OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Plugins errors for unsupported files


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Riccardo Corsi
Guest





PostPosted: Tue Oct 18, 2016 5:21 pm    Post subject:
Plugins errors for unsupported files
Reply with quote

Hi Robert and all,


I'm currently using the ffmpeg plugin to load some movies - it works just fine but my application started generating a lot of errors on console like this:
Quote:
FFmpegImageStream::open : av_open_input_file() failed : AVERROR_NOENT
every time an image has to be loaded.


You can reproduce the issue with the modified osgMovie example in attach, which also loads the textured cow model.


Digging a bit I've seen that's because the file reading mechanism tries to read from all the already loaded plugins, reagardless of their extension(s) support.
See here: 
https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgDB/Registry.cpp#L1176



I thought that the extension supported by each plugin was checked before trying to use it. 
Besides the annoying errors on the console, wouldn't it be more efficient?


Thanks,
Ricky

------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12326

PostPosted: Tue Oct 18, 2016 5:56 pm    Post subject:
Plugins errors for unsupported files
Reply with quote

Hi Ricky,

The OSG uses the Chain Of Responsibility Design Pattern for the
plugins - so it's the plugins themselves to decide what formats they
can load. This enables them to handle multiple formats if they can
support it. From the description it sounds like the ffmpeg isn't
doing a good enough at deciding what it can or cannot load.

Robert.

On 18 October 2016 at 18:18, Riccardo Corsi <> wrote:
Quote:
Hi Robert and all,

I'm currently using the ffmpeg plugin to load some movies - it works just
fine but my application started generating a lot of errors on console like
this:
Quote:
FFmpegImageStream::open : av_open_input_file() failed : AVERROR_NOENT
every time an image has to be loaded.

You can reproduce the issue with the modified osgMovie example in attach,
which also loads the textured cow model.

Digging a bit I've seen that's because the file reading mechanism tries to
read from all the already loaded plugins, reagardless of their extension(s)
support.
See here:
https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgDB/Registry.cpp#L1176

I thought that the extension supported by each plugin was checked before
trying to use it.
Besides the annoying errors on the console, wouldn't it be more efficient?

Thanks,
Ricky





------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Riccardo Corsi
Guest





PostPosted: Wed Oct 19, 2016 9:34 am    Post subject:
Plugins errors for unsupported files
Reply with quote

Hi Robert,


right, the ffmpeg plugin is trying to load files without knowing if they are of a supported format.
The related code is here: 
https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp#L149


The comment explains something related to videos served from internet.
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).
This would stop the plugin to try loading every possible image and printing errors on the console. 


Thanks,
Ricky




On Tue, Oct 18, 2016 at 7:54 PM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Ricky,

The OSG uses the Chain Of Responsibility Design Pattern for the
plugins - so it's the plugins themselves to decide what formats they
can load.  This enables them to handle multiple formats if they can
support it.  From the description it sounds like the ffmpeg isn't
doing a good enough at deciding what it can or cannot load.

Robert.

On 18 October 2016 at 18:18, Riccardo Corsi < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert and all,

I'm currently using the ffmpeg plugin to load some movies - it works just
fine but my application started generating a lot of errors on console like
this:
Quote:
FFmpegImageStream::open : av_open_input_file() failed : AVERROR_NOENT
every time an image has to be loaded.

You can reproduce the issue with the modified osgMovie example in attach,
which also loads the textured cow model.

Digging a bit I've seen that's because the file reading mechanism tries to
read from all the already loaded plugins, reagardless of their extension(s)
support.
See here:
https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgDB/Registry.cpp#L1176

I thought that the extension supported by each plugin was checked before
trying to use it.
Besides the annoying errors on the console, wouldn't it be more efficient?

Thanks,
Ricky



Quote:
_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12326

PostPosted: Wed Oct 19, 2016 10:32 am    Post subject:
Plugins errors for unsupported files
Reply with quote

Hi Riccardo,

Just removing a code block might fix the problem you are seeing but
it'll break things for others so isn't an appropriate thing to do as
we'll just end up flip flopping between who's code we break today.

I haven't looked into the error itself yet, but my inclination would
be to see if is possible to improve the OSG's ffmpeg plugins' file
opening so that it handles the inability to read a file more
elegantly.

Robert.

On 19 October 2016 at 10:31, Riccardo Corsi <> wrote:
Quote:
Hi Robert,

right, the ffmpeg plugin is trying to load files without knowing if they are
of a supported format.
The related code is here:
https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp#L149

The comment explains something related to videos served from internet.
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).
This would stop the plugin to try loading every possible image and printing
errors on the console.

