2 * Implements MPEG Audio Decoder(CLSID_CMpegAudioCodec)
4 * FIXME - what library can we use? SMPEG??
8 * Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38 #include "wine/debug.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
41 #include "quartz_private.h"
45 static const WCHAR CMPEGAudioDecoderImpl_FilterName[] =
46 {'M','P','E','G',' ','A','u','d','i','o',' ','D','e','c','o','d','e','r',0};
49 typedef struct CMPEGAudioDecoderImpl
52 } CMPEGAudioDecoderImpl;
55 /***************************************************************************
57 * CMPEGAudioDecoderImpl methods
61 static HRESULT CMPEGAudioDecoderImpl_Init( CTransformBaseImpl* pImpl )
63 CMPEGAudioDecoderImpl* This = pImpl->m_pUserData;
70 This = (CMPEGAudioDecoderImpl*)QUARTZ_AllocMem( sizeof(CMPEGAudioDecoderImpl) );
73 ZeroMemory( This, sizeof(CMPEGAudioDecoderImpl) );
74 pImpl->m_pUserData = This;
81 static HRESULT CMPEGAudioDecoderImpl_Cleanup( CTransformBaseImpl* pImpl )
83 CMPEGAudioDecoderImpl* This = pImpl->m_pUserData;
92 QUARTZ_FreeMem( This );
93 pImpl->m_pUserData = NULL;
98 static HRESULT CMPEGAudioDecoderImpl_CheckMediaType( CTransformBaseImpl* pImpl, const AM_MEDIA_TYPE* pmtIn, const AM_MEDIA_TYPE* pmtOut )
100 CMPEGAudioDecoderImpl* This = pImpl->m_pUserData;
102 FIXME("(%p)\n",This);
109 static HRESULT CMPEGAudioDecoderImpl_GetOutputTypes( CTransformBaseImpl* pImpl, const AM_MEDIA_TYPE* pmtIn, const AM_MEDIA_TYPE** ppmtAcceptTypes, ULONG* pcAcceptTypes )
111 CMPEGAudioDecoderImpl* This = pImpl->m_pUserData;
113 FIXME("(%p)\n",This);
120 static HRESULT CMPEGAudioDecoderImpl_GetAllocProp( CTransformBaseImpl* pImpl, const AM_MEDIA_TYPE* pmtIn, const AM_MEDIA_TYPE* pmtOut, ALLOCATOR_PROPERTIES* pProp, BOOL* pbTransInPlace, BOOL* pbTryToReuseSample )
122 CMPEGAudioDecoderImpl* This = pImpl->m_pUserData;
124 FIXME("(%p)\n",This);
131 static HRESULT CMPEGAudioDecoderImpl_BeginTransform( CTransformBaseImpl* pImpl, const AM_MEDIA_TYPE* pmtIn, const AM_MEDIA_TYPE* pmtOut, BOOL bReuseSample )
133 CMPEGAudioDecoderImpl* This = pImpl->m_pUserData;
135 FIXME("(%p,%p,%p,%d)\n",This,pmtIn,pmtOut,bReuseSample);
142 static HRESULT CMPEGAudioDecoderImpl_ProcessReceive( CTransformBaseImpl* pImpl, IMediaSample* pSampIn )
144 CMPEGAudioDecoderImpl* This = pImpl->m_pUserData;
146 FIXME("(%p)\n",This);
153 static HRESULT CMPEGAudioDecoderImpl_EndTransform( CTransformBaseImpl* pImpl )
155 CMPEGAudioDecoderImpl* This = pImpl->m_pUserData;
157 FIXME("(%p)\n",This);
164 static const TransformBaseHandlers transhandlers =
166 CMPEGAudioDecoderImpl_Init,
167 CMPEGAudioDecoderImpl_Cleanup,
168 CMPEGAudioDecoderImpl_CheckMediaType,
169 CMPEGAudioDecoderImpl_GetOutputTypes,
170 CMPEGAudioDecoderImpl_GetAllocProp,
171 CMPEGAudioDecoderImpl_BeginTransform,
172 CMPEGAudioDecoderImpl_ProcessReceive,
174 CMPEGAudioDecoderImpl_EndTransform,
177 HRESULT QUARTZ_CreateCMpegAudioCodec(IUnknown* punkOuter,void** ppobj)
179 return QUARTZ_CreateTransformBase(
181 &CLSID_CMpegAudioCodec,
182 CMPEGAudioDecoderImpl_FilterName,