From: Bastien N. <ha...@ha...> - 2003-01-10 11:24:37
|
On Fri, 2003-01-10 at 11:04, Guenter Bartsch wrote: > hi bastien, > > On 01/10, Bastien Nocera wrote: > > Heya, > > > > It seems that the behaviour of xine_get_pos_length changed recently. I > > used to be able to get the length in milliseconds of a stream before > > playing it (ie. just after opening it). > > > > Now I can't get the length unless it has started playing. Does anybody > > know why ? I couldn't find anything in the logs that would make me think > > it didn't work like that anymore. > > > > Any Ideas ? > > sorry, cannot reproduce this. test program (sorry contains experimental > functions but you can do the same with the stable 1.0 api calls) : > > /* > * init the xine engine > */ > > xine = xine_new (); > > xine_init (xine); > > audio_port = NULL; > > video_port = xine_new_framegrab_video_port (xine); > > stream = xine_stream_new (xine, audio_port, > video_port); > > xine_open (stream, "/media/trailer/vob/matrix.vob"); > > xine_get_pos_length (stream, &pos_stream, > &pos_time, &length); > > printf ("length: %d msec\n", length); > > > result: > > xine: xine_stream_new > demux_mpeg_block:open_plugin:input ID=file count = 1 > metronom: video discontinuity #1, type is 0, disc_off is 0 > metronom: video vpts adjusted with prebuffer to 36365 > metronom: audio vpts adjusted with prebuffer to 36365 > libspudec:init_plugin called > length: 91000 msec > xine: xine_play Right, it seems to work now. The if (gtk_xine_is_playing (gtx) == FALSE) return 0; surely didn't help ;) I guess one day I'll mail this list with bugs in xine, not in my own code. -- /Bastien Nocera http://hadess.net #2 0x4205a2cc in printf ("Oh my %s\n", preferred_deity) from /lib/i686/libc.so.6 printf ("Oh my %s\n", preferred_deity); Segmentation fault |