Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
video::packet_raw_avcodec Struct Reference

AVCodec packet wrapper with codec-specific metadata. More...

#include <src/video.h>

Inheritance diagram for video::packet_raw_avcodec:
Collaboration diagram for video::packet_raw_avcodec:

Public Member Functions

uint8_t * data () override
 Return writable access to the FFmpeg packet payload.
size_t data_size () override
 Return the FFmpeg packet payload length.
int64_t frame_index () override
 Return the FFmpeg packet PTS used as Sunshine's frame index.
bool is_idr () override
 Report whether the FFmpeg packet is marked as a key frame.

Public Attributes

AVPacket * av_packet
 FFmpeg packet that owns encoded data and frame metadata.
Public Attributes inherited from video::packet_raw_t
bool after_ref_frame_invalidation = false
 Whether the frame follows reference-frame invalidation.
stream::session_t * channel_data = nullptr
 Stream session that receives this packet.
std::optional< std::chrono::steady_clock::time_point > frame_timestamp
 Capture timestamp associated with the frame.
std::vector< replace_t > * replacements = nullptr
 Optional encoded-byte substitutions applied before packetization.

Detailed Description

AVCodec packet wrapper with codec-specific metadata.

Member Function Documentation

◆ data()

uint8_t * video::packet_raw_avcodec::data ( )
inlineoverridevirtual

Return writable access to the FFmpeg packet payload.

Returns
Pointer to the first encoded byte in the FFmpeg packet.

Implements video::packet_raw_t.

◆ data_size()

size_t video::packet_raw_avcodec::data_size ( )
inlineoverridevirtual

Return the FFmpeg packet payload length.

Returns
Size of the encoded frame payload in bytes.

Implements video::packet_raw_t.

◆ frame_index()

int64_t video::packet_raw_avcodec::frame_index ( )
inlineoverridevirtual

Return the FFmpeg packet PTS used as Sunshine's frame index.

Returns
Monotonic frame index assigned to this frame.

Implements video::packet_raw_t.

◆ is_idr()

bool video::packet_raw_avcodec::is_idr ( )
inlineoverridevirtual

Report whether the FFmpeg packet is marked as a key frame.

Returns
True when this frame is an IDR frame.

Implements video::packet_raw_t.


The documentation for this struct was generated from the following file: