- Main Page
- Namespaces
- Classes
- Files
- Directories

- File List
- File Members

# AVI2AC3Filter.h

    00001 /*
    00002  *      Copyright (C) 2003-2005 Gabest
    00003  *      http://www.gabest.org
    00004  *
    00005  *  This Program is free software; you can redistribute it and/or modify
    00006  *  it under the terms of the GNU General Public License as published by
    00007  *  the Free Software Foundation; either version 2, or (at your option)
    00008  *  any later version.
    00009  *
    00010  *  This Program is distributed in the hope that it will be useful,
    00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    00013  *  GNU General Public License for more details.
    00014  *
    00015  *  You should have received a copy of the GNU General Public License
    00016  *  along with GNU Make; see the file COPYING.  If not, write to
    00017  *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
    00018  *  http://www.gnu.org/copyleft/gpl.html
    00019  *
    00020  */
    00021
    00022 #pragma once
    00023
    00024 /*  AC3 audio
    00025
    00026     wFormatTag          WAVE_FORMAT_DOLBY_AC3
    00027     nChannels           1 -6 channels valid
    00028     nSamplesPerSec      48000, 44100, 32000
    00029     nAvgByesPerSec      4000 to 80000
    00030     nBlockAlign         128 - 3840
    00031     wBitsPerSample      Up to 24 bits - (in the original)
    00032
    00033 */
    00034
    00035 typedef struct tagDOLBYAC3WAVEFORMAT
    00036 {
    00037     WAVEFORMATEX     wfx;
    00038     BYTE             bBigEndian;       // TRUE = Big Endian, FALSE little endian
    00039     BYTE             bsid;
    00040     BYTE             lfeon;
    00041     BYTE             copyrightb;
    00042     BYTE             nAuxBitsCode;  //  Aux bits per frame
    00043 } DOLBYAC3WAVEFORMAT;
    00044
    00045 //
    00046 // CAVI2AC3Filter
    00047 //
    00048
    00049 [uuid("93230DD0-7B3C-4efb-AFBB-DC380FEC9E6B")]
    00050 class CAVI2AC3Filter : public CTransformFilter
    00051 {
    00052         bool CheckAC3(const CMediaType* pmt);
    00053         bool CheckDTS(const CMediaType* pmt);
    00054         bool CheckWAVEAC3(const CMediaType* pmt);
    00055         bool CheckWAVEDTS(const CMediaType* pmt);
    00056
    00057 public:
    00058         CAVI2AC3Filter(LPUNKNOWN lpunk, HRESULT* phr);
    00059         virtual ~CAVI2AC3Filter();
    00060
    00061         HRESULT Transform(IMediaSample* pIn, IMediaSample* pOut);
    00062         HRESULT CheckInputType(const CMediaType* mtIn);
    00063         HRESULT CheckTransform(const CMediaType* mtIn, const CMediaType* mtOut);
    00064         HRESULT DecideBufferSize(IMemAllocator* pAllocator, ALLOCATOR_PROPERTIES* pProperties);
    00065         HRESULT GetMediaType(int iPosition, CMediaType* pMediaType);
    00066 };