X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Fproducer%2Faudio%2Faudio_decoder.h;h=99f6e398be358d3342bb7c44b94b1761b28314fd;hb=c537308072c50a6b8bba9fb5db7bc837aeae6ce7;hp=984799568f8289a2b4ce76cb59fd17d3fadc35fb;hpb=d929026dad7810a6e8fb1d7131d09aa78dfcfa00;p=casparcg diff --git a/modules/ffmpeg/producer/audio/audio_decoder.h b/modules/ffmpeg/producer/audio/audio_decoder.h index 984799568..99f6e398b 100644 --- a/modules/ffmpeg/producer/audio/audio_decoder.h +++ b/modules/ffmpeg/producer/audio/audio_decoder.h @@ -1,64 +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 AVPacket; -struct AVFormatContext; - -namespace caspar { - -namespace core { - -struct video_format_desc; - -} - -namespace ffmpeg { - -class audio_decoder : boost::noncopyable -{ -public: - - typedef Concurrency::ISource> source_t; - typedef Concurrency::ITarget> target_t; - - explicit audio_decoder(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; - safe_ptr impl_; -}; - +/* +* 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