X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Fproducer%2Faudio%2Faudio_decoder.h;h=b70a307b30d519875ed8c4620cd3221d144de64a;hb=58439eaecd6ed455b187e9965cf333073ead46de;hp=f5c705f2f8155f2cccfda8c69078af83757121a4;hpb=65d1a0f14182438d8484d3bcf7c626f1e238972f;p=casparcg diff --git a/modules/ffmpeg/producer/audio/audio_decoder.h b/modules/ffmpeg/producer/audio/audio_decoder.h index f5c705f2f..b70a307b3 100644 --- a/modules/ffmpeg/producer/audio/audio_decoder.h +++ b/modules/ffmpeg/producer/audio/audio_decoder.h @@ -19,29 +19,48 @@ */ #pragma once -#include "../packet.h" +#include -#include - -#include +#include #include -#include +#include #include -struct AVCodecContext; +struct AVPacket; +struct AVFormatContext; namespace caspar { - + +namespace core { + +struct video_format_desc; + +} + +namespace ffmpeg { + class audio_decoder : boost::noncopyable { public: - explicit audio_decoder(AVCodecContext& codec_context, const core::video_format_desc& format_desc); - std::vector> execute(const packet& audio_packet); + + typedef Concurrency::ISource token_t; + typedef Concurrency::ISource> source_t; + typedef Concurrency::ITarget> target_t; + + explicit audio_decoder(token_t& active_token, + source_t& source, + target_t& target, + const safe_ptr& context, + const core::video_format_desc& format_desc); + + int64_t nb_frames() const; + private: + struct implementation; - std::shared_ptr impl_; + safe_ptr impl_; }; -} \ No newline at end of file +}} \ No newline at end of file