4 * Copyright (C) 2005-2013 Team XBMC
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with XBMC; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 #include "DVDAudioCodec.h"
24 #include "DllAvCodec.h"
25 #include "DllAvFormat.h"
26 #include "DllAvUtil.h"
27 #include "DllSwResample.h"
29 class CDVDAudioCodecFFmpeg : public CDVDAudioCodec
32 CDVDAudioCodecFFmpeg();
33 virtual ~CDVDAudioCodecFFmpeg();
34 virtual bool Open(CDVDStreamInfo &hints, CDVDCodecOptions &options);
35 virtual void Dispose();
36 virtual int Decode(uint8_t* pData, int iSize);
37 virtual int GetData(uint8_t** dst);
39 virtual int GetChannels();
40 virtual CAEChannelInfo GetChannelMap();
41 virtual int GetSampleRate();
42 virtual int GetEncodedSampleRate();
43 virtual enum AEDataFormat GetDataFormat();
44 virtual const char* GetName() { return "FFmpeg"; }
45 virtual int GetBufferSize() { return m_iBuffered; }
46 virtual int GetBitRate();
49 AVCodecContext* m_pCodecContext;
50 SwrContext* m_pConvert;
51 enum AVSampleFormat m_iSampleFormat;
52 CAEChannelInfo m_channelLayout;
59 int m_iBufferTotalSize2;
67 DllAvCodec m_dllAvCodec;
68 DllAvUtil m_dllAvUtil;
69 DllSwResample m_dllSwResample;
71 void BuildChannelMap();
72 void ConvertToFloat();