<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi Robert,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">right, the ffmpeg plugin is trying to load files without knowing if they are of a supported format.</div><div class="gmail_default" style="font-family:tahoma,sans-serif">The related code is here: </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><a href="https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp#L149">https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp#L149</a></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">The comment explains something related to videos served from internet.</div><div class="gmail_default" style="font-family:tahoma,sans-serif">I'm wondering if it would be ok to move that code below, after having checked whether the filename contains a URL (performed a few lines below).</div><div class="gmail_default" style="font-family:tahoma,sans-serif">This would stop the plugin to try loading every possible image and printing errors on the console. </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks,</div><div class="gmail_default" style="font-family:tahoma,sans-serif">Ricky</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 18, 2016 at 7:54 PM, Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Ricky,<br>
<br>
The OSG uses the Chain Of Responsibility Design Pattern for the<br>
plugins - so it's the plugins themselves to decide what formats they<br>
can load. This enables them to handle multiple formats if they can<br>
support it. From the description it sounds like the ffmpeg isn't<br>
doing a good enough at deciding what it can or cannot load.<br>
<br>
Robert.<br>
<div><div class="h5"><br>
On 18 October 2016 at 18:18, Riccardo Corsi <<a href="mailto:riccardo.corsi@kairos3d.it">riccardo.corsi@kairos3d.it</a>> wrote:<br>
> Hi Robert and all,<br>
><br>
> I'm currently using the ffmpeg plugin to load some movies - it works just<br>
> fine but my application started generating a lot of errors on console like<br>
> this:<br>
>> FFmpegImageStream::open : av_open_input_file() failed : AVERROR_NOENT<br>
> every time an image has to be loaded.<br>
><br>
> You can reproduce the issue with the modified osgMovie example in attach,<br>
> which also loads the textured cow model.<br>
><br>
> Digging a bit I've seen that's because the file reading mechanism tries to<br>
> read from all the already loaded plugins, reagardless of their extension(s)<br>
> support.<br>
> See here:<br>
> <a href="https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgDB/Registry.cpp#L1176" rel="noreferrer" target="_blank">https://github.com/<wbr>openscenegraph/OpenSceneGraph/<wbr>blob/master/src/osgDB/<wbr>Registry.cpp#L1176</a><br>
><br>
> I thought that the extension supported by each plugin was checked before<br>
> trying to use it.<br>
> Besides the annoying errors on the console, wouldn't it be more efficient?<br>
><br>
> Thanks,<br>
> Ricky<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> osg-users mailing list<br>
> <a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
> <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
><br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</blockquote></div><br></div>