]> git.sesse.net Git - vlc/blobdiff - modules/access/dvb/access.c
Export Content-Type out of HTTP access using Control.
[vlc] / modules / access / dvb / access.c
index ecc46e88cf44049ef177f23565c4fd71e3560279..47ced7b7d7c2be51067d98220f4b2798c99640f2 100644 (file)
@@ -253,14 +253,21 @@ vlc_module_begin();
 #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();
 
@@ -308,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 */
@@ -423,7 +433,7 @@ static block_t *Block( access_t *p_access )
             if( errno == EINTR )
                 continue;
 
-            msg_Err( p_access, "poll error: %s", strerror(errno) );
+            msg_Err( p_access, "poll error: %m" );
             return NULL;
         }
 
@@ -482,7 +492,7 @@ static block_t *Block( access_t *p_access )
             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) );
+                msg_Warn( p_access, "read failed (%m)" );
                 block_Release( p_block );
                 continue;
             }
@@ -532,6 +542,7 @@ static int Control( access_t *p_access, int i_query, va_list args )
         case ACCESS_GET_TITLE_INFO:
         case ACCESS_SET_TITLE:
         case ACCESS_SET_SEEKPOINT:
+        case ACCESS_GET_CONTENT_TYPE:
             return VLC_EGENERIC;
 
         case ACCESS_SET_PRIVATE_ID_STATE:
@@ -713,7 +724,7 @@ 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"), 
+        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 );
@@ -760,7 +771,7 @@ 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"), 
+                intf_UserFatal( p_access, VLC_FALSE, _("Illegal Polarization"),
                                 _("The provided polarization \"%c\" is not valid."),
                                 *psz_parser );
                 free( psz_dup );