]> git.sesse.net Git - vlc/blobdiff - modules/demux/mkv.cpp
* ALL: playlist API changes
[vlc] / modules / demux / mkv.cpp
index ea8cdb4f200658339bead3ff6e9de6378001ad16..0e56da9b2f592b65c5950ec473d58ba40f2256e7 100644 (file)
@@ -2,7 +2,7 @@
  * mkv.cpp : matroska demuxer
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: mkv.cpp,v 1.47 2003/11/28 22:23:04 fenrir Exp $
+ * $Id: mkv.cpp,v 1.51 2004/01/05 13:07:02 zorglub Exp $
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
@@ -91,7 +91,7 @@ static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 
 vlc_module_begin();
-    add_category_hint( N_("mkv-demuxer"), NULL, VLC_TRUE );
+    add_category_hint( N_("mkv demuxer"), NULL, VLC_TRUE );
         add_bool( "mkv-seek-percent", 1, NULL,
                   N_("Seek based on percent not time"),
                   N_("Seek based on percent not time"), VLC_TRUE );
@@ -2166,19 +2166,16 @@ static void InformationsCreate( input_thread_t *p_input )
 {
     demux_sys_t           *p_sys = p_input->p_demux_data;
     input_info_category_t *p_cat;
+    playlist_t            *p_playlist;
     int                   i_track;
 
     p_cat = input_InfoCategory( p_input, "Matroska" );
+    p_playlist = (playlist_t*)vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT );
     if( p_sys->f_duration > 1000.1 )
     {
-        int64_t i_sec = (int64_t)p_sys->f_duration / 1000;
-        int h,m,s;
-
-        h = i_sec / 3600;
-        m = ( i_sec / 60 ) % 60;
-        s = i_sec % 60;
-
-        input_AddInfo( p_cat, _("Duration"), "%d:%2.2d:%2.2d" , h, m, s );
+        char psz_buffer[MSTRTIME_MAX_SIZE];
+        input_AddInfo( p_cat, _("Duration"),
+                       msecstotimestr( psz_buffer, (int)p_sys->f_duration ) );
     }
 
     if( p_sys->psz_title )
@@ -2187,19 +2184,19 @@ static void InformationsCreate( input_thread_t *p_input )
     }
     if( p_sys->psz_date_utc )
     {
-        input_AddInfo( p_cat, _("Date UTC"), "%s" ,p_sys->psz_date_utc );
+        input_AddInfo( p_cat, _("UTC date"), "%s" ,p_sys->psz_date_utc );
     }
     if( p_sys->psz_segment_filename )
     {
-        input_AddInfo( p_cat, _("Segment Filename"), "%s" ,p_sys->psz_segment_filename );
+        input_AddInfo( p_cat, _("Segment filename"), "%s" ,p_sys->psz_segment_filename );
     }
     if( p_sys->psz_muxing_application )
     {
-        input_AddInfo( p_cat, _("Muxing Application"), "%s" ,p_sys->psz_muxing_application );
+        input_AddInfo( p_cat, _("Muxing application"), "%s" ,p_sys->psz_muxing_application );
     }
     if( p_sys->psz_writing_application )
     {
-        input_AddInfo( p_cat, _("Writing Application"), "%s" ,p_sys->psz_writing_application );
+        input_AddInfo( p_cat, _("Writing application"), "%s" ,p_sys->psz_writing_application );
     }
     input_AddInfo( p_cat, _("Number of streams"), "%d" , p_sys->i_track );
 
@@ -2220,19 +2217,19 @@ static void InformationsCreate( input_thread_t *p_input )
         }
         if( tk.psz_codec_name )
         {
-            input_AddInfo( p_cat, _("Codec Name"), "%s", tk.psz_codec_name );
+            input_AddInfo( p_cat, _("Codec name"), "%s", tk.psz_codec_name );
         }
         if( tk.psz_codec_settings )
         {
-            input_AddInfo( p_cat, _("Codec Setting"), "%s", tk.psz_codec_settings );
+            input_AddInfo( p_cat, _("Codec setting"), "%s", tk.psz_codec_settings );
         }
         if( tk.psz_codec_info_url )
         {
-            input_AddInfo( p_cat, _("Codec Info"), "%s", tk.psz_codec_info_url );
+            input_AddInfo( p_cat, _("Codec info"), "%s", tk.psz_codec_info_url );
         }
         if( tk.psz_codec_download_url )
         {
-            input_AddInfo( p_cat, _("Codec Download"), "%s", tk.psz_codec_download_url );
+            input_AddInfo( p_cat, _("Codec download"), "%s", tk.psz_codec_download_url );
         }
 #undef  tk
     }