Sunshine master
Self-hosted game stream host for Moonlight.
cbs.h
Go to the documentation of this file.
1
5#pragma once
6
7// local includes
8#include "utility.h"
9
10struct AVPacket;
11struct AVCodecContext;
12
13namespace cbs {
14
22
26 struct hevc_t {
29 };
30
34 struct h264_t {
36 };
37
45 hevc_t make_sps_hevc(const AVCodecContext *ctx, const AVPacket *packet);
53 h264_t make_sps_h264(const AVCodecContext *ctx, const AVPacket *packet);
54
62 bool validate_sps(const AVPacket *packet, int codec_id);
63} // namespace cbs
h264_t make_sps_h264(const AVCodecContext *avctx, const AVPacket *packet)
Build replacement H.264 SPS bytes with Sunshine-required VUI fields.
Definition cbs.cpp:131
bool validate_sps(const AVPacket *packet, int codec_id)
Check whether an encoded H.264 or HEVC packet contains active SPS VUI metadata.
Definition cbs.cpp:269
hevc_t make_sps_hevc(const AVCodecContext *avctx, const AVPacket *packet)
Build replacement HEVC VPS/SPS bytes with Sunshine-required VUI fields.
Definition cbs.cpp:190
Owning contiguous buffer with an explicit logical element count.
Definition utility.h:1394
H.264 parameter set before and after VUI rewriting.
Definition cbs.h:34
nal_t sps
Sequence parameter set bytes.
Definition cbs.h:35
HEVC parameter sets before and after VUI rewriting.
Definition cbs.h:26
nal_t sps
Sequence parameter set bytes.
Definition cbs.h:28
nal_t vps
Video parameter set bytes.
Definition cbs.h:27
Original and rewritten bytes for one codec NAL unit.
Definition cbs.h:18
util::buffer_t< std::uint8_t > _new
Replacement bytes generated by Sunshine.
Definition cbs.h:19
util::buffer_t< std::uint8_t > old
Original bytes copied from the source packet.
Definition cbs.h:20
Declarations for utility functions.