|
ifm3d
|
Lists and selects the video decoder implementations that are compiled into the RTSP module. More...
#include <ifm3d/rtsp/decoder_manager.h>
Classes | |
| struct | DecoderInfo |
| Describes a registered decoder implementation and whether it can be used on the current system. More... | |
Public Member Functions | |
| DecoderManager (std::optional< std::string > preferred_decoder={}) | |
| DecoderManager (const DecoderManager &)=delete | |
| DecoderManager & | operator= (const DecoderManager &)=delete |
| DecoderManager (DecoderManager &&)=delete | |
| DecoderManager & | operator= (DecoderManager &&)=delete |
| void | LoadDecoders () |
| Resolve which decoder serves each codec, honouring preferred_decoder and falling back to the null decoder. More... | |
| std::unique_ptr< ifm3d::rtsp::VideoDecoder > | CreateDecoder (ifm3d::rtsp::VideoCodec codec) |
| Create a decoder for the given codec using the selected implementation. More... | |
| std::string | SelectedDecoderName (ifm3d::rtsp::VideoCodec codec) const |
Static Public Member Functions | |
| static std::vector< DecoderInfo > | DiscoverDecoders () |
| List the decoder implementations and report whether each is usable on the current system. More... | |
Lists and selects the video decoder implementations that are compiled into the RTSP module.
Each implementation (e.g. the ffmpeg decoder and the always-available "null" decoder) is registered here. Implementations that depend on optional runtime libraries report their own availability – the ffmpeg decoder, for example, resolves libavcodec/libavutil at runtime and is unavailable when no compatible FFmpeg is installed.
Selection for a codec (deterministic):
|
explicit |
| preferred_decoder | Optional decoder name substring (e.g. "ffmpeg"), or the "null" decoder name. |
| std::unique_ptr<ifm3d::rtsp::VideoDecoder> ifm3d::DecoderManager::CreateDecoder | ( | ifm3d::rtsp::VideoCodec | codec | ) |
Create a decoder for the given codec using the selected implementation.
Returns nullptr if LoadDecoders() has not run or no decoder is available.
|
static |
List the decoder implementations and report whether each is usable on the current system.
This is a diagnostic helper: it does not affect the state of any DecoderManager instance.
| void ifm3d::DecoderManager::LoadDecoders | ( | ) |
Resolve which decoder serves each codec, honouring preferred_decoder and falling back to the null decoder.
Should be called once after construction.
| std::string ifm3d::DecoderManager::SelectedDecoderName | ( | ifm3d::rtsp::VideoCodec | codec | ) | const |
codec, or an empty string if none has been selected. Intended for diagnostics/tests.