pub struct StreamBufferPartialSettings {
pub buffer_lifetime_ordinal: Option<u64>,
pub buffer_constraints_version_ordinal: Option<u64>,
pub single_buffer_mode: Option<bool>,
pub packet_count_for_server: Option<u32>,
pub packet_count_for_client: Option<u32>,
pub sysmem_token: Option<ClientEnd<BufferCollectionTokenMarker>>,
pub sysmem2_token: Option<ClientEnd<BufferCollectionTokenMarker>>,
/* private fields */
}Fields§
§buffer_lifetime_ordinal: Option<u64>Each buffer is associated with a buffer_lifetime_ordinal value.
There is a separate buffer_lifetime_ordinal for input vs. output.
Values must be odd. Values must only increase (increasing by more than 2 is permitted).
When using SetInputBufferPartialSettings or
SetOutputBufferPartialSettings, re-use of the same value (considering
input and output separately) for the new message is not allowed. Using
these messages, all the buffers of a given buffer_lifetime_ordinal value
are allocated as one sysmem buffer collection.
When a new buffer_lifetime_ordinal starts, that also automatically starts un-registering and releasing any buffers associated with prior buffer_lifetime_ordinal values, but does not force them to complete un-registration (or release) if they’re still used by the codec for reference purposes (VP9 can do this across a mid-stream dimensions switch). A buffer can still be output by the server (as indicated by an output packet) until un-registration completes.
If the client wants the server to drop all buffers quickly, the client
can send CloseCurrentStream with release_input_buffers and/or
release_output_buffers set. This of course also stops decode of the
current stream. Closing the StreamProcessor client end is another
option.
buffer_constraints_version_ordinal: Option<u64>This value indicates which version of constraints the client is/was aware of so far.
For input, this must always be 0 because constraints don’t change for input (settings can change, but there’s no settings vs current constraints synchronization issue on input).
For output, this allows the server to know when the client is sufficiently caught up before the server will generate any more output.
When there is no active stream, a client is permitted to re-configure buffers again using the same buffer_constraints_version_ordinal.
single_buffer_mode: Option<bool>§packet_count_for_server: Option<u32>§packet_count_for_client: Option<u32>§sysmem_token: Option<ClientEnd<BufferCollectionTokenMarker>>§sysmem2_token: Option<ClientEnd<BufferCollectionTokenMarker>>The client end of a BufferCollectionToken channel, which the StreamProcessor will use to deliver constraints to sysmem and learn of buffers allocated by sysmem.
The client guarantees that the token is already known to sysmem (via BufferCollectionToken.Sync(), BufferCollection.Sync(), or BufferCollectionEvents.OnDuplicatedTokensKnownByServer()).
Trait Implementations§
Source§impl Debug for StreamBufferPartialSettings
impl Debug for StreamBufferPartialSettings
Source§impl Decode<StreamBufferPartialSettings, DefaultFuchsiaResourceDialect> for StreamBufferPartialSettings
impl Decode<StreamBufferPartialSettings, DefaultFuchsiaResourceDialect> for StreamBufferPartialSettings
Source§impl Default for StreamBufferPartialSettings
impl Default for StreamBufferPartialSettings
Source§fn default() -> StreamBufferPartialSettings
fn default() -> StreamBufferPartialSettings
Source§impl Encode<StreamBufferPartialSettings, DefaultFuchsiaResourceDialect> for &mut StreamBufferPartialSettings
impl Encode<StreamBufferPartialSettings, DefaultFuchsiaResourceDialect> for &mut StreamBufferPartialSettings
Source§impl PartialEq for StreamBufferPartialSettings
impl PartialEq for StreamBufferPartialSettings
Source§fn eq(&self, other: &StreamBufferPartialSettings) -> bool
fn eq(&self, other: &StreamBufferPartialSettings) -> bool
self and other values to be equal, and is used by ==.Source§impl ResourceTypeMarker for StreamBufferPartialSettings
impl ResourceTypeMarker for StreamBufferPartialSettings
Source§type Borrowed<'a> = &'a mut StreamBufferPartialSettings
type Borrowed<'a> = &'a mut StreamBufferPartialSettings
Encode<Self>
type cheaply obtainable from &mut Self::Owned. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
&mut Self::Owned to Self::Borrowed. For
HandleBased types this is “take” (it returns an owned handle and
replaces value with Handle::invalid), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for StreamBufferPartialSettings
impl TypeMarker for StreamBufferPartialSettings
Source§type Owned = StreamBufferPartialSettings
type Owned = StreamBufferPartialSettings
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.