|
Sunshine master
Self-hosted game stream host for Moonlight.
|
Definitions for FFmpeg Coded Bitstream API. More...
#include <libavcodec/avcodec.h>#include <libavcodec/cbs_h264.h>#include <libavcodec/cbs_h265.h>#include <libavcodec/h264_levels.h>#include <libavutil/pixdesc.h>#include "cbs.h"#include "logging.h"#include "utility.h"Classes | |
| class | cbs::frag_t |
| Owns an FFmpeg coded bitstream fragment and frees fragment buffers on destruction. More... | |
Typedefs | |
| using | cbs::ctx_t = util::safe_ptr<CodedBitstreamContext, close> |
| Owning coded bitstream context pointer that calls ff_cbs_close. | |
Functions | |
| void | cbs::close (CodedBitstreamContext *c) |
| Release an FFmpeg coded bitstream context. | |
| h264_t | cbs::make_sps_h264 (const AVCodecContext *avctx, const AVPacket *packet) |
| Build replacement H.264 SPS bytes with Sunshine-required VUI fields. | |
| hevc_t | cbs::make_sps_hevc (const AVCodecContext *avctx, const AVPacket *packet) |
| Build replacement HEVC VPS/SPS bytes with Sunshine-required VUI fields. | |
| bool | cbs::validate_sps (const AVPacket *packet, int codec_id) |
| Check whether an encoded H.264 or HEVC packet contains active SPS VUI metadata. | |
| util::buffer_t< std::uint8_t > | cbs::write (cbs::ctx_t &cbs_ctx, std::uint8_t nal, void *uh, AVCodecID codec_id) |
| Serialize a prepared coded bitstream unit with an existing context. | |
| util::buffer_t< std::uint8_t > | cbs::write (std::uint8_t nal, void *uh, AVCodecID codec_id) |
| Serialize a prepared coded bitstream unit with a temporary context. | |
Definitions for FFmpeg Coded Bitstream API.
| void cbs::close | ( | CodedBitstreamContext * | c | ) |
Release an FFmpeg coded bitstream context.
| c | Context pointer owned by the safe pointer wrapper. |
| h264_t cbs::make_sps_h264 | ( | const AVCodecContext * | ctx, |
| const AVPacket * | packet ) |
Build replacement H.264 SPS bytes with Sunshine-required VUI fields.
Build an H.264 replacement SPS for a packet.
| ctx | FFmpeg codec context that provides colorimetry and reference-frame metadata. |
| packet | Encoded packet containing the original SPS. |
| hevc_t cbs::make_sps_hevc | ( | const AVCodecContext * | ctx, |
| const AVPacket * | packet ) |
Build replacement HEVC VPS/SPS bytes with Sunshine-required VUI fields.
Build HEVC replacement parameter sets for a packet.
| ctx | FFmpeg codec context that provides colorimetry and reference-frame metadata. |
| packet | Encoded packet containing the original VPS and SPS. |
| bool cbs::validate_sps | ( | const AVPacket * | packet, |
| int | codec_id ) |
Check whether an encoded H.264 or HEVC packet contains active SPS VUI metadata.
| packet | Encoded packet to parse with FFmpeg's coded bitstream reader. |
| codec_id | FFmpeg codec identifier; expected to be AV_CODEC_ID_H264 or AV_CODEC_ID_H265. |
true when the packet's active SPS advertises VUI parameters. | util::buffer_t< std::uint8_t > cbs::write | ( | cbs::ctx_t & | cbs_ctx, |
| std::uint8_t | nal, | ||
| void * | uh, | ||
| AVCodecID | codec_id ) |
Serialize a prepared coded bitstream unit with an existing context.
| cbs_ctx | Coded bitstream context initialized for the codec. |
| nal | NAL unit type to insert into the fragment. |
| uh | Pointer to the FFmpeg raw unit header/content structure. |
| codec_id | FFmpeg codec identifier used by the context. |
| util::buffer_t< std::uint8_t > cbs::write | ( | std::uint8_t | nal, |
| void * | uh, | ||
| AVCodecID | codec_id ) |
Serialize a prepared coded bitstream unit with a temporary context.
| nal | NAL unit type to insert into the fragment. |
| uh | Pointer to the FFmpeg raw unit header/content structure. |
| codec_id | FFmpeg codec identifier used to initialize the temporary context. |