\r
#include <common/memory/safe_ptr.h>\r
\r
+#include <common/env.h>\r
+\r
namespace caspar { namespace core {\r
+\r
+size_t consumer_buffer_depth()\r
+{\r
+ return env::properties().get("configuration.consumers.buffer-depth", 5);\r
+}\r
\r
std::vector<const consumer_factory_t> g_factories;\r
\r
#include <string>\r
#include <vector>\r
\r
-static const size_t CONSUMER_BUFFER_DEPTH = 6;\r
-\r
namespace caspar { namespace core {\r
\r
class read_frame;\r
struct video_format_desc;\r
\r
+size_t consumer_buffer_depth();\r
+\r
struct frame_consumer : boost::noncopyable\r
{\r
virtual ~frame_consumer() {}\r
, embedded_audio_(embedded_audio)\r
, executor_(print())\r
{\r
- executor_.set_capacity(CONSUMER_BUFFER_DEPTH);\r
+ executor_.set_capacity(core::consumer_buffer_depth());\r
\r
graph_ = diagnostics::create_graph(narrow(print()));\r
graph_->add_guide("tick-time", 0.5);\r
, external_key(false)\r
, low_latency(false)\r
, key_only(false)\r
- , buffer_depth(CONSUMER_BUFFER_DEPTH){}\r
+ , buffer_depth(core::consumer_buffer_depth()){}\r
};\r
\r
class decklink_frame_muxer : public IDeckLinkVideoFrame\r
<< boost::errinfo_api_function("avformat_alloc_context"));\r
}\r
\r
- executor_.set_capacity(CONSUMER_BUFFER_DEPTH);\r
+ executor_.set_capacity(core::consumer_buffer_depth());\r
\r
oc_->oformat = av_guess_format(nullptr, filename_.c_str(), nullptr);\r
if (!oc_->oformat)\r
AV_SAMPLE_FMT_S16, codec_context_->sample_fmt,\r
16, 10, 0, 0.8);\r
\r
- CASPAR_LOG(warning) << L" Invalid audio format.";\r
+ CASPAR_LOG(warning) << L" Invalid audio format. Resampling.";\r
\r
if(resampler)\r
resampler_.reset(resampler, audio_resample_close);\r
}\r
\r
#include <boost/thread/once.hpp>\r
-
-typedef struct {
- int mode;
- int parity;
- int frame_pending;
- int auto_enable;
- AVFilterBufferRef *cur;
- AVFilterBufferRef *next;
- AVFilterBufferRef *prev;
- AVFilterBufferRef *out;
- void (*filter_line)(uint8_t *dst,
- uint8_t *prev, uint8_t *cur, uint8_t *next,
- int w, int prefs, int mrefs, int parity, int mode);
- const AVPixFmtDescriptor *csp;
+\r
+typedef struct {\r
+ int mode;\r
+ int parity;\r
+ int frame_pending;\r
+ int auto_enable;\r
+ AVFilterBufferRef *cur;\r
+ AVFilterBufferRef *next;\r
+ AVFilterBufferRef *prev;\r
+ AVFilterBufferRef *out;\r
+ void (*filter_line)(uint8_t *dst,\r
+ uint8_t *prev, uint8_t *cur, uint8_t *next,\r
+ int w, int prefs, int mrefs, int parity, int mode);\r
+ const AVPixFmtDescriptor *csp;\r
} YADIFContext;\r
\r
struct scalable_yadif_context\r
graph_->add_guide("tick-time", 0.5);\r
graph_->set_color("tick-time", diagnostics::color(0.1f, 0.7f, 0.8f));\r
is_running_ = true;\r
- input_.set_capacity(CONSUMER_BUFFER_DEPTH-2);\r
+ input_.set_capacity(core::consumer_buffer_depth()-2);\r
\r
sf::SoundStream::Initialize(2, 48000);\r
Play(); \r
, screen_index_(screen_index)\r
, format_desc_(format_desc_)\r
, graph_(diagnostics::create_graph(narrow(print())))\r
- , frame_buffer_(CONSUMER_BUFFER_DEPTH)\r
+ , frame_buffer_(core::consumer_buffer_depth())\r
, executor_(print())\r
{ \r
graph_->add_guide("frame-time", 0.5);\r