\r
class decklink_producer : boost::noncopyable, public IDeckLinkInputCallback\r
{ \r
- CComPtr<IDeckLink> decklink_;\r
- CComQIPtr<IDeckLinkInput> input_;\r
- \r
- const std::wstring model_name_;\r
- const core::video_format_desc format_desc_;\r
- const size_t device_index_;\r
-\r
- spl::shared_ptr<diagnostics::graph> graph_;\r
- boost::timer tick_timer_;\r
- boost::timer frame_timer_;\r
- \r
- tbb::atomic<int> flags_;\r
- spl::shared_ptr<core::frame_factory> frame_factory_;\r
- std::vector<int> audio_cadence_;\r
+ spl::shared_ptr<diagnostics::graph> graph_;\r
+ boost::timer tick_timer_;\r
+ boost::timer frame_timer_;\r
\r
- tbb::concurrent_bounded_queue<spl::shared_ptr<core::draw_frame>> frame_buffer_;\r
+ CComPtr<IDeckLink> decklink_;\r
+ CComQIPtr<IDeckLinkInput> input_;\r
+ CComQIPtr<IDeckLinkAttributes > attributes_;\r
+ \r
+ const std::wstring model_name_;\r
+ const size_t device_index_;\r
+ const std::wstring filter_;\r
+ \r
+ core::video_format_desc format_desc_;\r
+ std::vector<int> audio_cadence_;\r
+ boost::circular_buffer<size_t> sync_buffer_;\r
+ ffmpeg::frame_muxer muxer_;\r
+ \r
+ tbb::atomic<int> flags_;\r
+ spl::shared_ptr<core::frame_factory> frame_factory_;\r
\r
- std::exception_ptr exception_;\r
- \r
- ffmpeg::frame_muxer muxer_;\r
+ tbb::concurrent_bounded_queue<\r
+ spl::shared_ptr<core::draw_frame>> frame_buffer_;\r
\r
- boost::circular_buffer<size_t> sync_buffer_;\r
+ std::exception_ptr exception_; \r
\r
public:\r
decklink_producer(const core::video_format_desc& format_desc, size_t device_index, const spl::shared_ptr<core::frame_factory>& frame_factory, const std::wstring& filter)\r
: decklink_(get_device(device_index))\r
, input_(decklink_)\r
+ , attributes_(decklink_)\r
, model_name_(get_model_name(decklink_))\r
- , format_desc_(format_desc)\r
, device_index_(device_index)\r
- , frame_factory_(frame_factory)\r
- , audio_cadence_(frame_factory->get_video_format_desc().audio_cadence)\r
+ , filter_(filter)\r
+ , format_desc_(format_desc)\r
+ , audio_cadence_(format_desc.audio_cadence)\r
, muxer_(format_desc.fps, frame_factory, filter)\r
, sync_buffer_(format_desc.audio_cadence.size())\r
- { \r
+ , frame_factory_(frame_factory)\r
+ { \r
flags_ = 0;\r
frame_buffer_.set_capacity(2);\r
\r
\r
std::wstring print() const\r
{\r
- return model_name_ + L" [" + boost::lexical_cast<std::wstring>(device_index_) + L"]";\r
+ return model_name_ + L" [" + boost::lexical_cast<std::wstring>(device_index_) + L"|" + format_desc_.name + L"]";\r
}\r
};\r
\r
\r
auto device_index = get_param(L"DEVICE", params, -1);\r
if(device_index == -1)\r
- device_index = params.size() > 1 ? boost::lexical_cast<int>(params.at(1)) : 1;\r
+ device_index = boost::lexical_cast<int>(params.at(1));\r
\r
auto filter_str = get_param(L"FILTER", params); \r
auto length = get_param(L"LENGTH", params, std::numeric_limits<uint32_t>::max()); \r