]> git.sesse.net Git - vlc/blobdiff - modules/access/dvb/access.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / access / dvb / access.c
index ec2e31a9bb0619d0c5f2d2b2fa65ad3e20858c7f..d08a7a2dedfd530eca44e4af136b0076acc245d9 100644 (file)
@@ -1,10 +1,10 @@
 /*****************************************************************************
  * access.c: DVB card input v4l2 only
  *****************************************************************************
- * Copyright (C) 1998-2004 VideoLAN
+ * Copyright (C) 1998-2005 the VideoLAN team
  *
  * Authors: Johan Bilien <jobi@via.ecp.fr>
- *          Jean-Paul Saman <jpsaman@wxs.nl>
+ *          Jean-Paul Saman <jpsaman _at_ videolan _dot_ org>
  *          Christophe Massiot <massiot@via.ecp.fr>
  *          Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -20,7 +20,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 
@@ -28,7 +28,8 @@
  * Preamble
  *****************************************************************************/
 #include <vlc/vlc.h>
-#include <vlc/input.h>
+#include <vlc_access.h>
+#include <vlc_interface.h>
 
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>
@@ -36,6 +37,7 @@
 
 #include <fcntl.h>
 #include <sys/types.h>
+#include <sys/poll.h>
 
 #include <errno.h>
 
 #   include "psi.h"
 #endif
 
+#ifdef ENABLE_HTTPD
+#   include "vlc_httpd.h"
+#endif
+
 #include "dvb.h"
 
 /*****************************************************************************
@@ -66,8 +72,8 @@ static void Close( vlc_object_t *p_this );
 
 #define CACHING_TEXT N_("Caching value in ms")
 #define CACHING_LONGTEXT N_( \
-    "Allows you to modify the default caching value for dvb streams. This " \
-    "value should be set in millisecond units." )
+    "Caching value for DVB streams. This " \
+    "value should be set in milliseconds." )
 
 #define ADAPTER_TEXT N_("Adapter card to tune")
 #define ADAPTER_LONGTEXT N_("Adapter cards have a device file in directory named /dev/dvb/adapter[n] with n>=0.")
@@ -82,40 +88,40 @@ static void Close( vlc_object_t *p_this );
 #define INVERSION_LONGTEXT N_("Inversion mode [0=off, 1=on, 2=auto]")
 
 #define PROBE_TEXT N_("Probe DVB card for capabilities")
-#define PROBE_LONGTEXT N_("Some DVB cards do not like to be probed for their capabilities.")
-
-#define LNB_LOF1_TEXT N_("Antenna lnb_lof1 (kHz)")
-#define LNB_LOF1_LONGTEXT ""
-
-#define LNB_LOF2_TEXT N_("Antenna lnb_lof2 (kHz)")
-#define LNB_LOF2_LONGTEXT ""
-
-#define LNB_SLOF_TEXT N_("Antenna lnb_slof (kHz)")
-#define LNB_SLOF_LONGTEXT ""
+#define PROBE_LONGTEXT N_("Some DVB cards do not like to be probed for their capabilities, you can disable this feature if you experience some trouble.")
 
-/* Satellite */
 #define BUDGET_TEXT N_("Budget mode")
-#define BUDGET_LONGTEXT N_("This allows you to stream an entire transponder with a budget card.")
+#define BUDGET_LONGTEXT N_("This allows you to stream an entire transponder with a \"budget\" card.")
 
+/* Satellite */
 #define SATNO_TEXT N_("Satellite number in the Diseqc system")
-#define SATNO_LONGTEXT N_("[0=no diseqc, 1-4=satellite number]")
+#define SATNO_LONGTEXT N_("[0=no diseqc, 1-4=satellite number].")
 
 #define VOLTAGE_TEXT N_("LNB voltage")
-#define VOLTAGE_LONGTEXT N_("In Volts [0, 13=vertical, 18=horizontal]")
+#define VOLTAGE_LONGTEXT N_("In Volts [0, 13=vertical, 18=horizontal].")
 
 #define HIGH_VOLTAGE_TEXT N_("High LNB voltage")
 #define HIGH_VOLTAGE_LONGTEXT N_("Enable high voltage if your cables are " \
     "particularly long. This is not supported by all frontends.")
 
 #define TONE_TEXT N_("22 kHz tone")
-#define TONE_LONGTEXT N_("[0=off, 1=on, -1=auto]")
+#define TONE_LONGTEXT N_("[0=off, 1=on, -1=auto].")
 
 #define FEC_TEXT N_("Transponder FEC")
