: device_index(1)\r
, embedded_audio(false)\r
, internal_key(false)\r
- , low_latency(true)\r
+ , low_latency(false)\r
, key_only(false)\r
, base_buffer_depth(3)\r
, buffer_depth(base_buffer_depth + (low_latency ? 0 : 1) + (embedded_audio ? 1 : 0)){}\r
\r
\r
/* File created by MIDL compiler version 7.00.0555 */\r
-/* at Sun Nov 27 16:26:23 2011\r
+/* at Mon Nov 28 22:42:59 2011\r
*/\r
/* Compiler settings for interop\DeckLinkAPI.idl:\r
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
\r
\r
/* File created by MIDL compiler version 7.00.0555 */\r
-/* at Sun Nov 27 16:26:23 2011\r
+/* at Mon Nov 28 22:42:59 2011\r
*/\r
/* Compiler settings for interop\DeckLinkAPI.idl:\r
Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 7.00.0555 \r
format_desc.audio_sample_rate, codec_context_->sample_rate,\r
AV_SAMPLE_FMT_S32, codec_context_->sample_fmt)\r
, buffer1_(AVCODEC_MAX_AUDIO_FRAME_SIZE*2)\r
- , nb_frames_(context->streams[index_]->nb_frames)\r
+ , nb_frames_(0)//context->streams[index_]->nb_frames)\r
{ \r
file_frame_number_ = 0;\r
CASPAR_LOG(debug) << "[audio_decoder] " << context->streams[index_]->codec->codec->long_name; \r
{\r
return packets_.size() > 10;\r
}\r
+\r
+ int64_t nb_frames() const\r
+ {\r
+ return std::max<int64_t>(nb_frames_, file_frame_number_);\r
+ }\r
};\r
\r
audio_decoder::audio_decoder(const safe_ptr<AVFormatContext>& context, const core::video_format_desc& format_desc) : impl_(new implementation(context, format_desc)){}\r
void audio_decoder::push(const std::shared_ptr<AVPacket>& packet){impl_->push(packet);}\r
bool audio_decoder::ready() const{return impl_->ready();}\r
std::shared_ptr<core::audio_buffer> audio_decoder::poll(){return impl_->poll();}\r
-int64_t audio_decoder::nb_frames() const{return impl_->nb_frames_;}\r
+int64_t audio_decoder::nb_frames() const{return impl_->nb_frames();}\r
size_t audio_decoder::file_frame_number() const{return impl_->file_frame_number_;}\r
\r
}}
\ No newline at end of file
\r
virtual int64_t file_nb_frames() const override\r
{\r
- return video_decoder_ ? video_decoder_->nb_frames() : std::numeric_limits<int64_t>::max();\r
+ int64_t file_nb_frames = 0;\r
+ file_nb_frames = std::max(file_nb_frames, video_decoder_ ? video_decoder_->nb_frames() : 0);\r
+ file_nb_frames = std::max(file_nb_frames, audio_decoder_ ? audio_decoder_->nb_frames() : 0);\r
+ return file_nb_frames;\r
}\r
\r
virtual int64_t frame_number() const override\r
pix_fmts_.push_back(PIX_FMT_YUV422P);\r
pix_fmts_.push_back(PIX_FMT_YUV420P);\r
pix_fmts_.push_back(PIX_FMT_YUV411P);\r
+ pix_fmts_.push_back(PIX_FMT_BGRA);\r
pix_fmts_.push_back(PIX_FMT_ARGB);\r
pix_fmts_.push_back(PIX_FMT_RGBA);\r
pix_fmts_.push_back(PIX_FMT_ABGR);\r
\r
auto stream = format_context_->streams[default_stream_index_];\r
auto codec = stream->codec;\r
- auto fixed_target = (target*stream->time_base.den*codec->time_base.num)/(stream->time_base.num*codec->time_base.den);\r
+ auto fixed_target = (target*stream->time_base.den*codec->time_base.num)/(stream->time_base.num*codec->time_base.den)*codec->ticks_per_frame;\r
\r
THROW_ON_ERROR2(avformat_seek_file(format_context_.get(), default_stream_index_, std::numeric_limits<int64_t>::min(), fixed_target, std::numeric_limits<int64_t>::max(), 0), print()); \r
\r
s->thread_opaque = &dummy_opaque; \r
s->execute = thread_execute;\r
s->execute2 = thread_execute2;\r
- s->thread_count = tbb::tbb_thread::hardware_concurrency(); // MAX_THREADS; // We are using a task-scheduler, so use as many "threads/tasks" as possible. \r
+ s->thread_count = MAX_THREADS;//tbb::tbb_thread::hardware_concurrency(); // MAX_THREADS; // We are using a task-scheduler, so use as many "threads/tasks" as possible. \r
\r
CASPAR_LOG(info) << "Initialized ffmpeg tbb context.";\r
}\r
\r
int tbb_avcodec_open(AVCodecContext* avctx, AVCodec* codec)\r
{\r
- CodecID supported_codecs[] = {CODEC_ID_MPEG2VIDEO, CODEC_ID_PRORES};\r
+ CodecID supported_codecs[] = {CODEC_ID_MPEG2VIDEO, CODEC_ID_PRORES, CODEC_ID_FFV1};\r
\r
avctx->thread_count = 1;\r
// Some codecs don't like to have multiple multithreaded decoding instances. Only enable for those we know work.\r
{\r
return packets_.size() > 10;\r
}\r
+\r
+ int64_t nb_frames() const\r
+ {\r
+ return std::max<int64_t>(nb_frames_, file_frame_number_);\r
+ }\r
};\r
\r
video_decoder::video_decoder(const safe_ptr<AVFormatContext>& context) : impl_(new implementation(context)){}\r
void video_decoder::push(const std::shared_ptr<AVPacket>& packet){impl_->push(packet);}\r
std::shared_ptr<AVFrame> video_decoder::poll(){return impl_->poll();}\r
bool video_decoder::ready() const{return impl_->ready();}\r
-int64_t video_decoder::nb_frames() const{return impl_->nb_frames_;}\r
+int64_t video_decoder::nb_frames() const{return impl_->nb_frames();}\r
size_t video_decoder::width() const{return impl_->width_;}\r
size_t video_decoder::height() const{return impl_->height_;}\r
bool video_decoder::is_progressive() const{return impl_->is_progressive_;}\r
<?xml version="1.0" encoding="utf-8"?>\r
<configuration>\r
<paths>\r
- <media-path>C:\casparmedia\_media\</media-path>\r
- <log-path>log\</log-path>\r
- <data-path>data\</data-path>\r
- <template-path>C:\casparmedia\_templates\</template-path>\r
+ <media-path>F:\casparcg\_media\</media-path>\r
+ <log-path>F:\casparcg\_log\</log-path>\r
+ <data-path>F:\casparcg\_data\</data-path>\r
+ <template-path>F:\casparcg\_templates\</template-path>\r
</paths>\r
<channels>\r
<channel>\r
- <video-mode>NTSC</video-mode>\r
+ <video-mode>1080i5000</video-mode>\r
<consumers>\r
- <screen>\r
- </screen>\r
+ <decklink>\r
+ </decklink>\r
</consumers>\r
</channel>\r
</channels>\r