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