X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Fproducer%2Faudio%2Faudio_decoder.h;h=99f6e398be358d3342bb7c44b94b1761b28314fd;hb=c537308072c50a6b8bba9fb5db7bc837aeae6ce7;hp=6121fbc10bace930fc6897cf9e322ecd79b61a13;hpb=76f37af71c3da42bca41ba008e27ab8c8f17589a;p=casparcg diff --git a/modules/ffmpeg/producer/audio/audio_decoder.h b/modules/ffmpeg/producer/audio/audio_decoder.h index 6121fbc10..99f6e398b 100644 --- a/modules/ffmpeg/producer/audio/audio_decoder.h +++ b/modules/ffmpeg/producer/audio/audio_decoder.h @@ -1,45 +1,59 @@ -/* -* copyright (c) 2010 Sveriges Television AB -* -* This file is part of CasparCG. -* -* CasparCG is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* CasparCG is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. - -* You should have received a copy of the GNU General Public License -* along with CasparCG. If not, see . -* -*/ -#pragma once - -#include - -#include - -#include - -#include -#include - -struct AVCodecContext; - -namespace caspar { - -class audio_decoder : boost::noncopyable -{ -public: - explicit audio_decoder(AVCodecContext& codec_context, const core::video_format_desc& format_desc); - std::vector> execute(std::shared_ptr&& audio_packet); -private: - struct implementation; - std::shared_ptr impl_; -}; - -} \ No newline at end of file +/* +* Copyright (c) 2011 Sveriges Television AB +* +* This file is part of CasparCG (www.casparcg.com). +* +* CasparCG is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* CasparCG is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with CasparCG. If not, see . +* +* Author: Robert Nagy, ronag89@gmail.com +*/ + +#pragma once + +#include +#include + +#include + +#include + +#include + +struct AVPacket; +struct AVFormatContext; + +namespace caspar { namespace ffmpeg { + +class audio_decoder : public boost::noncopyable +{ +public: + explicit audio_decoder(class input& input, const core::video_format_desc& format_desc, int audio_stream_index); + + audio_decoder(audio_decoder&& other); + audio_decoder& operator=(audio_decoder&& other); + + std::shared_ptr operator()(); + + uint32_t nb_frames() const; + + std::wstring print() const; + + core::monitor::subject& monitor_output(); + +private: + struct impl; + spl::shared_ptr impl_; +}; + +}} \ No newline at end of file