From: Michael R. <mr...@us...> - 2004-07-05 17:17:45
|
Hi Andr=E9, > After a bit more digging around (it's amazing how much better your > brain works after it's had some sleep ...), I'm a bit closer to finding > out what's going on. If you look at video_out.c:446, there's this bit > of code there: > > if (stream->first_frame_flag =3D=3D 2) { > stream->first_frame_flag =3D (this->grab_only) ? 0 : 1; > img->is_first =3D FIRST_FRAME_MAX_POLL; > > lprintf ("get_next_video_frame first_frame_reached\n"); > } > > If I add a "pthread_cond_broadcast(&stream->first_frame_reached);" > directly after the lprintf, it works. And this is the place where you already found the bug. Whenever=20 stream->first_frame_flag drops to 0, stream->first_frame_reached has to be= =20 emitted. This is obviously not true here. I fixed this in CVS, does it work= =20 now? > There are only three places in the xine sources where > first_frame_reached is signalled: > > 12:18 ~xine/src/xine-engine % grep -n > 'broadcast.*first_frame_reached' *.c > demux.c:351: pthread_cond_broadcast(&stream->first_frame_reached); > video_decoder.c:218: > pthread_cond_broadcast(&stream->first_frame_reached); > video_out.c:895: > pthread_cond_broadcast(&stream->first_frame_reached); > > Out of these, I put a few lprintf's around the place, and it seems that > with a "normal" (non-framegrabbing) video port, the > pthread_cond_broadcast in video_out.c:895 is the one that triggers > xine.c:1076's pthread_cond_timedout to acknowledge that the first frame > has been reached. This line will not be reached with a framegrabber port for a simple reason:= =20 This is the display_frame function which is never called with a framegrabbe= r=20 port. Michael =2D-=20 panic("sun_82072_fd_inb: How did I get here?"); 2.2.16 /usr/src/linux/include/asm-sparc/floppy.h |