Lumiera  0.pre.03
»edit your freedom«
OutputSlot Class Referenceabstract

#include "steam/play/output-slot.hpp"

Description

Interface: Generic output sink.

An OutputSlot represents the possibility to send data through multiple channels to some kind of external sink (video in GUI window, video full screen, sound, Jack, rendering to file). Clients are expected to retrieve a suitably preconfigured implementation from some OutputManager instance. An OutputSlot needs to be claimed for output by invoking allocate, which returns a representation of the connection state. This operation is exclusive. The actual output sinks can be retrieved through the Allocation object returned from there.

Definition at line 101 of file output-slot.hpp.

Public Types

typedef lib::IterSource< DataSink >::iterator OpenedSinks
 

Public Member Functions

Allocationallocate ()
 claim this slot for exclusive use More...
 
void disconnect ()
 disconnect from this OutputSlot More...
 
bool isFree () const
 can this OutputSlot be allocated? More...
 

Classes

class  Allocation
 
class  Connection
 
class  ConnectionState
 Extension point for Implementation. More...
 

Protected Member Functions

virtual ConnectionStatebuildState ()=0
 build the connected state, based on the existing configuration within this concrete OutputSlot
 

Protected Attributes

unique_ptr< ConnectionStatestate_
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Function Documentation

◆ isFree()

bool isFree ( ) const

can this OutputSlot be allocated?

whether this output slot is occupied

Returns
true if currently unconnected and able to connect and handle output data

Definition at line 52 of file output-slot.cpp.

Referenced by OutputSlot::allocate(), OutputSlot::disconnect(), and LumieraRenderProcessBuilder::getOutputFor().

+ Here is the caller graph for this function:

◆ allocate()

OutputSlot::Allocation & allocate ( )

claim this slot for exclusive use

claim this OutputSlot for active use as output sink(s).

At any point, a given slot can only be used for a single ongoing output process (which may serve several channels though). The assumption is for the OutputSlot to be picked through a query to some OutputManater, so the parameters (resolution, sample rate...) should be suited for the intended use. Thus no additional configuration is necessary.

Returns
Allocation representing the "connected state" from the client's POV. The client may retrieve the effectively required Timings from there, as well as the actual output sinks, ready for use.
Remarks
calls back into buildState, where the concrete OutputSlot is expected to provide a private Connection implementation, subclassing OutputSlot::Allocation

Definition at line 73 of file output-slot.cpp.

References OutputSlot::isFree().

Referenced by LumieraRenderProcessBuilder::buildCalculationStreams().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ disconnect()

void disconnect ( )

disconnect from this OutputSlot

Warning
may block until DataSinks are gone

Definition at line 84 of file output-slot.cpp.

References OutputSlot::isFree().

+ Here is the call graph for this function:
+ Inheritance diagram for OutputSlot:
+ Collaboration diagram for OutputSlot:

The documentation for this class was generated from the following files: