X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fffmpeg%2Fproducer%2Faudio%2Faudio_decoder.h;h=0deb8292045c7bbb7162f407fc17ef9e0cb2a096;hb=726897adbf881d3b75f171fff24f2b917ba5f05a;hp=fc9789633499af6371395b039954a6f7b791109a;hpb=d5f9d08224fc07362c7da31176c78027662d8783;p=casparcg diff --git a/modules/ffmpeg/producer/audio/audio_decoder.h b/modules/ffmpeg/producer/audio/audio_decoder.h index fc9789633..0deb82920 100644 --- a/modules/ffmpeg/producer/audio/audio_decoder.h +++ b/modules/ffmpeg/producer/audio/audio_decoder.h @@ -1,49 +1,54 @@ -/* -* 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 - -struct AVStream; -struct AVCodecContext; - -namespace caspar { - -class audio_decoder : boost::noncopyable -{ -public: - explicit audio_decoder(const std::shared_ptr& context, const core::video_format_desc& format_desc); - - void push(const std::shared_ptr& packet); - bool ready() const; - std::vector>> poll(); - -private: - struct implementation; - safe_ptr impl_; -}; - -} \ No newline at end of file +/* +* Copyright 2013 Sveriges Television AB http://casparcg.com/ +* +* 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 + +struct AVPacket; +struct AVFrame; +struct AVFormatContext; + +namespace caspar { namespace ffmpeg { + +class audio_decoder : boost::noncopyable +{ +public: + explicit audio_decoder(const spl::shared_ptr& context, int out_samplerate); + + bool ready() const; + void push(const std::shared_ptr& packet); + std::shared_ptr poll(); + + int num_channels() const; + uint64_t ffmpeg_channel_layout() const; + + std::wstring print() const; +private: + struct implementation; + spl::shared_ptr impl_; +}; + +}}