Sunshine latest
Self-hosted game stream host for Moonlight.
cbs.h File Reference

Declarations for FFmpeg Coded Bitstream API. More...

#include "utility.h"
Include dependency graph for cbs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cbs::h264_t
 
struct  cbs::hevc_t
 
struct  cbs::nal_t
 

Functions

h264_t cbs::make_sps_h264 (const AVCodecContext *avctx, const AVPacket *packet)
 
hevc_t cbs::make_sps_hevc (const AVCodecContext *avctx, const AVPacket *packet)
 
bool cbs::validate_sps (const AVPacket *packet, int codec_id)
 Validates the Sequence Parameter Set (SPS) of a given packet.
 

Detailed Description

Declarations for FFmpeg Coded Bitstream API.

Function Documentation

◆ validate_sps()

bool cbs::validate_sps ( const AVPacket * packet,
int codec_id )

Validates the Sequence Parameter Set (SPS) of a given packet.

This function initializes a Coded Bitstream Context and reads the packet into a Coded Bitstream Fragment. It then checks if the SPS->VUI (Video Usability Information) is present in the active SPS of the packet. This is done for both H264 and H265 codecs.

Parameters
packetThe packet to validate.
codec_idThe ID of the codec used (either AV_CODEC_ID_H264 or AV_CODEC_ID_H265).
Returns
True if the SPS->VUI is present in the active SPS of the packet, false otherwise.