* 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.
150 lines
5 KiB
C++
150 lines
5 KiB
C++
/*
|
||
DUMMY-PLAYER-FACADE.h - access point to a dummy test player
|
||
|
||
Copyright (C)
|
||
2009, 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.
|
||
|
||
*/
|
||
|
||
|
||
/** @file dummy-player-facade.h
|
||
* @deprecated left-over from an early design draft (2009)
|
||
*/
|
||
|
||
|
||
#ifndef STEAM_INTERFACE_DUMMYPLAYER_H
|
||
#define STEAM_INTERFACE_DUMMYPLAYER_H
|
||
|
||
#include "include/display-facade.h"
|
||
#include "include/display-handles.h"
|
||
|
||
|
||
|
||
#ifdef __cplusplus /* ============== C++ Interface ================= */
|
||
|
||
#include "common/subsys.hpp"
|
||
#include "lib/depend.hpp"
|
||
#include "lib/handle.hpp"
|
||
|
||
|
||
|
||
|
||
namespace steam {
|
||
namespace play {
|
||
|
||
class ProcessImpl;
|
||
} }
|
||
|
||
|
||
namespace lumiera {
|
||
|
||
|
||
/**************************************************************//**
|
||
* Experimental Interface Steam-Layer (or maybe the vault?):
|
||
* Global access point for starting a dummy playback, generating
|
||
* some test image data for the GUI to display in a viewer window.
|
||
*
|
||
* This is a mockup service we created 1/2009 to collect some
|
||
* experiences regarding integration of the application layers.
|
||
* Lumiera is not yet able actually to deliver rendered video data.
|
||
*
|
||
* In hindsight, this design study highlighted some relevant problems
|
||
* with our interface layout and the way we create bindings to the
|
||
* implementation. The moment we attempt to use other abstractions
|
||
* within an interface (as we do here with the Process interface),
|
||
* we're running into serious maintenance and library dependency problems.
|
||
* @deprecated obsoleted design from 2009 and not operative anymore (2018)
|
||
*/
|
||
class DummyPlayer
|
||
{
|
||
public:
|
||
/** provide a descriptor for lumiera::AppState,
|
||
* wired accordingly to allow main to deal with
|
||
* the dummy player as independent subsystem. */
|
||
static lumiera::Subsys& getDescriptor();
|
||
|
||
/** get an implementation instance of this service */
|
||
static lib::Depend<DummyPlayer> facade;
|
||
|
||
class ProcessImplementationLink;
|
||
|
||
/**
|
||
* Playback process, front-end to be used by client code.
|
||
* This handle represents a continuous playback process, which has been started
|
||
* with a specific output size, format and framerate. It is a handle to a calculation process,
|
||
* which is about to produce a stream of frames and push them to the viewer widget,
|
||
* specified by a LumieraDisplaySlot when starting this process.
|
||
*
|
||
* The Lifecycle of the referred playback process is managed automatically
|
||
* through this handle (by ref count). Client code is supposed to use the
|
||
* API on this handle to control the playback mode.
|
||
*
|
||
* @see handle.hpp
|
||
* @see dummy-player-service.cpp implementation
|
||
*/
|
||
class Process
|
||
: public lib::Handle<ProcessImplementationLink>
|
||
{
|
||
public:
|
||
void play(bool); ///< play/pause toggle
|
||
};
|
||
|
||
/**
|
||
* Mediator to allow the client to communicate with
|
||
* the Process implementation via the Process handle,
|
||
* without having to map each implementation-level function
|
||
* into the dummy player interface. We can't access the
|
||
* implementation in Steam-Layer without this indirection
|
||
* through a VTable, since a direct call would require
|
||
* us to link against liblumierasteam.so
|
||
*/
|
||
class ProcessImplementationLink
|
||
: public lumiera_playprocess
|
||
{
|
||
public:
|
||
virtual ~ProcessImplementationLink(); ///< this is an interface
|
||
|
||
virtual Process createHandle() =0; ///< activate the Process-frontend and link it to the process implementation
|
||
virtual void doPlay(bool yes) =0; ///< forward the play/pause toggle to the play process implementation
|
||
};
|
||
|
||
|
||
|
||
|
||
/** create a new playback process outputting to the given viewer/display */
|
||
virtual Process start(LumieraDisplaySlot viewerHandle) =0;
|
||
|
||
|
||
protected:
|
||
virtual ~DummyPlayer();
|
||
friend class lib::DependencyFactory<DummyPlayer>;
|
||
};
|
||
|
||
|
||
} // namespace lumiera
|
||
|
||
|
||
|
||
|
||
extern "C" {
|
||
#endif /* =========================== CL Interface ===================== */
|
||
|
||
|
||
#include "common/interface.h"
|
||
|
||
LUMIERA_INTERFACE_DECLARE (lumieraorg_DummyPlayer, 0
|
||
, LUMIERA_INTERFACE_SLOT (LumieraPlayProcess, startPlay, (LumieraDisplaySlot) )
|
||
, LUMIERA_INTERFACE_SLOT (void, togglePlay,(LumieraPlayProcess, bool))
|
||
, LUMIERA_INTERFACE_SLOT (void, terminate, (LumieraPlayProcess) )
|
||
);
|
||
|
||
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif
|
||
#endif
|