-#define FEC_LONGTEXT N_("FEC=Forward Error Correction mode [9=auto]")
+#define FEC_LONGTEXT N_("FEC=Forward Error Correction mode [9=auto].")
 
 #define SRATE_TEXT N_("Transponder symbol rate in kHz")
 #define SRATE_LONGTEXT ""
 
+#define LNB_LOF1_TEXT N_("Antenna lnb_lof1 (kHz)")
+#define LNB_LOF1_LONGTEXT ""
+
+#define LNB_LOF2_TEXT N_("Antenna lnb_lof2 (kHz)")
+#define LNB_LOF2_LONGTEXT ""
+
+#define LNB_SLOF_TEXT N_("Antenna lnb_slof (kHz)")
+#define LNB_SLOF_LONGTEXT ""
+
 /* Cable */
 #define MODULATION_TEXT N_("Modulation type")
 #define MODULATION_LONGTEXT N_("Modulation type for front-end device.")
@@ -139,9 +145,43 @@ static void Close( vlc_object_t *p_this );
 #define HIERARCHY_TEXT N_("Terrestrial hierarchy mode")
 #define HIERARCHY_LONGTEXT ""
 
+#define HOST_TEXT N_( "HTTP Host address" )
+#define HOST_LONGTEXT N_( \
+    "To enable the internal HTTP server, set its address and port here." )
+
+#define USER_TEXT N_( "HTTP user name" )
+#define USER_LONGTEXT N_( \
+    "User name the administrator will use to log into " \
+    "the internal HTTP server." )
+
+#define PASSWORD_TEXT N_( "HTTP password" )
+#define PASSWORD_LONGTEXT N_( \
+    "Password the administrator will use to log into " \
+    "the internal HTTP server." )
+
+#define ACL_TEXT N_( "HTTP ACL" )
+#define ACL_LONGTEXT N_( \
+    "Access control list (equivalent to .hosts) file path, " \
+    "which will limit the range of IPs entitled to log into the internal " \
+    "HTTP server." )
+
+#define CERT_TEXT N_( "Certificate file" )
+#define CERT_LONGTEXT N_( "HTTP interface x509 PEM certificate file " \
+                          "(enables SSL)" )
+
+#define KEY_TEXT N_( "Private key file" )
+#define KEY_LONGTEXT N_( "HTTP interface x509 PEM private key file" )
+
+#define CA_TEXT N_( "Root CA file" )
+#define CA_LONGTEXT N_( "HTTP interface x509 PEM trusted root CA " \
+                        "certificates file" )
+
+#define CRL_TEXT N_( "CRL file" )
+#define CRL_LONGTEXT N_( "HTTP interface Certificates Revocation List file" )
+
 vlc_module_begin();
     set_shortname( _("DVB") );
-    set_description( N_("DVB input with v4l2 support") );
+    set_description( _("DVB input with v4l2 support") );
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACCESS );
 
@@ -156,15 +196,9 @@ vlc_module_begin();
     add_integer( "dvb-inversion", 2, NULL, INVERSION_TEXT, INVERSION_LONGTEXT,
                  VLC_TRUE );
     add_bool( "dvb-probe", 1, NULL, PROBE_TEXT, PROBE_LONGTEXT, VLC_TRUE );
-    add_integer( "dvb-lnb-lof1", 9750000, NULL, LNB_LOF1_TEXT,
-                 LNB_LOF1_LONGTEXT, VLC_TRUE );
-    add_integer( "dvb-lnb-lof2", 10600000, NULL, LNB_LOF2_TEXT,
-                 LNB_LOF2_LONGTEXT, VLC_TRUE );
-    add_integer( "dvb-lnb-slof", 11700000, NULL, LNB_SLOF_TEXT,
-                 LNB_SLOF_LONGTEXT, VLC_TRUE );
-    /* DVB-S (satellite) */
     add_bool( "dvb-budget-mode", 0, NULL, BUDGET_TEXT, BUDGET_LONGTEXT,
               VLC_TRUE );
