mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
amstream: Add checks to GetFormat.
This commit is contained in:
parent
bde73d8dfc
commit
49762b1679
@ -159,13 +159,13 @@ static HRESULT WINAPI IDirectDrawMediaStreamImpl_SendEndOfStream(IDirectDrawMedi
|
||||
|
||||
/*** IDirectDrawMediaStream methods ***/
|
||||
static HRESULT WINAPI IDirectDrawMediaStreamImpl_GetFormat(IDirectDrawMediaStream *iface,
|
||||
DDSURFACEDESC *pDDSDCurrent, IDirectDrawPalette **ppDirectDrawPalette,
|
||||
DDSURFACEDESC *pDDSDDesired, DWORD *pdwFlags)
|
||||
DDSURFACEDESC *current_format, IDirectDrawPalette **palette,
|
||||
DDSURFACEDESC *desired_format, DWORD *flags)
|
||||
{
|
||||
FIXME("(%p)->(%p,%p,%p,%p) stub!\n", iface, pDDSDCurrent, ppDirectDrawPalette, pDDSDDesired,
|
||||
pdwFlags);
|
||||
FIXME("(%p)->(%p,%p,%p,%p) stub!\n", iface, current_format, palette, desired_format,
|
||||
flags);
|
||||
|
||||
return E_NOTIMPL;
|
||||
return MS_E_NOSTREAM;
|
||||
|
||||
}
|
||||
|
||||
@ -390,7 +390,10 @@ static HRESULT WINAPI IAudioMediaStreamImpl_GetFormat(IAudioMediaStream *iface,
|
||||
|
||||
FIXME("(%p/%p)->(%p) stub!\n", iface, This, wave_format_current);
|
||||
|
||||
return E_NOTIMPL;
|
||||
if (!wave_format_current)
|
||||
return E_POINTER;
|
||||
|
||||
return MS_E_NOSTREAM;
|
||||
|
||||
}
|
||||
|
||||
|
@ -248,6 +248,13 @@ static void test_media_streams(void)
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
DDSURFACEDESC current_format, desired_format;
|
||||
IDirectDrawPalette *palette;
|
||||
DWORD flags;
|
||||
|
||||
hr = IDirectDrawMediaStream_GetFormat(ddraw_stream, ¤t_format, &palette, &desired_format, &flags);
|
||||
ok(hr == MS_E_NOSTREAM, "IDirectDrawoMediaStream_GetFormat returned: %x\n", hr);
|
||||
|
||||
hr = IDirectDrawMediaStream_CreateSample(ddraw_stream, NULL, NULL, 0, &ddraw_sample);
|
||||
ok(hr == S_OK, "IDirectDrawMediaStream_CreateSample returned: %x\n", hr);
|
||||
}
|
||||
@ -333,9 +340,16 @@ static void test_media_streams(void)
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
IAudioData* audio_data = NULL;
|
||||
WAVEFORMATEX format;
|
||||
|
||||
hr = CoCreateInstance(&CLSID_AMAudioData, NULL, CLSCTX_INPROC_SERVER, &IID_IAudioData, (void **)&audio_data);
|
||||
ok(hr == S_OK, "CoCreateInstance returned: %x\n", hr);
|
||||
|
||||
hr = IAudioMediaStream_GetFormat(audio_media_stream, NULL);
|
||||
ok(hr == E_POINTER, "IAudioMediaStream_GetFormat returned: %x\n", hr);
|
||||
hr = IAudioMediaStream_GetFormat(audio_media_stream, &format);
|
||||
ok(hr == MS_E_NOSTREAM, "IAudioMediaStream_GetFormat returned: %x\n", hr);
|
||||
|
||||
hr = IAudioMediaStream_CreateSample(audio_media_stream, NULL, 0, &audio_sample);
|
||||
ok(hr == E_POINTER, "IAudioMediaStream_CreateSample returned: %x\n", hr);
|
||||
hr = IAudioMediaStream_CreateSample(audio_media_stream, audio_data, 0, &audio_sample);
|
||||
|
Loading…
Reference in New Issue
Block a user