#[repr(C)]pub struct StreamPacket {
    pub pts: i64,
    pub payload_buffer_id: u32,
    pub payload_offset: u64,
    pub payload_size: u64,
    pub flags: u32,
    pub buffer_config: u64,
    pub stream_segment_id: u64,
}Expand description
Describes a packet consumed by StreamSink or produced by StreamSource.
Fields§
§pts: i64Time at which the packet is to be presented, according to the presentation clock.
payload_buffer_id: u32ID of the payload buffer used for this packet.
When this struct is used with StreamBufferSet, this field is the ID of
a payload buffer provided via StreamBufferSet.AddPayloadBuffer. In
that case, this value must identify a payload buffer in the current set.
Other interfaces may define different semantics for this field.
payload_offset: u64Offset of the packet payload in the payload buffer.
This value plus the payload_size value must be less than or equal to
the size of the referenced payload buffer.
payload_size: u64Size in bytes of the payload.
This value plus the payload_offest value must be less than or equal to
the size of the referenced payload buffer.
flags: u32An bitwise-or’ed set of flags (see constants below) describing properties of this packet.
buffer_config: u64The buffer configuration associated with this packet. The semantics of
this field depend on the interface with which this struct is used.
In many contexts, this field is not used. This field is intended for
situations in which buffer configurations (i.e. sets of payload buffers)
are explicitly identified. In such cases, the payload_buffer_id refers
to a payload buffer in the buffer configuration identified by this
field.
stream_segment_id: u64The stream segment associated with this packet. The semantics of this field depend on the interface with which this struct is used. In many contexts, this field is not used. This field is intended to distinguish contiguous segments of the stream where stream properties (e.g. encoding) may differ from segment to segment.
Trait Implementations§
Source§impl Clone for StreamPacket
 
impl Clone for StreamPacket
Source§fn clone(&self) -> StreamPacket
 
fn clone(&self) -> StreamPacket
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StreamPacket
 
impl Debug for StreamPacket
Source§impl<D> Decode<StreamPacket, D> for StreamPacketwhere
    D: ResourceDialect,
 
impl<D> Decode<StreamPacket, D> for StreamPacketwhere
    D: ResourceDialect,
Source§fn new_empty() -> StreamPacket
 
fn new_empty() -> StreamPacket
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl<D> Encode<StreamPacket, D> for &StreamPacketwhere
    D: ResourceDialect,
 
impl<D> Encode<StreamPacket, D> for &StreamPacketwhere
    D: ResourceDialect,
Source§impl Hash for StreamPacket
 
impl Hash for StreamPacket
Source§impl Ord for StreamPacket
 
impl Ord for StreamPacket
Source§fn cmp(&self, other: &StreamPacket) -> Ordering
 
fn cmp(&self, other: &StreamPacket) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
    Self: Sized,
 
fn max(self, other: Self) -> Selfwhere
    Self: Sized,
Source§impl PartialEq for StreamPacket
 
impl PartialEq for StreamPacket
Source§impl PartialOrd for StreamPacket
 
impl PartialOrd for StreamPacket
Source§impl TypeMarker for StreamPacket
 
impl TypeMarker for StreamPacket
Source§type Owned = StreamPacket
 
type Owned = StreamPacket
Source§fn inline_align(_context: Context) -> usize
 
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
 
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
 
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
 
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl ValueTypeMarker for StreamPacket
 
impl ValueTypeMarker for StreamPacket
Source§type Borrowed<'a> = &'a StreamPacket
 
type Borrowed<'a> = &'a StreamPacket
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
    value: &<StreamPacket as TypeMarker>::Owned,
) -> <StreamPacket as ValueTypeMarker>::Borrowed<'_>
 
fn borrow( value: &<StreamPacket as TypeMarker>::Owned, ) -> <StreamPacket as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.