- if(!video_packet.empty() && video_decoder_) // Video Decoding.\r
- {\r
- try\r
- {\r
- auto frame = video_decoder_->execute(this, video_packet);\r
- video_frame_channel_.push_back(std::move(frame));\r
- }\r
- catch(...)\r
- {\r
- CASPAR_LOG_CURRENT_EXCEPTION();\r
- video_decoder_.reset();\r
- CASPAR_LOG(warning) << print() << " removed video-stream.";\r
- }\r
- }\r
- }, \r
- [&] \r
- { \r
- if(!audio_packet.empty() && audio_decoder_) // Audio Decoding.\r
- {\r
- try\r
- {\r
- auto chunks = audio_decoder_->execute(audio_packet);\r
- audio_chunk_channel_.insert(audio_chunk_channel_.end(), chunks.begin(), chunks.end());\r
- }\r
- catch(...)\r
- {\r
- CASPAR_LOG_CURRENT_EXCEPTION();\r
- audio_decoder_.reset();\r
- CASPAR_LOG(warning) << print() << " removed audio-stream.";\r
- }\r
- }\r
+ video_decoder_.push(pkt);\r
+ audio_decoder_.push(pkt);\r
+ }\r
+ }\r
+ \r
+ if(!muxer_.video_ready())\r
+ {\r
+ tasks_.run([=]\r
+ {\r
+ video_timer_.restart();\r
+\r
+ auto video_frames = video_decoder_.poll();\r
+ BOOST_FOREACH(auto& video, video_frames) \r
+ muxer_.push(video, hints); \r
+\r
+ graph_->update_value("video-time", static_cast<float>(video_timer_.elapsed()*format_desc_.fps*0.5));\r