- Timestamp:
- Aug 23, 2001, 8:34:51 PM (24 years ago)
- Location:
- trunk/src/quartz
- Files:
-
- 10 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/quartz/fgraph.c
r6563 r6578 14 14 #include "winerror.h" 15 15 #include "wine/obj_base.h" 16 #include "wine/obj_oleaut.h" 16 17 #include "strmif.h" 18 #include "control.h" 17 19 #include "uuids.h" 18 20 … … 29 31 { &IID_IGraphBuilder, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) }, 30 32 { &IID_IFilterGraph2, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) }, 33 { &IID_IMediaControl, offsetof(CFilterGraph,mediacontrol)-offsetof(CFilterGraph,unk) }, 34 { &IID_IMediaEvent, offsetof(CFilterGraph,mediaevent)-offsetof(CFilterGraph,unk) }, 35 { &IID_IMediaEventEx, offsetof(CFilterGraph,mediaevent)-offsetof(CFilterGraph,unk) }, 36 { &IID_IMediaPosition, offsetof(CFilterGraph,mediaposition)-offsetof(CFilterGraph,unk) }, 37 { &IID_IMediaSeeking, offsetof(CFilterGraph,mediaseeking)-offsetof(CFilterGraph,unk) }, 38 { &IID_IBasicVideo, offsetof(CFilterGraph,basvid)-offsetof(CFilterGraph,unk) }, 39 { &IID_IBasicAudio, offsetof(CFilterGraph,basaud)-offsetof(CFilterGraph,unk) }, 40 { &IID_IVideoWindow, offsetof(CFilterGraph,vidwin)-offsetof(CFilterGraph,unk) }, 31 41 }; 32 42 … … 41 51 return E_OUTOFMEMORY; 42 52 43 QUARTZ_IUnkInit( &pfg->unk );53 QUARTZ_IUnkInit( &pfg->unk, punkOuter ); 44 54 CFilterGraph_InitIFilterGraph2( pfg ); 55 CFilterGraph_InitIMediaControl( pfg ); 56 CFilterGraph_InitIMediaEventEx( pfg ); 57 CFilterGraph_InitIMediaPosition( pfg ); 58 CFilterGraph_InitIMediaSeeking( pfg ); 59 CFilterGraph_InitIBasicVideo2( pfg ); 60 CFilterGraph_InitIBasicAudio( pfg ); 61 CFilterGraph_InitIVideoWindow( pfg ); 45 62 46 63 pfg->unk.pEntries = IFEntries; 47 64 pfg->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 48 65 49 *ppobj = (void*) pfg;66 *ppobj = (void*)(&pfg->unk); 50 67 51 68 return S_OK; -
trunk/src/quartz/fgraph.h
r6563 r6578 11 11 + IDispatch - IMediaControl 12 12 + IDispatch - IMediaEvent - IMediaEventEx 13 + IDispatch - IMediaPosition 13 14 + IMediaSeeking 14 15 + IDispatch - IBasicVideo (pass to a renderer) … … 24 25 } FG_IFilterGraph2Impl; 25 26 27 typedef struct FG_IMediaControlImpl 28 { 29 ICOM_VFIELD(IMediaControl); 30 } FG_IMediaControlImpl; 31 32 typedef struct FG_IMediaEventImpl 33 { 34 ICOM_VFIELD(IMediaEventEx); 35 } FG_IMediaEventImpl; 36 37 typedef struct FG_IMediaPositionImpl 38 { 39 ICOM_VFIELD(IMediaPosition); 40 } FG_IMediaPositionImpl; 41 42 typedef struct FG_IMediaSeekingImpl 43 { 44 ICOM_VFIELD(IMediaSeeking); 45 } FG_IMediaSeekingImpl; 46 47 typedef struct FG_IBasicVideoImpl 48 { 49 ICOM_VFIELD(IBasicVideo2); 50 } FG_IBasicVideoImpl; 51 52 typedef struct FG_IBasicAudioImpl 53 { 54 ICOM_VFIELD(IBasicAudio); 55 } FG_IBasicAudioImpl; 56 57 typedef struct FG_IVideoWindowImpl 58 { 59 ICOM_VFIELD(IVideoWindow); 60 } FG_IVideoWindowImpl; 61 62 26 63 typedef struct CFilterGraph 27 64 { 28 65 QUARTZ_IUnkImpl unk; 29 66 FG_IFilterGraph2Impl fgraph; 67 FG_IMediaControlImpl mediacontrol; 68 FG_IMediaEventImpl mediaevent; 69 FG_IMediaPositionImpl mediaposition; 70 FG_IMediaSeekingImpl mediaseeking; 71 FG_IBasicVideoImpl basvid; 72 FG_IBasicAudioImpl basaud; 73 FG_IVideoWindowImpl vidwin; 30 74 31 75 /* IFilterGraph2 fields. */ 76 /* IMediaControl fields. */ 77 /* IMediaEvent fields. */ 78 /* IMediaPosition fields. */ 79 /* IMediaSeeking fields. */ 80 /* IBasicVideo fields. */ 81 /* IBasicAudio fields. */ 82 /* IVideoWindow fields. */ 32 83 } CFilterGraph; 33 84 … … 37 88 38 89 void CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg ); 90 void CFilterGraph_InitIMediaControl( CFilterGraph* pfg ); 91 void CFilterGraph_InitIMediaEventEx( CFilterGraph* pfg ); 92 void CFilterGraph_InitIMediaPosition( CFilterGraph* pfg ); 93 void CFilterGraph_InitIMediaSeeking( CFilterGraph* pfg ); 94 void CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg ); 95 void CFilterGraph_InitIBasicAudio( CFilterGraph* pfg ); 96 void CFilterGraph_InitIVideoWindow( CFilterGraph* pfg ); 39 97 40 98 -
trunk/src/quartz/guid.c
r6563 r6578 9 9 #include "winerror.h" 10 10 #include "wine/obj_base.h" 11 #include "wine/obj_oleaut.h" 11 12 #include "strmif.h" 12 13 #include "uuids.h" 13 14 #include "control.h" -
trunk/src/quartz/ifgraph.c
r6563 r6578 15 15 #include "winerror.h" 16 16 #include "wine/obj_base.h" 17 #include "wine/obj_oleaut.h" 17 18 #include "strmif.h" 19 #include "control.h" 18 20 #include "uuids.h" 19 21 … … 31 33 TRACE("(%p)->()\n",This); 32 34 33 return IUnknown_QueryInterface( (IUnknown*)(&This->unk),riid,ppobj);35 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 34 36 } 35 37 … … 41 43 TRACE("(%p)->()\n",This); 42 44 43 return IUnknown_AddRef( (IUnknown*)(&This->unk));45 return IUnknown_AddRef(This->unk.punkControl); 44 46 } 45 47 … … 51 53 TRACE("(%p)->()\n",This); 52 54 53 return IUnknown_Release( (IUnknown*)(&This->unk));55 return IUnknown_Release(This->unk.punkControl); 54 56 } 55 57 -
trunk/src/quartz/imem.c
r6563 r6578 31 31 TRACE("(%p)->()\n",This); 32 32 33 return IUnknown_QueryInterface( (IUnknown*)(&This->unk),riid,ppobj);33 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 34 34 } 35 35 … … 41 41 TRACE("(%p)->()\n",This); 42 42 43 return IUnknown_AddRef( (IUnknown*)(&This->unk));43 return IUnknown_AddRef(This->unk.punkControl); 44 44 } 45 45 … … 51 51 TRACE("(%p)->()\n",This); 52 52 53 return IUnknown_Release( (IUnknown*)(&This->unk));53 return IUnknown_Release(This->unk.punkControl); 54 54 } 55 55 -
trunk/src/quartz/irclock.c
r6563 r6578 31 31 TRACE("(%p)->()\n",This); 32 32 33 return IUnknown_QueryInterface( (IUnknown*)(&This->unk),riid,ppobj);33 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj); 34 34 } 35 35 … … 41 41 TRACE("(%p)->()\n",This); 42 42 43 return IUnknown_AddRef( (IUnknown*)(&This->unk));43 return IUnknown_AddRef(This->unk.punkControl); 44 44 } 45 45 … … 51 51 TRACE("(%p)->()\n",This); 52 52 53 return IUnknown_Release( (IUnknown*)(&This->unk));53 return IUnknown_Release(This->unk.punkControl); 54 54 } 55 55 -
trunk/src/quartz/iunk.c
r6563 r6578 32 32 33 33 ofs = 0; 34 for ( dwIndex = 0; dwIndex < This->dwEntries; dwIndex++ ) 34 35 if ( IsEqualGUID( &IID_IUnknown, riid ) ) 35 36 { 36 if ( IsEqualGUID( This->pEntries[dwIndex].piid, riid ) ) 37 TRACE("IID_IUnknown - returns inner object.\n"); 38 } 39 else 40 { 41 for ( dwIndex = 0; dwIndex < This->dwEntries; dwIndex++ ) 37 42 { 38 ofs = This->pEntries[dwIndex].ofsVTPtr; 39 break; 43 if ( IsEqualGUID( This->pEntries[dwIndex].piid, riid ) ) 44 { 45 ofs = This->pEntries[dwIndex].ofsVTPtr; 46 break; 47 } 40 48 } 41 } 42 43 if ( dwIndex == This->dwEntries ) 44 { 45 if ( !IsEqualGUID( &IID_IUnknown, riid ) ) 49 if ( dwIndex == This->dwEntries ) 46 50 { 47 TRACE("unknown interface: %s\n",debugstr_guid(riid));51 FIXME("unknown interface: %s\n",debugstr_guid(riid)); 48 52 return E_NOINTERFACE; 49 53 } … … 51 55 52 56 *ppobj = (LPVOID)(((char*)This) + ofs); 53 IUnknown_AddRef( iface);57 IUnknown_AddRef((IUnknown*)(*ppobj)); 54 58 55 59 return S_OK; … … 90 94 91 95 92 void QUARTZ_IUnkInit( QUARTZ_IUnkImpl* pImpl )96 void QUARTZ_IUnkInit( QUARTZ_IUnkImpl* pImpl, IUnknown* punkOuter ) 93 97 { 94 98 TRACE("(%p)\n",pImpl); … … 98 102 pImpl->dwEntries = 0; 99 103 pImpl->ref = 1; 104 pImpl->punkControl = (IUnknown*)pImpl; 105 106 /* for delegation. */ 107 if ( punkOuter != NULL ) 108 pImpl->punkControl = punkOuter; 100 109 } 110 -
trunk/src/quartz/iunk.h
r6563 r6578 42 42 /* IUnknown fields. */ 43 43 ULONG ref; 44 IUnknown* punkControl; 44 45 } QUARTZ_IUnkImpl; 45 46 46 47 47 void QUARTZ_IUnkInit( QUARTZ_IUnkImpl* pImpl );48 void QUARTZ_IUnkInit( QUARTZ_IUnkImpl* pImpl, IUnknown* punkOuter ); 48 49 49 50 -
trunk/src/quartz/main.c
r6563 r6578 6 6 #include "wingdi.h" 7 7 #include "ole2.h" 8 #include "wine/obj_oleaut.h" 8 9 #include "strmif.h" 10 #include "control.h" 9 11 #include "uuids.h" 10 12 … … 146 148 if ( ppobj == NULL ) 147 149 return E_POINTER; 150 if ( pOuter != NULL && !IsEqualGUID( riid, &IID_IUnknown ) ) 151 return CLASS_E_NOAGGREGATION; 148 152 149 153 *ppobj = NULL; -
trunk/src/quartz/makefile
r6563 r6578 1 # $Id: makefile,v 1. 1 2001-08-19 14:02:12 sandervl Exp $1 # $Id: makefile,v 1.2 2001-08-23 18:34:22 sandervl Exp $ 2 2 3 3 # … … 28 28 # 29 29 OBJS = \ 30 $(OBJDIR)\amerror.obj \ 31 $(OBJDIR)\complist.obj \ 30 32 $(OBJDIR)\fgraph.obj \ 31 33 $(OBJDIR)\ifgraph.obj \ 32 34 $(OBJDIR)\imem.obj \ 35 $(OBJDIR)\ibasaud.obj \ 36 $(OBJDIR)\ibasvid.obj \ 37 $(OBJDIR)\imcntl.obj \ 38 $(OBJDIR)\imevent.obj \ 39 $(OBJDIR)\impos.obj \ 40 $(OBJDIR)\imseek.obj \ 41 $(OBJDIR)\ividwin.obj \ 33 42 $(OBJDIR)\initterm.obj \ 34 43 $(OBJDIR)\initquartz.obj \ -
trunk/src/quartz/memalloc.c
r6563 r6578 40 40 return E_OUTOFMEMORY; 41 41 42 QUARTZ_IUnkInit( &pma->unk );42 QUARTZ_IUnkInit( &pma->unk, punkOuter ); 43 43 CMemoryAllocator_InitIMemAllocator( pma ); 44 44 … … 46 46 pma->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 47 47 48 *ppobj = (void*) pma;48 *ppobj = (void*)(&pma->unk); 49 49 50 50 return S_OK; -
trunk/src/quartz/quartz.def
r6563 r6578 1 ; $Id: quartz.def,v 1. 1 2001-08-19 14:02:13 sandervl Exp $1 ; $Id: quartz.def,v 1.2 2001-08-23 18:34:23 sandervl Exp $ 2 2 3 3 ; … … 11 11 DllRegisterServer = _QUARTZ_DllRegisterServer@0 @3 12 12 DllUnregisterServer = _QUARTZ_DllUnregisterServer@0 @4 13 AMGetErrorTextA = _AMGetErrorTextA@12 @5 14 AMGetErrorTextW = _AMGetErrorTextW@12 @6 15 -
trunk/src/quartz/sysclock.c
r6563 r6578 40 40 return E_OUTOFMEMORY; 41 41 42 QUARTZ_IUnkInit( &psc->unk );42 QUARTZ_IUnkInit( &psc->unk, punkOuter ); 43 43 CSystemClock_InitIReferenceClock( psc ); 44 44 … … 46 46 psc->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]); 47 47 48 *ppobj = (void*) psc;48 *ppobj = (void*)(&psc->unk); 49 49 50 50 return S_OK;
Note:
See TracChangeset
for help on using the changeset viewer.