if(loop_)\r
return std::numeric_limits<int64_t>::max();\r
\r
- // This function estimates nb_frames until input has read all packets for one loop, at which point the count should be accurate.\r
-\r
- int64_t nb_frames = input_.nb_frames();\r
- if(input_.nb_loops() < 1) // input still hasn't counted all frames\r
- {\r
- auto video_nb_frames = video_decoder_ ? video_decoder_->nb_frames() : std::numeric_limits<int64_t>::max();\r
- //auto audio_nb_frames = audio_decoder_ ? audio_decoder_->nb_frames() : std::numeric_limits<int64_t>::max();\r
-\r
- nb_frames = std::max(nb_frames, video_nb_frames);\r
- }\r
+ auto nb_frames = file_nb_frames();\r
\r
nb_frames = std::min(static_cast<int64_t>(length_), nb_frames);\r
nb_frames = muxer_->calc_nb_frames(nb_frames);\r
return L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"|" \r
+ boost::lexical_cast<std::wstring>(video_decoder_->width()) + L"x" + boost::lexical_cast<std::wstring>(video_decoder_->height())\r
+ (video_decoder_->is_progressive() ? L"p" : L"i") + boost::lexical_cast<std::wstring>(video_decoder_->is_progressive() ? video_decoder_->fps() : 2.0 * video_decoder_->fps())\r
- + L"|" + boost::lexical_cast<std::wstring>(nb_frames()) + L"]";\r
+ + L"|" + boost::lexical_cast<std::wstring>(file_nb_frames()) + L"]";\r
}\r
\r
return L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"]";\r
}\r
\r
// ffmpeg_producer\r
+\r
+ int64_t file_nb_frames() const\r
+ {\r
+ // This function estimates nb_frames until input has read all packets for one loop, at which point the count should be accurate.\r
+\r
+ int64_t nb_frames = input_.nb_frames();\r
+ if(input_.nb_loops() < 1) // input still hasn't counted all frames\r
+ {\r
+ auto video_nb_frames = video_decoder_ ? video_decoder_->nb_frames() : std::numeric_limits<int64_t>::max();\r
+ //auto audio_nb_frames = audio_decoder_ ? audio_decoder_->nb_frames() : std::numeric_limits<int64_t>::max();\r
+\r
+ nb_frames = std::max(nb_frames, video_nb_frames);\r
+ }\r
+ return nb_frames;\r
+ }\r
\r
std::wstring do_call(const std::wstring& param)\r
{\r
<?xml version="1.0" encoding="utf-8"?>\r
<configuration>\r
<paths>\r
- <media-path>media\</media-path>\r
+ <media-path>C:\casparmedia\_media\</media-path>\r
<log-path>log\</log-path>\r
<data-path>data\</data-path>\r
<template-path>templates\</template-path>\r
<channel>\r
<video-mode>PAL</video-mode>\r
<consumers>\r
- <decklink>\r
- <device>1</device>\r
- <embedded-audio>true</embedded-audio>\r
- </decklink>\r
+ <screen>\r
+ </screen>\r
</consumers>\r
</channel>\r
</channels>\r