30 #ifndef IFM3D_RTSP_VIDEO_DECODER_H
31 #define IFM3D_RTSP_VIDEO_DECODER_H
48 VIDEO_FORMAT_YUV420P = 1
60 std::uint8_t* planes[4]{};
82 virtual int SendPacket(
const std::uint8_t* data,
int size) = 0;
99 [[nodiscard]]
virtual std::string
126 [[nodiscard]]
virtual std::string
Name()
const = 0;
147 [[nodiscard]]
virtual std::string
Abstract decoder implementation (factory).
Definition: video_decoder.h:121
virtual bool SupportsCodec(VideoCodec codec) const =0
Whether this implementation can decode codec.
virtual std::string AvailabilityError() const
Optional human-readable reason why IsAvailable() is false; empty when the decoder is available.
Definition: video_decoder.h:148
virtual bool IsAvailable() const =0
Whether this implementation can actually be used on the current system.
virtual std::unique_ptr< VideoDecoder > CreateDecoder(VideoCodec codec)=0
Create a decoder for codec, or nullptr if unsupported/unavailable.
virtual std::string Name() const =0
Stable, human-readable name (e.g.
Abstract H.264 (etc.) video decoder.
Definition: video_decoder.h:74
virtual int ReceiveFrame(VideoFrame &out)=0
Pull a decoded frame.
virtual int SendPacket(const std::uint8_t *data, int size)=0
Push one unit of compressed data into the decoder.
virtual std::string LastError() const
Optional: a human-readable description of the last error.
Definition: video_decoder.h:100
virtual int Flush()
Optional: flush buffered frames at end-of-stream.
Definition: video_decoder.h:93
Decoded frame view.
Definition: video_decoder.h:59