Hi J-S, FFmpegDecoder.cpp : -> bool FFmpegDecoder::readNextPacketNormal() [Line 246 to 308] -> bool FFmpegDecoder::readNextPacketEndOfStream() [Line 312 to 320]
More precisely, I wonder about the API validity of the following code in the case of a streaming video. FFmpeg documentation is quite poor in this regard. // Read the next frame packet if (av_read_frame(m_format_context.get(), &packet) < 0) { if (url_ferror(m_format_context->pb) == 0) end_of_stream = true; else throw std::runtime_error("av_read_frame() failed"); } Also note that there might be a difference between a finite video streamed from an HTTP source and an endless video stream from an HTTP source. Cheers, Tanguy -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Wednesday 22 April 2009 18:06 To: OpenSceneGraph Users Subject: Re: [osg-users] Public ffmpeg plugin testing streams Hello Tanguy, > The osgFFmpeg plugin was written with a file source in mind. By default when > it encounters an EOF, it will either loop the video or stop playing > (depending on the ImageStream settings). > This behaviour may probably be incorrect with streaming sources. Yes, seems so, it would need to wait and try again later... Interesting you didn't mention this earlier, I've been saying that it stopped after 15-20 seconds of streaming and asking if someone knew why... Oh wait, are you not on osg-submissions? That discussion was there. Where is that code located? I looked around but didn't find it, perhaps I was looking wrong :-) > As you said, one needs to dive further into FFmpeg API to really understand > what is really happening. Yeah, that's what's killing me. I really want this to work, but without knowing ffmpeg more I'm really grasping at straws... Thanks, J-S -- ______________________________________________________ Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org