2008-09-22 06:42:10 +02:00
|
|
|
|
/*
|
|
|
|
|
|
LILBGAVL.hpp - facade for integrating the GAVL media handling library
|
2010-12-17 23:28:49 +01:00
|
|
|
|
|
Copyright: clarify and simplify the file headers
* Lumiera source code always was copyrighted by individual contributors
* there is no entity "Lumiera.org" which holds any copyrights
* Lumiera source code is provided under the GPL Version 2+
== Explanations ==
Lumiera as a whole is distributed under Copyleft, GNU General Public License Version 2 or above.
For this to become legally effective, the ''File COPYING in the root directory is sufficient.''
The licensing header in each file is not strictly necessary, yet considered good practice;
attaching a licence notice increases the likeliness that this information is retained
in case someone extracts individual code files. However, it is not by the presence of some
text, that legally binding licensing terms become effective; rather the fact matters that a
given piece of code was provably copyrighted and published under a license. Even reformatting
the code, renaming some variables or deleting parts of the code will not alter this legal
situation, but rather creates a derivative work, which is likewise covered by the GPL!
The most relevant information in the file header is the notice regarding the
time of the first individual copyright claim. By virtue of this initial copyright,
the first author is entitled to choose the terms of licensing. All further
modifications are permitted and covered by the License. The specific wording
or format of the copyright header is not legally relevant, as long as the
intention to publish under the GPL remains clear. The extended wording was
based on a recommendation by the FSF. It can be shortened, because the full terms
of the license are provided alongside the distribution, in the file COPYING.
2024-11-17 23:42:55 +01:00
|
|
|
|
Copyright (C)
|
|
|
|
|
|
2008, Hermann Vosseler <Ichthyostega@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
**Lumiera** is free software; you can redistribute it and/or modify it
|
|
|
|
|
|
under the terms of the GNU General Public License as published by the
|
|
|
|
|
|
Free Software Foundation; either version 2 of the License, or (at your
|
|
|
|
|
|
option) any later version. See the file COPYING for further details.
|
2010-12-17 23:28:49 +01:00
|
|
|
|
|
2008-09-22 06:42:10 +02:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-03 18:22:31 +01:00
|
|
|
|
/** @file libgavl.hpp
|
2025-05-17 23:12:47 +02:00
|
|
|
|
** Concrete implementation of the MediaImplLib facade to work with [lib-GAVL],
|
|
|
|
|
|
** a library for handling basic raw video data formats.
|
2016-11-09 20:09:19 +01:00
|
|
|
|
** @todo a draft and placeholder code from 2008, at which time the intention was
|
|
|
|
|
|
** to rely on libGAVL for processing of raw media data. This seemed like a
|
|
|
|
|
|
** good idea at that time, but we should re-evaluate if libGAVL is maintained
|
2025-05-17 23:12:47 +02:00
|
|
|
|
** and in actual use, before we start really relying on it.
|
|
|
|
|
|
** @todo 2025 this code is a kind of _architecture placeholder_ — it is clear that
|
|
|
|
|
|
** a solution can can not be _that simple_, but any viable solution will
|
|
|
|
|
|
** rely onto an approach like outlined here: provide a façade interface,
|
|
|
|
|
|
** which has to be implemented by any plug-in component to provide access
|
|
|
|
|
|
** to the processing capabilities of a specific library. The access point
|
|
|
|
|
|
** functions exposed on the facade however must be shaped by the specific
|
|
|
|
|
|
** way how the builder and the render engine interacts with and delegates
|
|
|
|
|
|
** back to the media-handling library. Such an interface can not be based
|
|
|
|
|
|
** on first principles alone.
|
|
|
|
|
|
** @todo 2025 I still retain the dependency on lib-GAVL for now, even while we
|
|
|
|
|
|
** never got into actually using it. Simply because I still consider this
|
|
|
|
|
|
** library exemplary, and would love to use it for real. Yet it remains
|
|
|
|
|
|
** to be seen if the project actually gets a chance to do so, simply
|
|
|
|
|
|
** because FFmpeg roughly covers the same ground. Presumably it turns
|
|
|
|
|
|
** out to be a basic requirement to ship a plug-in with FFmpeg binding.
|
|
|
|
|
|
** Furthermore, one especially tricky aspect is how to support displays
|
|
|
|
|
|
** with extended dynamic range -- a requirement which has the potential
|
|
|
|
|
|
** to blur the notion of »raw video«...
|
|
|
|
|
|
** [Lib-GAVL]: https://github.com/bplaum/gavl
|
2016-11-03 18:20:10 +01:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-15 23:52:02 +01:00
|
|
|
|
#ifndef STEAM_EXTERNAL_LIBGAVL_H
|
|
|
|
|
|
#define STEAM_EXTERNAL_LIBGAVL_H
|
2008-09-22 06:42:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
2018-11-15 23:42:43 +01:00
|
|
|
|
#include "steam/control/media-impl-lib.hpp"
|
2008-09-22 06:42:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-15 23:55:13 +01:00
|
|
|
|
namespace steam {
|
2011-12-02 16:10:03 +01:00
|
|
|
|
namespace external {
|
2008-09-22 06:42:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
2009-09-24 23:02:40 +02:00
|
|
|
|
using lib::Symbol;
|
2008-09-24 06:36:35 +02:00
|
|
|
|
|
2008-09-22 06:42:10 +02:00
|
|
|
|
typedef StreamType::ImplFacade ImplFacade;
|
|
|
|
|
|
typedef StreamType::ImplFacade::TypeTag TypeTag;
|
2008-09-24 06:36:35 +02:00
|
|
|
|
|
2008-09-22 06:42:10 +02:00
|
|
|
|
|
|
|
|
|
|
class LibGavl;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Concrete media lib implementation facade
|
|
|
|
|
|
* allowing to work with GAVL data frames and types
|
2008-09-24 06:36:35 +02:00
|
|
|
|
* in an implementation agnostic way.
|
|
|
|
|
|
* @note GAVL types are automagically registered into the
|
|
|
|
|
|
* control::STypeManager on reset and thus are always available.
|
2016-11-09 20:09:19 +01:00
|
|
|
|
* @todo 2016 evaluate if libGAVL is still active and maintained
|
2008-09-22 06:42:10 +02:00
|
|
|
|
*/
|
|
|
|
|
|
class ImplFacadeGAVL
|
|
|
|
|
|
: public ImplFacade
|
|
|
|
|
|
{
|
|
|
|
|
|
protected:
|
|
|
|
|
|
ImplFacadeGAVL()
|
|
|
|
|
|
: ImplFacade("GAVL")
|
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
friend class LibGavl;
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
virtual bool operator== (ImplFacade const& other) const;
|
|
|
|
|
|
virtual bool operator== (StreamType const& other) const;
|
|
|
|
|
|
|
|
|
|
|
|
virtual bool canConvert (ImplFacade const& other) const;
|
|
|
|
|
|
virtual bool canConvert (StreamType const& other) const;
|
|
|
|
|
|
|
2008-09-28 04:05:10 +02:00
|
|
|
|
virtual StreamType::MediaKind getKind() const;
|
2008-09-22 06:42:10 +02:00
|
|
|
|
virtual DataBuffer* createFrame () const;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2008-09-24 06:36:35 +02:00
|
|
|
|
|
2008-09-22 06:42:10 +02:00
|
|
|
|
class LibGavl
|
|
|
|
|
|
: public control::MediaImplLib
|
|
|
|
|
|
{
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
virtual Symbol getLibID() const { return "GAVL"; }
|
|
|
|
|
|
|
2008-09-26 04:57:20 +02:00
|
|
|
|
virtual ImplFacadeGAVL const& getImplFacade (TypeTag&);
|
2008-09-22 06:42:10 +02:00
|
|
|
|
};
|
2008-09-24 06:36:35 +02:00
|
|
|
|
|
2008-09-22 06:42:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
2018-11-15 23:55:13 +01:00
|
|
|
|
}} // namespace steam::external
|
2008-09-22 06:42:10 +02:00
|
|
|
|
#endif
|