]> git.sesse.net Git - vlc/blobdiff - modules/access/bda/bdagraph.cpp
Swedish translation update by Daniel Nylander
[vlc] / modules / access / bda / bdagraph.cpp
index 64615ff114da1e06b46c536c7527a2f8825c44dd..c60be0a04981a6843b20264b135325b315c55e46 100644 (file)
@@ -24,6 +24,7 @@
  * Preamble
  *****************************************************************************/
 #include "bdagraph.h"
+#include <ctype.h>
 
 /****************************************************************************
  * Interfaces for calls from C
@@ -60,7 +61,7 @@ extern "C" {
         if( p_access->p_sys->p_bda_module )
             return p_access->p_sys->p_bda_module->SubmitDVBCTuneRequest();
         return VLC_EGENERIC;
-    };    
+    };
 
     int dvb_SubmitDVBSTuneRequest( access_t* p_access )
     {
@@ -79,7 +80,7 @@ extern "C" {
     long dvb_ReadBuffer( access_t* p_access, long* l_buffer_len, BYTE* p_buff )
     {
         if( p_access->p_sys->p_bda_module )
-            return p_access->p_sys->p_bda_module->ReadBuffer( l_buffer_len, 
+            return p_access->p_sys->p_bda_module->ReadBuffer( l_buffer_len,
                 p_buff );
         return -1;
     };
@@ -532,23 +533,31 @@ int BDAGraph::SubmitDVBSTuneRequest()
     l_elevation = var_GetInteger( p_access, "dvb-elevation" );
     l_longitude = var_GetInteger( p_access, "dvb-longitude" );
     l_lnb_lof1 = var_GetInteger( p_access, "dvb-lnb-lof1" );
-    l_lnb_lof2 = var_GetInteger( p_access, "dvb-lnb-lof2" ); 
+    l_lnb_lof2 = var_GetInteger( p_access, "dvb-lnb-lof2" );
     l_lnb_slof = var_GetInteger( p_access, "dvb-lnb-slof" );
-    psz_polarisation = var_GetString( p_access, "dvb-polarisation" );
+    psz_polarisation = var_GetNonEmptyString( p_access, "dvb-polarisation" );
     l_inversion = var_GetInteger( p_access, "dvb-inversion" );
     l_network_id = var_GetInteger( p_access, "dvb-network_id" );
 
     b_west = ( l_longitude < 0 ) ? TRUE : FALSE;
 
     i_polar = BDA_POLARISATION_NOT_SET;
-    if( *psz_polarisation == 'H' || *psz_polarisation == 'h' )
-        i_polar = BDA_POLARISATION_LINEAR_H;
-    if( *psz_polarisation == 'V' || *psz_polarisation == 'v' )
-        i_polar = BDA_POLARISATION_LINEAR_V;
-    if( *psz_polarisation == 'L' || *psz_polarisation == 'l' )
-        i_polar = BDA_POLARISATION_CIRCULAR_L;
-    if( *psz_polarisation == 'R' || *psz_polarisation == 'r' )
-        i_polar = BDA_POLARISATION_CIRCULAR_R;
+    if( psz_polarisation != NULL )
+        switch( toupper( psz_polarisation[0] ) )
+        {
+            case 'H':
+                i_polar = BDA_POLARISATION_LINEAR_H;
+                break;
+            case 'V':
+                i_polar = BDA_POLARISATION_LINEAR_V;
+                break;
+            case 'L':
+                i_polar = BDA_POLARISATION_CIRCULAR_L;
+                break;
+            case 'R':
+                i_polar = BDA_POLARISATION_CIRCULAR_R;
+                break;
+        }
 
     i_inversion = BDA_SPECTRAL_INVERSION_NOT_SET;
     if( l_inversion == 0 )
@@ -1419,7 +1428,7 @@ HRESULT BDAGraph::Destroy()
         p_media_control->Release();
         p_media_control = NULL;
     }
-    if( p_scanning_tuner )
+    if( p_filter_graph )
     {
         p_filter_graph->Release();
         p_filter_graph = NULL;