<div dir="ltr">2014-11-25 9:38 GMT-02:00 Rémi Denis-Courmont <span dir="ltr"><<a href="mailto:remi@remlab.net" target="_blank">remi@remlab.net</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le 2014-11-25 10:30, Paulo Vitor Magacho da Silva a écrit :<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
 modules/access/live555.cpp      | 13 +++++++------<br>
 modules/codec/avcodec/video.c   |  4 ++--<br>
 src/input/clock.c               |  2 +-<br>
 src/video_output/video_output.<u></u>c |  2 +-<br>
 4 files changed, 11 insertions(+), 10 deletions(-)<br>
<br>
diff --git a/modules/access/live555.cpp b/modules/access/live555.cpp<br>
index b14898c..4442b9b 100644<br>
--- a/modules/access/live555.cpp<br>
+++ b/modules/access/live555.cpp<br>
@@ -1217,8 +1217,9 @@ static int Play( demux_t *p_demux )<br>
     {<br>
         /* The PLAY */<br>
         p_sys->rtsp->sendPlayCommand( *p_sys->ms,<br>
default_live555_callback, p_sys->f_npt_start, -1, 1 );<br>
+        const int i_timeout = var_InheritInteger( p_demux, "ipv4-timeout" );<br>
<br>
-        if( !wait_Live555_response(p_<u></u>demux) )<br>
+        if( !wait_Live555_response(p_<u></u>demux, i_timeout) )<br>
</blockquote>
<br></span>
I don't see how this fits with ipv4-timeout.<span class=""><br>
<br></span></blockquote><div><br></div><div>Will remove this from the commit.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
         {<br>
             msg_Err( p_demux, "RTSP PLAY failed %s",<br>
p_sys->env->getResultMsg() );<br>
             return VLC_EGENERIC;<br>
@@ -1386,14 +1387,14 @@ static int Demux( demux_t *p_demux )<br>
         */<br>
     }<br>
     else if( !p_sys->b_multicast && !p_sys->b_paused &&<br>
-              p_sys->b_no_data && ( p_sys->i_no_data_ti > 34 ) )<br>
+              p_sys->b_no_data && ( p_sys->i_no_data_ti > 68 ) )<br>
     {<br>
         bool b_rtsp_tcp = var_GetBool( p_demux, "rtsp-tcp" ) ||<br>
                                 var_GetBool( p_demux, "rtsp-http" );<br>
<br>
         if( !b_rtsp_tcp && p_sys->rtsp && p_sys->ms )<br>
         {<br>
-            msg_Warn( p_demux, "no data received in 10s. Switching<br>
to TCP" );<br>
+            msg_Warn( p_demux, "no data received in 20s. Switching<br>
to TCP" );<br>
</blockquote>
<br></span>
This is way too long. Even 10 seconds is already long.<br>
<br>
And this has nothing to do with FPS and everything to do with network conditions.<span class=""><br>
<br></span></blockquote><div><br></div><div>Can I make this be configurable ? So the above ipv4-timeout would be rtsp-timeout and would also work in this situation.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
             if( RollOverTcp( p_demux ) )<br>
             {<br>
                 msg_Err( p_demux, "TCP rollover failed, aborting" );<br>
@@ -1401,14 +1402,14 @@ static int Demux( demux_t *p_demux )<br>
             }<br>
             return 1;<br>
         }<br>
-        msg_Err( p_demux, "no data received in 10s, aborting" );<br>
+        msg_Err( p_demux, "no data received in 20s, aborting" );<br>
         return 0;<br>
     }<br>
     else if( !p_sys->b_multicast && !p_sys->b_paused &&<br>
-             ( p_sys->i_no_data_ti > 34 ) )<br>
+             ( p_sys->i_no_data_ti > 68 ) )<br>
     {<br>
         /* EOF ? */<br>
-        msg_Warn( p_demux, "no data received in 10s, eof ?" );<br>
+        msg_Warn( p_demux, "no data received in 20s, eof ?" );<br>
         return 0;<br>
     }<br>
     return p_sys->b_error ? 0 : 1;<br>
diff --git a/modules/codec/avcodec/video.<u></u>c b/modules/codec/avcodec/video.<u></u>c<br>
index 5ba6e2e..fafe4f9 100644<br>
--- a/modules/codec/avcodec/video.<u></u>c<br>
+++ b/modules/codec/avcodec/video.<u></u>c<br>
@@ -515,7 +515,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec,<br>
block_t **pp_block )<br>
     }<br>
