From f80d0a49bd5c81428b2adb0397493477dc6fd70e Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Wed, 24 Sep 2008 06:36:35 +0200 Subject: [PATCH] provide for the GAVL impl facade to be registered as basic media type. WIP actual implementation missing... --- src/lib/external/libgavl.cpp | 21 +++++++++++++++++---- src/lib/external/libgavl.hpp | 14 +++++++------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/src/lib/external/libgavl.cpp b/src/lib/external/libgavl.cpp index 7b477c871..054feacaf 100644 --- a/src/lib/external/libgavl.cpp +++ b/src/lib/external/libgavl.cpp @@ -1,5 +1,5 @@ /* - STypeManager - entry point for dealing with media stream types + ImplFacadeGAVL - facade for integrating the GAVL media handling library Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -23,6 +23,7 @@ #include "proc/lumiera.hpp" #include "lib/external/libgavl.hpp" +#include "proc/control/stypemanager.hpp" extern "C" { #include @@ -31,11 +32,24 @@ extern "C" { namespace lib { namespace external { - - namespace { // implementation internals + using control::STypeManager; + using control::ON_STREAMTYPES_RESET; + using lumiera::LifecycleHook; + + void + provide_GAVL_stream_implementation_types () + { + STypeManager& typeManager = STypeManager::instance(); + UNIMPLEMENTED ("wire up a ImplFacade for GAVL implemented media streams"); + } + + namespace { // internal functionality + + LifecycleHook _register_gavl_types_ (ON_STREAMTYPES_RESET, &provide_GAVL_stream_implementation_types); } + /** * Use an type information struct, which actually has to be * a GAVL frametype (TODO), to wire up an ImplFacade such @@ -49,7 +63,6 @@ namespace lib { TODO ("any chance to verify that the TypeTag actually points to a GAVL frame type descriptor?"); UNIMPLEMENTED ("wire up an impl facade with the correct GAVL lib functions for the data type in question"); } - diff --git a/src/lib/external/libgavl.hpp b/src/lib/external/libgavl.hpp index 26f6b6237..706b08ed2 100644 --- a/src/lib/external/libgavl.hpp +++ b/src/lib/external/libgavl.hpp @@ -34,18 +34,20 @@ namespace lib { using lumiera::Symbol; - + using lumiera::StreamType; typedef StreamType::ImplFacade ImplFacade; typedef StreamType::ImplFacade::TypeTag TypeTag; - + class LibGavl; /** * Concrete media lib implementation facade * allowing to work with GAVL data frames and types - * in an implementation agnostic way + * in an implementation agnostic way. + * @note GAVL types are automagically registered into the + * control::STypeManager on reset and thus are always available. */ class ImplFacadeGAVL : public ImplFacade @@ -67,7 +69,7 @@ namespace lib { virtual DataBuffer* createFrame () const; }; - + class LibGavl : public control::MediaImplLib { @@ -78,9 +80,7 @@ namespace lib { virtual ImplFacadeGAVL const& getImplFacade (TypeTag*); }; - - - ////////////////////////////////////TODO: dafür sorgen, daß sich das beim Systemstart in den control::STypeManger einklinkt!!!!!!!! + } // namespace external