]> git.sesse.net Git - vlc/commitdiff
Fixed invalid/useless usage of ES_OUT_RESET_PCR.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 10 Oct 2008 19:24:32 +0000 (21:24 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 10 Oct 2008 19:28:30 +0000 (21:28 +0200)
13 files changed:
include/vlc_es_out.h
modules/demux/avformat/demux.c
modules/demux/gme.cpp
modules/demux/live555.cpp
modules/demux/mkv/mkv.cpp
modules/demux/mod.c
modules/demux/nsv.c
modules/demux/ps.c
modules/demux/pva.c
modules/demux/real.c
modules/demux/ts.c
modules/demux/tta.c
modules/demux/ty.c

index 0ef457b07f0a4cf749382e7ba601f22867fb0155..08e75eb9cf66114cf368e0ece57e7f619ff0c7f9 100644 (file)
@@ -71,9 +71,8 @@ enum es_out_query_e
     /* PCR handling, DTS/PTS will be automatically computed using thoses PCR
      * XXX: SET_PCR(_GROUP) are in charge of the pace control. They will wait
      * to slow down the demuxer so that it reads at the right speed.
-     * XXX: if you want PREROLL just call RESET_PCR and
-     * ES_OUT_SET_NEXT_DISPLAY_TIME and send data to the decoder *without*
-     * calling SET_PCR until preroll is finished.
+     * XXX: if you want PREROLL just call ES_OUT_SET_NEXT_DISPLAY_TIME and send$
+     * as you would normally do.
      */
     ES_OUT_SET_PCR,             /* arg1=int64_t i_pcr(microsecond!) (using default group 0)*/
     ES_OUT_SET_GROUP_PCR,       /* arg1= int i_group, arg2=int64_t i_pcr(microsecond!)*/
index f093079c5d3862ec68c1fd3e4f13c20a0f07ac0e..1658122bbd99bd63175b34a8aba4a7b6bb1622f3 100644 (file)
@@ -509,7 +509,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                         return VLC_EGENERIC;
                 }
                 UpdateSeekPoint( p_demux, i64 );
-                es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
                 p_sys->i_pcr = -1; /* Invalidate time display */
             }
             return VLC_SUCCESS;
@@ -540,7 +539,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             {
                 return VLC_EGENERIC;
             }
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
             p_sys->i_pcr = -1; /* Invalidate time display */
             UpdateSeekPoint( p_demux, i64 );
             return VLC_SUCCESS;
@@ -626,7 +624,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             {
                 return VLC_EGENERIC;
             }
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
             p_sys->i_pcr = -1; /* Invalidate time display */
             UpdateSeekPoint( p_demux, i64 );
             return VLC_SUCCESS;
index de1c285d0f6c8a1bf230d2fbaed9f49810601f63..2dfb5c957a216e5d658cd7e1759b76dd32f073c3 100644 (file)
@@ -420,7 +420,6 @@ switch( i_query )
             {
                 ModPlug_Seek( p_sys->f, i64 / 1000 );
                 p_sys->i_time = i64 + 1;
-                es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
 
                 return VLC_SUCCESS;
             }
@@ -443,7 +442,6 @@ switch( i_query )
             {
                 ModPlug_Seek( p_sys->f, i64 / 1000 );
                 p_sys->i_time = i64 + 1;
-                es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
 
                 return VLC_SUCCESS;
             }
index fd4d69d9b7259244ba926f78d82929529c156df4..687dc882ef7bc552cfeda5ebb5a6e9570e58d30e 100644 (file)
@@ -1252,7 +1252,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                         p_sys->env->getResultMsg() );
                     return VLC_EGENERIC;
                 }
-                es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
                 p_sys->i_pcr = 0;
 
                 /* Retrieve RTP-Info values */
@@ -1338,7 +1337,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             p_sys->i_npt_start = 0;
             p_sys->i_pcr = 0;
             p_sys->i_npt = 0.;
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
 
             *pi_int = (int)( INPUT_RATE_DEFAULT / p_sys->ms->scale() + 0.5 );
             return VLC_SUCCESS;
index 338732ff5b1cbfb9fbfc686a5619d03dd2077564..2c1e96734567fb6ee9dff99c37972bb286eaef82 100644 (file)
@@ -649,7 +649,6 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
                 {
                     ParseCluster();
                     msg_Dbg( &sys.demuxer, "we found a cluster that is in the neighbourhood" );
-                    es_out_Control( sys.demuxer.out, ES_OUT_RESET_PCR );
                     return;
                 }
             }
@@ -690,8 +689,6 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
 
     sys.i_start_pts = i_date;
 
-    es_out_Control( sys.demuxer.out, ES_OUT_RESET_PCR );
-
     /* now parse until key frame */
     i_track_skipping = 0;
     for( i_track = 0; i_track < tracks.size(); i_track++ )
@@ -744,7 +741,6 @@ void matroska_segment_c::Seek( mtime_t i_date, mtime_t i_time_offset, int64_t i_
                 }
                 if( !tracks[i_track]->b_search_keyframe )
                 {
-                    //es_out_Control( sys.demuxer.out, ES_OUT_SET_PCR, sys.i_pts );
                     BlockDecode( &sys.demuxer, block, simpleblock, sys.i_pts, 0, i_block_ref1 >= 0 || i_block_ref2 > 0 );
                 }
             }
