From: Andreas H. <and...@gm...> - 2003-04-16 23:56:16
|
Hello, Am Die, 2003-04-15 um 23.52 schrieb Thibaut Mattern: > Hi, > > On Tuesday 15 April 2003 23:01, Miguel Freitas wrote: > [...] > > you have basically two factors that make you feel the seek slower: > > > > - waiting audio driver to finish playing before seeking. some drivers > > (oss/alsa) have commands to flush card's buffers and they are used. > > > > - prebuffering of the metronom. this adds 0.33 sec delay to every seek > > in order to give a time to the pipeline to get full before start playing > > again. you can change it with XINE_PARAM_METRONOM_PREBUFFER. > > > > there might be room for some minor further optimization here. guenter > > once added a code to xine_stop to discard audio/video buffers before > > actually trying to stop the engine and that ideia might also be used on > > seeking case. i would have to check because i'm not sure about it. > > I've a patch that really improves seeking while moving the slider with > xine-ui. > Basically it does 2 things : > 1) do not wait 0.33 s, and allow a new seek as soon as a frame is decoded. > This first frame is detected, marked as first frame, and the video_loop is > modified to not discard first frames and display them immediately instead. > 2) send audio data in smaller chunks to the audio driver > > http://xine.sourceforge.net/tmattern/seeking/xine_lib.patch I've tested you patch, fine work. I also set XINE_PARAM_METRONOM_PREBUFFER to 9000. Both improves seeking a lot. I have a question/idea. Is it necessary to play audio during seeking in videostreams? I think, when the user pressed the mousebutton and moves the slider, should we really play sound during that time ? IMHO the seeking would be much faster and nicer to handle, if xine would just draw keyframes during seeking. Andreas Heinchen |