Settings for a MediaReceiver.
#include <MediaReceiver.h>
Name | |
---|---|
AlignedFrame::PixelFormat | mDecodedFormat The pixel format delivered to the rendering engine. |
std::function< std::function< void(const AlignedFramePtr &)>uint32_t inputSlot, const std::string &streamID, const NewStreamParameters &newStreamParameters)> | mNewConnectionCallback |
std::function< void(uint32_t inputSlot)> | mClosedConnectionCallback |
bool | mUseMultiViewer |
bool | mDeliverOld Set to true if this MediaReceiver should have a multi-view generator. |
CUstream | mAlignedFrameFreeStream |
AlignedFrame::PixelFormat mDecodedFormat = AlignedFrame::PixelFormat::kRgba64Le;
The pixel format delivered to the rendering engine.
std::function< std::function< void(const AlignedFramePtr &)>uint32_t inputSlot, const std::string &streamID, const NewStreamParameters &newStreamParameters)> mNewConnectionCallback;
Parameters:
Note: The internal CUDA stream is synchronized before delivering the AlignedFrames, meaning the DeviceMemory in the AlignedFrame will always contain the written data; no further synchronization is needed before the rendering engine can read the data.
A callback called by the MediaReceiver whenever a new connection from an Ingest is set up. The callback should return a function to which the data will be delivered. In case the Rendering engine does not want to accept the pending incoming stream (due to a format not supported, etc) the Rendering engine can return nullptr.
std::function< void(uint32_t inputSlot)> mClosedConnectionCallback;
Parameters:
A callback called whenever a connection from an Ingest has been stopped. When receiving this callback, the callback function returned by the mNewConnectionCallback will not be called anymore and can be discarded if required by the application. After this function has been called, the input slot might be reused by another incoming stream after a call to the mNewConnectionCallback.
bool mUseMultiViewer = false;
bool mDeliverOld = false;
Set to true if this MediaReceiver should have a multi-view generator.
CUstream mAlignedFrameFreeStream = nullptr;
Set to true if the media frames should be delivered, even if the delivery time has already passed, otherwise they are discarded The CUDA stream to use for asynchronously freeing the AlignedFrames’ DeviceMemory. Set this to the rendering engine’s CUDA stream, to ensure memory is not freed before the rendering engine is done using it asynchronously in its CUDA stream. Note that the MediaReceiver instance and all AlignedFrames delivered from it must be destroyed before the CUDA stream can be destroyed.
Updated on 2023-10-03 at 14:32:11 +0200