Commit 3dd09ed8 authored by Shaun Ren's avatar Shaun Ren Committed by Alexandre Julliard

ir50_32: Implement open and close.

parent 70e93833
MODULE = ir50_32.dll MODULE = ir50_32.dll
IMPORTS = user32 IMPORTS = user32 mfplat mfuuid
DELAYIMPORTS = winegstreamer
C_SRCS = \ C_SRCS = \
ir50.c ir50.c
......
...@@ -35,13 +35,23 @@ WINE_DEFAULT_DEBUG_CHANNEL(ir50_32); ...@@ -35,13 +35,23 @@ WINE_DEFAULT_DEBUG_CHANNEL(ir50_32);
static HINSTANCE IR50_32_hModule; static HINSTANCE IR50_32_hModule;
#define IV50_MAGIC mmioFOURCC('I','V','5','0') #define IV50_MAGIC mmioFOURCC('I','V','5','0')
#define compare_fourcc(fcc1, fcc2) (((fcc1)^(fcc2))&~0x20202020)
static LRESULT static LRESULT
IV50_Open( const ICINFO *icinfo ) IV50_Open( const ICINFO *icinfo )
{ {
FIXME("DRV_OPEN %p\n", icinfo); IMFTransform *decoder = NULL;
return 0;
TRACE("DRV_OPEN %p\n", icinfo);
if ( icinfo && compare_fourcc( icinfo->fccType, ICTYPE_VIDEO ) )
return 0;
if ( FAILED(winegstreamer_create_video_decoder( &decoder )) )
return 0;
return (LRESULT)decoder;
} }
static LRESULT static LRESULT
...@@ -177,7 +187,10 @@ LRESULT WINAPI IV50_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, ...@@ -177,7 +187,10 @@ LRESULT WINAPI IV50_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg,
break; break;
case DRV_CLOSE: case DRV_CLOSE:
FIXME("DRV_CLOSE\n"); TRACE("DRV_CLOSE\n");
if ( decoder )
IMFTransform_Release( decoder );
r = 1;
break; break;
case DRV_ENABLE: case DRV_ENABLE:
......
...@@ -31,4 +31,6 @@ ...@@ -31,4 +31,6 @@
#define IDS_NAME 100 #define IDS_NAME 100
#define IDS_DESCRIPTION 101 #define IDS_DESCRIPTION 101
HRESULT WINAPI winegstreamer_create_video_decoder(IMFTransform **out);
#endif /* __IR50_PRIVATE_H */ #endif /* __IR50_PRIVATE_H */
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