MediaConverterInterface Class Reference

#include <mediasession_converter.h>

Inheritance diagram for MediaConverterInterface:

详细描述

MediaConverterInterface is a generic interface to access media conversions. It allows to connect streams and triggers the evaluation of the network.

公共成员函数

MAXON_METHOD Bool   SupportImportStrategy () const
MAXON_METHOD Bool   SupportExportStrategy () const
MAXON_METHOD Result < BaseArray < MediaConverterRef > >  GetInputConverter () const
MAXON_METHOD Result < void >  AddOutputStream (const MediaStreamRef &stream)
MAXON_METHOD Result < void >  RemoveOutputStream (const MediaStreamRef &stream)
MAXON_METHOD Result < BaseArray < MediaStreamRef > >  GetOutputStreams ( Bool flattenChildren) const
MAXON_METHOD Result < void >  Analyze (const Block < const MediaConverterRef > &inputs, const TimeValue &targetTime, MEDIASESSIONFLAGS flags)
MAXON_METHOD Result < void >  PrepareExecute (const Block < const MediaConverterRef > &inputs, const TimeValue &targetTime, MEDIASESSIONFLAGS flags)
MAXON_METHOD Result < void >  Execute (const Block < const MediaConverterRef > &inputs, const TimeValue &targetTime, MEDIASESSIONFLAGS flags)
MAXON_METHOD Result < void >  关闭 (const Block < const MediaConverterRef > &inputs)

私有成员函数

  MAXON_INTERFACE ( MediaConverterInterface , MAXON_REFERENCE_NORMAL , "net.maxon.image.interface.mediaconverter")

成员函数文档编制

◆  MAXON_INTERFACE()

MAXON_INTERFACE ( MediaConverterInterface   ,
MAXON_REFERENCE_NORMAL   ,
"net.maxon.image.interface.mediaconverter"   
)
private

◆  SupportImportStrategy()

MAXON_METHOD Bool SupportImportStrategy ( ) const

Returns true for media importers: The converter supports the import strategy where the input pushes the read data to the output nodes. The media session can only connect converters which support the same strategies, e.g. MediaStreamImageDataImportInterface .

返回
True for supported imported strategy, false otherwise.

◆  SupportExportStrategy()

MAXON_METHOD Bool SupportExportStrategy ( ) const

Returns true for media exporters: The converter supports the export strategy where the output pulls the required data from the input nodes. The media session can only connect converters which support the same strategies, e.g. MediaStreamImageDataExportInterface .

返回
True for supported export strategy, false otherwise.

◆  GetInputConverter()

MAXON_METHOD Result < BaseArray <MediaConverterRef> > GetInputConverter ( ) const

Get the connected MediaConvertRef used as input. An empty array if it's the source/root.

返回
Array of inputs.

◆  AddOutputStream()

MAXON_METHOD Result <void> AddOutputStream ( const MediaStreamRef &  stream )

Adds an output stream to the converter.

返回
OK on success.

◆  RemoveOutputStream()

MAXON_METHOD Result <void> RemoveOutputStream ( const MediaStreamRef &  stream )

Removes an output stream from the converter.

返回
OK on success.

◆  GetOutputStreams()

MAXON_METHOD Result < BaseArray <MediaStreamRef> > GetOutputStreams ( Bool   flattenChildren ) const

Returns all output streams of this converter.

参数
[in] flattenChildren Return also all children streams by running recursively through all streams.
返回
Array of output streams.

◆  Analyze()

MAXON_METHOD Result <void> Analyze ( const Block < const MediaConverterRef > &  inputs ,
const TimeValue targetTime ,
MEDIASESSIONFLAGS   flags  
)

Analyzes the streams. A converter needs to call the same function for all inputs followed by calling stream.SubscribeStream() to signal the interest for one or more streams.

参数
[in] inputs Block of input streams to evaluate.
[in] targetTime Target time to load.
[in] flags See MEDIASESSIONFLAGS for details.
返回
OK on success.

◆  PrepareExecute()

MAXON_METHOD Result <void> PrepareExecute ( const Block < const MediaConverterRef > &  inputs ,
const TimeValue targetTime ,
MEDIASESSIONFLAGS   flags  
)

Prepares to execute the streams. Called after Analyze() and before Execute() . At this moment all requested streams are already subscribed. This allows to setup progress hooks to setup correctly with the necessary data.

参数
[in] inputs Block of input streams to evaluate.
[in] targetTime Target time to load.
[in] flags See MEDIASESSIONFLAGS for details.
返回
OK on success.

◆  Execute()

MAXON_METHOD Result <void> Execute ( const Block < const MediaConverterRef > &  inputs ,
const TimeValue targetTime ,
MEDIASESSIONFLAGS   flags  
)

Executes the streams.

参数
[in] inputs Block of input streams to evaluate.
[in] targetTime Target time to load.
[in] flags See MEDIASESSIONFLAGS for details.
返回
OK on success.

◆  Close()

MAXON_METHOD Result <void> Close ( const Block < const MediaConverterRef > &  inputs )

Closes the converter and closes all streams and operations.

参数
[in] inputs Block of input streams to close.
返回
OK on success.