]> git.sesse.net Git - vlc/blobdiff - src/input/stream.c
vlc.win32.nsi.in: i need holidays
[vlc] / src / input / stream.c
index 3ce55b270e88dc8820a861154c78a76b6ba793d6..c833f7d059c0ca795e7d38c931b6e75863c235c6 100644 (file)
@@ -807,7 +807,7 @@ static int AStreamSeekBlock( stream_t *s, int64_t i_pos )
 
         if( !b_aseek )
         {
-            msg_Err( s, "backward seek impossible (access non seekable)" );
+            msg_Err( s, "backward seeking impossible (access not seekable)" );
             return VLC_EGENERIC;
         }
 
@@ -1327,7 +1327,7 @@ static void AStreamPrebufferStream( stream_t *s )
         ( (p_access->info.i_title > 1 || p_access->info.i_seekpoint > 1) ?
           STREAM_CACHE_PREBUFFER_SIZE : STREAM_CACHE_TRACK_SIZE / 3 );
 
-    msg_Dbg( s, "pre buffering" );
+    msg_Dbg( s, "pre-buffering..." );
     i_start = mdate();
     for( ;; )
     {
@@ -1347,7 +1347,7 @@ static void AStreamPrebufferStream( stream_t *s )
             i_byterate = ( I64C(1000000) * p_sys->stat.i_bytes ) /
                          (p_sys->stat.i_read_time+1);
 
-            msg_Dbg( s, "prebuffering done "I64Fd" bytes in "I64Fd"s - "
+            msg_Dbg( s, "pre-buffering done "I64Fd" bytes in "I64Fd"s - "
                      I64Fd" kbytes/s",
                      p_sys->stat.i_bytes,
                      p_sys->stat.i_read_time / I64C(1000000),
@@ -1530,7 +1530,7 @@ char * stream_ReadLine( stream_t *s )
         if( s->i_char_width > 1 )
         {
             size_t i_in = 0, i_out = 0;
-            char * p_in = NULL;
+            const char * p_in = NULL;
             char * p_out = NULL;
             char * psz_new_line = NULL;
             
@@ -1580,11 +1580,12 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
     if( !p_sys->i_list )
     {
         i_read = p_access->pf_read( p_access, p_read, i_read );
-        stats_UpdateInteger( s->p_parent->p_parent , "read_bytes", i_read,
+        stats_UpdateInteger( s->p_parent->p_parent , STATS_READ_BYTES, i_read,
                              &i_total );
-        stats_UpdateFloat( s->p_parent->p_parent , "input_bitrate",
+        stats_UpdateFloat( s->p_parent->p_parent , STATS_INPUT_BITRATE,
                            (float)i_total, NULL );
-        stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1, NULL );
+        stats_UpdateInteger( s->p_parent->p_parent , STATS_READ_PACKETS, 1,
+                             NULL );
         return i_read;
     }
 
@@ -1613,11 +1614,11 @@ static int AReadStream( stream_t *s, void *p_read, int i_read )
     }
 
     /* Update read bytes in input */
-    stats_UpdateInteger( s->p_parent->p_parent , "read_bytes", i_read,
+    stats_UpdateInteger( s->p_parent->p_parent ,  STATS_READ_BYTES, i_read,
                          &i_total );
-    stats_UpdateFloat( s->p_parent->p_parent , "input_bitrate",
+    stats_UpdateFloat( s->p_parent->p_parent ,  STATS_INPUT_BITRATE,
                       (float)i_total, NULL );
-    stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1, NULL );
+    stats_UpdateInteger( s->p_parent->p_parent ,  STATS_READ_PACKETS, 1, NULL );
     return i_read;
 }
 
@@ -1635,11 +1636,11 @@ static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof )
         if( pb_eof ) *pb_eof = p_access->info.b_eof;
         if( p_block && p_access->p_libvlc->b_stats )
         {
-            stats_UpdateInteger( s->p_parent->p_parent, "read_bytes",
+            stats_UpdateInteger( s->p_parent->p_parent,  STATS_READ_BYTES,
                                  p_block->i_buffer, &i_total );
-            stats_UpdateFloat( s->p_parent->p_parent , "input_bitrate",
+            stats_UpdateFloat( s->p_parent->p_parent ,  STATS_INPUT_BITRATE,
                               (float)i_total, NULL );
-            stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1, NULL );
+            stats_UpdateInteger( s->p_parent->p_parent ,  STATS_READ_PACKETS, 1, NULL );
         }
         return p_block;
     }
@@ -1670,11 +1671,12 @@ static block_t *AReadBlock( stream_t *s, vlc_bool_t *pb_eof )
     }
     if( p_block )
     {
-        stats_UpdateInteger( s->p_parent->p_parent, "read_bytes",
+        stats_UpdateInteger( s->p_parent->p_parent,  STATS_READ_BYTES,
                              p_block->i_buffer, &i_total );
-        stats_UpdateFloat( s->p_parent->p_parent , "input_bitrate",
+        stats_UpdateFloat( s->p_parent->p_parent ,  STATS_INPUT_BITRATE,
                           (float)i_total, NULL );
-        stats_UpdateInteger( s->p_parent->p_parent , "read_packets", 1 , NULL);
+        stats_UpdateInteger( s->p_parent->p_parent ,  STATS_READ_PACKETS,
+                             1 , NULL);
     }
 
     return p_block;