common.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * common.h : DirectShow access module for vlc
00003  *****************************************************************************
00004  * Copyright (C) 2002 the VideoLAN team
00005  * $Id$
00006  *
00007  * Author: Gildas Bazin <gbazin@videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 /*****************************************************************************
00025  * Preamble
00026  *****************************************************************************/
00027 #include <string>
00028 #include <list>
00029 #include <deque>
00030 using namespace std;
00031 
00032 #ifndef _MSC_VER
00033 #   include <wtypes.h>
00034 #   include <unknwn.h>
00035 #   include <ole2.h>
00036 #   include <limits.h>
00037 #   ifdef _WINGDI_
00038 #      undef _WINGDI_
00039 #   endif
00040 #   define _WINGDI_ 1
00041 #   define AM_NOVTABLE
00042 #   define _OBJBASE_H_
00043 #   undef _X86_
00044 #   ifndef _I64_MAX
00045 #     define _I64_MAX LONG_LONG_MAX
00046 #   endif
00047 #   define LONGLONG long long
00048 #endif
00049 
00050 #include <dshow.h>
00051 
00052 typedef struct dshow_stream_t dshow_stream_t;
00053 
00054 /****************************************************************************
00055  * Crossbar stuff
00056  ****************************************************************************/
00057 #define MAX_CROSSBAR_DEPTH 10
00058 
00059 typedef struct CrossbarRouteRec
00060 {
00061     IAMCrossbar *pXbar;
00062     LONG        VideoInputIndex;
00063     LONG        VideoOutputIndex;
00064     LONG        AudioInputIndex;
00065     LONG        AudioOutputIndex;
00066 
00067 } CrossbarRoute;
00068 
00069 void DeleteCrossbarRoutes( access_sys_t * );
00070 HRESULT FindCrossbarRoutes( vlc_object_t *, access_sys_t *,
00071                             IPin *, LONG, int = 0 );
00072 
00073 /****************************************************************************
00074  * Access descriptor declaration
00075  ****************************************************************************/
00076 struct access_sys_t
00077 {
00078     /* These 2 must be left at the beginning */
00079     vlc_mutex_t lock;
00080     vlc_cond_t  wait;
00081 
00082     IFilterGraph           *p_graph;
00083     ICaptureGraphBuilder2  *p_capture_graph_builder2;
00084     IMediaControl          *p_control;
00085 
00086     int                     i_crossbar_route_depth;
00087     CrossbarRoute           crossbar_routes[MAX_CROSSBAR_DEPTH];
00088 
00089     /* list of elementary streams */
00090     dshow_stream_t **pp_streams;
00091     int            i_streams;
00092     int            i_current_stream;
00093 
00094     /* misc properties */
00095     int            i_width;
00096     int            i_height;
00097     int            i_chroma;
00098     bool           b_chroma; /* Force a specific chroma on the dshow input */
00099 };

Generated on Tue May 25 08:04:52 2010 for VLC by  doxygen 1.5.6