]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/info_panels.cpp
New icons for repeat, more obvious, done by Daniel Dreibrodt
[vlc] / modules / gui / qt4 / components / info_panels.cpp
index a74329d127ff506c5138e75505991fda8a532fe0..2b35cdb599a2869f9540b6e617d53a16d1dd9b5d 100644 (file)
@@ -234,14 +234,13 @@ void MetaPanel::update( input_item_t *p_item )
 
     QString file;
     char *psz_art = input_item_GetArtURL( p_item );
-    if( psz_art && !strncmp( psz_art, "file://", 7 ) &&
-                decode_URI( psz_art + 7 ) )
-#ifdef WIN32
-        file = qfu( psz_art + 8 ); // Remove extra / on Win32 URI.
-#else
-        file = qfu( psz_art + 7 );
-#endif
-    free( psz_art );
+    if( psz_art )
+    {
+        char *psz = make_path( psz_art );
+        free( psz_art );
+        file = qfu( psz );
+        free( psz );
+    }
 
     art_cover->showArtUpdate( file );
 
@@ -267,9 +266,8 @@ void MetaPanel::saveMeta()
     input_item_SetPublisher( p_input, qtu( publisher_text->text() ) );
     input_item_SetDescription( p_input, qtu( description_text->text() ) );
 
-    playlist_t *p_playlist = pl_Hold( p_intf );
+    playlist_t *p_playlist = pl_Get( p_intf );
     input_item_WriteMeta( VLC_OBJECT(p_playlist), p_input );
-    pl_Release( p_intf );
 
     /* Reset the status of the mode. No need to emit any signal because parent
        is the only caller */
@@ -512,10 +510,10 @@ InputStatsPanel::InputStatsPanel( QWidget *parent,
     CREATE_CATEGORY( streaming, qtr("Output/Written/Sent") );
 
     CREATE_AND_ADD_TO_CAT( read_media_stat, qtr("Media data size"),
-                           "0", input , "kB" );
+                           "0", input , "KiB" );
     CREATE_AND_ADD_TO_CAT( input_bitrate_stat, qtr("Input bitrate"),
                            "0", input, "kb/s" );
-    CREATE_AND_ADD_TO_CAT( demuxed_stat, qtr("Demuxed data size"), "0", input, "kB") ;
+    CREATE_AND_ADD_TO_CAT( demuxed_stat, qtr("Demuxed data size"), "0", input, "KiB") ;
     CREATE_AND_ADD_TO_CAT( stream_bitrate_stat, qtr("Content bitrate"),
                            "0", input, "kb/s" );
     CREATE_AND_ADD_TO_CAT( corrupted_stat, qtr("Discarded (corrupted)"),
@@ -532,7 +530,7 @@ InputStatsPanel::InputStatsPanel( QWidget *parent,
 
     CREATE_AND_ADD_TO_CAT( send_stat, qtr("Sent"), "0", streaming, qtr("packets") );
     CREATE_AND_ADD_TO_CAT( send_bytes_stat, qtr("Sent"),
-                           "0", streaming, "kB" );
+                           "0", streaming, "KiB" );
     CREATE_AND_ADD_TO_CAT( send_bitrate_stat, qtr("Upstream rate"),
                            "0", streaming, "kb/s" );
 
@@ -569,11 +567,11 @@ void InputStatsPanel::update( input_item_t *p_item )
     { QString str; widget->setText( 1 , str.sprintf( format, ## calc ) );  }
 
     UPDATE( read_media_stat, "%8.0f",
-            (float)(p_item->p_stats->i_read_bytes)/1000);
+            (float)(p_item->p_stats->i_read_bytes)/1024);
     UPDATE( input_bitrate_stat, "%6.0f",
                     (float)(p_item->p_stats->f_input_bitrate * 8000 ));
     UPDATE( demuxed_stat, "%8.0f",
-                    (float)(p_item->p_stats->i_demux_read_bytes)/1000 );
+                    (float)(p_item->p_stats->i_demux_read_bytes)/1024 );
     UPDATE( stream_bitrate_stat, "%6.0f",
                     (float)(p_item->p_stats->f_demux_bitrate * 8000 ));
     UPDATE( corrupted_stat, "%5i", p_item->p_stats->i_demux_corrupted );
@@ -587,7 +585,7 @@ void InputStatsPanel::update( input_item_t *p_item )
     /* Sout */
     UPDATE( send_stat, "%5i", p_item->p_stats->i_sent_packets );
     UPDATE( send_bytes_stat, "%8.0f",
-            (float)(p_item->p_stats->i_sent_bytes)/1000 );
+            (float)(p_item->p_stats->i_sent_bytes)/1024 );
     UPDATE( send_bitrate_stat, "%6.0f",
             (float)(p_item->p_stats->f_send_bitrate*8)*1000 );