pub enum Codec {
H264,
H265,
Mjpeg,
}Expand description
Which elementary stream the input carries.
Seyd never decodes video, so this exists for exactly two reasons: to find frame boundaries in an RTP stream, and to know which frames are keyframes. Everything downstream — chunking, FEC, transport, pacing — is bytes.
Variants§
H264
H265
Mjpeg
Motion JPEG: a sequence of complete JPEG images, one per frame.
The only codec ONVIF Profile S makes mandatory, so every conformant camera can emit it while none is obliged to emit H.265 — which makes it the compatibility path, not a preference. It costs roughly an order of magnitude more bandwidth than H.264.
Implementations§
Source§impl Codec
impl Codec
Sourcepub fn from_codec_string(s: &str) -> Result<Self>
pub fn from_codec_string(s: &str) -> Result<Self>
From the channel’s codec string, which is a WebCodecs identifier
(avc1.42001f, hev1.1.6.L93.B0) because it also travels to the
browser’s decoder untouched. Bare h264 / h265 are accepted too.
Sourcepub fn rtp_encoding_name(self) -> &'static str
pub fn rtp_encoding_name(self) -> &'static str
The RTP encoding_name an RTSP server advertises for this codec.
Trait Implementations§
impl Copy for Codec
impl Eq for Codec
impl StructuralPartialEq for Codec
Auto Trait Implementations§
impl Freeze for Codec
impl RefUnwindSafe for Codec
impl Send for Codec
impl Sync for Codec
impl Unpin for Codec
impl UnsafeUnpin for Codec
impl UnwindSafe for Codec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.