<div>In 2008 I found this, @Laurent thanks for the input. Yes can_rewind does exist and is currently working for 1.1.9. But nothing is supposedly happening with can_rewind.</div><div>------------------------------------------------------------------------------------------------</div>
<div>commit 75adef44b044b9b81e593e74db857d6b2a7e4eaa</div><div>Author: Jean-Paul Saman <<a href="mailto:jean-paul.saman@m2x.nl" target="_blank">jean-paul.saman@m2x.nl</a>></div><div>Date: Thu Nov 20 14:19:37 2008 +0100</div>
<div><br>
</div><div> Signal can_rewind for use by user interfaces.</div><div><br></div><div>commit f76cff41026a8c812644a57db33c4d2d846cf55a</div><div>Author: Jean-Paul Saman <<a href="mailto:jean-paul.saman@m2x.nl" target="_blank">jean-paul.saman@m2x.nl</a>></div>
<div>Date: Wed Nov 19 16:07:34 2008 +0100</div><div><br></div><div> Allowing for rate < 0 enables rewind playback for eg: RTSP streams.</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8">------------------------------------------------------------------------------------------------</div>
<div><br></div><div>So this means one can do something like this:</div><div><br></div><div><div>int libvlc_media_player_set_rate( libvlc_media_player_t *p_mi, float rate )</div><div>{</div><div><br></div><div> input_thread_t *p_input_thread = libvlc_get_input_thread ( p_mi );</div>
<div> bool b_rewindable;</div><div> if( !p_input_thread )</div><div> return 0;</div><div> b_rewindable = var_GetBool( p_input_thread, "can-rewind" );</div><div><br></div><div> if (rate < 0. && !b_rewindable)</div>
<div> {</div><div> libvlc_printerr ("Playing backward not supported for current file");</div><div> return -1;</div><div> }</div><div><br></div><div> var_SetFloat (p_mi, "rate", rate);</div>
<div> var_SetFloat( p_input_thread, "rate", rate );</div><div> vlc_object_release( p_input_thread );</div><div> return 0;</div><div>}</div></div><div><br></div><div>The test was successful once again. For a RTSP stream it was able to fast rewind, otherwise reading from a file at least, set_rate(-2) returned -1.</div>
<br><div class="gmail_quote">2011/5/29 Laurent Aimar <span dir="ltr"><<a href="mailto:fenrir@elivagar.org" target="_blank">fenrir@elivagar.org</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>On Sun, May 29, 2011 at 11:53:54AM +0300, Kaarlo Räihä wrote:<br>
> 2011/5/29 Nuno Mota <<a href="mailto:ee05154@fe.up.pt" target="_blank">ee05154@fe.up.pt</a>><br>
><br>
> So i've been using VLC java bindings for a few days to create a RTSP client<br>
> to work with my Live555 RTSP Server implementation.<br>
><br>
> Both commands play and pause work fine for me. Seek is working fine and the<br>
> playback works great after all these commands. However there's a few<br>
> remarks relating to fast forward and fast rewind. Fast forward works fine,<br>
> it moves along great but sometimes the current media position is set to<br>
> values way back the timeline. When I issue the command setRate(1), the<br>
> video is played again at the same rate but it skips some frames I think,<br>
> because the playback looks a little bit jumpy. I always get the same output<br>
> when i do this:<br>
><br>
> libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 15)<br>
> for PID 0<br>
> libdvbpsi error (PSI decoder): TS discontinuity (received 10, expected 0)<br>
> for PID 4095<br>
> libdvbpsi error (PSI decoder): TS duplicate (received 12, expected 13) for<br>
> PID 17<br>
><br>
> I see no other issues concerning Fast forward. Relative to fast rewind the<br>
> source code in the control section in media_player.c in line 1149<br>
><br>
> int libvlc_media_player_set_rate( libvlc_media_player_t *p_mi, float rate )<br>
> {<br>
><br>
> if (rate < 0.)<br>
> {<br>
> libvlc_printerr ("Playing backward not supported");<br>
> return -1;<br>
> }<br>
><br>
> Playing backwards is not supported playing from a disc file, i've tested it<br>
> myself, however, when streaming from an Internet source the case is quite<br>
> different. I commented the above lines to produce something similar to fast<br>
> forward and the result was successful.<br>
><br>
> PLAY rtsp://<a href="http://172.16.2.196:8554/Redbull_720.ts/" target="_blank">172.16.2.196:8554/Redbull_720.ts/</a> RTSP/1.0<br>
> CSeq: 11<br>
> User-Agent: LibVLC/1.1.9 (LIVE555 Streaming Media v2010.11.17)<br>
> Session: 68C9705<br>
> Scale: -2.000000<br>
><br>
> RTSP/1.0 200 OK<br>
> CSeq: 11<br>
> Date: Fri, May 27 2011 14:41:49 GMT<br>
> Scale: -2.000000<br>
> Session: 68C97056<br>
> RTP-Info: url=rtsp://<a href="http://172.16.2.196:8554/Redbull_720.ts/track1;seq=13622" target="_blank">172.16.2.196:8554/Redbull_720.ts/track1;seq=13622</a>;<br>
> rtptime=210151468<br>
><br>
> The playback was as good as the fast forward results. So here's my question<br>
> why is it still not supported for streaming? I see no other problems as the<br>
> ones that exist to still make this not supported. I'm kindly accepting<br>
> responses and comments and other stuff to make this a more interesting<br>
> topic.<br>
><br>
><br>
> AFAIK it would be somewhat ugly hack in libvlc to add support like this for<br>
> single access method (discs aren't the only problematic thing) with simple code<br>
> change. But if there would be internal variable (e.g. b_can_play_backwards) and<br>
> code for this in rtsp access, I don't think that patch would be opposed that<br>
> much.<br>
<br>
</div></div> The input code does declare weither or not rewinding is supported for the current input<br>
("can-rewind" variable of the input_thread_t object).<br>
<font color="#888888"><br>
--<br>
fenrir<br>
</font><div><div></div><div><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
</div></div></blockquote></div><br>