mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[AMSTREAM][QUARTZ][STRMBASE]
* Sync with Wine 1.7.17. CORE-8080 svn path=/trunk/; revision=62809
This commit is contained in:
parent
4b97514e49
commit
6069c46a4d
24 changed files with 1112 additions and 332 deletions
|
@ -18,6 +18,8 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma makedep register
|
||||
|
||||
[
|
||||
helpstring("SFilter Class"),
|
||||
threading(both),
|
||||
|
|
|
@ -178,14 +178,13 @@ static HRESULT WINAPI BasePinImp_GetMediaType(BasePin *This, int index, AM_MEDIA
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static const BasePinFuncTable input_BaseFuncTable = {
|
||||
BasePinImpl_CheckMediaType,
|
||||
NULL,
|
||||
BasePinImp_GetMediaTypeVersion,
|
||||
BasePinImp_GetMediaType
|
||||
};
|
||||
|
||||
static const BaseInputPinFuncTable input_BaseInputFuncTable = {
|
||||
{
|
||||
BasePinImpl_CheckMediaType,
|
||||
NULL,
|
||||
BasePinImp_GetMediaTypeVersion,
|
||||
BasePinImp_GetMediaType
|
||||
},
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -354,7 +353,8 @@ static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* i
|
|||
/* Pin name is "I{guid MSPID_PrimaryVideo or MSPID_PrimaryAudio}" */
|
||||
info.achName[0] = 'I';
|
||||
StringFromGUID2(&purpose_id, info.achName + 1, 40);
|
||||
hr = BaseInputPin_Construct(&MediaStreamFilter_InputPin_Vtbl, &info, &input_BaseFuncTable, &input_BaseInputFuncTable, &This->filter.csFilter, NULL, &This->pins[This->nb_streams]);
|
||||
hr = BaseInputPin_Construct(&MediaStreamFilter_InputPin_Vtbl, sizeof(BaseInputPin), &info,
|
||||
&input_BaseInputFuncTable, &This->filter.csFilter, NULL, &This->pins[This->nb_streams]);
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ typedef struct StreamData
|
|||
DWORD entries;
|
||||
AVISTDINDEX **stdindex;
|
||||
DWORD frames;
|
||||
DWORD seek;
|
||||
BOOL seek;
|
||||
|
||||
/* Position, in index units */
|
||||
DWORD pos, pos_next, index, index_next;
|
||||
|
@ -431,7 +431,7 @@ static HRESULT AVISplitter_first_request(LPVOID iface)
|
|||
stream->index_next = stream->index;
|
||||
|
||||
/* This was sent after stopped->paused or stopped->playing, so set seek */
|
||||
stream->seek = 1;
|
||||
stream->seek = TRUE;
|
||||
|
||||
/* There should be a packet queued from AVISplitter_next_request last time
|
||||
* It needs to be done now because this is the only way to ensure that every
|
||||
|
@ -956,7 +956,7 @@ static HRESULT AVISplitter_InitializeStreams(AVISplitterImpl *This)
|
|||
DWORD y;
|
||||
DWORD64 frames = 0;
|
||||
|
||||
stream->seek = 1;
|
||||
stream->seek = TRUE;
|
||||
|
||||
if (stream->stdindex)
|
||||
{
|
||||
|
@ -1303,7 +1303,7 @@ static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface)
|
|||
pin->dwSamplesProcessed = 0;
|
||||
stream->index = 0;
|
||||
stream->pos = 0;
|
||||
stream->seek = 1;
|
||||
stream->seek = TRUE;
|
||||
if (stream->stdindex)
|
||||
{
|
||||
DWORD y, z = 0;
|
||||
|
@ -1379,7 +1379,7 @@ static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface)
|
|||
stream->index = 0;
|
||||
}
|
||||
stream->preroll = preroll;
|
||||
stream->seek = 1;
|
||||
stream->seek = TRUE;
|
||||
}
|
||||
LeaveCriticalSection(&This->Parser.filter.csFilter);
|
||||
|
||||
|
|
|
@ -14,4 +14,6 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma makedep regtypelib
|
||||
|
||||
#include "control.idl"
|
||||
|
|
|
@ -911,14 +911,13 @@ static HRESULT WINAPI FileAsyncReaderPin_DecideBufferSize(BaseOutputPin *iface,
|
|||
return IMemAllocator_SetProperties(pAlloc, &This->allocProps, &actual);
|
||||
}
|
||||
|
||||
static const BasePinFuncTable output_BaseFuncTable = {
|
||||
NULL,
|
||||
FileAsyncReaderPin_AttemptConnection,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
FileAsyncReaderPin_GetMediaType
|
||||
};
|
||||
|
||||
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
|
||||
{
|
||||
NULL,
|
||||
FileAsyncReaderPin_AttemptConnection,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
FileAsyncReaderPin_GetMediaType
|
||||
},
|
||||
FileAsyncReaderPin_DecideBufferSize,
|
||||
BaseOutputPinImpl_DecideAllocator,
|
||||
BaseOutputPinImpl_BreakConnect
|
||||
|
@ -933,7 +932,7 @@ static HRESULT FileAsyncReader_Construct(HANDLE hFile, IBaseFilter * pBaseFilter
|
|||
piOutput.dir = PINDIR_OUTPUT;
|
||||
piOutput.pFilter = pBaseFilter;
|
||||
strcpyW(piOutput.achName, wszOutputPinName);
|
||||
hr = BaseOutputPin_Construct(&FileAsyncReaderPin_Vtbl, sizeof(FileAsyncReader), &piOutput, &output_BaseFuncTable, &output_BaseOutputFuncTable, pCritSec, ppPin);
|
||||
hr = BaseOutputPin_Construct(&FileAsyncReaderPin_Vtbl, sizeof(FileAsyncReader), &piOutput, &output_BaseOutputFuncTable, pCritSec, ppPin);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
|
|
|
@ -67,7 +67,7 @@ static int EventsQueue_Destroy(EventsQueue* omr)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static int EventsQueue_PutEvent(EventsQueue* omr, const Event* evt)
|
||||
static BOOL EventsQueue_PutEvent(EventsQueue* omr, const Event* evt)
|
||||
{
|
||||
EnterCriticalSection(&omr->msg_crst);
|
||||
if (omr->msg_toget == ((omr->msg_tosave + 1) % omr->ring_buffer_size))
|
||||
|
@ -96,7 +96,7 @@ static int EventsQueue_PutEvent(EventsQueue* omr, const Event* evt)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static int EventsQueue_GetEvent(EventsQueue* omr, Event* evt, LONG msTimeOut)
|
||||
static BOOL EventsQueue_GetEvent(EventsQueue* omr, Event* evt, LONG msTimeOut)
|
||||
{
|
||||
if (WaitForSingleObject(omr->msg_event, msTimeOut) != WAIT_OBJECT_0)
|
||||
return FALSE;
|
||||
|
@ -356,7 +356,7 @@ static HRESULT WINAPI FilterGraph2_AddFilter(IFilterGraph2 *iface, IBaseFilter *
|
|||
HRESULT hr;
|
||||
int i,j;
|
||||
WCHAR* wszFilterName = NULL;
|
||||
int duplicate_name = FALSE;
|
||||
BOOL duplicate_name = FALSE;
|
||||
|
||||
TRACE("(%p/%p)->(%p, %s (%p))\n", This, iface, pFilter, debugstr_w(pName), pName);
|
||||
|
||||
|
@ -429,7 +429,7 @@ static HRESULT WINAPI FilterGraph2_AddFilter(IFilterGraph2 *iface, IBaseFilter *
|
|||
This->filterCapacity = newCapacity;
|
||||
}
|
||||
|
||||
hr = IBaseFilter_JoinFilterGraph(pFilter, (IFilterGraph *)This, wszFilterName);
|
||||
hr = IBaseFilter_JoinFilterGraph(pFilter, (IFilterGraph *)&This->IFilterGraph2_iface, wszFilterName);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
|
@ -469,7 +469,7 @@ static HRESULT WINAPI FilterGraph2_RemoveFilter(IFilterGraph2 *iface, IBaseFilte
|
|||
if (This->defaultclock && This->refClockProvider == pFilter)
|
||||
{
|
||||
IMediaFilter_SetSyncSource(&This->IMediaFilter_iface, NULL);
|
||||
This->defaultclock = 1;
|
||||
This->defaultclock = TRUE;
|
||||
}
|
||||
|
||||
TRACE("Removing filter %s\n", debugstr_w(This->pFilterNames[i]));
|
||||
|
@ -1481,7 +1481,7 @@ static HRESULT WINAPI FilterGraph2_RenderFile(IFilterGraph2 *iface, LPCWSTR lpcw
|
|||
IEnumPins* penumpins = NULL;
|
||||
HRESULT hr;
|
||||
BOOL partial = FALSE;
|
||||
HRESULT any = FALSE;
|
||||
BOOL any = FALSE;
|
||||
|
||||
TRACE("(%p/%p)->(%s, %s)\n", This, iface, debugstr_w(lpcwstrFile), debugstr_w(lpcwstrPlayList));
|
||||
|
||||
|
@ -1659,7 +1659,7 @@ static HRESULT WINAPI FilterGraph2_AddSourceFilter(IFilterGraph2 *iface, LPCWSTR
|
|||
}
|
||||
|
||||
/* The file has been already loaded */
|
||||
IFileSourceFilter_GetCurFile(pfile, &filename, &mt);
|
||||
hr = IFileSourceFilter_GetCurFile(pfile, &filename, &mt);
|
||||
if (FAILED(hr)) {
|
||||
WARN("GetCurFile (%x)\n", hr);
|
||||
goto error;
|
||||
|
@ -5257,7 +5257,7 @@ static HRESULT WINAPI MediaFilter_SetSyncSource(IMediaFilter *iface, IReferenceC
|
|||
IMediaEventSink *pEventSink;
|
||||
HRESULT eshr;
|
||||
|
||||
eshr = IMediaFilter_QueryInterface(iface, &IID_IMediaEventSink, (LPVOID)&pEventSink);
|
||||
eshr = IMediaFilter_QueryInterface(iface, &IID_IMediaEventSink, (void **)&pEventSink);
|
||||
if (SUCCEEDED(eshr))
|
||||
{
|
||||
IMediaEventSink_Notify(pEventSink, EC_CLOCK_CHANGED, 0, 0);
|
||||
|
|
|
@ -69,6 +69,7 @@ static const struct object_creation_info object_creation[] =
|
|||
{ &CLSID_MPEG1Splitter, MPEGSplitter_create },
|
||||
{ &CLSID_VideoRenderer, VideoRenderer_create },
|
||||
{ &CLSID_NullRenderer, NullRenderer_create },
|
||||
{ &CLSID_VideoMixingRenderer, VMR7Impl_create },
|
||||
{ &CLSID_VideoMixingRenderer9, VMR9Impl_create },
|
||||
{ &CLSID_VideoRendererDefault, VideoRendererDefault_create },
|
||||
{ &CLSID_DSoundRender, DSoundRender_create },
|
||||
|
|
|
@ -405,14 +405,13 @@ HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo)
|
|||
return BaseFilterImpl_QueryVendorInfo(iface, pVendorInfo);
|
||||
}
|
||||
|
||||
static const BasePinFuncTable output_BaseFuncTable = {
|
||||
NULL,
|
||||
BaseOutputPinImpl_AttemptConnection,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
Parser_OutputPin_GetMediaType
|
||||
};
|
||||
|
||||
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
|
||||
{
|
||||
NULL,
|
||||
BaseOutputPinImpl_AttemptConnection,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
Parser_OutputPin_GetMediaType
|
||||
},
|
||||
Parser_OutputPin_DecideBufferSize,
|
||||
Parser_OutputPin_DecideAllocator,
|
||||
Parser_OutputPin_BreakConnect
|
||||
|
@ -428,7 +427,7 @@ HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PR
|
|||
This->ppPins = CoTaskMemAlloc((This->cStreams + 2) * sizeof(IPin *));
|
||||
memcpy(This->ppPins, ppOldPins, (This->cStreams + 1) * sizeof(IPin *));
|
||||
|
||||
hr = BaseOutputPin_Construct(&Parser_OutputPin_Vtbl, sizeof(Parser_OutputPin), piOutput, &output_BaseFuncTable, &output_BaseOutputFuncTable, &This->filter.csFilter, This->ppPins + (This->cStreams + 1));
|
||||
hr = BaseOutputPin_Construct(&Parser_OutputPin_Vtbl, sizeof(Parser_OutputPin), piOutput, &output_BaseOutputFuncTable, &This->filter.csFilter, This->ppPins + (This->cStreams + 1));
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
|
|
|
@ -256,7 +256,7 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
|
|||
ALLOCATOR_PROPERTIES props;
|
||||
|
||||
props.cBuffers = 3;
|
||||
props.cbBuffer = 64 * 1024; /* 64k bytes */
|
||||
props.cbBuffer = 64 * 1024; /* 64 KB */
|
||||
props.cbAlign = 1;
|
||||
props.cbPrefix = 0;
|
||||
|
||||
|
@ -589,7 +589,7 @@ static HRESULT PullPin_InitProcessing(PullPin * This)
|
|||
assert(WaitForSingleObject(This->thread_sleepy, 0) == WAIT_TIMEOUT);
|
||||
This->state = Req_Sleepy;
|
||||
|
||||
/* AddRef the filter to make sure it and it's pins will be around
|
||||
/* AddRef the filter to make sure it and its pins will be around
|
||||
* as long as the thread */
|
||||
IBaseFilter_AddRef(This->pin.pinInfo.pFilter);
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ HRESULT VideoRendererDefault_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC
|
|||
HRESULT QUARTZ_CreateSystemClock(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN;
|
||||
HRESULT ACMWrapper_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN;
|
||||
HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv) DECLSPEC_HIDDEN;
|
||||
HRESULT VMR7Impl_create(IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN;
|
||||
HRESULT VMR9Impl_create(IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT EnumMonikerImpl_Create(IMoniker ** ppMoniker, ULONG nMonikerCount, IEnumMoniker ** ppEnum) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#pragma makedep proxy
|
||||
#pragma makedep register
|
||||
|
||||
cpp_quote("#include <wingdi.h>")
|
||||
#include "strmif.idl"
|
||||
|
||||
|
@ -151,6 +154,13 @@ coclass ACMWrapper { interface IBaseFilter; }
|
|||
]
|
||||
coclass WAVEParser { interface IBaseFilter; }
|
||||
|
||||
[
|
||||
helpstring("Video Mixing Renderer"),
|
||||
threading(both),
|
||||
uuid(b87beb7b-8d29-423f-ae4d-6582c10175ac)
|
||||
]
|
||||
coclass VideoMixingRenderer { interface IBaseFilter; }
|
||||
|
||||
[
|
||||
helpstring("Video Mixing Renderer 9"),
|
||||
threading(both),
|
||||
|
|
|
@ -261,6 +261,10 @@ HKCR
|
|||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
|
||||
}
|
||||
'{B87BEB7B-8D29-423F-AE4D-6582C10175AC}' = s 'Video Mixing Renderer'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
|
||||
}
|
||||
'{51B4ABF3-748F-4E3B-A276-C828330E926A}' = s 'Video Mixing Renderer 9'
|
||||
{
|
||||
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
|
||||
|
|
|
@ -177,8 +177,7 @@ static HRESULT register_interfaces(struct regsvr_interface const *list)
|
|||
if (res != ERROR_SUCCESS) goto error_close_interface_key;
|
||||
|
||||
if (list->name) {
|
||||
res = RegSetValueExA(iid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)(list->name),
|
||||
res = RegSetValueExA(iid_key, NULL, 0, REG_SZ, (const BYTE*)list->name,
|
||||
strlen(list->name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
}
|
||||
|
@ -197,8 +196,7 @@ static HRESULT register_interfaces(struct regsvr_interface const *list)
|
|||
if (res != ERROR_SUCCESS) goto error_close_iid_key;
|
||||
|
||||
sprintfW(buf, fmt, list->num_methods);
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)buf,
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ, (const BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
RegCloseKey(key);
|
||||
|
||||
|
@ -273,8 +271,7 @@ static HRESULT register_coclasses(struct regsvr_coclass const *list)
|
|||
if (res != ERROR_SUCCESS) goto error_close_coclass_key;
|
||||
|
||||
if (list->name) {
|
||||
res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)(list->name),
|
||||
res = RegSetValueExA(clsid_key, NULL, 0, REG_SZ, (const BYTE*)list->name,
|
||||
strlen(list->name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
}
|
||||
|
@ -292,12 +289,11 @@ static HRESULT register_coclasses(struct regsvr_coclass const *list)
|
|||
&ips32_key, NULL);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
||||
res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)list->ips32,
|
||||
res = RegSetValueExA(ips32_key, NULL, 0, REG_SZ, (const BYTE*)list->ips32,
|
||||
lstrlenA(list->ips32) + 1);
|
||||
if (res == ERROR_SUCCESS && list->ips32_tmodel)
|
||||
res = RegSetValueExA(ips32_key, tmodel_valuename, 0, REG_SZ,
|
||||
(CONST BYTE*)list->ips32_tmodel,
|
||||
(const BYTE*)list->ips32_tmodel,
|
||||
strlen(list->ips32_tmodel) + 1);
|
||||
RegCloseKey(ips32_key);
|
||||
if (res != ERROR_SUCCESS) goto error_close_clsid_key;
|
||||
|
@ -402,14 +398,14 @@ static HRESULT register_mediatypes_parsing(struct regsvr_mediatype_parsing const
|
|||
if (res != ERROR_SUCCESS) goto error_close_keys;
|
||||
|
||||
StringFromGUID2(&CLSID_AsyncReader, buf, 39);
|
||||
res = RegSetValueExW(subtype_key, sourcefilter_valuename, 0, REG_SZ, (CONST BYTE*)buf,
|
||||
res = RegSetValueExW(subtype_key, sourcefilter_valuename, 0, REG_SZ, (const BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
if (res != ERROR_SUCCESS) goto error_close_keys;
|
||||
|
||||
for(i = 0; list->line[i]; i++) {
|
||||
char buffer[3];
|
||||
wsprintfA(buffer, "%d", i);
|
||||
res = RegSetValueExA(subtype_key, buffer, 0, REG_SZ, (CONST BYTE*)list->line[i],
|
||||
res = RegSetValueExA(subtype_key, buffer, 0, REG_SZ, (const BYTE*)list->line[i],
|
||||
lstrlenA(list->line[i]));
|
||||
if (res != ERROR_SUCCESS) goto error_close_keys;
|
||||
}
|
||||
|
@ -452,17 +448,17 @@ static HRESULT register_mediatypes_extension(struct regsvr_mediatype_extension c
|
|||
if (res != ERROR_SUCCESS) break;
|
||||
|
||||
StringFromGUID2(list->majortype, buf, 39);
|
||||
res = RegSetValueExW(extension_key, mediatype_name, 0, REG_SZ, (CONST BYTE*)buf,
|
||||
res = RegSetValueExW(extension_key, mediatype_name, 0, REG_SZ, (const BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
if (res != ERROR_SUCCESS) goto error_close_key;
|
||||
|
||||
StringFromGUID2(list->subtype, buf, 39);
|
||||
res = RegSetValueExW(extension_key, subtype_valuename, 0, REG_SZ, (CONST BYTE*)buf,
|
||||
res = RegSetValueExW(extension_key, subtype_valuename, 0, REG_SZ, (const BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
if (res != ERROR_SUCCESS) goto error_close_key;
|
||||
|
||||
StringFromGUID2(&CLSID_AsyncReader, buf, 39);
|
||||
res = RegSetValueExW(extension_key, sourcefilter_valuename, 0, REG_SZ, (CONST BYTE*)buf,
|
||||
res = RegSetValueExW(extension_key, sourcefilter_valuename, 0, REG_SZ, (const BYTE*)buf,
|
||||
(lstrlenW(buf) + 1) * sizeof(WCHAR));
|
||||
if (res != ERROR_SUCCESS) goto error_close_key;
|
||||
|
||||
|
@ -682,7 +678,7 @@ static LONG register_key_defvalueW(
|
|||
res = RegCreateKeyExW(base, name, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
|
||||
res = RegSetValueExW(key, NULL, 0, REG_SZ, (const BYTE*)value,
|
||||
(lstrlenW(value) + 1) * sizeof(WCHAR));
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
|
@ -702,8 +698,7 @@ static LONG register_key_defvalueA(
|
|||
res = RegCreateKeyExW(base, name, 0, NULL, 0,
|
||||
KEY_READ | KEY_WRITE, NULL, &key, NULL);
|
||||
if (res != ERROR_SUCCESS) return res;
|
||||
res = RegSetValueExA(key, NULL, 0, REG_SZ, (CONST BYTE*)value,
|
||||
lstrlenA(value) + 1);
|
||||
res = RegSetValueExA(key, NULL, 0, REG_SZ, (const BYTE*)value, lstrlenA(value) + 1);
|
||||
RegCloseKey(key);
|
||||
return res;
|
||||
}
|
||||
|
@ -727,8 +722,7 @@ static LONG register_progid(
|
|||
if (res != ERROR_SUCCESS) return res;
|
||||
|
||||
if (name) {
|
||||
res = RegSetValueExA(progid_key, NULL, 0, REG_SZ,
|
||||
(CONST BYTE*)name, strlen(name) + 1);
|
||||
res = RegSetValueExA(progid_key, NULL, 0, REG_SZ, (const BYTE*)name, strlen(name) + 1);
|
||||
if (res != ERROR_SUCCESS) goto error_close_progid_key;
|
||||
}
|
||||
|
||||
|
@ -938,6 +932,18 @@ static struct regsvr_filter const filter_list[] = {
|
|||
{ 0xFFFFFFFF },
|
||||
}
|
||||
},
|
||||
{ &CLSID_VideoMixingRenderer,
|
||||
&CLSID_LegacyAmFilterCategory,
|
||||
{'V','i','d','e','o',' ','M','i','x','i','n','g',' ','R','e','n','d','e','r','e','r',0},
|
||||
0x200000,
|
||||
{ { REG_PINFLAG_B_RENDERER,
|
||||
{ { &MEDIATYPE_Video, &GUID_NULL },
|
||||
{ NULL }
|
||||
},
|
||||
},
|
||||
{ 0xFFFFFFFF },
|
||||
}
|
||||
},
|
||||
{ &CLSID_VideoMixingRenderer9,
|
||||
&CLSID_LegacyAmFilterCategory,
|
||||
{'V','i','d','e','o',' ','M','i','x','i','n','g',' ','R','e','n','d','e','r','e','r',' ','9',0},
|
||||
|
|
|
@ -1009,7 +1009,7 @@ HRESULT VideoRenderer_create(IUnknown *pUnkOuter, void **ppv)
|
|||
pVideoRenderer->IUnknown_inner.lpVtbl = &IInner_VTable;
|
||||
pVideoRenderer->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl;
|
||||
|
||||
pVideoRenderer->init = 0;
|
||||
pVideoRenderer->init = FALSE;
|
||||
ZeroMemory(&pVideoRenderer->SourceRect, sizeof(RECT));
|
||||
ZeroMemory(&pVideoRenderer->DestRect, sizeof(RECT));
|
||||
ZeroMemory(&pVideoRenderer->WindowPos, sizeof(RECT));
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -71,6 +71,8 @@ typedef HRESULT (WINAPI *BaseOutputPin_DecideAllocator)(BaseOutputPin *This, IMe
|
|||
typedef HRESULT (WINAPI *BaseOutputPin_BreakConnect)(BaseOutputPin * This);
|
||||
|
||||
typedef struct BaseOutputPinFuncTable {
|
||||
BasePinFuncTable base;
|
||||
|
||||
/* Required for BaseOutputPinImpl_DecideAllocator */
|
||||
BaseOutputPin_DecideBufferSize pfnDecideBufferSize;
|
||||
/* Required for BaseOutputPinImpl_AttemptConnection */
|
||||
|
@ -94,6 +96,7 @@ typedef struct BaseInputPin
|
|||
typedef HRESULT (WINAPI *BaseInputPin_Receive)(BaseInputPin *This, IMediaSample *pSample);
|
||||
|
||||
typedef struct BaseInputPinFuncTable {
|
||||
BasePinFuncTable base;
|
||||
/* Optional */
|
||||
BaseInputPin_Receive pfnReceive;
|
||||
} BaseInputPinFuncTable;
|
||||
|
@ -132,7 +135,7 @@ HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocato
|
|||
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc);
|
||||
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
|
||||
|
||||
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BasePinFuncTable* pBaseFuncsTable, const BaseOutputPinFuncTable* pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin ** ppPin);
|
||||
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BaseOutputPinFuncTable* pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin ** ppPin);
|
||||
|
||||
/* Base Input Pin */
|
||||
HRESULT WINAPI BaseInputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv);
|
||||
|
@ -145,7 +148,9 @@ HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface);
|
|||
HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface);
|
||||
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
|
||||
|
||||
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo, const BasePinFuncTable* pBaseFuncsTable, const BaseInputPinFuncTable* pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin ** ppPin);
|
||||
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO * pPinInfo,
|
||||
const BaseInputPinFuncTable* pBaseInputFuncsTable,
|
||||
LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin ** ppPin);
|
||||
|
||||
typedef struct BaseFilter
|
||||
{
|
||||
|
|
78
reactos/lib/3rdparty/strmbase/dllfunc.c
vendored
78
reactos/lib/3rdparty/strmbase/dllfunc.c
vendored
|
@ -21,6 +21,12 @@
|
|||
|
||||
#include "strmbase_private.h"
|
||||
|
||||
#define NO_SHLWAPI_PATH
|
||||
#define NO_SHLWAPI_STRFCNS
|
||||
#define NO_SHLWAPI_GDI
|
||||
#define NO_SHLWAPI_STREAM
|
||||
#include <shlwapi.h>
|
||||
|
||||
extern const int g_cTemplates;
|
||||
extern const FactoryTemplate g_Templates[];
|
||||
|
||||
|
@ -37,76 +43,6 @@ static const WCHAR ips32_keyname[] = {'I','n','P','r','o','c','S','e','r','v','e
|
|||
static const WCHAR tmodel_keyname[] = {'T','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
|
||||
static const WCHAR tmodel_both[] = {'B','o','t','h',0};
|
||||
|
||||
#ifdef __REACTOS__
|
||||
static LSTATUS WINAPI RegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
|
||||
{
|
||||
LONG ret;
|
||||
DWORD dwMaxSubkeyLen, dwMaxValueLen;
|
||||
DWORD dwMaxLen, dwSize;
|
||||
WCHAR szNameBuf[MAX_PATH], *lpszName = szNameBuf;
|
||||
HKEY hSubKey = hKey;
|
||||
|
||||
TRACE("(hkey=%p,%p %s)\n", hKey, lpszSubKey, debugstr_w(lpszSubKey));
|
||||
|
||||
if(lpszSubKey)
|
||||
{
|
||||
ret = RegOpenKeyExW(hKey, lpszSubKey, 0, KEY_READ, &hSubKey);
|
||||
if (ret) return ret;
|
||||
}
|
||||
|
||||
/* Get highest length for keys, values */
|
||||
ret = RegQueryInfoKeyW(hSubKey, NULL, NULL, NULL, NULL,
|
||||
&dwMaxSubkeyLen, NULL, NULL, &dwMaxValueLen, NULL, NULL, NULL);
|
||||
if (ret) goto cleanup;
|
||||
|
||||
dwMaxSubkeyLen++;
|
||||
dwMaxValueLen++;
|
||||
dwMaxLen = max(dwMaxSubkeyLen, dwMaxValueLen);
|
||||
if (dwMaxLen > sizeof(szNameBuf)/sizeof(WCHAR))
|
||||
{
|
||||
/* Name too big: alloc a buffer for it */
|
||||
if (!(lpszName = HeapAlloc( GetProcessHeap(), 0, dwMaxLen*sizeof(WCHAR))))
|
||||
{
|
||||
ret = ERROR_NOT_ENOUGH_MEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Recursively delete all the subkeys */
|
||||
while (TRUE)
|
||||
{
|
||||
dwSize = dwMaxLen;
|
||||
if (RegEnumKeyExW(hSubKey, 0, lpszName, &dwSize, NULL,
|
||||
NULL, NULL, NULL)) break;
|
||||
|
||||
ret = RegDeleteTreeW(hSubKey, lpszName);
|
||||
if (ret) goto cleanup;
|
||||
}
|
||||
|
||||
if (lpszSubKey)
|
||||
ret = RegDeleteKeyW(hKey, lpszSubKey);
|
||||
else
|
||||
while (TRUE)
|
||||
{
|
||||
dwSize = dwMaxLen;
|
||||
if (RegEnumValueW(hKey, 0, lpszName, &dwSize,
|
||||
NULL, NULL, NULL, NULL)) break;
|
||||
|
||||
ret = RegDeleteValueW(hKey, lpszName);
|
||||
if (ret) goto cleanup;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
/* Free buffer if allocated */
|
||||
if (lpszName != szNameBuf)
|
||||
HeapFree( GetProcessHeap(), 0, lpszName);
|
||||
if(lpszSubKey)
|
||||
RegCloseKey(hSubKey);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* SetupRegisterClass()
|
||||
*/
|
||||
|
@ -174,7 +110,7 @@ static HRESULT SetupRegisterAllClasses(const FactoryTemplate * pList, int num,
|
|||
pList->m_Name, szFileName,
|
||||
ips32_keyname, tmodel_both);
|
||||
else
|
||||
hr = RegDeleteTreeW(hkey, szCLSID);
|
||||
hr = SHDeleteKeyW(hkey, szCLSID);
|
||||
}
|
||||
}
|
||||
RegCloseKey(hkey);
|
||||
|
|
16
reactos/lib/3rdparty/strmbase/filter.c
vendored
16
reactos/lib/3rdparty/strmbase/filter.c
vendored
|
@ -27,23 +27,15 @@ static inline BaseFilter *impl_from_IBaseFilter(IBaseFilter *iface)
|
|||
|
||||
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv)
|
||||
{
|
||||
BaseFilter *This = impl_from_IBaseFilter(iface);
|
||||
TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
|
||||
|
||||
*ppv = NULL;
|
||||
|
||||
if (IsEqualIID(riid, &IID_IUnknown))
|
||||
*ppv = This;
|
||||
else if (IsEqualIID(riid, &IID_IPersist))
|
||||
*ppv = This;
|
||||
else if (IsEqualIID(riid, &IID_IMediaFilter))
|
||||
*ppv = This;
|
||||
else if (IsEqualIID(riid, &IID_IBaseFilter))
|
||||
*ppv = This;
|
||||
|
||||
if (*ppv)
|
||||
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPersist) ||
|
||||
IsEqualIID(riid, &IID_IMediaFilter) || IsEqualIID(riid, &IID_IBaseFilter))
|
||||
{
|
||||
IUnknown_AddRef((IUnknown *)(*ppv));
|
||||
*ppv = iface;
|
||||
IBaseFilter_AddRef(iface);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
44
reactos/lib/3rdparty/strmbase/pin.c
vendored
44
reactos/lib/3rdparty/strmbase/pin.c
vendored
|
@ -409,6 +409,9 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
|
|||
TRACE("(%p/%p)->(%p, %p)\n", This, iface, pReceivePin, pmt);
|
||||
dump_AM_MEDIA_TYPE(pmt);
|
||||
|
||||
if (!pReceivePin)
|
||||
return E_POINTER;
|
||||
|
||||
/* If we try to connect to ourselves, we will definitely deadlock.
|
||||
* There are other cases where we could deadlock too, but this
|
||||
* catches the obvious case */
|
||||
|
@ -455,9 +458,11 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
|
|||
/* then try receiver filter's media types */
|
||||
if (hr != S_OK && SUCCEEDED(hr = IPin_EnumMediaTypes(pReceivePin, &pEnumCandidates))) /* if we haven't already connected successfully */
|
||||
{
|
||||
ULONG fetched;
|
||||
|
||||
hr = VFW_E_NO_ACCEPTABLE_TYPES; /* Assume the worst, but set to S_OK if connected successfully */
|
||||
|
||||
while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, NULL))
|
||||
while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, &fetched))
|
||||
{
|
||||
assert(pmtCandidate);
|
||||
dump_AM_MEDIA_TYPE(pmtCandidate);
|
||||
|
@ -780,7 +785,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin* iface, IPin * pRecei
|
|||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT OutputPin_Init(const IPinVtbl *OutputPin_Vtbl, const PIN_INFO * pPinInfo, const BasePinFuncTable* pBaseFuncsTable, const BaseOutputPinFuncTable* pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, BaseOutputPin * pPinImpl)
|
||||
static HRESULT OutputPin_Init(const IPinVtbl *OutputPin_Vtbl, const PIN_INFO * pPinInfo, const BaseOutputPinFuncTable* vtbl, LPCRITICAL_SECTION pCritSec, BaseOutputPin * pPinImpl)
|
||||
{
|
||||
TRACE("\n");
|
||||
|
||||
|
@ -793,18 +798,18 @@ static HRESULT OutputPin_Init(const IPinVtbl *OutputPin_Vtbl, const PIN_INFO * p
|
|||
pPinImpl->pin.tStop = 0;
|
||||
pPinImpl->pin.dRate = 1.0;
|
||||
Copy_PinInfo(&pPinImpl->pin.pinInfo, pPinInfo);
|
||||
pPinImpl->pin.pFuncsTable = pBaseFuncsTable;
|
||||
pPinImpl->pin.pFuncsTable = &vtbl->base;
|
||||
ZeroMemory(&pPinImpl->pin.mtCurrent, sizeof(AM_MEDIA_TYPE));
|
||||
|
||||
/* Output pin attributes */
|
||||
pPinImpl->pMemInputPin = NULL;
|
||||
pPinImpl->pAllocator = NULL;
|
||||
pPinImpl->pFuncsTable = pBaseOutputFuncsTable;
|
||||
pPinImpl->pFuncsTable = vtbl;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BasePinFuncTable* pBaseFuncsTable, const BaseOutputPinFuncTable* pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin ** ppPin)
|
||||
HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BaseOutputPinFuncTable* vtbl, LPCRITICAL_SECTION pCritSec, IPin ** ppPin)
|
||||
{
|
||||
BaseOutputPin * pPinImpl;
|
||||
|
||||
|
@ -817,14 +822,14 @@ HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outp
|
|||
}
|
||||
|
||||
assert(outputpin_size >= sizeof(BaseOutputPin));
|
||||
assert(pBaseFuncsTable->pfnAttemptConnection);
|
||||
assert(vtbl->base.pfnAttemptConnection);
|
||||
|
||||
pPinImpl = CoTaskMemAlloc(outputpin_size);
|
||||
|
||||
if (!pPinImpl)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if (SUCCEEDED(OutputPin_Init(OutputPin_Vtbl, pPinInfo, pBaseFuncsTable, pBaseOutputFuncsTable, pCritSec, pPinImpl)))
|
||||
if (SUCCEEDED(OutputPin_Init(OutputPin_Vtbl, pPinInfo, vtbl, pCritSec, pPinImpl)))
|
||||
{
|
||||
*ppPin = &pPinImpl->pin.IPin_iface;
|
||||
return S_OK;
|
||||
|
@ -971,7 +976,7 @@ HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface)
|
|||
if (This->flushing)
|
||||
hr = S_FALSE;
|
||||
else
|
||||
This->end_of_stream = 1;
|
||||
This->end_of_stream = TRUE;
|
||||
LeaveCriticalSection(This->pin.pCritSec);
|
||||
|
||||
if (hr == S_OK)
|
||||
|
@ -991,7 +996,7 @@ HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface)
|
|||
TRACE("() semi-stub\n");
|
||||
|
||||
EnterCriticalSection(This->pin.pCritSec);
|
||||
This->flushing = 1;
|
||||
This->flushing = TRUE;
|
||||
|
||||
hr = SendFurther( iface, deliver_beginflush, NULL, NULL );
|
||||
LeaveCriticalSection(This->pin.pCritSec);
|
||||
|
@ -1011,7 +1016,7 @@ HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface)
|
|||
TRACE("(%p)\n", This);
|
||||
|
||||
EnterCriticalSection(This->pin.pCritSec);
|
||||
This->flushing = This->end_of_stream = 0;
|
||||
This->flushing = This->end_of_stream = FALSE;
|
||||
|
||||
hr = SendFurther( iface, deliver_endflush, NULL, NULL );
|
||||
LeaveCriticalSection(This->pin.pCritSec);
|
||||
|
@ -1199,7 +1204,7 @@ static const IMemInputPinVtbl MemInputPin_Vtbl =
|
|||
};
|
||||
|
||||
static HRESULT InputPin_Init(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo,
|
||||
const BasePinFuncTable* pBaseFuncsTable, const BaseInputPinFuncTable* pBaseInputFuncsTable,
|
||||
const BaseInputPinFuncTable* vtbl,
|
||||
LPCRITICAL_SECTION pCritSec, IMemAllocator *allocator, BaseInputPin * pPinImpl)
|
||||
{
|
||||
TRACE("\n");
|
||||
|
@ -1213,29 +1218,30 @@ static HRESULT InputPin_Init(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPi
|
|||
pPinImpl->pin.dRate = 1.0;
|
||||
Copy_PinInfo(&pPinImpl->pin.pinInfo, pPinInfo);
|
||||
ZeroMemory(&pPinImpl->pin.mtCurrent, sizeof(AM_MEDIA_TYPE));
|
||||
pPinImpl->pin.pFuncsTable = pBaseFuncsTable;
|
||||
pPinImpl->pin.pFuncsTable = &vtbl->base;
|
||||
|
||||
/* Input pin attributes */
|
||||
pPinImpl->pFuncsTable = pBaseInputFuncsTable;
|
||||
pPinImpl->pFuncsTable = vtbl;
|
||||
pPinImpl->pAllocator = pPinImpl->preferred_allocator = allocator;
|
||||
if (pPinImpl->preferred_allocator)
|
||||
IMemAllocator_AddRef(pPinImpl->preferred_allocator);
|
||||
pPinImpl->pin.IPin_iface.lpVtbl = InputPin_Vtbl;
|
||||
pPinImpl->IMemInputPin_iface.lpVtbl = &MemInputPin_Vtbl;
|
||||
pPinImpl->flushing = pPinImpl->end_of_stream = 0;
|
||||
pPinImpl->flushing = pPinImpl->end_of_stream = FALSE;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo,
|
||||
const BasePinFuncTable* pBaseFuncsTable, const BaseInputPinFuncTable* pBaseInputFuncsTable,
|
||||
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO * pPinInfo,
|
||||
const BaseInputPinFuncTable* vtbl,
|
||||
LPCRITICAL_SECTION pCritSec, IMemAllocator *allocator, IPin ** ppPin)
|
||||
{
|
||||
BaseInputPin * pPinImpl;
|
||||
|
||||
*ppPin = NULL;
|
||||
|
||||
assert(pBaseFuncsTable->pfnCheckMediaType);
|
||||
assert(inputpin_size >= sizeof(BaseInputPin));
|
||||
assert(vtbl->base.pfnCheckMediaType);
|
||||
|
||||
if (pPinInfo->dir != PINDIR_INPUT)
|
||||
{
|
||||
|
@ -1243,12 +1249,12 @@ HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * p
|
|||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
pPinImpl = CoTaskMemAlloc(sizeof(*pPinImpl));
|
||||
pPinImpl = CoTaskMemAlloc(inputpin_size);
|
||||
|
||||
if (!pPinImpl)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if (SUCCEEDED(InputPin_Init(InputPin_Vtbl, pPinInfo, pBaseFuncsTable, pBaseInputFuncsTable, pCritSec, allocator, pPinImpl)))
|
||||
if (SUCCEEDED(InputPin_Init(InputPin_Vtbl, pPinInfo, vtbl, pCritSec, allocator, pPinImpl)))
|
||||
{
|
||||
*ppPin = (IPin *)pPinImpl;
|
||||
return S_OK;
|
||||
|
|
10
reactos/lib/3rdparty/strmbase/pospass.c
vendored
10
reactos/lib/3rdparty/strmbase/pospass.c
vendored
|
@ -253,7 +253,7 @@ HRESULT WINAPI PosPassThru_Construct(IUnknown *pUnkOuter, LPVOID *ppPassThru)
|
|||
fimpl->IMediaPosition_iface.lpVtbl = &IMediaPositionPassThru_Vtbl;
|
||||
fimpl->ref = 1;
|
||||
fimpl->pin = NULL;
|
||||
fimpl->timevalid = 0;
|
||||
fimpl->timevalid = FALSE;
|
||||
InitializeCriticalSection(&fimpl->time_cs);
|
||||
fimpl->time_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PassThruImpl.time_cs");
|
||||
BaseDispatch_Init(&fimpl->baseDispatch, &IID_IMediaPosition);
|
||||
|
@ -589,7 +589,7 @@ HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_
|
|||
PassThruImpl *This = impl_from_IUnknown_inner(iface);
|
||||
EnterCriticalSection(&This->time_cs);
|
||||
This->time_earliest = start;
|
||||
This->timevalid = 1;
|
||||
This->timevalid = TRUE;
|
||||
LeaveCriticalSection(&This->time_cs);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -598,7 +598,7 @@ HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface)
|
|||
{
|
||||
PassThruImpl *This = impl_from_IUnknown_inner(iface);
|
||||
EnterCriticalSection(&This->time_cs);
|
||||
This->timevalid = 0;
|
||||
This->timevalid = FALSE;
|
||||
LeaveCriticalSection(&This->time_cs);
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -611,10 +611,10 @@ HRESULT WINAPI RendererPosPassThru_EOS(IUnknown *iface)
|
|||
hr = IMediaSeeking_GetStopPosition(&This->IMediaSeeking_iface, &time);
|
||||
EnterCriticalSection(&This->time_cs);
|
||||
if (SUCCEEDED(hr)) {
|
||||
This->timevalid = 1;
|
||||
This->timevalid = TRUE;
|
||||
This->time_earliest = time;
|
||||
} else
|
||||
This->timevalid = 0;
|
||||
This->timevalid = FALSE;
|
||||
LeaveCriticalSection(&This->time_cs);
|
||||
return hr;
|
||||
}
|
||||
|
|
|
@ -101,8 +101,9 @@ void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart)
|
|||
This->avg_render = This->last_in_time = This->last_left = This->avg_duration = This->avg_pt = -1;
|
||||
This->clockstart = tStart;
|
||||
This->avg_rate = -1.0;
|
||||
This->rendered = This->dropped = This->is_dropped = 0;
|
||||
This->qos_handled = 1; /* Lie that will be corrected on first adjustment */
|
||||
This->rendered = This->dropped = 0;
|
||||
This->is_dropped = FALSE;
|
||||
This->qos_handled = TRUE; /* Lie that will be corrected on first adjustment */
|
||||
}
|
||||
|
||||
|
||||
|
|
22
reactos/lib/3rdparty/strmbase/renderer.c
vendored
22
reactos/lib/3rdparty/strmbase/renderer.c
vendored
|
@ -217,15 +217,14 @@ static const BaseFilterFuncTable RendererBaseFilterFuncTable = {
|
|||
BaseRenderer_GetPinCount
|
||||
};
|
||||
|
||||
static const BasePinFuncTable input_BaseFuncTable = {
|
||||
BaseRenderer_Input_CheckMediaType,
|
||||
NULL,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
BasePinImpl_GetMediaType
|
||||
};
|
||||
|
||||
static const BaseInputPinFuncTable input_BaseInputFuncTable = {
|
||||
BaseRenderer_Receive
|
||||
{
|
||||
BaseRenderer_Input_CheckMediaType,
|
||||
NULL,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
BasePinImpl_GetMediaType
|
||||
},
|
||||
BaseRenderer_Receive
|
||||
};
|
||||
|
||||
|
||||
|
@ -243,7 +242,8 @@ HRESULT WINAPI BaseRenderer_Init(BaseRenderer * This, const IBaseFilterVtbl *Vtb
|
|||
piInput.pFilter = &This->filter.IBaseFilter_iface;
|
||||
lstrcpynW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0]));
|
||||
|
||||
hr = BaseInputPin_Construct(&BaseRenderer_InputPin_Vtbl, &piInput, &input_BaseFuncTable, &input_BaseInputFuncTable, &This->filter.csFilter, NULL, (IPin **)&This->pInputPin);
|
||||
hr = BaseInputPin_Construct(&BaseRenderer_InputPin_Vtbl, sizeof(BaseInputPin), &piInput,
|
||||
&input_BaseInputFuncTable, &This->filter.csFilter, NULL, (IPin **)&This->pInputPin);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
|
@ -461,7 +461,7 @@ HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
|
|||
|
||||
if (This->pInputPin->pin.pConnectedTo)
|
||||
{
|
||||
This->pInputPin->end_of_stream = 0;
|
||||
This->pInputPin->end_of_stream = FALSE;
|
||||
}
|
||||
else if (This->filter.filterInfo.pGraph)
|
||||
{
|
||||
|
@ -504,7 +504,7 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface)
|
|||
{
|
||||
if (This->pInputPin->pin.pConnectedTo)
|
||||
ResetEvent(This->evComplete);
|
||||
This->pInputPin->end_of_stream = 0;
|
||||
This->pInputPin->end_of_stream = FALSE;
|
||||
}
|
||||
else if (This->pFuncsTable->pfnOnStopStreaming)
|
||||
This->pFuncsTable->pfnOnStopStreaming(This);
|
||||
|
|
33
reactos/lib/3rdparty/strmbase/transform.c
vendored
33
reactos/lib/3rdparty/strmbase/transform.c
vendored
|
@ -157,25 +157,23 @@ static const BaseFilterFuncTable tfBaseFuncTable = {
|
|||
TransformFilter_GetPinCount
|
||||
};
|
||||
|
||||
static const BasePinFuncTable tf_input_BaseFuncTable = {
|
||||
TransformFilter_Input_CheckMediaType,
|
||||
NULL,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
BasePinImpl_GetMediaType
|
||||
};
|
||||
|
||||
static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = {
|
||||
{
|
||||
TransformFilter_Input_CheckMediaType,
|
||||
NULL,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
BasePinImpl_GetMediaType
|
||||
},
|
||||
TransformFilter_Input_Receive
|
||||
};
|
||||
|
||||
static const BasePinFuncTable tf_output_BaseFuncTable = {
|
||||
NULL,
|
||||
BaseOutputPinImpl_AttemptConnection,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
TransformFilter_Output_GetMediaType
|
||||
};
|
||||
|
||||
static const BaseOutputPinFuncTable tf_output_BaseOutputFuncTable = {
|
||||
{
|
||||
NULL,
|
||||
BaseOutputPinImpl_AttemptConnection,
|
||||
BasePinImpl_GetMediaTypeVersion,
|
||||
TransformFilter_Output_GetMediaType
|
||||
},
|
||||
TransformFilter_Output_DecideBufferSize,
|
||||
BaseOutputPinImpl_DecideAllocator,
|
||||
BaseOutputPinImpl_BreakConnect
|
||||
|
@ -207,11 +205,12 @@ static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID* p
|
|||
piOutput.pFilter = &pTransformFilter->filter.IBaseFilter_iface;
|
||||
lstrcpynW(piOutput.achName, wcsOutputPinName, sizeof(piOutput.achName) / sizeof(piOutput.achName[0]));
|
||||
|
||||
hr = BaseInputPin_Construct(&TransformFilter_InputPin_Vtbl, &piInput, &tf_input_BaseFuncTable, &tf_input_BaseInputFuncTable, &pTransformFilter->filter.csFilter, NULL, &pTransformFilter->ppPins[0]);
|
||||
hr = BaseInputPin_Construct(&TransformFilter_InputPin_Vtbl, sizeof(BaseInputPin), &piInput,
|
||||
&tf_input_BaseInputFuncTable, &pTransformFilter->filter.csFilter, NULL, &pTransformFilter->ppPins[0]);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = BaseOutputPin_Construct(&TransformFilter_OutputPin_Vtbl, sizeof(BaseOutputPin), &piOutput, &tf_output_BaseFuncTable, &tf_output_BaseOutputFuncTable, &pTransformFilter->filter.csFilter, &pTransformFilter->ppPins[1]);
|
||||
hr = BaseOutputPin_Construct(&TransformFilter_OutputPin_Vtbl, sizeof(BaseOutputPin), &piOutput, &tf_output_BaseOutputFuncTable, &pTransformFilter->filter.csFilter, &pTransformFilter->ppPins[1]);
|
||||
|
||||
if (FAILED(hr))
|
||||
ERR("Cannot create output pin (%x)\n", hr);
|
||||
|
@ -387,7 +386,7 @@ HRESULT WINAPI TransformFilterImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStar
|
|||
{
|
||||
if (This->filter.state == State_Stopped)
|
||||
{
|
||||
impl_BaseInputPin_from_IPin(This->ppPins[0])->end_of_stream = 0;
|
||||
impl_BaseInputPin_from_IPin(This->ppPins[0])->end_of_stream = FALSE;
|
||||
if (This->pFuncsTable->pfnStartStreaming)
|
||||
hr = This->pFuncsTable->pfnStartStreaming(This);
|
||||
if (SUCCEEDED(hr))
|
||||
|
|
|
@ -27,7 +27,7 @@ reactos/tools/wpp # Synced to Wine-1.7.1
|
|||
|
||||
The following libraries are shared with Wine.
|
||||
|
||||
reactos/dll/directx/wine/amstream # Synced to Wine-1.7.1
|
||||
reactos/dll/directx/wine/amstream # Synced to Wine-1.7.17
|
||||
reactos/dll/directx/wine/d3d8 # Synced to Wine-1.7.11
|
||||
reactos/dll/directx/wine/d3d9 # Synced to Wine-1.7.11
|
||||
reactos/dll/directx/wine/d3dcompiler_43 # Synced to Wine-1.7.1
|
||||
|
@ -45,7 +45,7 @@ reactos/dll/directx/wine/dxdiagn # Synced to Wine-1.7.1
|
|||
reactos/dll/directx/wine/dxgi # Synced to Wine-1.7.1
|
||||
reactos/dll/directx/wine/msdmo # Synced to Wine-1.7.1
|
||||
reactos/dll/directx/wine/qedit # Synced to Wine-1.7.1
|
||||
reactos/dll/directx/wine/quartz # Synced to Wine-1.7.1
|
||||
reactos/dll/directx/wine/quartz # Synced to Wine-1.7.17
|
||||
reactos/dll/directx/wine/wined3d # Synced to Wine-1.7.11
|
||||
|
||||
reactos/dll/win32/activeds # Synced to Wine-1.7.1
|
||||
|
@ -246,7 +246,7 @@ In addition the following libs, dlls and source files are mostly based on code p
|
|||
from Winehq CVS. If you are looking to update something in these files
|
||||
check Wine current souces first as it may already be fixed.
|
||||
|
||||
reactos/lib/3rdparty/strmbase # Synced to Wine-1.7.1
|
||||
reactos/lib/3rdparty/strmbase # Synced to Wine-1.7.17
|
||||
|
||||
advapi32 -
|
||||
reactos/dll/win32/advapi32/crypt/*.c # Synced to Wine-1.7.1
|
||||
|
|
Loading…
Reference in a new issue