+    /* DVB-S (satellite) */
     add_integer( "dvb-satno", 0, NULL, SATNO_TEXT, SATNO_LONGTEXT,
                  VLC_TRUE );
     add_integer( "dvb-voltage", 13, NULL, VOLTAGE_TEXT, VOLTAGE_LONGTEXT,
@@ -176,7 +210,13 @@ vlc_module_begin();
     add_integer( "dvb-fec", 9, NULL, FEC_TEXT, FEC_LONGTEXT, VLC_TRUE );
     add_integer( "dvb-srate", 27500000, NULL, SRATE_TEXT, SRATE_LONGTEXT,
                  VLC_FALSE );
-    /* DVB-T (terrestrial) */
+    add_integer( "dvb-lnb-lof1", 0, NULL, LNB_LOF1_TEXT,
+                 LNB_LOF1_LONGTEXT, VLC_TRUE );
+    add_integer( "dvb-lnb-lof2", 0, NULL, LNB_LOF2_TEXT,
+                 LNB_LOF2_LONGTEXT, VLC_TRUE );
+    add_integer( "dvb-lnb-slof", 0, NULL, LNB_SLOF_TEXT,
+                 LNB_SLOF_LONGTEXT, VLC_TRUE );
+    /* DVB-C (cable) */
     add_integer( "dvb-modulation", 0, NULL, MODULATION_TEXT,
                  MODULATION_LONGTEXT, VLC_TRUE );
     /* DVB-T (terrestrial) */
@@ -191,16 +231,43 @@ vlc_module_begin();
                  TRANSMISSION_LONGTEXT, VLC_TRUE );
     add_integer( "dvb-hierarchy", 0, NULL, HIERARCHY_TEXT, HIERARCHY_LONGTEXT,
                  VLC_TRUE );
+#ifdef ENABLE_HTTPD
+    /* MMI HTTP interface */
+    set_section( N_("HTTP server" ), 0 );
+    add_string( "dvb-http-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT,
+                VLC_TRUE );
+    add_string( "dvb-http-user", NULL, NULL, USER_TEXT, USER_LONGTEXT,
+                VLC_TRUE );
+    add_string( "dvb-http-password", NULL, NULL, PASSWORD_TEXT,
+                PASSWORD_LONGTEXT, VLC_TRUE );
+    add_string( "dvb-http-acl", NULL, NULL, ACL_TEXT, ACL_LONGTEXT,
+                VLC_TRUE );
+    add_string( "dvb-http-intf-cert", NULL, NULL, CERT_TEXT, CERT_LONGTEXT,
+                VLC_TRUE );
+    add_string( "dvb-http-intf-key",  NULL, NULL, KEY_TEXT,  KEY_LONGTEXT,
+                VLC_TRUE );
+    add_string( "dvb-http-intf-ca",   NULL, NULL, CA_TEXT,   CA_LONGTEXT,
+                VLC_TRUE );
+    add_string( "dvb-http-intf-crl",  NULL, NULL, CRL_TEXT,  CRL_LONGTEXT,
+                VLC_TRUE );
+#endif
 
     set_capability( "access2", 0 );
-    add_shortcut( "dvb" );
-    add_shortcut( "dvb-s" );
+    add_shortcut( "dvb" );      /* Generic name */
+
+    add_shortcut( "dvb-s" );    /* Satellite */
     add_shortcut( "qpsk" );
-    add_shortcut( "dvb-c" );
+    add_shortcut( "satellite" );
+
+    add_shortcut( "dvb-c" );    /* Cable */
     add_shortcut( "cable" );
-    add_shortcut( "dvb-t" );
+
+    add_shortcut( "dvb-t" );    /* Terrestrial */
     add_shortcut( "terrestrial" );
-    add_shortcut( "satellite" );    /* compatibility with the interface. */
+
+    add_shortcut( "atsc" );     /* Atsc */
+    add_shortcut( "usdigital" );
+
     set_callbacks( Open, Close );
 vlc_module_end();
 
@@ -211,7 +278,8 @@ vlc_module_end();
 static block_t *Block( access_t * );
 static int Control( access_t *, int, va_list );
 
-#define DVB_READ_ONCE 3
+#define DVB_READ_ONCE 20
+#define DVB_READ_ONCE_START 2
 #define TS_PACKET_SIZE 188
 
 static void FilterUnset( access_t *, int i_max );
@@ -247,6 +315,9 @@ static int Open( vlc_object_t *p_this )
     p_access->info.i_seekpoint = 0;
 
     p_access->p_sys = p_sys = malloc( sizeof( access_sys_t ) );
+    if( !p_sys )
+        return VLC_ENOMEM;
+
     memset( p_sys, 0, sizeof( access_sys_t ) );
 
     /* Create all variables */
@@ -297,6 +368,15 @@ static int Open( vlc_object_t *p_this )
 
     E_(CAMOpen)( p_access );
 
