[Mplayer-users] a question about fast forward
pked at go2.pl
Tue Aug 7 01:51:48 CEST 2001
On Tue, 31 Jul 2001, Arpi wrote:
> it's normal. i set every steram pointers to the beginning of the file.
> for interleaved files (99% of avi files) _a and _v variables aren't used.
> for non-interleaved (-ni) files they are set by the demuxer.
> for ni, i could calculate position from index table, it's right.
> but i'm lazy, and you can nitoce that many "HACK!!!" commenst in teh -ni
> code. it wasn't well-written, unfortunately. just hacked together to work.
> as it's used for only a few movies, i don't care. i'll rewrite that stuff
Thank you for your answer.
I took a look of sources of MPlayer. I would like to ask you one more
question about non-interleaved files. I know it is 1%, but I have one :(
In seek.c file in function demux_seek(), section for avi files
is calculated variable video_chunk_pos and fields idx_pos_a, idx_pos_v and idx_pos
are set to its value (line 96), next is calculated variable audio_chunk_pos and
these fields are set to value of audio_chunk_pos (line 149).
Some lines down is calculated variable skip_video_frames with idx_pos
It seems to work well if idx_pos_v is removed from line 149 and added condition
that skip_video_frames is calculated only when demuxer->type==DEMUXER_TYPE_AVI.
In idx_pos_v is position of package of video stream and there is no need
for skipping video frames in functions for non-interleaved files,
( demux_avi_fill_buffer_ni() and demux_avi_fill_buffer_nini())
and moving forward is then really fast.
What do you think about it ?
Mplayer-users mailing list
Mplayer-users at lists.sourceforge.net
More information about the MPlayer-users