[vlc-devel] [PATCH 5/5] dshow: rename access_sys_t to access_dshow

Thomas Guillem thomas at gllm.fr
Wed Mar 7 17:31:59 CET 2018


ODR related.
---
 modules/access/dshow/access.h     | 11 +++++------
 modules/access/dshow/crossbar.cpp |  4 ++--
 modules/access/dshow/dshow.cpp    | 40 +++++++++++++++++++--------------------
 modules/access/dshow/filter.cpp   |  4 ++--
 modules/access/dshow/filter.h     |  6 +++---
 5 files changed, 32 insertions(+), 33 deletions(-)

diff --git a/modules/access/dshow/access.h b/modules/access/dshow/access.h
index 0527423c6b..0ee5b31150 100644
--- a/modules/access/dshow/access.h
+++ b/modules/access/dshow/access.h
@@ -1,6 +1,6 @@
 /*****************************************************************************
  * access.h : DirectShow access module for vlc
- * access_sys_t definition
+ * access_dshow definition
  *****************************************************************************
  * Copyright (C) 2002, 2004, 2010-2011 VLC authors and VideoLAN
  * $Id$
@@ -47,14 +47,10 @@ struct CrossbarRoute
     LONG        AudioOutputIndex;
 };
 
-void DeleteCrossbarRoutes( access_sys_t * );
-HRESULT FindCrossbarRoutes( vlc_object_t *, access_sys_t *,
-                            IPin *, LONG, int = 0 );
-
 /****************************************************************************
  * Access descriptor declaration
  ****************************************************************************/
-struct access_sys_t
+struct access_dshow
 {
     /* These 2 must be left at the beginning */
     vlc_mutex_t lock;
@@ -78,3 +74,6 @@ struct access_sys_t
     mtime_t        i_start;
 };
 
+void DeleteCrossbarRoutes( access_dshow * );
+HRESULT FindCrossbarRoutes( vlc_object_t *, access_dshow *,
+                            IPin *, LONG, int = 0 );
diff --git a/modules/access/dshow/crossbar.cpp b/modules/access/dshow/crossbar.cpp
index 75e93182b3..9815e4cd53 100644
--- a/modules/access/dshow/crossbar.cpp
+++ b/modules/access/dshow/crossbar.cpp
@@ -75,7 +75,7 @@ static const char * GetPhysicalPinName(long lType)
 /*****************************************************************************
  * DeleteCrossbarRoutes
  *****************************************************************************/
