#include <mediasession_stream.h>
Stream which represents full image data.
Public Types | |
using | InitHandler = Delegate< Result< void >(const MediaStreamImageDataImportRef &stream, const MediaStreamProperties &props)> |
using | SetPixelHandler = Delegate< Result< SetPixelHandlerStruct >(const MediaStreamImageDataImportRef &stream, const MediaStreamProperties &props, const ChannelOffsets &srcChannelOffset, SETPIXELHANDLERFLAGS setPixelFlags)> |
using | FinishHandler = Delegate< Result< void >(const MediaStreamImageDataImportRef &stream, const MediaStreamProperties &props)> |
Public Member Functions | |
MAXON_METHOD Result< void > | SetCallbackHandler (const InitHandler &initHandler, const SetPixelHandler &setPixelHandler, const FinishHandler &finishHandler) |
MAXON_METHOD Result< void > | InitStream (const MediaStreamProperties &props) |
MAXON_METHOD Result< SetPixelHandlerStruct > | SetPixelStream (const MediaStreamProperties &props, const ChannelOffsets &srcChannelOffsets, SETPIXELHANDLERFLAGS setPixelFlags) |
MAXON_METHOD Result< void > | FinishStream (const MediaStreamProperties &props) |
Private Member Functions | |
MAXON_INTERFACE (MediaStreamImageDataImportInterface, MAXON_REFERENCE_NORMAL, "net.maxon.image.interface.mediastreamimagedataimport") | |
using InitHandler = Delegate<Result<void>(const MediaStreamImageDataImportRef& stream, const MediaStreamProperties& props)> |
using SetPixelHandler = Delegate<Result<SetPixelHandlerStruct>(const MediaStreamImageDataImportRef& stream, const MediaStreamProperties& props, const ChannelOffsets& srcChannelOffset, SETPIXELHANDLERFLAGS setPixelFlags)> |
using FinishHandler = Delegate<Result<void>(const MediaStreamImageDataImportRef& stream, const MediaStreamProperties& props)> |
|
private |
MAXON_METHOD Result<void> SetCallbackHandler | ( | const InitHandler & | initHandler, |
const SetPixelHandler & | setPixelHandler, | ||
const FinishHandler & | finishHandler | ||
) |
Subscribes to the stream. So if the media converter loads the stream the setPixelHandler callback is triggered. this allows to read data directly to the place where it needs to by without additional memory copy.
[in] | initHandler | A handler which is called from the input media converter to signal that data is available for this frame of the stream. |
[in] | setPixelHandler | A handler which is called for each thread that needs a valid SetPixelHandlerStruct which will be used by the input converter to set the pixel data. |
[in] | finishHandler | A handler which is called from the input media converter to signal that data loading the data from this stream is finished for this frame of the stream. |
MAXON_METHOD Result<void> InitStream | ( | const MediaStreamProperties & | props | ) |
called by the input media converter implementation before loading a stream.
[in] | props | Properties of the source image stream. |
MAXON_METHOD Result<SetPixelHandlerStruct> SetPixelStream | ( | const MediaStreamProperties & | props, |
const ChannelOffsets & | srcChannelOffsets, | ||
SETPIXELHANDLERFLAGS | setPixelFlags | ||
) |
called by the input media converter implementation before loading a stream.
[in] | props | Properties of the source image stream. |
[in] | srcChannelOffsets | Source channel offsets of the data that will be set using this set pixel handler. |
[in] | setPixelFlags | Flags which control the set pixel operation. See also SETPIXELHANDLERFLAGS. |
MAXON_METHOD Result<void> FinishStream | ( | const MediaStreamProperties & | props | ) |
called by the input media converter implementation when loading the stream is completed.
[in] | props | Properties of the source image stream. |