]> git.sesse.net Git - vlc/commitdiff
bda: little cleanup.
authorRémi Duraffort <ivoire@videolan.org>
Tue, 16 Dec 2008 19:25:57 +0000 (20:25 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Tue, 16 Dec 2008 19:25:57 +0000 (20:25 +0100)
modules/access/bda/bda.c
modules/access/bda/bdadefs.h
modules/access/bda/bdagraph.cpp

index 6253bd7315a17b32594df56f561f7e872a3c249a..78080c36876980c09df9c4fd58d29ff7be003688 100644 (file)
@@ -413,7 +413,7 @@ static int ParsePath( access_t *p_access, const char* psz_module,
     const int i_param_count, const char** psz_param, const int* i_type )
 {
     const int   MAXPARAM = 40;
-    BOOL        b_used[MAXPARAM];
+    bool        b_used[MAXPARAM];
     char*       psz_parser;
     char*       psz_token;
     char*       psz_value;
@@ -429,7 +429,7 @@ static int ParsePath( access_t *p_access, const char* psz_module,
             return VLC_EGENERIC;
     }
     for( int i = 0; i < i_param_count; i++ )
-        b_used[i] = FALSE;
+        b_used[i] = false;
     psz_parser = p_access->psz_path;
     if( strlen( psz_parser ) <= 0 )
         return VLC_SUCCESS;
@@ -446,8 +446,7 @@ static int ParsePath( access_t *p_access, const char* psz_module,
         {
             msg_Warn( p_access, "ParsePath: Unspecified parameter %s",
                 psz_token );
-            if( psz_token )
-                free( psz_token );
+            free( psz_token );
             return VLC_EGENERIC;
         }
         i_this_param = -1;
@@ -462,19 +461,17 @@ static int ParsePath( access_t *p_access, const char* psz_module,
         if( i_this_param < 0 )
         {
             msg_Warn( p_access, "ParsePath: Unknown parameter %s", psz_token );
-            if( psz_token )
-                free( psz_token );
+            free( psz_token );
             return VLC_EGENERIC;
         }
         if( b_used[i_this_param] )
         {
             msg_Warn( p_access, "ParsePath: Duplicate parameter %s",
                 psz_token );
-            if( psz_token )
-                free( psz_token );
+            free( psz_token );
             return VLC_EGENERIC;
         }
-        b_used[i_this_param] = TRUE;
+        b_used[i_this_param] = true;
 
         /* if "=" was found in token then value starts at
          * psz_token + i_paramlen + 1
@@ -490,14 +487,13 @@ static int ParsePath( access_t *p_access, const char* psz_module,
             psz_param[i_this_param] );
         var_Set( p_access, psz_full_name, v_value );
 
-        if( psz_token )
-            free( psz_token );
+        free( psz_token );
         if( i_token_len >= strlen( psz_parser ) )
             break;
         psz_parser += i_token_len + 1;
         i_token_len = strcspn( psz_parser, ":" );
     }
-    while( TRUE );
+    while( true );
     return VLC_SUCCESS;
 }
 
index 611d61056aea9ddf79a9465c1447d7ad8c5db673..258d0bdff75a62545c0697c5641b83b5d192f6a7 100644 (file)
@@ -80,10 +80,10 @@ typedef enum ComponentStatus
 } ComponentStatus;
 
 typedef enum DVBSystemType
-{\r
-    DVB_Cable,\r
-    DVB_Terrestrial,\r
-    DVB_Satellite,\r
+{
+    DVB_Cable,
+    DVB_Terrestrial,
+    DVB_Satellite,
 } DVBSystemType;
 
 typedef enum FECMethod
@@ -161,13 +161,13 @@ typedef enum Polarisation
 } Polarisation;
 
 typedef enum SpectralInversion
-{\r
-    BDA_SPECTRAL_INVERSION_NOT_SET = -1,\r
-    BDA_SPECTRAL_INVERSION_NOT_DEFINED = 0,\r
-    BDA_SPECTRAL_INVERSION_AUTOMATIC = 1,\r
-    BDA_SPECTRAL_INVERSION_NORMAL,\r
-    BDA_SPECTRAL_INVERSION_INVERTED,\r
-    BDA_SPECTRAL_INVERSION_MAX\r
+{
+    BDA_SPECTRAL_INVERSION_NOT_SET = -1,
+    BDA_SPECTRAL_INVERSION_NOT_DEFINED = 0,
+    BDA_SPECTRAL_INVERSION_AUTOMATIC = 1,
+    BDA_SPECTRAL_INVERSION_NORMAL,
+    BDA_SPECTRAL_INVERSION_INVERTED,
+    BDA_SPECTRAL_INVERSION_MAX
 } SpectralInversion;
 
 typedef enum TransmissionMode
@@ -473,35 +473,35 @@ public:
     virtual HRESULT __stdcall Clone( ITuningSpace** p_p_tuning_space )=0;
 };
 
-class IDVBTuningSpace : public ITuningSpace\r
-{\r
-public:\r
-    virtual HRESULT __stdcall get_SystemType( DVBSystemType* p_sys_type )=0;\r
-    virtual HRESULT __stdcall put_SystemType( DVBSystemType sys_type )=0;\r
-};\r
-
-class IDVBTuningSpace2 : public IDVBTuningSpace\r
-{\r
-public:\r
-    virtual HRESULT __stdcall get_NetworkID( long* p_l_network_id )=0;\r
-    virtual HRESULT __stdcall put_NetworkID( long l_network_id )=0;\r
+class IDVBTuningSpace : public ITuningSpace
+{
+public:
+    virtual HRESULT __stdcall get_SystemType( DVBSystemType* p_sys_type )=0;
+    virtual HRESULT __stdcall put_SystemType( DVBSystemType sys_type )=0;
 };
-\r
-class IDVBSTuningSpace : public IDVBTuningSpace2\r
-{\r
-public:\r
-    virtual HRESULT __stdcall get_LowOscillator( long* p_l_low_osc )=0;\r
-    virtual HRESULT __stdcall put_LowOscillator( long l_low_osc )=0;\r
-    virtual HRESULT __stdcall get_HighOscillator( long* p_l_high_osc )=0;\r
-    virtual HRESULT __stdcall put_HighOscillator( long l_high_osc )=0;\r
-    virtual HRESULT __stdcall get_LNBSwitch( long* p_l_lnb_switch )=0;\r
-    virtual HRESULT __stdcall put_LNBSwitch( long l_lnb_switch )=0;\r
-    virtual HRESULT __stdcall get_InputRange( BSTR* p_bstr_input_range )=0;\r
-    virtual HRESULT __stdcall put_InputRange( BSTR bstr_input_range )=0;\r
+
+class IDVBTuningSpace2 : public IDVBTuningSpace
+{
+public:
+    virtual HRESULT __stdcall get_NetworkID( long* p_l_network_id )=0;
+    virtual HRESULT __stdcall put_NetworkID( long l_network_id )=0;
+};
+
+class IDVBSTuningSpace : public IDVBTuningSpace2
+{
+public:
+    virtual HRESULT __stdcall get_LowOscillator( long* p_l_low_osc )=0;
+    virtual HRESULT __stdcall put_LowOscillator( long l_low_osc )=0;
+    virtual HRESULT __stdcall get_HighOscillator( long* p_l_high_osc )=0;
+    virtual HRESULT __stdcall put_HighOscillator( long l_high_osc )=0;
+    virtual HRESULT __stdcall get_LNBSwitch( long* p_l_lnb_switch )=0;
+    virtual HRESULT __stdcall put_LNBSwitch( long l_lnb_switch )=0;
+    virtual HRESULT __stdcall get_InputRange( BSTR* p_bstr_input_range )=0;
+    virtual HRESULT __stdcall put_InputRange( BSTR bstr_input_range )=0;
     virtual HRESULT __stdcall get_SpectralInversion(
-        SpectralInversion* p_spectral_inv )=0;\r
+        SpectralInversion* p_spectral_inv )=0;
     virtual HRESULT __stdcall put_SpectralInversion(
-        SpectralInversion spectral_inv )=0;\r
+        SpectralInversion spectral_inv )=0;
 };
 
 class ITuningSpaceContainer : public IDispatch
@@ -585,10 +585,10 @@ extern const GUID MEDIATYPE_MPEG2_SECTIONS;
 extern const GUID MEDIASUBTYPE_None;
 extern const GUID FORMAT_None;
 
-const GUID KSCATEGORY_BDA_TRANSPORT_INFORMATION =\r
-    {0xa2e3074f,0x6c3d,0x11d3,{0xb6,0x53,0x00,0xc0,0x4f,0x79,0x49,0x8e}};\r
-const GUID KSCATEGORY_BDA_RECEIVER_COMPONENT    =\r
-    {0xFD0A5AF4,0xB41D,0x11d2,{0x9c,0x95,0x00,0xc0,0x4f,0x79,0x71,0xe0}};\r
-const GUID KSCATEGORY_BDA_NETWORK_TUNER         =\r
+const GUID KSCATEGORY_BDA_TRANSPORT_INFORMATION =
+    {0xa2e3074f,0x6c3d,0x11d3,{0xb6,0x53,0x00,0xc0,0x4f,0x79,0x49,0x8e}};
+const GUID KSCATEGORY_BDA_RECEIVER_COMPONENT    =
+    {0xFD0A5AF4,0xB41D,0x11d2,{0x9c,0x95,0x00,0xc0,0x4f,0x79,0x71,0xe0}};
+const GUID KSCATEGORY_BDA_NETWORK_TUNER         =
     {0x71985f48,0x1ca1,0x11d3,{0x9c,0xc8,0x00,0xc0,0x4f,0x79,0x71,0xe0}};
 };
index 80a26692cdfd1d31a58b0e1820ffe5b6ce49e217..d616188479ca38320496cd869e018aa9414ee6da 100644 (file)
@@ -94,7 +94,7 @@ BDAGraph::BDAGraph( access_t* p_this ):
     l_tuner_used(-1),
     d_graph_register( 0 )
 {
-    b_ready = FALSE;
+    b_ready = false;
     p_tuning_space = NULL;
     p_tune_request = NULL;
     p_media_control = NULL;