pub struct AacCodecInfo(/* private fields */);Implementations§
Source§impl AacCodecInfo
impl AacCodecInfo
pub fn new( object_type: AacObjectType, sampling_frequency: AacSamplingFrequency, channels: AacChannels, vbr: bool, bitrate: u32, ) -> Result<Self>
Sourcepub fn to_bytes(&self) -> [u8; 6]
pub fn to_bytes(&self) -> [u8; 6]
AacCodecInfoBytes is represented as an u64, with upper 16 bits unused.
Return a vector of the lower 6 bytes.
pub fn variable_bit_rate(&self) -> bool
pub fn bitrate(&self) -> u32
pub fn channels(&self) -> AacChannels
Sourcepub fn channel_count(&self) -> Result<usize>
pub fn channel_count(&self) -> Result<usize>
Returns the number of channels selected. Returns Error::OutOfRange if both mono and stereo are selected.
Sourcepub fn sampling_frequency(&self) -> Result<u32>
pub fn sampling_frequency(&self) -> Result<u32>
Returns the sampling frequeency selected, in hz. Returns Error::OutOfRange if multiple frequencies are selected.
Sourcepub fn supports(&self, other: &Self) -> bool
pub fn supports(&self, other: &Self) -> bool
Returns true if other is a compatable configuration of self
pub fn negotiate(a: &Self, b: &Self) -> Option<Self>
Trait Implementations§
Source§impl Debug for AacCodecInfo
impl Debug for AacCodecInfo
Source§impl From<AacCodecInfo> for ServiceCapability
impl From<AacCodecInfo> for ServiceCapability
Source§fn from(codec_info: AacCodecInfo) -> Self
fn from(codec_info: AacCodecInfo) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AacCodecInfo
impl RefUnwindSafe for AacCodecInfo
impl Send for AacCodecInfo
impl Sync for AacCodecInfo
impl Unpin for AacCodecInfo
impl UnwindSafe for AacCodecInfo
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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more