Commit d359812d authored by Hidenori Takeshima's avatar Hidenori Takeshima Committed by Alexandre Julliard

Fixed some bugs.

Implemented IPropertyBag. Implemented some FilterMapper2 methods. Implemented AddSourceFilter. Implemented Render partially. Implemented Connect partially.
parent dbb618a8
......@@ -20,7 +20,6 @@ C_SRCS = \
complist.c \
csconv.c \
devenum.c \
devmon.c \
enumunk.c \
fgevent.c \
fgpass.c \
......
quartz.dll is the basic library of ActiveMovie/DirectShow.
TODO
- merge some C sources.
- implements all filters.
- handles plug-in distributor.
- implements some interfaces as plug-ins(???)
- implements ICM
- implements mciqtz(mci driver for quartz)
- avoid deadlock
- merge some C sources
- implement filters
- restruct color-space converter
- add FilterData to winedefault.reg for Connect() and Render()
- sort active filters in filter graph
- sort regfilters in Merit order
- fix deadlocks in Receive/EndOfStream
- handle plug-in distributor
- handle seeking
- implement some interfaces as plug-ins(???)
- implement ICM drivers (yuv converter)
- implement ACM drivers (g711)
- implement ACM wrapper (improve xform)
- implement mciqtz(mci driver for quartz)
- implement renderer
- handle notification correctly
known BUGS
- all FIXMEs.
- some filters crash at CoCreateInstance. (ole???)
- some filters crash at CoCreateInstance. (???)
......@@ -1217,7 +1217,8 @@ static HRESULT AsyncSourceFileImpl_Read( CAsyncSourceImpl* pImpl, LONGLONG llOfs
while ( lLength > 0 )
{
if ( WaitForSingleObject( hEventCancel, 0 ) == WAIT_OBJECT_0 )
if ( hEventCancel != (HANDLE)NULL &&
WaitForSingleObject( hEventCancel, 0 ) == WAIT_OBJECT_0 )
{
hr = S_FALSE;
break;
......
/*
* Implements AVI Decompressor(CLSID_AVIDec).
*
* FIXME - insufficient buffer for ICDecompress!!!!
*
* hidenori@a2.ctktv.ne.jp
*/
......@@ -219,7 +217,7 @@ static HRESULT AVIDec_GetOutputTypes( CTransformBaseImpl* pImpl, const AM_MEDIA_
memcpy( &This->m_mtOut.majortype, &MEDIATYPE_Video, sizeof(GUID) );
memcpy( &This->m_mtOut.formattype, &FORMAT_VideoInfo, sizeof(GUID) );
This->m_mtOut.cbFormat = sizeof(VIDEOINFOHEADER) + cbFmt;
This->m_mtOut.cbFormat = sizeof(VIDEOINFOHEADER) + cbFmt + sizeof(RGBQUAD)*256;
This->m_mtOut.pbFormat = (BYTE*)CoTaskMemAlloc(This->m_mtOut.cbFormat);
if ( This->m_mtOut.pbFormat == NULL )
return E_OUTOFMEMORY;
......@@ -240,6 +238,31 @@ static HRESULT AVIDec_GetOutputTypes( CTransformBaseImpl* pImpl, const AM_MEDIA_
This->m_mtOut.bFixedSizeSamples = (pbiOut->bmiHeader.biCompression == 0) ? 1 : 0;
This->m_mtOut.lSampleSize = (pbiOut->bmiHeader.biCompression == 0) ? DIBSIZE(pbiOut->bmiHeader) : pbiOut->bmiHeader.biSizeImage;
/* get palette */
if ( pbiOut->bmiHeader.biBitCount <= 8 )
{
TRACE("(%p) - get palette\n",This);
if ( ICDecompressGetPalette( This->hicCached, pbiIn, pbiOut ) != ICERR_OK )
{
TRACE("(%p) - use the input palette\n",This);
if ( pbiIn->bmiHeader.biBitCount != pbiOut->bmiHeader.biBitCount )
{
FIXME( "no palette...fixme?\n" );
return E_FAIL;
}
if ( pbiOut->bmiHeader.biClrUsed == 0 )
pbiOut->bmiHeader.biClrUsed = 1<<pbiOut->bmiHeader.biBitCount;
if ( pbiOut->bmiHeader.biClrUsed > (1<<pbiOut->bmiHeader.biBitCount) )
{
ERR( "biClrUsed=%ld\n", pbiOut->bmiHeader.biClrUsed );
return E_FAIL;
}
memcpy( pbiOut->bmiColors, pbiIn->bmiColors,
sizeof(RGBQUAD) * pbiOut->bmiHeader.biClrUsed );
}
}
TRACE("(%p) - return format\n",This);
*ppmtAcceptTypes = &This->m_mtOut;
*pcAcceptTypes = 1;
......@@ -301,7 +324,7 @@ static HRESULT AVIDec_BeginTransform( CTransformBaseImpl* pImpl, const AM_MEDIA_
This->m_pbiOut = AVIDec_DuplicateBitmapInfo(pbiOut);
if ( This->m_pbiIn == NULL || This->m_pbiOut == NULL )
return E_OUTOFMEMORY;
if ( This->m_pbiOut->bmiHeader.biCompression == 0 )
if ( This->m_pbiOut->bmiHeader.biCompression == 0 || This->m_pbiOut->bmiHeader.biCompression == 3 )
This->m_pbiOut->bmiHeader.biSizeImage = DIBSIZE(This->m_pbiOut->bmiHeader);
if ( !bReuseSample )
......
......@@ -353,7 +353,7 @@ CPinBaseImpl_fnConnectionMediaType(IPin* iface,AM_MEDIA_TYPE* pmt)
ZeroMemory( pmt, sizeof(AM_MEDIA_TYPE) );
pmt->bFixedSizeSamples = TRUE;
pmt->lSampleSize = 1;
hr = NOERROR;
hr = VFW_E_NOT_CONNECTED;
}
LeaveCriticalSection( This->pcsPin );
......
......@@ -2,12 +2,12 @@
#define WINE_DSHOW_DEVENUM_H
/*
implements CLSID_SystemDeviceEnum.
- At least, the following interfaces should be implemented:
IUnknown
+ ICreateDevEnum
* implements CLSID_SystemDeviceEnum.
*
* - At least, the following interfaces should be implemented:
*
* IUnknown
* + ICreateDevEnum
*/
#include "iunk.h"
......@@ -27,10 +27,100 @@ typedef struct CSysDevEnum
HRESULT QUARTZ_CreateSystemDeviceEnum(IUnknown* punkOuter,void** ppobj);
HRESULT CSysDevEnum_InitICreateDevEnum( CSysDevEnum* psde );
void CSysDevEnum_UninitICreateDevEnum( CSysDevEnum* psde );
#endif /* WINE_DSHOW_DEVENUM_H */
/*
* implements CLSID_CDeviceMoniker.
*
* - At least, the following interfaces should be implemented:
*
* IUnknown
* + IPersist - IPersistStream - IMoniker
*/
typedef struct DMON_IMonikerImpl
{
ICOM_VFIELD(IMoniker);
} DMON_IMonikerImpl;
typedef struct CDeviceMoniker
{
QUARTZ_IUnkImpl unk;
DMON_IMonikerImpl moniker;
/* IMoniker fields */
HKEY m_hkRoot;
WCHAR* m_pwszPath;
} CDeviceMoniker;
#define CDeviceMoniker_THIS(iface,member) CDeviceMoniker* This = (CDeviceMoniker*)(((char*)iface)-offsetof(CDeviceMoniker,member))
HRESULT QUARTZ_CreateDeviceMoniker(
HKEY hkRoot, LPCWSTR lpKeyPath,
IMoniker** ppMoniker );
/*
* implements IPropertyBag for accessing registry.
*
* - At least, the following interfaces should be implemented:
*
* IUnknown
* + IPropertyBag
*/
typedef struct DMON_IPropertyBagImpl
{
ICOM_VFIELD(IPropertyBag);
} DMON_IPropertyBagImpl;
typedef struct CRegPropertyBag
{
QUARTZ_IUnkImpl unk;
DMON_IPropertyBagImpl propbag;
/* IPropertyBag fields */
HKEY m_hKey;
} CRegPropertyBag;
#define CRegPropertyBag_THIS(iface,member) CRegPropertyBag* This = (CRegPropertyBag*)(((char*)iface)-offsetof(CRegPropertyBag,member))
HRESULT QUARTZ_CreateRegPropertyBag(
HKEY hkRoot, LPCWSTR lpKeyPath,
IPropertyBag** ppPropBag );
/***************************************************************************
*
* related functions (internal).
*
*/
HRESULT QUARTZ_GetFilterRegPath(
WCHAR** ppwszPath, /* [OUT] path from HKEY_CLASSES_ROOT */
const CLSID* pguidFilterCategory, /* [IN] Category */
const CLSID* pclsid, /* [IN] CLSID of this filter */
LPCWSTR lpInstance ); /* [IN] instance */
HRESULT QUARTZ_RegisterFilterToMoniker(
IMoniker* pMoniker, /* [IN] Moniker */
const CLSID* pclsid, /* [IN] CLSID of this filter */
LPCWSTR lpFriendlyName, /* [IN] friendly name */
const BYTE* pbFilterData, /* [IN] filter data */
DWORD cbFilterData ); /* [IN] size of the filter data */
HRESULT QUARTZ_RegDeleteKey( HKEY hkRoot, LPCWSTR lpKeyPath );
HRESULT QUARTZ_GetCLSIDFromMoniker(
IMoniker* pMoniker, /* [IN] Moniker */
CLSID* pclsid ); /* [OUT] */
HRESULT QUARTZ_GetMeritFromMoniker(
IMoniker* pMoniker, /* [IN] Moniker */
DWORD* pdwMerit ); /* [OUT] */
HRESULT QUARTZ_GetFilterDataFromMoniker(
IMoniker* pMoniker, /* [IN] Moniker */
BYTE** ppbFilterData, /* [OUT] */
DWORD* pcbFilterData ); /* [OUT] */
#endif /* WINE_DSHOW_DEVENUM_H */
#ifndef WINE_DSHOW_DEVMON_H
#define WINE_DSHOW_DEVMON_H
/*
implements CLSID_CDeviceMoniker.
- At least, the following interfaces should be implemented:
IUnknown
+ IPersist - IPersistStream - IMoniker
*/
#include "iunk.h"
typedef struct DMON_IMonikerImpl
{
ICOM_VFIELD(IMoniker);
} DMON_IMonikerImpl;
typedef struct CDeviceMoniker
{
QUARTZ_IUnkImpl unk;
DMON_IMonikerImpl moniker;
/* IMoniker fields */
HKEY m_hkRoot;
WCHAR* m_pwszPath;
} CDeviceMoniker;
#define CDeviceMoniker_THIS(iface,member) CDeviceMoniker* This = (CDeviceMoniker*)(((char*)iface)-offsetof(CDeviceMoniker,member))
HRESULT QUARTZ_CreateDeviceMoniker(
HKEY hkRoot, LPCWSTR lpKeyPath,
IMoniker** ppMoniker );
/*
implements IPropertyBag for accessing registry.
- At least, the following interfaces should be implemented:
IUnknown
+ IPropertyBag
*/
#include "iunk.h"
typedef struct DMON_IPropertyBagImpl
{
ICOM_VFIELD(IPropertyBag);
} DMON_IPropertyBagImpl;
typedef struct CRegPropertyBag
{
QUARTZ_IUnkImpl unk;
DMON_IPropertyBagImpl propbag;
/* IPropertyBag fields */
HKEY m_hKey;
} CRegPropertyBag;
#define CRegPropertyBag_THIS(iface,member) CRegPropertyBag* This = (CRegPropertyBag*)(((char*)iface)-offsetof(CRegPropertyBag,member))
HRESULT QUARTZ_CreateRegPropertyBag(
HKEY hkRoot, LPCWSTR lpKeyPath,
IPropertyBag** ppPropBag );
#endif /* WINE_DSHOW_DEVMON_H */
......@@ -99,8 +99,10 @@ IUnknown_fnRelease(IUnknown* iface)
if ( ref > 0 )
return (ULONG)ref;
This->ref ++;
if ( This->pOnFinalRelease != NULL )
(*(This->pOnFinalRelease))(iface);
This->ref --;
QUARTZ_FreeObj(This);
......
......@@ -105,6 +105,11 @@ void QUARTZ_MediaType_Destroy(
void QUARTZ_MediaSubType_FromFourCC(
GUID* psubtype, DWORD dwFourCC )
{
TRACE( "FourCC %c%c%c%c\n",
(int)(dwFourCC>> 0)&0xff,
(int)(dwFourCC>> 8)&0xff,
(int)(dwFourCC>>16)&0xff,
(int)(dwFourCC>>24)&0xff );
memcpy( psubtype, &MEDIASUBTYPE_PCM, sizeof(GUID) );
psubtype->Data1 = dwFourCC;
}
......@@ -125,7 +130,7 @@ HRESULT QUARTZ_MediaSubType_FromBitmap(
HRESULT hr;
DWORD* pdwBitf;
if ( (pbi->biCompression & 0xffff) != 0 )
if ( (pbi->biCompression & 0xffff0000) != 0 )
return S_FALSE;
if ( pbi->biWidth <= 0 || pbi->biHeight == 0 )
......@@ -219,6 +224,25 @@ HRESULT QUARTZ_MediaSubType_FromBitmap(
return hr;
}
void QUARTZ_PatchBitmapInfoHeader( BITMAPINFOHEADER* pbi )
{
switch ( pbi->biCompression )
{
case mmioFOURCC('R','G','B',' '):
pbi->biCompression = 0;
break;
case mmioFOURCC('R','L','E',' '):
case mmioFOURCC('M','R','L','E'):
case mmioFOURCC('R','L','E','8'):
case mmioFOURCC('R','L','E','4'):
if ( pbi->biBitCount == 4 )
pbi->biCompression = 2;
else
pbi->biCompression = 1;
break;
}
}
BOOL QUARTZ_BitmapHasFixedSample( const BITMAPINFOHEADER* pbi )
{
switch ( pbi->biCompression )
......
......@@ -25,6 +25,7 @@ BOOL QUARTZ_MediaSubType_IsFourCC(
HRESULT QUARTZ_MediaSubType_FromBitmap(
GUID* psubtype, const BITMAPINFOHEADER* pbi );
void QUARTZ_PatchBitmapInfoHeader( BITMAPINFOHEADER* pbi );
BOOL QUARTZ_BitmapHasFixedSample( const BITMAPINFOHEADER* pbi );
......
......@@ -23,7 +23,7 @@ DEFAULT_DEBUG_CHANNEL(quartz);
#define NUMELEMS(elem) (sizeof(elem)/sizeof((elem)[0]))
#endif /* NUMELEMS */
const WCHAR QUARTZ_wszREG_SZ[] =
const WCHAR QUARTZ_wszREG_SZ[7] =
{'R','E','G','_','S','Z',0};
const WCHAR QUARTZ_wszInprocServer32[] =
{'I','n','p','r','o','c','S','e','r','v','e','r','3','2',0};
......@@ -34,15 +34,22 @@ const WCHAR QUARTZ_wszBoth[] =
const WCHAR QUARTZ_wszCLSID[] =
{'C','L','S','I','D',0};
const WCHAR QUARTZ_wszFilterData[] =
{'F','i','l','t','e','r',' ','D','a','t','a',0};
{'F','i','l','t','e','r','D','a','t','a',0};
const WCHAR QUARTZ_wszFriendlyName[] =
{'F','r','i','e','n','d','l','y','N','a','m','e',0};
const WCHAR QUARTZ_wszInstance[] =
{'I','n','s','t','a','n','c','e',0};
const WCHAR QUARTZ_wszMerit[] =
{'M','e','r','i','t',0};
const WCHAR QUARTZ_wszMediaType[] =
{'M','e','d','i','a',' ','T','y','p','e',0};
const WCHAR QUARTZ_wszSubType[] =
{'S','u','b','T','y','p','e',0};
const WCHAR QUARTZ_wszExtensions[] =
{'E','x','t','e','n','s','i','o','n','s',0};
const WCHAR QUARTZ_wszSourceFilter[] =
{'S','o','u','r','c','e',' ','F','i','l','t','e','r',0};
static
void QUARTZ_CatPathSepW( WCHAR* pBuf )
{
int len = lstrlenW(pBuf);
......@@ -50,7 +57,6 @@ void QUARTZ_CatPathSepW( WCHAR* pBuf )
pBuf[len+1] = 0;
}
static
void QUARTZ_GUIDtoString( WCHAR* pBuf, const GUID* pguid )
{
/* W"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}" */
......@@ -367,4 +373,3 @@ HRESULT QUARTZ_RegisterAMovieFilter(
}
......@@ -7,7 +7,7 @@
#ifndef QUARTZ_REGSVR_H
#define QUARTZ_REGSVR_H
extern const WCHAR QUARTZ_wszREG_SZ[];
extern const WCHAR QUARTZ_wszREG_SZ[7];
extern const WCHAR QUARTZ_wszInprocServer32[];
extern const WCHAR QUARTZ_wszThreadingModel[];
extern const WCHAR QUARTZ_wszBoth[];
......@@ -16,8 +16,15 @@ extern const WCHAR QUARTZ_wszFilterData[];
extern const WCHAR QUARTZ_wszFriendlyName[];
extern const WCHAR QUARTZ_wszInstance[];
extern const WCHAR QUARTZ_wszMerit[];
extern const WCHAR QUARTZ_wszMediaType[];
extern const WCHAR QUARTZ_wszSubType[];
extern const WCHAR QUARTZ_wszExtensions[];
extern const WCHAR QUARTZ_wszSourceFilter[];
void QUARTZ_CatPathSepW( WCHAR* pBuf );
void QUARTZ_GUIDtoString( WCHAR* pBuf, const GUID* pguid );
HRESULT QUARTZ_CreateCLSIDPath(
WCHAR* pwszBuf, DWORD dwBufLen,
const CLSID* pclsid,
......
......@@ -352,7 +352,9 @@ IMediaPosition_fnget_Duration(IMediaPosition* iface,REFTIME* prefTime)
TRACE("(%p)->()\n",This);
return IMediaPosition_get_Duration(pPos,prefTime);
hr = IMediaPosition_get_Duration(pPos,prefTime);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -363,7 +365,9 @@ IMediaPosition_fnput_CurrentPosition(IMediaPosition* iface,REFTIME refTime)
TRACE("(%p)->()\n",This);
return IMediaPosition_put_CurrentPosition(pPos,refTime);
hr = IMediaPosition_put_CurrentPosition(pPos,refTime);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -374,7 +378,9 @@ IMediaPosition_fnget_CurrentPosition(IMediaPosition* iface,REFTIME* prefTime)
TRACE("(%p)->()\n",This);
return IMediaPosition_get_CurrentPosition(pPos,prefTime);
hr = IMediaPosition_get_CurrentPosition(pPos,prefTime);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -385,7 +391,9 @@ IMediaPosition_fnget_StopTime(IMediaPosition* iface,REFTIME* prefTime)
TRACE("(%p)->()\n",This);
return IMediaPosition_get_StopTime(pPos,prefTime);
hr = IMediaPosition_get_StopTime(pPos,prefTime);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -396,7 +404,9 @@ IMediaPosition_fnput_StopTime(IMediaPosition* iface,REFTIME refTime)
TRACE("(%p)->()\n",This);
return IMediaPosition_put_StopTime(pPos,refTime);
hr = IMediaPosition_put_StopTime(pPos,refTime);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -407,7 +417,9 @@ IMediaPosition_fnget_PrerollTime(IMediaPosition* iface,REFTIME* prefTime)
TRACE("(%p)->()\n",This);
return IMediaPosition_get_PrerollTime(pPos,prefTime);
hr = IMediaPosition_get_PrerollTime(pPos,prefTime);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -418,7 +430,9 @@ IMediaPosition_fnput_PrerollTime(IMediaPosition* iface,REFTIME refTime)
TRACE("(%p)->()\n",This);
return IMediaPosition_put_PrerollTime(pPos,refTime);
hr = IMediaPosition_put_PrerollTime(pPos,refTime);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -429,7 +443,9 @@ IMediaPosition_fnput_Rate(IMediaPosition* iface,double dblRate)
TRACE("(%p)->()\n",This);
return IMediaPosition_put_Rate(pPos,dblRate);
hr = IMediaPosition_put_Rate(pPos,dblRate);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -440,7 +456,9 @@ IMediaPosition_fnget_Rate(IMediaPosition* iface,double* pdblRate)
TRACE("(%p)->()\n",This);
return IMediaPosition_get_Rate(pPos,pdblRate);
hr = IMediaPosition_get_Rate(pPos,pdblRate);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -451,7 +469,9 @@ IMediaPosition_fnCanSeekForward(IMediaPosition* iface,LONG* pCanSeek)
TRACE("(%p)->()\n",This);
return IMediaPosition_CanSeekForward(pPos,pCanSeek);
hr = IMediaPosition_CanSeekForward(pPos,pCanSeek);
IMediaPosition_Release(pPos);
return hr;
}
static HRESULT WINAPI
......@@ -462,7 +482,9 @@ IMediaPosition_fnCanSeekBackward(IMediaPosition* iface,LONG* pCanSeek)
TRACE("(%p)->()\n",This);
return IMediaPosition_CanSeekBackward(pPos,pCanSeek);
hr = IMediaPosition_CanSeekBackward(pPos,pCanSeek);
IMediaPosition_Release(pPos);
return hr;
}
......@@ -561,7 +583,9 @@ IMediaSeeking_fnGetCapabilities(IMediaSeeking* iface,DWORD* pdwCaps)
TRACE("(%p)->()\n",This);
return IMediaSeeking_GetCapabilities(pSeek,pdwCaps);
hr = IMediaSeeking_GetCapabilities(pSeek,pdwCaps);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -572,7 +596,9 @@ IMediaSeeking_fnCheckCapabilities(IMediaSeeking* iface,DWORD* pdwCaps)
TRACE("(%p)->()\n",This);
return IMediaSeeking_CheckCapabilities(pSeek,pdwCaps);
hr = IMediaSeeking_CheckCapabilities(pSeek,pdwCaps);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -583,7 +609,9 @@ IMediaSeeking_fnIsFormatSupported(IMediaSeeking* iface,const GUID* pidFormat)
TRACE("(%p)->()\n",This);
return IMediaSeeking_IsFormatSupported(pSeek,pidFormat);
hr = IMediaSeeking_IsFormatSupported(pSeek,pidFormat);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -594,7 +622,9 @@ IMediaSeeking_fnQueryPreferredFormat(IMediaSeeking* iface,GUID* pidFormat)
TRACE("(%p)->()\n",This);
return IMediaSeeking_QueryPreferredFormat(pSeek,pidFormat);
hr = IMediaSeeking_QueryPreferredFormat(pSeek,pidFormat);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -605,7 +635,9 @@ IMediaSeeking_fnGetTimeFormat(IMediaSeeking* iface,GUID* pidFormat)
TRACE("(%p)->()\n",This);
return IMediaSeeking_GetTimeFormat(pSeek,pidFormat);
hr = IMediaSeeking_GetTimeFormat(pSeek,pidFormat);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -616,7 +648,9 @@ IMediaSeeking_fnIsUsingTimeFormat(IMediaSeeking* iface,const GUID* pidFormat)
TRACE("(%p)->()\n",This);
return IMediaSeeking_IsUsingTimeFormat(pSeek,pidFormat);
hr = IMediaSeeking_IsUsingTimeFormat(pSeek,pidFormat);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -627,7 +661,9 @@ IMediaSeeking_fnSetTimeFormat(IMediaSeeking* iface,const GUID* pidFormat)
TRACE("(%p)->()\n",This);
return IMediaSeeking_SetTimeFormat(pSeek,pidFormat);
hr = IMediaSeeking_SetTimeFormat(pSeek,pidFormat);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -638,7 +674,9 @@ IMediaSeeking_fnGetDuration(IMediaSeeking* iface,LONGLONG* pllDuration)
TRACE("(%p)->()\n",This);
return IMediaSeeking_GetDuration(pSeek,pllDuration);
hr = IMediaSeeking_GetDuration(pSeek,pllDuration);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -649,7 +687,9 @@ IMediaSeeking_fnGetStopPosition(IMediaSeeking* iface,LONGLONG* pllPos)
TRACE("(%p)->()\n",This);
return IMediaSeeking_GetStopPosition(pSeek,pllPos);
hr = IMediaSeeking_GetStopPosition(pSeek,pllPos);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -660,7 +700,9 @@ IMediaSeeking_fnGetCurrentPosition(IMediaSeeking* iface,LONGLONG* pllPos)
TRACE("(%p)->()\n",This);
return IMediaSeeking_GetCurrentPosition(pSeek,pllPos);
hr = IMediaSeeking_GetCurrentPosition(pSeek,pllPos);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -671,7 +713,9 @@ IMediaSeeking_fnConvertTimeFormat(IMediaSeeking* iface,LONGLONG* pllOut,const GU
TRACE("(%p)->()\n",This);
return IMediaSeeking_ConvertTimeFormat(pSeek,pllOut,pidFmtOut,llIn,pidFmtIn);
hr = IMediaSeeking_ConvertTimeFormat(pSeek,pllOut,pidFmtOut,llIn,pidFmtIn);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -682,7 +726,9 @@ IMediaSeeking_fnSetPositions(IMediaSeeking* iface,LONGLONG* pllCur,DWORD dwCurFl
TRACE("(%p)->()\n",This);
return IMediaSeeking_SetPositions(pSeek,pllCur,dwCurFlags,pllStop,dwStopFlags);
hr = IMediaSeeking_SetPositions(pSeek,pllCur,dwCurFlags,pllStop,dwStopFlags);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -693,7 +739,9 @@ IMediaSeeking_fnGetPositions(IMediaSeeking* iface,LONGLONG* pllCur,LONGLONG* pll
TRACE("(%p)->()\n",This);
return IMediaSeeking_GetPositions(pSeek,pllCur,pllStop);
hr = IMediaSeeking_GetPositions(pSeek,pllCur,pllStop);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -704,7 +752,9 @@ IMediaSeeking_fnGetAvailable(IMediaSeeking* iface,LONGLONG* pllFirst,LONGLONG* p
TRACE("(%p)->()\n",This);
return IMediaSeeking_GetAvailable(pSeek,pllFirst,pllLast);
hr = IMediaSeeking_GetAvailable(pSeek,pllFirst,pllLast);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -715,7 +765,9 @@ IMediaSeeking_fnSetRate(IMediaSeeking* iface,double dblRate)
TRACE("(%p)->()\n",This);
return IMediaSeeking_SetRate(pSeek,dblRate);
hr = IMediaSeeking_SetRate(pSeek,dblRate);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -726,7 +778,9 @@ IMediaSeeking_fnGetRate(IMediaSeeking* iface,double* pdblRate)
TRACE("(%p)->()\n",This);
return IMediaSeeking_GetRate(pSeek,pdblRate);
hr = IMediaSeeking_GetRate(pSeek,pdblRate);
IMediaSeeking_Release(pSeek);
return hr;
}
static HRESULT WINAPI
......@@ -737,7 +791,9 @@ IMediaSeeking_fnGetPreroll(IMediaSeeking* iface,LONGLONG* pllPreroll)
TRACE("(%p)->()\n",This);
return IMediaSeeking_GetPreroll(pSeek,pllPreroll);
hr = IMediaSeeking_GetPreroll(pSeek,pllPreroll);
IMediaSeeking_Release(pSeek);
return hr;
}
......
......@@ -187,8 +187,9 @@ static HWND VIDREN_Create( HWND hwndOwner, CVideoRendererImpl* This )
HINSTANCE hInst = (HINSTANCE)GetModuleHandleA(NULL);
const VIDEOINFOHEADER* pinfo;
DWORD dwExStyle = 0;
DWORD dwStyle = WS_OVERLAPPED|WS_CAPTION|WS_MINIMIZEBOX|WS_MAXIMIZEBOX;
DWORD dwStyle = WS_POPUP|WS_CAPTION|WS_CLIPCHILDREN;
RECT rcWnd;
HWND hwnd;
if ( !VIDREN_Register( hInst ) )
return (HWND)NULL;
......@@ -206,14 +207,18 @@ static HWND VIDREN_Create( HWND hwndOwner, CVideoRendererImpl* This )
TRACE("window width %d,height %d\n",
rcWnd.right-rcWnd.left,rcWnd.bottom-rcWnd.top);
return CreateWindowExA(
hwnd = CreateWindowExA(
dwExStyle,
VIDREN_szWndClass, VIDREN_szWndName,
dwStyle | WS_VISIBLE,
dwStyle,
100,100, /* FIXME */
rcWnd.right-rcWnd.left, rcWnd.bottom-rcWnd.top,
hwndOwner, (HMENU)NULL,
hInst, (LPVOID)This );
if ( hwnd != (HWND)NULL )
ShowWindow(hwnd,SW_SHOW);
return hwnd;
}
static DWORD WINAPI VIDREN_ThreadEntry( LPVOID pv )
......
......@@ -284,6 +284,8 @@ static HRESULT CWavParseImpl_InitAU( CParserImpl* pImpl, CWavParseImpl* This )
This->llDataStart = dataofs;
This->llBytesTotal = datalen;
TRACE("offset %lu, length %lu\n",dataofs,datalen);
return NOERROR;
}
......@@ -460,7 +462,7 @@ static HRESULT CWavParseImpl_GetNextRequest( CParserImpl* pImpl, ULONG* pnStream
llAvail = This->llBytesTotal - This->llBytesProcessed;
if ( llAvail > (LONGLONG)This->dwBlockSize )
llAvail = (LONGLONG)This->dwBlockSize;
llStart = This->llBytesProcessed;
llStart = This->llDataStart + This->llBytesProcessed;
llEnd = llStart + llAvail;
This->llBytesProcessed = llEnd;
......
......@@ -306,6 +306,7 @@
[HKEY_CLASSES_ROOT\CLSID\{DA4E3DA0-D07D-11D0-BD50-00A0C911CE86}\Instance\{083863F1-70DE-11D0-BD40-00A0C911CE86}]
"CLSID"="{083863F1-70DE-11D0-BD40-00A0C911CE86}"
"FriendlyName"="DirectShow Filters"
"Merit"=dword:00600000
[HKEY_CLASSES_ROOT\CLSID\{DA4E3DA0-D07D-11D0-BD50-00A0C911CE86}\Instance\{33D9A760-90C8-11D0-BD43-00A0C911CE86}]
"CLSID"="{33D9A760-90C8-11D0-BD43-00A0C911CE86}"
......@@ -322,6 +323,7 @@
[HKEY_CLASSES_ROOT\CLSID\{DA4E3DA0-D07D-11D0-BD50-00A0C911CE86}\Instance\{4EFE2452-168A-11D1-BC76-00C04FB9453B}]
"CLSID"="{4EFE2452-168A-11D1-BC76-00C04FB9453B}"
"FriendlyName"="Midi Renderers"
"Merit"=dword:00600000
[HKEY_CLASSES_ROOT\CLSID\{DA4E3DA0-D07D-11D0-BD50-00A0C911CE86}\Instance\{860BB310-5D01-11D0-BD3B-00A0C911CE86}]
"CLSID"="{860BB310-5D01-11D0-BD3B-00A0C911CE86}"
......@@ -338,20 +340,25 @@
[HKEY_CLASSES_ROOT\CLSID\{DA4E3DA0-D07D-11D0-BD50-00A0C911CE86}\Instance\{E0F158E1-CB04-11D0-BD4E-00A0C911CE86}]
"CLSID"="{E0F158E1-CB04-11D0-BD4E-00A0C911CE86}"
"FriendlyName"="Audio Renderers"
"Merit"=dword:00600000
# CLSID_AudioRender
[HKEY_CLASSES_ROOT\CLSID\{e30629d1-27e5-11ce-875d-00608cb78066}]
@="Audio Renderer"
[HKEY_CLASSES_ROOT\CLSID\{e30629d1-27e5-11ce-875d-00608cb78066}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
[HKEY_CLASSES_ROOT\CLSID\{E0F158E1-CB04-11D0-BD4E-00A0C911CE86}\Instance\{e30629d1-27e5-11ce-875d-00608cb78066}]
"CLSID"="{e30629d1-27e5-11ce-875d-00608cb78066}"
# FriendlyName seems to be the driver name and to be generated dynamically.
"FriendlyName"="Waveout audio renderer"
# CLSID_VideoRenderer
[HKEY_CLASSES_ROOT\CLSID\{70e102b0-5556-11ce-97c0-00aa0055595a}]
@="Video Renderer"
[HKEY_CLASSES_ROOT\CLSID\{70e102b0-5556-11ce-97c0-00aa0055595a}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
......@@ -362,6 +369,8 @@
# Wave Parser
[HKEY_CLASSES_ROOT\CLSID\{D51BD5A1-7548-11CF-A520-0080C77EF58A}]
@="Wave Parser"
[HKEY_CLASSES_ROOT\CLSID\{D51BD5A1-7548-11CF-A520-0080C77EF58A}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
......@@ -370,8 +379,10 @@
"CLSID"="{D51BD5A1-7548-11CF-A520-0080C77EF58A}"
"FriendlyName"="Wave Parser"
# CLSID_AVIDec(AVI Decompressor) (not implemented yet)
# CLSID_AVIDec(AVI Decompressor)
[HKEY_CLASSES_ROOT\CLSID\{CF49D4E0-1115-11CE-B03A-0020AF0BA770}]
@="AVI Decompressor"
[HKEY_CLASSES_ROOT\CLSID\{CF49D4E0-1115-11CE-B03A-0020AF0BA770}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
......@@ -380,28 +391,34 @@
"CLSID"="{CF49D4E0-1115-11CE-B03A-0020AF0BA770}"
"FriendlyName"="AVI Decompressor"
# CLSID_AsyncReader (not implemented yet)
# CLSID_AsyncReader
[HKEY_CLASSES_ROOT\CLSID\{E436EBB5-524F-11CE-9F53-0020AF0BA770}]
@="File Source (Async.)"
[HKEY_CLASSES_ROOT\CLSID\{E436EBB5-524F-11CE-9F53-0020AF0BA770}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
[HKEY_CLASSES_ROOT\CLSID\{083863F1-70DE-11D0-BD40-00A0C911CE86}\Instance\{E436EBB5-524F-11CE-9F53-0020AF0BA770}]
"CLSID"="{E436EBB5-524F-11CE-9F53-0020AF0BA770}"
"FriendlyName"="Async Reader"
"FriendlyName"="File Source (Async.)"
# CLSID_URLReader (not implemented yet)
[HKEY_CLASSES_ROOT\CLSID\{E436EBB6-524F-11CE-9F53-0020AF0BA770}]
@="File Source (URL)"
[HKEY_CLASSES_ROOT\CLSID\{E436EBB6-524F-11CE-9F53-0020AF0BA770}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
[HKEY_CLASSES_ROOT\CLSID\{083863F1-70DE-11D0-BD40-00A0C911CE86}\Instance\{E436EBB6-524F-11CE-9F53-0020AF0BA770}]
"CLSID"="{E436EBB6-524F-11CE-9F53-0020AF0BA770}"
"FriendlyName"="URL Reader"
"FriendlyName"="File Source (URL)"
# CLSID_AviSplitter (not implemented yet)
# CLSID_AviSplitter
[HKEY_CLASSES_ROOT\CLSID\{1B544C20-FD0B-11CE-8C63-00AA0044B51E}]
@="AVI Splitter"
[HKEY_CLASSES_ROOT\CLSID\{1B544C20-FD0B-11CE-8C63-00AA0044B51E}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
......@@ -412,6 +429,8 @@
# CLSID_QuickTimeParser (not implemented yet)
[HKEY_CLASSES_ROOT\CLSID\{D51BD5A0-7548-11CF-A520-0080C77EF58A}]
@="QuickTime Movie Parser"
[HKEY_CLASSES_ROOT\CLSID\{D51BD5A0-7548-11CF-A520-0080C77EF58A}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
......@@ -420,15 +439,72 @@
"CLSID"="{D51BD5A0-7548-11CF-A520-0080C77EF58A}"
"FriendlyName"="QuickTime Movie Parser"
# CLSID_Colour(Color space converter) (not implemented yet)
# CLSID_Colour(Color space converter)
[HKEY_CLASSES_ROOT\CLSID\{1643E180-90F5-11CE-97D5-00AA0055595A}]
@="Color Space Converter"
[HKEY_CLASSES_ROOT\CLSID\{1643E180-90F5-11CE-97D5-00AA0055595A}\InprocServer32]
@="quartz.dll"
"ThreadingModel"="Both"
[HKEY_CLASSES_ROOT\CLSID\{083863F1-70DE-11D0-BD40-00A0C911CE86}\Instance\{1643E180-90F5-11CE-97D5-00AA0055595A}]
"CLSID"="{1643E180-90F5-11CE-97D5-00AA0055595A}"
"FriendlyName"="Color space converter"
"FriendlyName"="Color Space Converter"
#
# quartz Media Types.
#
# audio/wav
# RIFF****WAVE
[HKEY_CLASSES_ROOT\Media Type\{E436EB83-524F-11CE-9F53-0020AF0BA770}\{E436EB8B-524F-11CE-9F53-0020AF0BA770}]
"0"="0,4,,52494646, 8,4,,57415645"
"Source Filter"="{E436EBB5-524F-11CE-9F53-0020AF0BA770}"
# audio/basic
# .snd
[HKEY_CLASSES_ROOT\Media Type\{E436EB83-524F-11CE-9F53-0020AF0BA770}\{E436EB8C-524F-11CE-9F53-0020AF0BA770}]
"0"="0,4,,2E736E64"
"Source Filter"="{E436EBB5-524F-11CE-9F53-0020AF0BA770}"
# audio/aiff
# FORM****AIFF
[HKEY_CLASSES_ROOT\Media Type\{E436EB83-524F-11CE-9F53-0020AF0BA770}\{E436EB8D-524F-11CE-9F53-0020AF0BA770}]
"0"="0,4,,464F524D, 8,4,,41494646"
"Source Filter"="{E436EBB5-524F-11CE-9F53-0020AF0BA770}"
# video/x-msvideo
# RIFF****AVI
[HKEY_CLASSES_ROOT\Media Type\{E436EB83-524F-11CE-9F53-0020AF0BA770}\{E436EB88-524F-11CE-9F53-0020AF0BA770}]
"0"="0,4,,52494646, 8,4,,41564920"
"Source Filter"="{E436EBB5-524F-11CE-9F53-0020AF0BA770}"
# video/quicktime
# ****mdat / ****moov
[HKEY_CLASSES_ROOT\Media Type\{E436EB83-524F-11CE-9F53-0020AF0BA770}\{E436EB89-524F-11CE-9F53-0020AF0BA770}]
"0"="4,4,,6D646174"
"1"="4,4,,6D6F6F76"
"Source Filter"="{E436EBB5-524F-11CE-9F53-0020AF0BA770}"
# video/mpeg (MPEG-1/System)
# 0x00 0x00 0x01 0xba
[HKEY_CLASSES_ROOT\Media Type\{E436EB83-524F-11CE-9F53-0020AF0BA770}\{E436EB84-524F-11CE-9F53-0020AF0BA770}]
"0"="0,4,,000001BA"
"Source Filter"="{E436EBB5-524F-11CE-9F53-0020AF0BA770}"
# video/mpeg (MPEG-1/Video)
# 0x00 0x00 0x01 0xb3
[HKEY_CLASSES_ROOT\Media Type\{E436EB83-524F-11CE-9F53-0020AF0BA770}\{E436EB86-524F-11CE-9F53-0020AF0BA770}]
"0"="0,4,,000001B3"
"Source Filter"="{E436EBB5-524F-11CE-9F53-0020AF0BA770}"
# audio/mpeg
# 12bit 0xFFF + 1bit 0 + 2bit Layer(non-zero) + 1bit flag
[HKEY_CLASSES_ROOT\Media Type\{E436EB83-524F-11CE-9F53-0020AF0BA770}\{E436EB87-524F-11CE-9F53-0020AF0BA770}]
"0"="0,2,FFF8,FFF8"
"Source Filter"="{E436EBB5-524F-11CE-9F53-0020AF0BA770}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment