pub enum PlaybackKind {
DirectPlay,
DirectStream,
Transcode,
}Expand description
What the server is doing to the source to produce this stream.
Distinct from Transport because the two are genuinely independent: a
direct-streamed remux and a transcode can both arrive over HLS, and a direct
play can arrive progressively or as a local file. Keeping them apart is what
lets the UI say “this is not costing the server anything” without inferring
it from a URL shape.
TRACES: UR-079 | DR-228
Variants§
DirectPlay
The source file is served untouched. No server CPU, no quality loss.
DirectStream
The container is repackaged but the codecs are copied — cheap, and visually identical to the source.
Transcode
The server is re-encoding. The only case where a bitrate ceiling can actually be honoured, and the only one that costs the server real work.
Implementations§
Source§impl PlaybackKind
impl PlaybackKind
Sourcepub fn needs_transcoding(&self) -> bool
pub fn needs_transcoding(&self) -> bool
Whether the server is spending encoder time on this stream.
The queue carries a needs_transcoding flag that predates this enum and
that several seek/reload paths still branch on; this keeps the two from
drifting by making one derive from the other.
TRACES: UR-079 | DR-228
Trait Implementations§
Source§impl Clone for PlaybackKind
impl Clone for PlaybackKind
Source§fn clone(&self) -> PlaybackKind
fn clone(&self) -> PlaybackKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlaybackKind
impl Debug for PlaybackKind
Source§impl<'de> Deserialize<'de> for PlaybackKind
impl<'de> Deserialize<'de> for PlaybackKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl NamedType for PlaybackKind
impl NamedType for PlaybackKind
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl PartialEq for PlaybackKind
impl PartialEq for PlaybackKind
Source§fn eq(&self, other: &PlaybackKind) -> bool
fn eq(&self, other: &PlaybackKind) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PlaybackKind
impl Serialize for PlaybackKind
Source§impl Type for PlaybackKind
impl Type for PlaybackKind
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition will be put into the type map.impl Copy for PlaybackKind
impl Eq for PlaybackKind
impl Flatten for PlaybackKind
impl StructuralPartialEq for PlaybackKind
Auto Trait Implementations§
impl Freeze for PlaybackKind
impl RefUnwindSafe for PlaybackKind
impl Send for PlaybackKind
impl Sync for PlaybackKind
impl Unpin for PlaybackKind
impl UnsafeUnpin for PlaybackKind
impl UnwindSafe for PlaybackKind
Blanket Implementations§
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,
§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FunctionArg for Twhere
T: Type,
impl<T> FunctionArg for Twhere
T: Type,
§fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
fn to_datatype(type_map: &mut TypeCollection) -> Option<DataType>
DataType]. Read more