2 * Implements MIDI Parser.
7 * Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
40 #include "wine/debug.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
43 #include "quartz_private.h"
49 static const WCHAR QUARTZ_MIDIParser_Name[] =
50 { 'Q','u','i','c','k','T','i','m','e',' ','M','o','v','i','e',' ','P','a','r','s','e','r',0 };
51 static const WCHAR QUARTZ_MIDIParserInPin_Name[] =
53 static const WCHAR QUARTZ_MIDIParserOutPin_Name[] =
57 /****************************************************************************
63 typedef struct CMIDIParseImpl CMIDIParseImpl;
70 static HRESULT CMIDIParseImpl_InitParser( CParserImpl* pImpl, ULONG* pcStreams )
72 WARN("(%p,%p) stub\n",pImpl,pcStreams);
77 static HRESULT CMIDIParseImpl_UninitParser( CParserImpl* pImpl )
79 CMIDIParseImpl* This = (CMIDIParseImpl*)pImpl->m_pUserData;
88 QUARTZ_FreeMem( This );
89 pImpl->m_pUserData = NULL;
94 static LPCWSTR CMIDIParseImpl_GetOutPinName( CParserImpl* pImpl, ULONG nStreamIndex )
96 CMIDIParseImpl* This = (CMIDIParseImpl*)pImpl->m_pUserData;
98 TRACE("(%p,%lu)\n",This,nStreamIndex);
100 return QUARTZ_MIDIParserOutPin_Name;
103 static HRESULT CMIDIParseImpl_GetStreamType( CParserImpl* pImpl, ULONG nStreamIndex, AM_MEDIA_TYPE* pmt )
105 CMIDIParseImpl* This = (CMIDIParseImpl*)pImpl->m_pUserData;
107 FIXME("(%p) stub\n",This);
112 static HRESULT CMIDIParseImpl_CheckStreamType( CParserImpl* pImpl, ULONG nStreamIndex, const AM_MEDIA_TYPE* pmt )
114 CMIDIParseImpl* This = (CMIDIParseImpl*)pImpl->m_pUserData;
116 FIXME("(%p) stub\n",This);
121 static HRESULT CMIDIParseImpl_GetAllocProp( CParserImpl* pImpl, ALLOCATOR_PROPERTIES* pReqProp )
123 CMIDIParseImpl* This = (CMIDIParseImpl*)pImpl->m_pUserData;
125 FIXME("(%p,%p) stub\n",This,pReqProp);
132 static HRESULT CMIDIParseImpl_GetNextRequest( CParserImpl* pImpl, ULONG* pnStreamIndex, LONGLONG* pllStart, LONG* plLength, REFERENCE_TIME* prtStart, REFERENCE_TIME* prtStop, DWORD* pdwSampleFlags )
134 CMIDIParseImpl* This = (CMIDIParseImpl*)pImpl->m_pUserData;
136 FIXME("(%p) stub\n",This);
144 static HRESULT CMIDIParseImpl_ProcessSample( CParserImpl* pImpl, ULONG nStreamIndex, LONGLONG llStart, LONG lLength, IMediaSample* pSample )
146 CMIDIParseImpl* This = (CMIDIParseImpl*)pImpl->m_pUserData;
148 FIXME("(%p,%lu,%ld,%ld,%p)\n",This,nStreamIndex,(long)llStart,lLength,pSample);
156 static const struct ParserHandlers CMIDIParseImpl_Handlers =
158 CMIDIParseImpl_InitParser,
159 CMIDIParseImpl_UninitParser,
160 CMIDIParseImpl_GetOutPinName,
161 CMIDIParseImpl_GetStreamType,
162 CMIDIParseImpl_CheckStreamType,
163 CMIDIParseImpl_GetAllocProp,
164 CMIDIParseImpl_GetNextRequest,
165 CMIDIParseImpl_ProcessSample,
167 /* for IQualityControl */
168 NULL, /* pQualityNotify */
171 NULL, /* pGetSeekingCaps */
172 NULL, /* pIsTimeFormatSupported */
173 NULL, /* pGetCurPos */
174 NULL, /* pSetCurPos */
175 NULL, /* pGetDuration */
176 NULL, /* pGetStopPos */
177 NULL, /* pSetStopPos */
178 NULL, /* pGetPreroll */
181 HRESULT QUARTZ_CreateMIDIParser(IUnknown* punkOuter,void** ppobj)
183 return QUARTZ_CreateParser(
185 &CLSID_quartzMIDIParser,
186 QUARTZ_MIDIParser_Name,
187 QUARTZ_MIDIParserInPin_Name,
188 &CMIDIParseImpl_Handlers );