MediaStreamInterface Class Reference

#include <mediasession_stream.h>

Inheritance diagram for MediaStreamInterface:

Detailed Description

Single Stream within a MediaConverterInterface. Streams might have sub streams as children (see HierarchyObjectInterface).

Public Types

using RESTRICT_DICTIONARY_PROPS = MEDIASTREAM::RESTRICT
 

Public Member Functions

MAXON_METHOD Result< BaseArray< Data > > GetFormats () const
 
MAXON_METHOD MediaStreamFormat GetFormat (const Data &formatId) const
 
MAXON_METHOD const DataGetSelectedFormat () const
 
MAXON_METHOD Result< void > SetSelectedFormat (const Data &formatId)
 
MAXON_METHOD Result< void > AddFormat (const Data &formatId, const MediaStreamFormat &ref)
 
MAXON_METHOD Result< void > SubscribeStream (const Data &formatId)
 
MAXON_METHOD Result< void > UnsubscribeStream ()
 
MAXON_METHOD Bool IsSubscribed () const
 

Private Member Functions

 MAXON_INTERFACE (MediaStreamInterface, MAXON_REFERENCE_NORMAL, "net.maxon.image.interface.mediastream", MAXON_IMPLEMENTATION_MODULE("net.maxon.image"))
 
- Private Member Functions inherited from HierarchyObjectInterface< DefaultHierarchy< MediaStreamRef > >
MAXON_METHOD Result< void > InsertBefore (const typename HIERARCHY::template Sibling< Interface >::type &nextSibling)
 
MAXON_METHOD Result< void > InsertAfter (const typename HIERARCHY::template Sibling< Interface >::type &prevSibling)
 
MAXON_METHOD Result< void > InsertAsFirstChildOf (const typename HIERARCHY::template Parent< Interface >::type &parent, const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD Result< void > InsertAsLastChildOf (const typename HIERARCHY::template Parent< Interface >::type &parent, const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD Result< void > InsertAsChildAt (const typename HIERARCHY::template Parent< Interface >::type &parent, Int position, const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD Result< void > InsertChildAsFirst (const typename HIERARCHY::template Child< Interface >::type &child, const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD Result< void > InsertChildAsLast (const typename HIERARCHY::template Child< Interface >::type &child, const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD Result< void > InsertChildAt (const typename HIERARCHY::template Child< Interface >::type &child, Int position, const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD Result< void > InsertChildrenAsFirst (const Block< const typename HIERARCHY::template Child< Interface >::type > &children, const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD Result< void > InsertChildrenAsLast (const Block< const typename HIERARCHY::template Child< Interface >::type > &children, const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD Result< void > InsertChildrenAt (const Block< const typename HIERARCHY::template Child< Interface >::type > &children, Int position, const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD Result< void > Replace (const typename HIERARCHY::template Sibling< Interface >::type &newObject)
 
MAXON_METHOD HierarchyObjectRef Remove ()
 
MAXON_METHOD HIERARCHY::template Child< Interface >::type RemoveChildren (const ConstDataPtr &branchId=ConstDataPtr())
 
MAXON_METHOD void RemoveAllChildren ()
 
MAXON_METHOD HIERARCHY::template Child< Interface >::type GetFirstChild (const ConstDataPtr &branchId=ConstDataPtr()) const
 
MAXON_METHOD HIERARCHY::template Child< Interface >::type GetLastChild (const ConstDataPtr &branchId=ConstDataPtr()) const
 
MAXON_METHOD HIERARCHY::template Child< Interface >::type GetChildAt (Int position, const ConstDataPtr &branchId=ConstDataPtr()) const
 
MAXON_METHOD Result< BaseArray< typename HIERARCHY::template Child< Interface >::type > > GetChildren (const ConstDataPtr &branchId=ConstDataPtr()) const
 
MAXON_METHOD Result< BaseArray< ConstDataPtr > > GetBranches () const
 
MAXON_METHOD ConstDataPtr GetBranchId () const
 
MAXON_METHOD void SetLocking (const Bool locking)
 
MAXON_METHOD Bool IsLocked () const
 
MAXON_METHOD HIERARCHY::template Parent< Interface >::type GetParent () const
 
MAXON_METHOD std::add_pointer< HierarchyObjectInterface >::type GetParentPtr () const
 
MAXON_METHOD HIERARCHY::template Sibling< Interface >::type GetNext () const
 
MAXON_METHOD HIERARCHY::template Sibling< Interface >::type GetPrev () const
 
MAXON_METHOD HIERARCHY::template Sibling< Interface >::type GetFirst () const
 
MAXON_METHOD HIERARCHY::template Sibling< Interface >::type GetLast () const
 
MAXON_METHOD void ParentChanged (Bool removed)
 
MAXON_METHOD std::add_pointer< HierarchyObjectInterface >::type FindNextLeaf (const HierarchyObjectInterface *stopAtParent) const
 
 MAXON_OBSERVABLE (Result< void >, ObservableHierarchyInsert,(const HierarchyObjectRef<> &sender, const HierarchyObjectRef<> &object, const ConstDataPtr &branchId), ObservableCombinerRunAllComponent)
 
 MAXON_OBSERVABLE (Result< void >, ObservableHierarchyRemove,(const HierarchyObjectRef<> &sender, const HierarchyObjectRef<> &object, const ConstDataPtr &branchId), ObservableCombinerRunAllComponent)
 
MAXON_METHOD void FlushBranches ()
 

Member Typedef Documentation

◆ RESTRICT_DICTIONARY_PROPS

using RESTRICT_DICTIONARY_PROPS = MEDIASTREAM::RESTRICT

Member Function Documentation

◆ MAXON_INTERFACE()

MAXON_INTERFACE ( MediaStreamInterface  ,
MAXON_REFERENCE_NORMAL  ,
"net.maxon.image.interface.mediastream"  ,
MAXON_IMPLEMENTATION_MODULE("net.maxon.image")   
)
private

◆ GetFormats()

MAXON_METHOD Result<BaseArray<Data> > GetFormats ( ) const

returns the formatId of all available formats.

◆ GetFormat()

MAXON_METHOD MediaStreamFormat GetFormat ( const Data formatId) const

returns the format of the given id.

◆ GetSelectedFormat()

MAXON_METHOD const Data& GetSelectedFormat ( ) const

returns the selected format.

◆ SetSelectedFormat()

MAXON_METHOD Result<void> SetSelectedFormat ( const Data formatId)

used by reader implementations to set the selected format of the stream. this must not be called from outside.

◆ AddFormat()

MAXON_METHOD Result<void> AddFormat ( const Data formatId,
const MediaStreamFormat &  ref 
)

used by reader implementations to add formats to the stream. this must not be called from outside.

◆ SubscribeStream()

MAXON_METHOD Result<void> SubscribeStream ( const Data formatId)

Subscribes to the stream. So if the media converter finds the data in the stream it triggers the specific callbacks defined by the inherited specialized interface. this allows to read data directly to the place where it needs to by without additional memory copy.

Parameters
[in]formatIdThe selected format to subscribe.
Returns
OK on success.

◆ UnsubscribeStream()

MAXON_METHOD Result<void> UnsubscribeStream ( )

Unsubscribes from the stream.

Returns
OK on success.

◆ IsSubscribed()

MAXON_METHOD Bool IsSubscribed ( ) const

Returns true if the stream is subscribed by a media converter.