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

Encoded packet wrapper used by the streaming pipeline. More...

#include <src/video.h>

Inheritance diagram for video::packet_raw_t:
Collaboration diagram for video::packet_raw_t:

Classes

struct  replace_t
 Packet byte-range replacement descriptor. More...

Public Member Functions

virtual uint8_t * data ()=0
 Return writable access to the encoded packet bytes.
virtual size_t data_size ()=0
 Return the encoded payload length.
virtual int64_t frame_index ()=0
 Return the frame index associated with this encoded packet.
virtual bool is_idr ()=0
 Report whether this packet starts an IDR frame.

Public Attributes

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

Encoded packet wrapper used by the streaming pipeline.

Member Function Documentation

◆ data()

virtual uint8_t * video::packet_raw_t::data ( )
pure virtual

Return writable access to the encoded packet bytes.

Returns
Pointer to the first byte of encoded frame data.

Implemented in video::packet_raw_avcodec, and video::packet_raw_generic.

◆ data_size()

virtual size_t video::packet_raw_t::data_size ( )
pure virtual

Return the encoded payload length.

Returns
Size of the encoded frame payload in bytes.

Implemented in video::packet_raw_avcodec, and video::packet_raw_generic.

◆ frame_index()

virtual int64_t video::packet_raw_t::frame_index ( )
pure virtual

Return the frame index associated with this encoded packet.

Returns
Monotonic frame index assigned to this frame.

Implemented in video::packet_raw_avcodec, and video::packet_raw_generic.

◆ is_idr()

virtual bool video::packet_raw_t::is_idr ( )
pure virtual

Report whether this packet starts an IDR frame.

Returns
True when this frame is an IDR frame.

Implemented in video::packet_raw_avcodec, and video::packet_raw_generic.


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