I'm trying to put together an access module for VLC 0.8.5, but I'm currently stuck at a point where I cannot seem to find how to perform a seek to a specific byte position within a media file.
From within the Seek function for my module, I have tried setting p_access->info.i_pos to the byte position I want to seek to, but it didn't work and VLC kept jumping back to the old file position. I thought that maybe some upper level module is keeping the real position value and info.i_pos is just that, information only.
So I started examining the VLC source, looking at the bookmarks code, jump forward and backward routines, other modules' seek functions, etc. I saw the input_Seek() function mentioned at a few places, but later found out that it was deprecated. The best I can do now is using the float value of (desired_position/file_size) in a set_Var("position") call. However, although VLC does seek properly when I use set_Var, the accuracy is not that good; it seems VLC can only seek in 1% steps ('file_size/100' bytes). I ask for "position x", but VLC seeks to "x + several megabytes".
Is it possible to seek to a specific byte in VLC, and which function do I have to call to accomplish that?