[vlc-commits] dshow: remove dead code

Rémi Denis-Courmont git at videolan.org
Thu Jun 4 19:08:12 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jun  4 20:08:05 2015 +0300| [f4293e746210f931d9be6843616776997a88b8ce] | committer: Rémi Denis-Courmont

dshow: remove dead code

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f4293e746210f931d9be6843616776997a88b8ce
---

 include/vlc_plugin.h           |    3 --
 modules/access/dshow/dshow.cpp |   70 ----------------------------------------
 2 files changed, 73 deletions(-)

diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index 8d27284..36e902b 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -484,9 +484,6 @@ VLC_METADATA_EXPORTS
 #define change_float_range( minv, maxv ) \
     vlc_config_set (VLC_CONFIG_RANGE, (double)(minv), (double)(maxv));
 
-#define change_action_add( pf_action, text ) \
-    (void)(pf_action, text);
-
 /* For options that are saved but hidden from the preferences panel */
 #define change_private() \
     vlc_config_set (VLC_CONFIG_PRIVATE);
diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 195669d..990b2fb 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -74,8 +74,6 @@ static size_t EnumDeviceCaps( vlc_object_t *, IBaseFilter *,
 static bool ConnectFilters( vlc_object_t *, access_sys_t *,
                             IBaseFilter *, CaptureFilter * );
 static int FindDevices( vlc_object_t *, const char *, char ***, char *** );
-static int ConfigDevicesCallback( vlc_object_t *, char const *,
-                                  vlc_value_t, vlc_value_t, void * );
 
 static void ShowPropertyPage( IUnknown * );
 static void ShowDeviceProperties( vlc_object_t *, ICaptureGraphBuilder2 *,
@@ -224,11 +222,9 @@ vlc_module_begin ()
 
     add_string( CFG_PREFIX "vdev", NULL, VDEV_TEXT, VDEV_LONGTEXT, false)
         change_string_cb( FindDevices )
-        change_action_add( ConfigDevicesCallback, N_("Configure") )
 
     add_string( CFG_PREFIX "adev", NULL, ADEV_TEXT, ADEV_LONGTEXT, false)
         change_string_cb( FindDevices )
-        change_action_add( ConfigDevicesCallback, N_("Configure") )
 
     add_string( CFG_PREFIX "size", NULL, SIZE_TEXT, SIZE_LONGTEXT, false)
         change_safe()
@@ -2022,72 +2018,6 @@ static int FindDevices( vlc_object_t *p_this, const char *psz_name,
     return count;
 }
 
-static int ConfigDevicesCallback( vlc_object_t *p_this, char const *psz_name,
-                                  vlc_value_t newval, vlc_value_t, void * )
-{
-    module_config_t *p_item;
-    bool b_audio = false;
-    char *psz_device = NULL;
-    int i_ret = VLC_SUCCESS;
-
-    if( FAILED(CoInitializeEx( NULL, COINIT_MULTITHREADED ))
-     && FAILED(CoInitializeEx( NULL, COINIT_APARTMENTTHREADED )) )
-        return VLC_EGENERIC;
-
-    if( !EMPTY_STR( newval.psz_string ) )
-        psz_device = strdup( newval.psz_string );
-
-
-    p_item = config_FindConfig( p_this, psz_name );
-
-    if( !p_item )
-    {
-        free( psz_device );
-        CoUninitialize();
-        return VLC_SUCCESS;
-    }
-
-    if( !strcmp( psz_name, CFG_PREFIX "adev" ) ) b_audio = true;
-
-    string devicename;
-
-    if( psz_device )
-    {
-        devicename = psz_device ;
-    }
-    else
-    {
-        /* If no device name was specified, pick the 1st one */
-        list<string> list_devices;
-
-        /* Enumerate devices */
-        FindCaptureDevice( p_this, NULL, &list_devices, b_audio );
-        if( list_devices.empty() )
-        {
-            CoUninitialize();
-            return VLC_EGENERIC;
-        }
-        devicename = *list_devices.begin();
-    }
-
-    IBaseFilter *p_device_filter =
-        FindCaptureDevice( p_this, &devicename, NULL, b_audio );
-    if( p_device_filter )
-    {
-        ShowPropertyPage( p_device_filter );
-        p_device_filter->Release();
-    }
-    else
-    {
-        msg_Err( p_this, "didn't find device: %s", devicename.c_str() );
-        i_ret = VLC_EGENERIC;
-    }
-
-    CoUninitialize();
-    free( psz_device );
-    return i_ret;
-}
-
 /*****************************************************************************
  * Properties
  *****************************************************************************/



More information about the vlc-commits mailing list