]> git.sesse.net Git - vlc/commitdiff
- narrow r10012 to remove dts only stuff that goes to libmpeg2 (mpgv) and
authorIlkka Ollakka <ileoo@videolan.org>
Tue, 8 Jan 2008 08:15:54 +0000 (08:15 +0000)
committerIlkka Ollakka <ileoo@videolan.org>
Tue, 8 Jan 2008 08:15:54 +0000 (08:15 +0000)
  not all video. enables to restream/transcode rtsp/h264 streams.
  Should also partly fix #397, it seems that most of h264 streams are
  with packetization-mode=1 eg. in decoding order (thou it should be
  checked here, and FIXME is for that).

- only start GET_PARAMETER keepalive-thread if x-asf is setted eg. when
  server is wms, DSS 5.5.4 & 5.5.5 doesn't like GET_PARAMETER at all and
  closes the connection when getting that, and they seem to use
  rtcp-data for liveness. Kasenna uses that KA in useragent-string.

modules/demux/live555.cpp

index c21781281b4fd6d9cb5bd17362627e6eef46dc67..dc1bc0ab6d8078cf6143906a5a3c44c8e9f00705 100644 (file)
@@ -980,7 +980,11 @@ static int Play( demux_t *p_demux )
         p_sys->i_timeout = p_sys->rtsp->sessionTimeoutParameter();
         if( p_sys->i_timeout <= 0 )
             p_sys->i_timeout = 60; /* default value from RFC2326 */
-        if( !p_sys->p_timeout )
+
+        /* start timeout-thread only on x-asf streams (wms), it has rtcp support but doesn't 
+         * seem to use it for liveness/keep-alive, get_parameter seems to work for it. get_parameter
+         * doesn't work with dss 5.5.4 & 5.5.5, they seems to work with rtcp */
+        if( !p_sys->p_timeout && p_sys->p_out_asf )
         {
             msg_Dbg( p_demux, "We have a timeout of %d seconds",  p_sys->i_timeout );
             p_sys->p_timeout = (timeout_thread_t *)vlc_object_create( p_demux, sizeof(timeout_thread_t) );
@@ -1648,9 +1652,13 @@ static void StreamRead( void *p_private, unsigned int i_size,
 
     if( (i_pts != tk->i_pts) && (!tk->b_muxed) )
     {
-        p_block->i_dts = ( tk->fmt.i_cat == VIDEO_ES ) ? 0 : i_pts;
         p_block->i_pts = i_pts;
     }
+    if( !tk->b_muxed )
+    {
+        /*FIXME: for h264 you should check that packetization-mode=1 in sdp-file */
+        p_block->i_dts = ( tk->fmt.i_codec == VLC_FOURCC( 'm', 'p', 'g', 'v' ) ) ? 0 : i_pts;
+    }
 
     if( tk->b_muxed )
     {