]> git.sesse.net Git - vlc/commitdiff
Add --france / --no-france option to disable DRM playback.
authorClément Stenac <zorglub@videolan.org>
Thu, 27 Jul 2006 20:12:41 +0000 (20:12 +0000)
committerClément Stenac <zorglub@videolan.org>
Thu, 27 Jul 2006 20:12:41 +0000 (20:12 +0000)
CSS is not yet disabled as it is hidden from us by libdvdnav/libdvdplay

modules/demux/mp4/libmp4.c
src/libvlc.h

index 6d4a2dafbf3bb9bd4f5d5ba0c3a00b97933f3928..5ee0ddf27326c69ffe32fc9fa5a8301006e17d3d 100644 (file)
@@ -2035,8 +2035,16 @@ static int MP4_ReadBox_drms( stream_t *p_stream, MP4_Box_t *p_box )
 
     if( p_drms_box && p_drms_box->data.p_sample_soun->p_drms )
     {
-        int i_ret = drms_init( p_drms_box->data.p_sample_soun->p_drms,
+        int i_ret;
+        if( config_GetInt( p_stream, "france" ) )
+        {
+            i_ret = -7;
+        }
+        else
+        {
+            i_ret= drms_init( p_drms_box->data.p_sample_soun->p_drms,
                                p_box->i_type, p_peek, i_read );
+        }
         if( i_ret )
         {
             char *psz_error;
@@ -2049,6 +2057,7 @@ static int MP4_ReadBox_drms( stream_t *p_stream, MP4_Box_t *p_box )
                 case -4: psz_error = "could not get SCI data"; break;
                 case -5: psz_error = "no user key found in SCI data"; break;
                 case -6: psz_error = "invalid user key"; break;
+                case -7: psz_error = "you live in France"; break;
                 default: psz_error = "unknown error"; break;
             }
 
index ffc491095ceef886a18de1c73253ea54bebdea5b..3eefed38e7faa08215634766d7cbe3ad698b7f6c 100644 (file)
@@ -392,6 +392,10 @@ static char *ppsz_align_descriptions[] =
     "subsystem, such as the DVD or VCD device, the network interface " \
     "settings or the subtitle channel.")
 
+#define FRANCE_LONGTEXT N_( \
+    "If you live in France, it is not allowed to workaround any Digital " \
+    "Restrictions Management measure." )
+
 #define CR_AVERAGE_TEXT N_("Clock reference average counter")
 #define CR_AVERAGE_LONGTEXT N_( \
     "When using the PVR input (or a very irregular source), you should " \
@@ -1350,6 +1354,8 @@ vlc_module_begin();
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_GENERAL );
 
+    add_bool( "france", VLC_FALSE, NULL, "France", FRANCE_LONGTEXT, VLC_TRUE );
+
     set_section( N_( "Track settings" ), NULL );
     add_integer( "program", 0, NULL,
                  INPUT_PROGRAM_TEXT, INPUT_PROGRAM_LONGTEXT, VLC_TRUE );