#[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: i64
Time at which the packet is to be presented, according to the presentation clock.
payload_buffer_id: u32
ID 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: u64
Offset 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: u64
Size 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: u32
An bitwise-or’ed set of flags (see constants below) describing properties of this packet.
buffer_config: u64
The 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: u64
The 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: ResourceDialect> Decode<StreamPacket, D> for StreamPacket
impl<D: ResourceDialect> Decode<StreamPacket, D> for StreamPacket
Source§impl<D: ResourceDialect> Encode<StreamPacket, D> for &StreamPacket
impl<D: ResourceDialect> Encode<StreamPacket, D> for &StreamPacket
Source§impl<D: ResourceDialect, T0: Encode<i64, D>, T1: Encode<u32, D>, T2: Encode<u64, D>, T3: Encode<u64, D>, T4: Encode<u32, D>, T5: Encode<u64, D>, T6: Encode<u64, D>> Encode<StreamPacket, D> for (T0, T1, T2, T3, T4, T5, T6)
impl<D: ResourceDialect, T0: Encode<i64, D>, T1: Encode<u32, D>, T2: Encode<u64, D>, T3: Encode<u64, D>, T4: Encode<u32, D>, T5: Encode<u64, D>, T6: Encode<u64, D>> Encode<StreamPacket, D> for (T0, T1, T2, T3, T4, T5, T6)
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
.§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 more§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 moreimpl Copy for StreamPacket
impl Eq for StreamPacket
impl Persistable for StreamPacket
impl StructuralPartialEq for StreamPacket
Auto Trait Implementations§
impl Freeze for StreamPacket
impl RefUnwindSafe for StreamPacket
impl Send for StreamPacket
impl Sync for StreamPacket
impl Unpin for StreamPacket
impl UnwindSafe for StreamPacket
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)