+    if( p_sys->b_budget_mode )
+        p_sys->i_read_once = DVB_READ_ONCE;
+    else
+        p_sys->i_read_once = DVB_READ_ONCE_START;
+
+#ifdef ENABLE_HTTPD
+    E_(HTTPOpen)( p_access );
+#endif
+
     return VLC_SUCCESS;
 }
 
@@ -314,6 +394,10 @@ static void Close( vlc_object_t *p_this )
     E_(FrontendClose)( p_access );
     E_(CAMClose)( p_access );
 
+#ifdef ENABLE_HTTPD
+    E_(HTTPClose)( p_access );
+#endif
+
     free( p_sys );
 }
 
@@ -327,35 +411,29 @@ static block_t *Block( access_t *p_access )
 
     for ( ; ; )
     {
-        struct timeval timeout;
-        fd_set fds, fde;
+        struct pollfd ufds[2];
         int i_ret;
-        int i_max_handle = p_sys->i_handle;
 
         /* Initialize file descriptor sets */
-        FD_ZERO( &fds );
-        FD_ZERO( &fde );
-        FD_SET( p_sys->i_handle, &fds );
-        FD_SET( p_sys->i_frontend_handle, &fde );
-        if ( p_sys->i_frontend_handle > i_max_handle )
-            i_max_handle = p_sys->i_frontend_handle;
+        memset (ufds, 0, sizeof (ufds));
+        ufds[0].fd = p_sys->i_handle;
+        ufds[0].events = POLLIN;
+        ufds[1].fd = p_sys->i_frontend_handle;
+        ufds[1].events = POLLPRI;
 
         /* We'll wait 0.5 second if nothing happens */
-        timeout.tv_sec = 0;
-        timeout.tv_usec = 500000;
-
         /* Find if some data is available */
-        i_ret = select( i_max_handle + 1, &fds, NULL, &fde, &timeout );
+        i_ret = poll( ufds, 2, 500 );
 
         if ( p_access->b_die )
             return NULL;
 
-        if ( i_ret < 0 && errno == EINTR )
-            continue;
-
         if ( i_ret < 0 )
         {
-            msg_Err( p_access, "select error (%s)", strerror(errno) );
+            if( errno == EINTR )
+                continue;
+
+            msg_Err( p_access, "poll error: %s", strerror(errno) );
             return NULL;
         }
 
@@ -365,25 +443,65 @@ static block_t *Block( access_t *p_access )
             p_sys->i_ca_next_event = mdate() + p_sys->i_ca_timeout;
         }
 
-        if ( FD_ISSET( p_sys->i_frontend_handle, &fde ) )
+        if ( ufds[1].revents )
         {
             E_(FrontendPoll)( p_access );
         }
 
-        if ( FD_ISSET( p_sys->i_handle, &fds ) )
+#ifdef ENABLE_HTTPD
+        if ( p_sys->i_httpd_timeout && mdate() > p_sys->i_httpd_timeout )
+        {
+            vlc_mutex_lock( &p_sys->httpd_mutex );
+            if ( p_sys->b_request_frontend_info )
+            {
+                msg_Warn( p_access, "frontend timeout for HTTP interface" );
+                p_sys->b_request_frontend_info = VLC_FALSE;
+                p_sys->psz_frontend_info = strdup( "Timeout getting info\n" );
+            }
+            if ( p_sys->b_request_mmi_info )
+            {
+                msg_Warn( p_access, "MMI timeout for HTTP interface" );
+                p_sys->b_request_mmi_info = VLC_FALSE;
+                p_sys->psz_mmi_info = strdup( "Timeout getting info\n" );
+            }
+            vlc_cond_signal( &p_sys->httpd_cond );
+            vlc_mutex_unlock( &p_sys->httpd_mutex );
+        }
+
+        if ( p_sys->b_request_frontend_info )
+        {
+            E_(FrontendStatus)( p_access );
+        }
+
+        if ( p_sys->b_request_mmi_info )
+        {
+            E_(CAMStatus)( p_access );
+        }
+#endif
+
+        if ( p_sys->i_frontend_timeout && mdate() > p_sys->i_frontend_timeout )
+        {
+            msg_Warn( p_access, "no lock, tuning again" );
+            E_(FrontendSet)( p_access );
+        }
+
+        if ( ufds[0].revents )
         {
+            p_block = block_New( p_access,
+                                 p_sys->i_read_once * TS_PACKET_SIZE );
+            if( ( p_block->i_buffer = read( p_sys->i_handle, p_block->p_buffer,
+                                p_sys->i_read_once * TS_PACKET_SIZE ) ) <= 0 )
+            {
+                msg_Warn( p_access, "read failed (%s)", strerror(errno) );
+                block_Release( p_block );
+                continue;
+            }
             break;
         }
     }
 
