<ClInclude Include="compiler\vs\disable_silly_warnings.h" />\r
<ClInclude Include="concurrency\executor.h" />\r
<ClInclude Include="concurrency\governor.h" />\r
+ <ClInclude Include="concurrency\throw_away.h" />\r
<ClInclude Include="diagnostics\graph.h" />\r
<ClInclude Include="exception\exceptions.h" />\r
<ClInclude Include="exception\win32_exception.h" />\r
#include "video/video_decoder.h"\r
#include "../ffmpeg_error.h"\r
\r
+#include <common/concurrency/throw_away.h>\r
#include <common/env.h>\r
-#include <common/utility/assert.h>\r
#include <common/diagnostics/graph.h>\r
+#include <common/utility/assert.h>\r
\r
#include <core/video_format.h>\r
#include <core/producer/frame_producer.h>\r
const bool loop_;\r
const size_t length_;\r
\r
- call<input::target_element_t> throw_away_packets_;\r
- call<frame_muxer2::target_element_t> throw_away_frames_;\r
unbounded_buffer<input::target_element_t> packets_;\r
std::shared_ptr<unbounded_buffer<frame_muxer2::video_source_element_t>> video_;\r
std::shared_ptr<unbounded_buffer<frame_muxer2::audio_source_element_t>> audio_;\r
, start_(start)\r
, loop_(loop)\r
, length_(length)\r
- , throw_away_packets_([](const input::target_element_t&){})\r
- , throw_away_frames_([](const frame_muxer2::target_element_t&){})\r
, input_(packets_, graph_, filename_, loop, start, length)\r
, last_frame_(core::basic_frame::empty())\r
{ \r
\r
CASPAR_VERIFY(video_decoder_ || audio_decoder_, ffmpeg_error());\r
\r
- packets_.link_target(&throw_away_packets_);\r
+ link_throw_away(packets_);\r
muxer_.reset(new frame_muxer2(video_.get(), audio_.get(), frames_, video_decoder_ ? video_decoder_->fps() : frame_factory->get_video_format_desc().fps, frame_factory));\r
\r
graph_->set_color("underflow", diagnostics::color(0.6f, 0.3f, 0.9f)); \r
~ffmpeg_producer()\r
{\r
input_.stop(); \r
- frames_.link_target(&throw_away_frames_);\r
+ link_throw_away(frames_);\r
}\r
\r
virtual safe_ptr<core::basic_frame> receive(int hints)\r
#include <core/producer/frame/frame_factory.h>\r
#include <core/mixer/write_frame.h>\r
\r
-#include <common/env.h>\r
+#include <common/concurrency/throw_away.h>\r
#include <common/diagnostics/graph.h>\r
+#include <common/env.h>\r
#include <common/memory/memcpy.h>\r
#include <common/memory/memclr.h>\r
#include <common/utility/timer.h>\r
~flash_producer()\r
{\r
is_running_ = false;\r
- auto frame = core::basic_frame::empty();\r
- while(try_receive(frames_, frame)){}\r
+ link_throw_away(frames_);\r
agent::wait(this);\r
}\r
\r