@@ -865,10 +861,10 @@ static int Demux( demux_t *p_demux)
         else
             p_sys->i_pts = (p_sys->i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000;
 
+        es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts );
+
         if( p_sys->i_pts >= p_sys->i_start_pts  )
         {
-            es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts );
-
             if ( p_vsegment->UpdateCurrentToChapter( *p_demux ) )
             {
                 i_return = 1;
index 399bc00ab9f70d1294e4e1c17527160879b80393..69128ecc998ce707e06f1d37c0a97b02c8a7b58d 100644 (file)
@@ -327,7 +327,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             {
                 ModPlug_Seek( p_sys->f, i64 / 1000 );
                 p_sys->i_time = i64 + 1;
-                es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
 
                 return VLC_SUCCESS;
             }
@@ -350,7 +349,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             {
                 ModPlug_Seek( p_sys->f, i64 / 1000 );
                 p_sys->i_time = i64 + 1;
-                es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
 
                 return VLC_SUCCESS;
             }
index c50579ffc1ccfe0232e3b92f580d90fb8c66d2c6..8af188efc6cc649d44f026fe747d023c0c4acdb0 100644 (file)
@@ -343,11 +343,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             f = (double) va_arg( args, double );
             i64 = stream_Size( p_demux->s );
 
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
             if( stream_Seek( p_demux->s, (int64_t)(i64 * f) ) || ReSynch( p_demux ) )
-            {
                 return VLC_EGENERIC;
-            }
+
             p_sys->i_time = -1; /* Invalidate time display */
             return VLC_SUCCESS;
 
index 837a8ce31c3efa8ed7b8b006e180968b5df07969..274dc0bfee9c7f24a516e6b3e2a667aab26b0e16 100644 (file)
@@ -449,7 +449,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             f = (double) va_arg( args, double );
             i64 = stream_Size( p_demux->s );
             p_sys->i_current_pts = 0;
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
 
             return stream_Seek( p_demux->s, (int64_t)(i64 * f) );
 
@@ -494,7 +493,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                 int64_t i_offset = i_pos / (i_now / 1000000) * ((i64 - i_now) / 1000000);
                 stream_Seek( p_demux->s, i_pos + i_offset);
 
-                es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
                 return VLC_SUCCESS;
             }
             return VLC_EGENERIC;
index 09eaf303e50c276e2b0df4f862c7bcd7b50bcabb..a3f13a01fbd88475c3ece76f920101e4f74fb066 100644 (file)
@@ -294,7 +294,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             f = (double) va_arg( args, double );
             i64 = stream_Size( p_demux->s );
 
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
             if( stream_Seek( p_demux->s, (int64_t)(i64 * f) ) || ReSynch( p_demux ) )
             {
                 return VLC_EGENERIC;
index f7b71e35b666d99e10f8ff8467a54a1db6597522..8d6fa6c17f5476f9ac18599d67351d4417a83ac5 100644 (file)
@@ -794,7 +794,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
                 msg_Dbg(p_demux, "Seek in real rtsp stream!");
                 p_sys->i_pcr = (int64_t)1000 * ( p_sys->i_our_duration * f  );
 
-                es_out_Control( p_demux->out, ES_OUT_RESET_PCR , p_sys->i_pcr );
                 p_sys->b_seek = 1;
 
                 return stream_Seek( p_demux->s, p_sys->i_pcr );
@@ -819,8 +818,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
                 p_sys->i_pcr = 1000 * (int64_t) p_index->time_offset;
 
-                es_out_Control( p_demux->out, ES_OUT_RESET_PCR , p_sys->i_pcr );
-
                 return stream_Seek( p_demux->s, i64 );
             }
         case DEMUX_SET_TIME:
@@ -840,7 +837,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             }
 
             p_sys->i_pcr = 1000 * (int64_t) p_index->time_offset;
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR , p_sys->i_pcr );
 
             return stream_Seek( p_demux->s, i64 );
 
index 92889d6bbc94acfe2ad436de0ac5218668637454..57d9198073761b5534b8561b0672e4b987440f59 100644 (file)
@@ -1235,11 +1235,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             f = (double) va_arg( args, double );
             i64 = stream_Size( p_demux->s );
 
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
             if( stream_Seek( p_demux->s, (int64_t)(i64 * f) ) )
-            {
                 return VLC_EGENERIC;
-            }
+
             return VLC_SUCCESS;
 #if 0
 
index bc7ae25a7045449fa955b638e52cde5a5bf128ef..eca6ac5fba8f0a1b448bb118a1fc192eb2366c22 100644 (file)
@@ -236,7 +236,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         case DEMUX_SET_POSITION:
             f = (double)va_arg( args, double );
             i64 = (int64_t)(f * (stream_Size( p_demux->s ) - p_sys->i_start));
-            es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
             if( i64 > 0 )
             {
                 int64_t tmp = 0;
index 231fddabf8a53136040e7e3f5d0202d0539c8a93..7e3a2a42d6c65209e9f3f981623991e46da72c42 100644 (file)
@@ -1104,7 +1104,6 @@ static int ty_stream_seek_pct(demux_t *p_demux, double seek_pct)
 
     /* to hell with syncing any audio or video, just start reading records... :) */
     /*p_sys->lastAudioPTS = p_sys->lastVideoPTS = 0;*/
-    es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
     return VLC_SUCCESS;
 }