\r
struct configuration\r
{\r
- int device_index;\r
+ int device_index;\r
bool embedded_audio;\r
bool internal_key;\r
bool low_latency;\r
bool key_only;\r
- int base_buffer_depth;\r
- int buffer_depth;\r
+ int base_buffer_depth;\r
\r
configuration()\r
: device_index(1)\r
, low_latency(true)\r
, key_only(false)\r
, base_buffer_depth(3)\r
- , buffer_depth(base_buffer_depth + (low_latency ? 0 : 1) + (embedded_audio ? 1 : 0)){}\r
+ {\r
+ }\r
+\r
+ int buffer_depth() const\r
+ {\r
+ return base_buffer_depth + (low_latency ? 0 : 1) + (embedded_audio ? 1 : 0);\r
+ }\r
};\r
\r
class decklink_frame : public IDeckLinkVideoFrame\r
, keyer_(decklink_)\r
, model_name_(get_model_name(decklink_))\r
, format_desc_(format_desc)\r
- , buffer_size_(config.buffer_depth) // Minimum buffer-size 3.\r
+ , buffer_size_(config.buffer_depth()) // Minimum buffer-size 3.\r
, video_scheduled_(0)\r
, audio_scheduled_(0)\r
, preroll_count_(0)\r
\r
virtual int buffer_depth() const override\r
{\r
- return config_.buffer_depth;\r
+ return config_.buffer_depth();\r
}\r
\r
virtual int index() const override\r
#include <common/diagnostics/graph.h>\r
#include <common/log.h>\r
#include <common/utf.h>\r
+#include <common/env.h>\r
\r
#include <core/consumer/frame_consumer.h>\r
#include <core/mixer/audio/audio_util.h>\r
\r
virtual int buffer_depth() const override\r
{\r
- return 6;\r
+ return 3;\r
}\r
\r
// oal_consumer\r