00001 /***************************************************************************** 00002 * common.h : DirectShow access module for vlc 00003 ***************************************************************************** 00004 * Copyright (C) 2002 the VideoLAN team 00005 * $Id: common.h 11664 2005-07-09 06:17:09Z courmisch $ 00006 * 00007 * Author: Gildas Bazin <[email protected]> 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., 59 Temple Place - Suite 330, Boston, MA 02111, 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 # define _WINGDI_ 1 00038 # define AM_NOVTABLE 00039 # define _OBJBASE_H_ 00040 # undef _X86_ 00041 # define _I64_MAX LONG_LONG_MAX 00042 # define LONGLONG long long 00043 #endif 00044 00045 #include <dshow.h> 00046 00047 typedef struct dshow_stream_t dshow_stream_t; 00048 00049 /**************************************************************************** 00050 * Crossbar stuff 00051 ****************************************************************************/ 00052 #define MAX_CROSSBAR_DEPTH 10 00053 00054 typedef struct CrossbarRouteRec 00055 { 00056 IAMCrossbar *pXbar; 00057 LONG VideoInputIndex; 00058 LONG VideoOutputIndex; 00059 LONG AudioInputIndex; 00060 LONG AudioOutputIndex; 00061 00062 } CrossbarRoute; 00063 00064 void DeleteCrossbarRoutes( access_sys_t * ); 00065 HRESULT FindCrossbarRoutes( vlc_object_t *, access_sys_t *, 00066 IPin *, LONG, int = 0 ); 00067 00068 /**************************************************************************** 00069 * Access descriptor declaration 00070 ****************************************************************************/ 00071 struct access_sys_t 00072 { 00073 /* These 2 must be left at the beginning */ 00074 vlc_mutex_t lock; 00075 vlc_cond_t wait; 00076 00077 IFilterGraph *p_graph; 00078 ICaptureGraphBuilder2 *p_capture_graph_builder2; 00079 IMediaControl *p_control; 00080 00081 int i_crossbar_route_depth; 00082 CrossbarRoute crossbar_routes[MAX_CROSSBAR_DEPTH]; 00083 00084 /* list of elementary streams */ 00085 dshow_stream_t **pp_streams; 00086 int i_streams; 00087 int i_current_stream; 00088 00089 /* misc properties */ 00090 int i_width; 00091 int i_height; 00092 int i_chroma; 00093 };