pub enum NetStreamCommand<'a> {
Play {
values: Vec<Amf0Value<'static>>,
},
Play2 {
parameters: Amf0Object<'static>,
},
DeleteStream {
stream_id: f64,
},
CloseStream,
ReceiveAudio {
receive_audio: bool,
},
ReceiveVideo {
receive_video: bool,
},
Publish {
publishing_name: StringCow<'a>,
publishing_type: NetStreamCommandPublishPublishingType<'a>,
},
Seek {
milliseconds: f64,
},
Pause {
pause: bool,
milliseconds: f64,
},
}
Expand description
NetStream commands as defined in 7.2.2.
Variants§
Play
Play command.
Fields
Play2
Play2 command.
Fields
§
parameters: Amf0Object<'static>
All values in the command.
See the legacy RTMP spec for details.
DeleteStream
Delete stream command.
CloseStream
Close stream command.
ReceiveAudio
Receive audio command.
ReceiveVideo
Receive video command.
Publish
Publish command.
Fields
§
publishing_name: StringCow<'a>
Name with which the stream is published.
§
publishing_type: NetStreamCommandPublishPublishingType<'a>
Type of publishing.
Seek
Seek command.
Pause
Pause command.
Fields
Implementations§
Source§impl NetStreamCommand<'_>
impl NetStreamCommand<'_>
Sourcepub fn read(
command_name: &str,
decoder: &mut Amf0Decoder<BytesBuf<Bytes>>,
) -> Result<Option<Self>, CommandError>
pub fn read( command_name: &str, decoder: &mut Amf0Decoder<BytesBuf<Bytes>>, ) -> Result<Option<Self>, CommandError>
Reads a NetStreamCommand
from the given decoder.
Returns Ok(None)
if the command_name
is not recognized.
Trait Implementations§
Source§impl<'a> Clone for NetStreamCommand<'a>
impl<'a> Clone for NetStreamCommand<'a>
Source§fn clone(&self) -> NetStreamCommand<'a>
fn clone(&self) -> NetStreamCommand<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for NetStreamCommand<'a>
impl<'a> Debug for NetStreamCommand<'a>
Source§impl<'a> PartialEq for NetStreamCommand<'a>
impl<'a> PartialEq for NetStreamCommand<'a>
impl<'a> StructuralPartialEq for NetStreamCommand<'a>
Auto Trait Implementations§
impl<'a> !Freeze for NetStreamCommand<'a>
impl<'a> RefUnwindSafe for NetStreamCommand<'a>
impl<'a> Send for NetStreamCommand<'a>
impl<'a> Sync for NetStreamCommand<'a>
impl<'a> Unpin for NetStreamCommand<'a>
impl<'a> UnwindSafe for NetStreamCommand<'a>
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
Mutably borrows from an owned value. Read more