No subject


Wed Aug 5 14:32:43 CEST 2015


byte-seeks using stream_Seek(), but can you please clarify a few points for
me:

(1) Do all upper level modules (demux, codec, etc) also obey the new file
position when set with stream_Seek()?
(2) Am I allowed to call stream functions from within an access module?
(3) If #2 above is allowed, how do I get a handle to the stream functions?
For example, to access the input structure I call vlc_object_find( p_access,
VLC_OBJECT_INPUT, FIND_PARENT ). Can I do something similar for the stream
structure?

Thank you for your help.

Sincerely,
Utku Altunkaya

------=_Part_62913_26782647.1163151862492
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

This post is a follow-up to the VideoLAN Forums thread<br><a href="http://forum.videolan.org/viewtopic.php?t=28344">http://forum.videolan.org/viewtopic.php?t=28344</a><br><br>Since the subject was development related, I am moving the discussion to the vlc-devel list here in accordance with Mr. 
<span class="postbody">
Derk-Jan Hartman's advice.<br><br>Mr. Hartman, thank you for the explanations in your reply. I did indeed try to implement the seeks in my own access module, but it didn't quite work. Let me explain:<br><br>VLC starts playing a video file using my access module. When the file position reaches, say, 15MB I want the playback to continue from the 40MB position, because my access module knows that there's corrupt data or a gap in the 15MB-40MB range of the file. The first thing I tried was, as soon as the file read pointer reached the 15MB boundary, or when a seek was requested by VLC to a position that fell within this gap, I performed an lseek() to 40MB in my own access module's Seek() function and also updated the "
info.i_pos" variable (this is identical to what the file access module does, in fact I'm modifying file.c for writing my module). What happened was, an upper level module (probably the demux or the codec) kept asking for the old location, and my seek operation was basically ignored. So I realized that I need to force the seek from an upper level module, but the best method I have yet been able to find is setting the "position" variable of the input class, which accomplishes a proper seek (even the time slider is updated), but that only gives me "1% of file size" resolution. For large files, this amounts to over 10MB of data getting skipped over.
<br><br>From reading the VLC source code, I know that the stream class can do byte-seeks using stream_Seek(), but can you please clarify a few points for me:<br><br>(1) Do all upper level modules (demux, codec, etc) also obey the new file position when set with stream_Seek()?
<br>(2) Am I allowed to call stream functions from within an access module?<br>(3) If #2 above is allowed, how do I get a handle to the stream functions? For example, to access the input structure I call vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT ). Can I do something similar for the stream structure?
<br><br>Thank you for your help.<br><br>Sincerely,<br>Utku Altunkaya<br></span>

------=_Part_62913_26782647.1163151862492--

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list