]> git.sesse.net Git - vlc/commitdiff
Added mod title support.
authorLaurent Aimar <fenrir@videolan.org>
Wed, 4 Feb 2009 20:31:11 +0000 (21:31 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 5 Feb 2009 18:13:11 +0000 (19:13 +0100)
modules/demux/mod.c

index c0ff6dcf8c7761e013c8d8b4b63533b7c1891955..38072d070c417d2308d76a1f98569d852651aff8 100644 (file)
@@ -32,6 +32,7 @@
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_demux.h>
+#include <vlc_meta.h>
 
 #include <libmodplug/modplug.h>
 
@@ -349,6 +350,21 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         }
         return VLC_EGENERIC;
 
+    case DEMUX_HAS_UNSUPPORTED_META:
+    {
+        bool *pb_bool = (bool*)va_arg( args, bool* );
+        *pb_bool = false; /* FIXME I am not sure of this one */
+        return VLC_SUCCESS;
+    }
+    case DEMUX_GET_META:
+    {
+        vlc_meta_t *p_meta = (vlc_meta_t *)va_arg( args, vlc_meta_t* );
+        const char *psz_name = ModPlug_GetName( p_sys->f );
+        if( psz_name && *psz_name )
+            vlc_meta_SetTitle( p_meta, psz_name );
+        return VLC_SUCCESS;
+    }
+
     case DEMUX_GET_FPS: /* meaningless */
     default:
         return VLC_EGENERIC;