]> git.sesse.net Git - vlc/blob - modules/access/dshow/common.h
update module LIST file.
[vlc] / modules / access / dshow / common.h
1 /*****************************************************************************
2  * common.h : DirectShow access module for vlc
3  *****************************************************************************
4  * Copyright (C) 2002 the VideoLAN team
5  * $Id$
6  *
7  * Author: Gildas Bazin <gbazin@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27 #include <string>
28 #include <list>
29 #include <deque>
30 using namespace std;
31
32 #ifndef _MSC_VER
33 #   include <wtypes.h>
34 #   include <unknwn.h>
35 #   include <ole2.h>
36 #   include <limits.h>
37 #   ifdef _WINGDI_
38 #      undef _WINGDI_
39 #   endif
40 #   define _WINGDI_ 1
41 #   define AM_NOVTABLE
42 #   define _OBJBASE_H_
43 #   undef _X86_
44 #   define _I64_MAX LONG_LONG_MAX
45 #   define LONGLONG long long
46 #endif
47
48 #include <dshow.h>
49
50 typedef struct dshow_stream_t dshow_stream_t;
51
52 /****************************************************************************
53  * Crossbar stuff
54  ****************************************************************************/
55 #define MAX_CROSSBAR_DEPTH 10
56
57 typedef struct CrossbarRouteRec
58 {
59     IAMCrossbar *pXbar;
60     LONG        VideoInputIndex;
61     LONG        VideoOutputIndex;
62     LONG        AudioInputIndex;
63     LONG        AudioOutputIndex;
64
65 } CrossbarRoute;
66
67 void DeleteCrossbarRoutes( access_sys_t * );
68 HRESULT FindCrossbarRoutes( vlc_object_t *, access_sys_t *,
69                             IPin *, LONG, int = 0 );
70
71 /****************************************************************************
72  * Access descriptor declaration
73  ****************************************************************************/
74 struct access_sys_t
75 {
76     /* These 2 must be left at the beginning */
77     vlc_mutex_t lock;
78     vlc_cond_t  wait;
79
80     IFilterGraph           *p_graph;
81     ICaptureGraphBuilder2  *p_capture_graph_builder2;
82     IMediaControl          *p_control;
83
84     int                     i_crossbar_route_depth;
85     CrossbarRoute           crossbar_routes[MAX_CROSSBAR_DEPTH];
86
87     /* list of elementary streams */
88     dshow_stream_t **pp_streams;
89     int            i_streams;
90     int            i_current_stream;
91
92     /* misc properties */
93     int            i_width;
94     int            i_height;
95     int            i_chroma;
96     vlc_bool_t     b_chroma; /* Force a specific chroma on the dshow input */
97 };