source: trunk/src/quartz/fgraph.c@ 6578

Last change on this file since 6578 was 6578, checked in by sandervl, 24 years ago

wine updates

File size: 2.1 KB
Line 
1/*
2 * Implementation of CLSID_FilterGraph.
3 *
4 * FIXME - stub.
5 *
6 * hidenori@a2.ctktv.ne.jp
7 */
8
9#include "config.h"
10
11#include "windef.h"
12#include "winbase.h"
13#include "wingdi.h"
14#include "winerror.h"
15#include "wine/obj_base.h"
16#include "wine/obj_oleaut.h"
17#include "strmif.h"
18#include "control.h"
19#include "uuids.h"
20
21#include "debugtools.h"
22DEFAULT_DEBUG_CHANNEL(quartz);
23
24#include "quartz_private.h"
25#include "fgraph.h"
26
27/* can I use offsetof safely? - FIXME? */
28static QUARTZ_IFEntry IFEntries[] =
29{
30 { &IID_IFilterGraph, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) },
31 { &IID_IGraphBuilder, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) },
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) },
41};
42
43HRESULT QUARTZ_CreateFilterGraph(IUnknown* punkOuter,void** ppobj)
44{
45 CFilterGraph* pfg;
46
47 TRACE("(%p,%p)\n",punkOuter,ppobj);
48
49 pfg = (CFilterGraph*)QUARTZ_AllocObj( sizeof(CFilterGraph) );
50 if ( pfg == NULL )
51 return E_OUTOFMEMORY;
52
53 QUARTZ_IUnkInit( &pfg->unk, punkOuter );
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 );
62
63 pfg->unk.pEntries = IFEntries;
64 pfg->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
65
66 *ppobj = (void*)(&pfg->unk);
67
68 return S_OK;
69}
Note: See TracBrowser for help on using the repository browser.