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

Last change on this file since 6649 was 6649, checked in by bird, 24 years ago

Added $Id:$ keyword.

File size: 2.3 KB
Line 
1/* $Id: fgraph.c,v 1.3 2001-09-05 13:36:34 bird Exp $ */
2/*
3 * Implementation of CLSID_FilterGraph.
4 *
5 * FIXME - stub.
6 *
7 * hidenori@a2.ctktv.ne.jp
8 */
9
10#include "config.h"
11
12#include "windef.h"
13#include "winbase.h"
14#include "wingdi.h"
15#include "winerror.h"
16#include "wine/obj_base.h"
17#include "wine/obj_oleaut.h"
18#include "strmif.h"
19#include "control.h"
20#include "uuids.h"
21
22#include "debugtools.h"
23DEFAULT_DEBUG_CHANNEL(quartz);
24
25#include "quartz_private.h"
26#include "fgraph.h"
27
28/* can I use offsetof safely? - FIXME? */
29static QUARTZ_IFEntry IFEntries[] =
30{
31 { &IID_IFilterGraph, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) },
32 { &IID_IGraphBuilder, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) },
33 { &IID_IFilterGraph2, offsetof(CFilterGraph,fgraph)-offsetof(CFilterGraph,unk) },
34 { &IID_IMediaControl, offsetof(CFilterGraph,mediacontrol)-offsetof(CFilterGraph,unk) },
35 { &IID_IMediaEvent, offsetof(CFilterGraph,mediaevent)-offsetof(CFilterGraph,unk) },
36 { &IID_IMediaEventEx, offsetof(CFilterGraph,mediaevent)-offsetof(CFilterGraph,unk) },
37 { &IID_IMediaPosition, offsetof(CFilterGraph,mediaposition)-offsetof(CFilterGraph,unk) },
38 { &IID_IMediaSeeking, offsetof(CFilterGraph,mediaseeking)-offsetof(CFilterGraph,unk) },
39 { &IID_IBasicVideo, offsetof(CFilterGraph,basvid)-offsetof(CFilterGraph,unk) },
40 { &IID_IBasicAudio, offsetof(CFilterGraph,basaud)-offsetof(CFilterGraph,unk) },
41 { &IID_IVideoWindow, offsetof(CFilterGraph,vidwin)-offsetof(CFilterGraph,unk) },
42};
43
44HRESULT QUARTZ_CreateFilterGraph(IUnknown* punkOuter,void** ppobj)
45{
46 CFilterGraph* pfg;
47
48 TRACE("(%p,%p)\n",punkOuter,ppobj);
49
50 pfg = (CFilterGraph*)QUARTZ_AllocObj( sizeof(CFilterGraph) );
51 if ( pfg == NULL )
52 return E_OUTOFMEMORY;
53
54 QUARTZ_IUnkInit( &pfg->unk, punkOuter );
55 CFilterGraph_InitIFilterGraph2( pfg );
56 CFilterGraph_InitIMediaControl( pfg );
57 CFilterGraph_InitIMediaEventEx( pfg );
58 CFilterGraph_InitIMediaPosition( pfg );
59 CFilterGraph_InitIMediaSeeking( pfg );
60 CFilterGraph_InitIBasicVideo2( pfg );
61 CFilterGraph_InitIBasicAudio( pfg );
62 CFilterGraph_InitIVideoWindow( pfg );
63
64 pfg->unk.pEntries = IFEntries;
65 pfg->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
66
67 *ppobj = (void*)(&pfg->unk);
68
69 return S_OK;
70}
Note: See TracBrowser for help on using the repository browser.