1 #ifndef _ENCODERVORBIS_H
2 #define _ENCODERVORBIS_H
5 * Copyright (C) 2005-2013 Team XBMC
8 * This Program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
13 * This Program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with XBMC; see the file COPYING. If not, see
20 * <http://www.gnu.org/licenses/>.
26 #include "DllVorbis.h"
27 #include "DllVorbisEnc.h"
29 class CEncoderVorbis : public CEncoder
33 virtual ~CEncoderVorbis() {};
34 bool Init(const char* strFile, int iInChannels, int iInRate, int iInBits);
35 int Encode(int nNumBytesRead, BYTE* pbtStream);
37 void AddTag(int key, const char* value);
40 vorbis_info m_sVorbisInfo; /* struct that stores all the static vorbis bitstream settings */
41 vorbis_dsp_state m_sVorbisDspState; /* central working state for the packet->PCM decoder */
42 vorbis_block m_sVorbisBlock; /* local working space for packet->PCM decode */
43 vorbis_comment m_sVorbisComment;
45 ogg_stream_state m_sOggStreamState; /* take physical pages, weld into a logical stream of packets */
46 ogg_page m_sOggPage; /* one Ogg bitstream page. Vorbis packets are inside */
47 ogg_packet m_sOggPacket; /* one raw packet of data for decode */
52 DllVorbis m_VorbisDll;
53 DllVorbisEnc m_VorbisEncDll;
56 #endif // _ENCODERVORBIS_H