virtual void initialize(const video_format_desc& format_desc) = 0;\r
virtual std::wstring print() const = 0;\r
virtual bool has_synchronization_clock() const {return true;}\r
- virtual const core::video_format_desc& get_video_format_desc() const = 0; // nothrow\r
virtual size_t buffer_depth() const = 0;\r
\r
static const safe_ptr<frame_consumer>& empty()\r
virtual void initialize(const video_format_desc&){}\r
virtual std::wstring print() const {return L"empty";}\r
virtual bool has_synchronization_clock() const {return false;}\r
- virtual const core::video_format_desc& get_video_format_desc() const{return format_desc;}; // nothrow\r
virtual size_t buffer_depth() const {return 0;};\r
};\r
static safe_ptr<frame_consumer> consumer = make_safe<empty_frame_consumer>();\r
CASPAR_LOG(info) << print() << L" Shutting down."; \r
}\r
\r
- const core::video_format_desc& get_video_format_desc() const\r
- {\r
- return format_desc_;\r
- }\r
-\r
void enable_video_output()\r
{\r
if(!BLUE_PASS(set_card_property(blue_, VIDEO_BLACKGENERATOR, 0)))\r
const size_t device_index_;\r
const bool embedded_audio_;\r
const bool key_only_;\r
- core::video_format_desc format_desc_;\r
public:\r
\r
bluefish_consumer_proxy(size_t device_index, bool embedded_audio, bool key_only)\r
\r
virtual void initialize(const core::video_format_desc& format_desc)\r
{\r
- format_desc_ = format_desc;\r
consumer_.reset(new bluefish_consumer(format_desc, device_index_, embedded_audio_, key_only_));\r
}\r
\r
consumer_->send(frame);\r
return true;\r
}\r
-\r
- virtual const core::video_format_desc& get_video_format_desc() const\r
- {\r
- return consumer_->get_video_format_desc();\r
- }\r
- \r
+ \r
virtual std::wstring print() const\r
{\r
- if(consumer_)\r
- consumer_->print();\r
-\r
- return L"bluefish [" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
+ return consumer_ ? consumer_->print() : L"bluefish_consumer";\r
}\r
\r
size_t buffer_depth() const\r
}\r
}\r
\r
- const core::video_format_desc& get_video_format_desc() const\r
- {\r
- return format_desc_;\r
- }\r
-\r
void set_latency(bool low_latency)\r
{ \r
if(!low_latency)\r
{\r
const configuration config_;\r
com_context<decklink_consumer> context_;\r
- core::video_format_desc format_desc_;\r
public:\r
\r
decklink_consumer_proxy(const configuration& config)\r
\r
virtual void initialize(const core::video_format_desc& format_desc)\r
{\r
- format_desc_ = format_desc;\r
- context_.reset([&]{return new decklink_consumer(config_, format_desc_);}); \r
+ context_.reset([&]{return new decklink_consumer(config_, format_desc);}); \r
\r
CASPAR_LOG(info) << print() << L" Successfully Initialized."; \r
}\r
virtual std::wstring print() const\r
{\r
return context_ ? context_->print() : L"decklink_consumer";\r
- }\r
- \r
- virtual const core::video_format_desc& get_video_format_desc() const\r
- {\r
- return format_desc_;\r
- }\r
+ } \r
\r
virtual size_t buffer_depth() const\r
{\r
tbb::atomic<bool> is_running_;\r
\r
core::video_format_desc format_desc_;\r
- int preroll_count_;\r
public:\r
oal_consumer() \r
: container_(16)\r
- , preroll_count_(0)\r
{\r
graph_->add_guide("tick-time", 0.5);\r
graph_->set_color("tick-time", diagnostics::color(0.0f, 0.6f, 0.9f)); \r
{\r
return L"oal[" + format_desc_.name + L"]";\r
}\r
-\r
- virtual const core::video_format_desc& get_video_format_desc() const\r
- {\r
- return format_desc_;\r
- }\r
-\r
+ \r
virtual size_t buffer_depth() const\r
{\r
return 2;\r
}\r
}\r
\r
- const core::video_format_desc& get_video_format_desc() const\r
- {\r
- return format_desc_;\r
- }\r
-\r
safe_ptr<AVFrame> get_av_frame()\r
{ \r
safe_ptr<AVFrame> av_frame(avcodec_alloc_frame(), av_free); \r
{\r
return false;\r
}\r
-\r
- virtual const core::video_format_desc& get_video_format_desc() const\r
- {\r
- return consumer_->get_video_format_desc();\r
- }\r
-\r
+ \r
virtual size_t buffer_depth() const\r
{\r
return 1;\r