-void DeleteCrossbarRoutes( access_sys_t *p_sys )
+void DeleteCrossbarRoutes( access_dshow *p_sys )
 {
     /* Remove crossbar filters from graph */
     for( int i = 0; i < p_sys->i_crossbar_route_depth; i++ )
@@ -167,7 +167,7 @@ static HRESULT GetCrossbarIndexFromIPin( IAMCrossbar * pXbar, LONG * PinIndex,
 /*****************************************************************************
  * FindCrossbarRoutes
  *****************************************************************************/
-HRESULT FindCrossbarRoutes( vlc_object_t *p_this, access_sys_t *p_sys,
+HRESULT FindCrossbarRoutes( vlc_object_t *p_this, access_dshow *p_sys,
                             IPin *p_input_pin, LONG physicalType, int depth )
 {
     HRESULT result = S_FALSE;
diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index efe87b7593..32fb4fe9f3 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -66,13 +66,13 @@ static int AccessControl ( stream_t *, int, va_list );
 static int Demux       ( demux_t * );
 static int DemuxControl( demux_t *, int, va_list );
 
-static int OpenDevice( vlc_object_t *, access_sys_t *, std::string, bool );
+static int OpenDevice( vlc_object_t *, access_dshow *, std::string, bool );
 static ComPtr<IBaseFilter> FindCaptureDevice( vlc_object_t *, std::string *,
                                        std::list<std::string> *, bool );
 static size_t EnumDeviceCaps( vlc_object_t *, IBaseFilter *,
                               int, int, int, int, int, int,
                               AM_MEDIA_TYPE *mt, size_t, bool );
-static bool ConnectFilters( vlc_object_t *, access_sys_t *,
+static bool ConnectFilters( vlc_object_t *, access_dshow *,
                             IBaseFilter *, CaptureFilter * );
 static int FindDevices( const char *, char ***, char *** );
 
@@ -206,8 +206,8 @@ static const char *const ppsz_standards_list_text[] =
 #define AUDIO_BITSPERSAMPLE_LONGTEXT N_( \
     "Select audio input format with the given bits/sample (if non 0)" )
 
-static int  CommonOpen ( vlc_object_t *, access_sys_t *, bool );
-static void CommonClose( vlc_object_t *, access_sys_t * );
+static int  CommonOpen ( vlc_object_t *, access_dshow *, bool );
+static void CommonClose( vlc_object_t *, access_dshow * );
 
 static int  AccessOpen ( vlc_object_t * );
 static void AccessClose( vlc_object_t * );
@@ -343,7 +343,7 @@ struct dshow_stream_t
 /*****************************************************************************
  * DirectShow utility functions
  *****************************************************************************/
-static void CreateDirectShowGraph( access_sys_t *p_sys )
+static void CreateDirectShowGraph( access_dshow *p_sys )
 {
     p_sys->i_crossbar_route_depth = 0;
 
@@ -365,7 +365,7 @@ static void CreateDirectShowGraph( access_sys_t *p_sys )
     }
 }
 
-static void DeleteDirectShowGraph( vlc_object_t *p_this, access_sys_t *p_sys )
+static void DeleteDirectShowGraph( vlc_object_t *p_this, access_dshow *p_sys )
 {
     DeleteCrossbarRoutes( p_sys );
 
@@ -395,7 +395,7 @@ static void DeleteDirectShowGraph( vlc_object_t *p_this, access_sys_t *p_sys )
 /*****************************************************************************
  * CommonOpen: open direct show device
  *****************************************************************************/
-static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
+static int CommonOpen( vlc_object_t *p_this, access_dshow *p_sys,
                        bool b_access_demux )
 {
     char *psz_val;
@@ -668,9 +668,9 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
 static int DemuxOpen( vlc_object_t *p_this )
 {
     demux_t      *p_demux = (demux_t *)p_this;
-    access_sys_t *p_sys;
+    access_dshow *p_sys;
 
-    p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) );
+    p_sys = (access_dshow*)calloc( 1, sizeof( access_dshow ) );
     if( !p_sys )
         return VLC_ENOMEM;
     p_demux->p_sys = (demux_sys_t *)p_sys;
@@ -780,9 +780,9 @@ static int DemuxOpen( vlc_object_t *p_this )
 static int AccessOpen( vlc_object_t *p_this )
 {
     stream_t     *p_access = (stream_t*)p_this;
-    access_sys_t *p_sys;
+    access_dshow *p_sys;
 
-    p_access->p_sys = p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) );
+    p_access->p_sys = p_sys = (access_dshow*)calloc( 1, sizeof( access_dshow ) );
     if( !p_sys )
         return VLC_ENOMEM;
 
@@ -822,7 +822,7 @@ static int AccessOpen( vlc_object_t *p_this )
 /*****************************************************************************
  * CommonClose: close device
  *****************************************************************************/
-static void CommonClose( vlc_object_t *p_this, access_sys_t *p_sys )
+static void CommonClose( vlc_object_t *p_this, access_dshow *p_sys )
 {
     msg_Dbg( p_this, "releasing DirectShow");
 
@@ -844,7 +844,7 @@ static void CommonClose( vlc_object_t *p_this, access_sys_t *p_sys )
 static void AccessClose( vlc_object_t *p_this )
 {
     stream_t     *p_access = (stream_t *)p_this;
-    access_sys_t *p_sys    = (access_sys_t *)p_access->p_sys;
+    access_dshow *p_sys    = (access_dshow *)p_access->p_sys;
 
     ComContext ctx( COINIT_MULTITHREADED );
 
@@ -860,7 +860,7 @@ static void AccessClose( vlc_object_t *p_this )
 static void DemuxClose( vlc_object_t *p_this )
 {
     demux_t      *p_demux = (demux_t *)p_this;
-    access_sys_t *p_sys   = (access_sys_t *)p_demux->p_sys;
+    access_dshow *p_sys   = (access_dshow *)p_demux->p_sys;
 
     ComContext ctx( COINIT_MULTITHREADED );
 
@@ -873,7 +873,7 @@ static void DemuxClose( vlc_object_t *p_this )
 /****************************************************************************
  * ConnectFilters
  ****************************************************************************/
-static bool ConnectFilters( vlc_object_t *p_this, access_sys_t *p_sys,
+static bool ConnectFilters( vlc_object_t *p_this, access_dshow *p_sys,
                             IBaseFilter *p_filter,
                             CaptureFilter *p_capture_filter )
 {
@@ -985,7 +985,7 @@ static int GetFourCCPriority( int i_fourcc )
 
 #define MAX_MEDIA_TYPES 32
 
-static int OpenDevice( vlc_object_t *p_this, access_sys_t *p_sys,
+static int OpenDevice( vlc_object_t *p_this, access_dshow *p_sys,
                        std::string devicename, bool b_audio )
 {
     ComPtr<IBaseFilter> p_device_filter;
@@ -1767,7 +1767,7 @@ static block_t *ReadCompressed( stream_t *p_access, bool *eof )
 {
     ComContext ctx( COINIT_MULTITHREADED );
 
-    access_sys_t   *p_sys = (access_sys_t *)p_access->p_sys;
+    access_dshow   *p_sys = (access_dshow *)p_access->p_sys;
     /* There must be only 1 elementary stream to produce a valid stream
      * of MPEG or DV data */
     dshow_stream_t *p_stream = p_sys->pp_streams[0];
@@ -1814,7 +1814,7 @@ static int Demux( demux_t *p_demux )
 {
     ComContext ctx( COINIT_MULTITHREADED );
 
-    access_sys_t *p_sys = (access_sys_t *)p_demux->p_sys;
+    access_dshow *p_sys = (access_dshow *)p_demux->p_sys;
     int i_found_samples;
 
     i_found_samples = 0;
@@ -1914,7 +1914,7 @@ static int Demux( demux_t *p_demux )
  *****************************************************************************/
 static int AccessControl( stream_t *p_access, int i_query, va_list args )
 {
-    access_sys_t *sys = (access_sys_t *)p_access->p_sys;
+    access_dshow *sys = (access_dshow *)p_access->p_sys;
     bool    *pb_bool;
     int64_t *pi_64;
 
@@ -1964,7 +1964,7 @@ static int DemuxControl( demux_t *p_demux, int i_query, va_list args )
     bool    *pb;
     int64_t *pi64;
 
-    access_sys_t *p_sys = ( access_sys_t * ) p_demux->p_sys;
+    access_dshow *p_sys = (access_dshow *)p_demux->p_sys;
 
     switch( i_query )
     {
diff --git a/modules/access/dshow/filter.cpp b/modules/access/dshow/filter.cpp
index 40620b9c64..18093420b0 100644
--- a/modules/access/dshow/filter.cpp
+++ b/modules/access/dshow/filter.cpp
@@ -205,7 +205,7 @@ int GetFourCCFromMediaType( const AM_MEDIA_TYPE &media_type )
  * Implementation of our dummy directshow filter pin class
  ****************************************************************************/
 
-CapturePin::CapturePin( vlc_object_t *_p_input, access_sys_t *_p_sys,
+CapturePin::CapturePin( vlc_object_t *_p_input, access_dshow *_p_sys,
                         CaptureFilter* _p_filter,
                         AM_MEDIA_TYPE *mt, size_t mt_count )
   : p_input( _p_input ), p_sys( _p_sys ), p_filter( _p_filter ),
@@ -683,7 +683,7 @@ STDMETHODIMP CapturePin::ReceiveCanBlock( void )
 /****************************************************************************
  * Implementation of our dummy directshow filter class
  ****************************************************************************/
-CaptureFilter::CaptureFilter( vlc_object_t *_p_input, access_sys_t *p_sys,
+CaptureFilter::CaptureFilter( vlc_object_t *_p_input, access_dshow *p_sys,
                               AM_MEDIA_TYPE *mt, size_t mt_count )
   : p_input( _p_input ),
     p_pin( new CapturePin( _p_input, p_sys, this, mt, mt_count ) ),
diff --git a/modules/access/dshow/filter.h b/modules/access/dshow/filter.h
index 733f45b7bd..b9a4d97775 100644
--- a/modules/access/dshow/filter.h
+++ b/modules/access/dshow/filter.h
@@ -50,7 +50,7 @@ class CapturePin: public IPin, public IMemInputPin
     friend class CaptureEnumMediaTypes;
 
     vlc_object_t *p_input;
-    access_sys_t *p_sys;
+    access_dshow *p_sys;
     // Don't store this filter as a ComPtr to avoid a circular reference.
     // p_filter is the parent filter, and already has a refcounter pointer to this CapturePin
     // instance
@@ -68,7 +68,7 @@ class CapturePin: public IPin, public IMemInputPin
     long i_ref;
 
   public:
-    CapturePin( vlc_object_t *_p_input, access_sys_t *p_sys,
+    CapturePin( vlc_object_t *_p_input, access_dshow *p_sys,
                 CaptureFilter* _p_filter,
                 AM_MEDIA_TYPE *mt, size_t mt_count );
 
@@ -132,7 +132,7 @@ class CaptureFilter : public IBaseFilter
     long i_ref;
 
   public:
-    CaptureFilter( vlc_object_t *_p_input, access_sys_t *p_sys,
+    CaptureFilter( vlc_object_t *_p_input, access_dshow *p_sys,
                    AM_MEDIA_TYPE *mt, size_t mt_count );
 
     /* IUnknown methods */
-- 
2.11.0



More information about the vlc-devel mailing list