From: Guenter B. <bar...@st...> - 2001-02-12 13:53:48
|
Hi Joachim, On Mon, 12 Feb 2001, Joachim Koenig wrote: > > - syncfb video driver > > I will check and correct this beast tonight. great :-) there hasn't changed much with the video output drivers, the only thing to watch out for is that the video driver had to free the images given to it via display_frame () as soon as they're no longer needed so they can be re-used by the decoder. This means you have to call vo_image_drawn ( (vo_image_buffer_t *) gXv.cur_image); on every image you get delivered as soon as you're finished drawing it. One easy way to implement this is to remember the image currently displayed (gXv.cur_image for example) and free it at soon as you get a new image (take a look at display_frame_xv to see what I mean). In the driver's reset function you should then release the currently displayed image too (this function is called on a resolution change for example). Apart from that, make sure alloc_image_buffer () initialized the mutex in the image buffer structure pthread_mutex_init (&img->mImageBuffer.mutex, NULL); > I will also look into alsa sound driver and avi demux. Do you want patches > or shall I update CVS directly. you can directly update CVS :-) ... if you find out anything about synchronization in AVIs I'd be very interested in hearing about out - so please drop me a line. The trouble with the avi demuxer is that it has to generate PTS for the video and audio packages it deliveres. For video, that doesn't seem to be a big problem, we know the frame number and the exact frame rate from the avi header. But I'm not sure about audio - the audio packages contain mp3 audio so we can't simply count samples since we don't know how many samples a packages will generate when decoded. I tried two different approaches, first I used nAvgBytesPerSec from the AVI header - that works for most AVIs I have here, but not for all of them (with two test streams I have here audio and video drift apart). Then I tried to calculate that value myself gDemuxAvi.pts_per_byte = (((double) gDemuxAvi.avi->video_frames / (double) gDemuxAvi.avi->fps) * 90000.0) / (double) gDemuxAvi.avi->audio_bytes; that works better for the two "bad streams" bad isn't exact enough. > PS: By what early hours do you work ?? *grin* .. yeah, got a bit late last night ;)) Regards, Guenter |