<br>
     if( !p_dec->b_pace_control && (p_sys->i_late_frames > 0) &&<br>
-        (mdate() - p_sys->i_late_frames_start > INT64_C( 5000000)) )<br>
+        (mdate() - p_sys->i_late_frames_start > INT64_C(60000000)) )<br>
</blockquote>
<br></span>
No way. If you want to support arbitrarily low frame rate, you do it properly. Tweaking magic values like this is a recipe for huge problems.<span class=""><br>
<br></span></blockquote><div><br></div><div>The problem here is with the network buffer. I have to set the network buffer to something like 5~10 seconds to capture enough frames for 1 FPS stream, for instance, to start deconding. This won't work with the 5 seconds limit above. Do you have any suggestion ? Is there any information coming from the SDP that I could use to detect FPS and act accordingly ?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     {<br>
         if( p_sys->i_pts > VLC_TS_INVALID )<br>
         {<br>
@@ -524,7 +524,7 @@ static picture_t *DecodeVideo( decoder_t *p_dec,<br>
block_t **pp_block )<br>
         if( p_block )<br>
             block_Release( p_block );<br>
         p_sys->i_late_frames--;<br>
-        msg_Err( p_dec, "more than 5 seconds of late video -> "<br>
+        msg_Err( p_dec, "more than 60 seconds of late video -> "<br>
                  "dropping frame (computer too slow ?)" );<br>
         return NULL;<br>
     }<br>
diff --git a/src/input/clock.c b/src/input/clock.c<br>
index 1419f8f..8f4acf9 100644<br>
--- a/src/input/clock.c<br>
+++ b/src/input/clock.c<br>
@@ -430,7 +430,7 @@ int input_clock_ConvertTS( input_clock_t *cl,<br>
     /* */<br>
     if( *pi_ts0 > VLC_TS_INVALID )<br>
     {<br>
-        *pi_ts0 = ClockStreamToSystem( cl, *pi_ts0 + AvgGet( &cl->drift ) );<br>
+        *pi_ts0 = ClockStreamToSystem( cl, *pi_ts0 /* AvgGet(<br>
&cl->drift ) */ );<br>
</blockquote>
<br></span>
This kind of changes is totally unacceptable without explanations why the current code is wrong and why the patch is right.<span class=""><br></span></blockquote><div><br></div><div>The same as above. I would probrably need to know the FPS of the stream to adjust this conversion.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
         if( *pi_ts0 > cl->i_ts_max )<br>
             cl->i_ts_max = *pi_ts0;<br>
         *pi_ts0 += i_ts_delay;<br>
diff --git a/src/video_output/video_<u></u>output.c<br>
b/src/video_output/video_<u></u>output.c<br>
index 2a6fe2a..820199d 100644<br>
--- a/src/video_output/video_<u></u>output.c<br>
+++ b/src/video_output/video_<u></u>output.c<br>
@@ -66,7 +66,7 @@ static void VoutDestructor(vlc_object_t *);<br>
 /**<br>
  * Late pictures having a delay higher than this value are thrashed.<br>
  */<br>
-#define VOUT_DISPLAY_LATE_THRESHOLD (INT64_C(20000))<br>
+#define VOUT_DISPLAY_LATE_THRESHOLD (INT64_C(5000000))<br>
</blockquote>
<br></span>
See above. 60ms is the absolute maximum acceptable value here, IMHO.</blockquote><div><br></div><div>Same as above. This would have to be adjusted with the FPS information from the stream. Don't know if that is possible. <br></div><div><br></div><div>I am open to suggestion on how to make this work. The idea is to work with cameras that change to a low FPS when no movement is detected or that are set fixed to a low FPS.<br><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
 /* Better be in advance when awakening than late... */<br>
 #define VOUT_MWAIT_TOLERANCE (INT64_C(4000))<br>
</blockquote>
<br>
-- <br></div></div><span class="HOEnZb"><font color="#888888">
Rémi Denis-Courmont<br>
</font></span></blockquote></div><br><br></div><div class="gmail_extra">Thank you,<br>Paulo<br></div></div>