-    p_block = block_New( p_access, DVB_READ_ONCE * TS_PACKET_SIZE );
-    if( ( p_block->i_buffer = read( p_sys->i_handle, p_block->p_buffer,
-                                    DVB_READ_ONCE * TS_PACKET_SIZE ) ) <= 0 )
-    {
-        msg_Err( p_access, "read failed (%s)", strerror(errno) );
-        block_Release( p_block );
-        return NULL;
-    }
+    if( p_sys->i_read_once < DVB_READ_ONCE )
+        p_sys->i_read_once++;
 
     return p_block;
 }
@@ -489,6 +607,9 @@ static void FilterSet( access_t *p_access, int i_pid, int i_type )
     }
     p_sys->p_demux_handles[i].i_type = i_type;
     p_sys->p_demux_handles[i].i_pid = i_pid;
+
+    if( p_sys->i_read_once < DVB_READ_ONCE )
+        p_sys->i_read_once++;
 }
 
 static void FilterUnset( access_t *p_access, int i_max )
@@ -536,18 +657,18 @@ static void VarInit( access_t *p_access )
     var_Create( p_access, "dvb-frequency", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-inversion", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-probe", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
-    var_Create( p_access, "dvb-lnb-lof1", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
-    var_Create( p_access, "dvb-lnb-lof2", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
-    var_Create( p_access, "dvb-lnb-slof", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-budget-mode", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
 
     /* */
-    var_Create( p_access, "dvb-budget-mode", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-satno", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-voltage", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-high-voltage", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-tone", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-fec", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-srate", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-lnb-lof1", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-lnb-lof2", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-lnb-slof", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
 
     /* */
     var_Create( p_access, "dvb-modulation", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
@@ -559,6 +680,17 @@ static void VarInit( access_t *p_access )
     var_Create( p_access, "dvb-transmission", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-guard", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
     var_Create( p_access, "dvb-hierarchy", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
+
+#ifdef ENABLE_HTTPD
+    var_Create( p_access, "dvb-http-host", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-http-user", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-http-password", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-http-acl", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-http-intf-cert", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-http-intf-key", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-http-intf-ca", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+    var_Create( p_access, "dvb-http-intf-crl", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
+#endif
 }
 
 /* */
@@ -591,6 +723,9 @@ static int ParseMRL( access_t *p_access )
     {
         msg_Err( p_access, "the DVB input old syntax is deprecated, use vlc "
                           "-p dvb to see an explanation of the new syntax" );
+        intf_UserFatal( p_access, VLC_TRUE, _("Input syntax is deprecated"),
+            _("The given syntax is deprecated. Run \"vlc -p dvb\" to see an " \
+                "explanation of the new syntax.") );
         free( psz_dup );
         return VLC_EGENERIC;
     }
@@ -602,17 +737,17 @@ static int ParseMRL( access_t *p_access )
         else GET_OPTION_INT("frequency")
         else GET_OPTION_INT("inversion")
         else GET_OPTION_BOOL("probe")
-        else GET_OPTION_INT("lnb-lof1")
-        else GET_OPTION_INT("lnb-lof2")
-        else GET_OPTION_INT("lnb-slof")
-
         else GET_OPTION_BOOL("budget-mode")
+
         else GET_OPTION_INT("voltage")
         else GET_OPTION_BOOL("high-voltage")
         else GET_OPTION_INT("tone")
         else GET_OPTION_INT("satno")
         else GET_OPTION_INT("fec")
         else GET_OPTION_INT("srate")
+        else GET_OPTION_INT("lnb-lof1")
+        else GET_OPTION_INT("lnb-lof2")
+        else GET_OPTION_INT("lnb-slof")
 
         else GET_OPTION_INT("modulation")
 
@@ -635,6 +770,9 @@ static int ParseMRL( access_t *p_access )
             else
             {
                 msg_Err( p_access, "illegal polarization %c", *psz_parser );
+                intf_UserFatal( p_access, VLC_FALSE, _("Illegal Polarization"),
+                                _("The provided polarization \"%c\" is not valid."),
+                                *psz_parser );
                 free( psz_dup );
                 return VLC_EGENERIC;
             }