From 07e7a9048dbad0d54d73d8c8b92e4f99fd3da0a5 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Tue, 8 Jan 2008 08:15:54 +0000 Subject: [PATCH] - narrow r10012 to remove dts only stuff that goes to libmpeg2 (mpgv) and 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 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp index c21781281b..dc1bc0ab6d 100644 --- a/modules/demux/live555.cpp +++ b/modules/demux/live555.cpp @@ -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 ) { -- 2.39.2