Thanks,
Ricky


On Tue, Oct 18, 2016 at 7:54 PM, Robert Osfield <>
wrote:
Quote:

Hi Ricky,

The OSG uses the Chain Of Responsibility Design Pattern for the
plugins - so it's the plugins themselves to decide what formats they
can load. This enables them to handle multiple formats if they can
support it. From the description it sounds like the ffmpeg isn't
doing a good enough at deciding what it can or cannot load.

Robert.

On 18 October 2016 at 18:18, Riccardo Corsi <>
wrote:
Quote:
Hi Robert and all,

I'm currently using the ffmpeg plugin to load some movies - it works
just
fine but my application started generating a lot of errors on console
like
this:
Quote:
FFmpegImageStream::open : av_open_input_file() failed : AVERROR_NOENT
every time an image has to be loaded.

You can reproduce the issue with the modified osgMovie example in
attach,
which also loads the textured cow model.

Digging a bit I've seen that's because the file reading mechanism tries
to
read from all the already loaded plugins, reagardless of their
extension(s)
support.
See here:

https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgDB/Registry.cpp#L1176

I thought that the extension supported by each plugin was checked before
trying to use it.
Besides the annoying errors on the console, wouldn't it be more
efficient?

Thanks,
Ricky











------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Riccardo Corsi
Guest





PostPosted: Wed Oct 19, 2016 11:51 am    Post subject:
Plugins errors for unsupported files
Reply with quote

Hi Robert,


maybe I wasn't clear in my previous message.


I'm not suggesting to remove the code, 
only to move it down few lines, and possibly inside an if block which 
checks if the video is loaded from internet (filename containing an URL path).


That should cover the use case of streaming the video from a server and improve a more general file type handling.






On Wed, Oct 19, 2016 at 12:29 PM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Riccardo,

Just removing a code block might fix the problem you are seeing but
it'll break things for others so isn't an appropriate thing to do as
we'll just end up flip flopping between who's code we break today.

I haven't looked into the error itself yet, but my inclination would
be to see if is possible to improve the OSG's ffmpeg plugins' file
opening so that it handles the inability to read a file more
elegantly.

Robert.

On 19 October 2016 at 10:31, Riccardo Corsi < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,

right, the ffmpeg plugin is trying to load files without knowing if they are
of a supported format.
The related code is here:
https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgPlugins/ffmpeg/ReaderWriterFFmpeg.cpp#L149

The comment explains something related to videos served from internet.
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).
This would stop the plugin to try loading every possible image and printing
errors on the console.

Thanks,
Ricky


On Tue, Oct 18, 2016 at 7:54 PM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
wrote:
Quote:

Hi Ricky,

The OSG uses the Chain Of Responsibility Design Pattern for the
plugins - so it's the plugins themselves to decide what formats they
can load.  This enables them to handle multiple formats if they can
support it.  From the description it sounds like the ffmpeg isn't
doing a good enough at deciding what it can or cannot load.

Robert.

On 18 October 2016 at 18:18, Riccardo Corsi < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
wrote:
Quote:
Hi Robert and all,

I'm currently using the ffmpeg plugin to load some movies - it works
just
fine but my application started generating a lot of errors on console
like
this:
Quote:
FFmpegImageStream::open : av_open_input_file() failed : AVERROR_NOENT
every time an image has to be loaded.

You can reproduce the issue with the modified osgMovie example in
attach,
which also loads the textured cow model.

Digging a bit I've seen that's because the file reading mechanism tries
to
read from all the already loaded plugins, reagardless of their
extension(s)
support.
See here:

https://github.com/openscenegraph/OpenSceneGraph/blob/master/src/osgDB/Registry.cpp#L1176

I thought that the extension supported by each plugin was checked before
trying to use it.
Besides the annoying errors on the console, wouldn't it be more
efficient?

Thanks,
Ricky

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Loading .fbx files causes triangulati... neonerd Plugins [osgPlugins] 1 Mon Aug 19, 2019 6:01 am View latest post
No new posts Loading .fbx files causes triangulati... neonerd Plugins [osgPlugins] 0 Tue Jun 18, 2019 3:14 am View latest post
No new posts Recent mods to XmlParser giving error... Trajce Nikolov NICK General 0 Wed Apr 17, 2019 11:09 am View latest post
No new posts How make my app to load plugins marco.beninca General 1 Thu Dec 06, 2018 2:34 pm View latest post
No new posts What's the status of .osg files? hunter789 General 2 Fri Nov 02, 2018 1:26 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP