[osg-users] ReadImage not routing to plugin?

Robert Osfield robert.osfield at gmail.com
Fri Sep 23 13:52:46 PDT 2016


HI Rob,

The OSG uses a chain of responsibility pattern for the plugins and
will first attempt to load file by calling all of the currently loaded
plugins first, then if it fails then look for the plugin named the
same as the file extension, in your case .ogr.

There are also some built in aliases in osgDB::Registry that enables
mapping of some extensions to plugins that are known to be supported
i.e. flt to the OpenFlight plugin.  Not all possibility combinations
of extensions are hardwired like this.

I'm away from my dev system so can't check up what is set up by
default but I don't think there is any specific to ffmpeg hard wired
into Registry - the ffmpeg plugin is purely optional part of the OSG
and depends on a 3rd part dependency so we generally avoid hard-wiring
such mappings in.  Have a look in include/osgDB/Registry for the
various methods.

You can always pre-load the ffmpeg or explictly adding in the
extension mapping you want to be recognized by default.

Robert.

On 23 September 2016 at 20:01, Rob Spearman <rob at digitaliseducation.com> wrote:
>
> I am trying to understand why osgDB::readImageFile( "abc.ogv" ) does not get
> routed to the ffmpeg plugin.  I get no image loaded and I see that the
> readImage method of the plugin is not even called.
>
> If I call osgDB::readImageFile( "abc.ogv.ffmpeg" ) it works, but that is not
> going to be an acceptable solution.
>
> I registered the ogv file extension in the plugin with supportsExtension,
> and I even added a registry file extension alias as well.  I don't believe I
> have any conflicting plugins, and even using a new made up file extension I
> get the same problem.
>
> What am I missing here?
>
> Thanks,
>
> Rob
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list