AudioData

Struct AudioData 

Source
pub struct AudioData { /* private fields */ }
Expand description

An audio frame

Implementations§

Source§

impl AudioData

Source

pub fn new() -> Self

Create new instance of AudioData

Source

pub fn sample_rate(&self) -> u32

The sample-rate of this buffer

Source

pub fn no_channels(&self) -> u32

The number of audio channels

Source

pub fn no_samples(&self) -> u32

The number of audio samples per channel

Source

pub fn timecode(&self) -> i64

The timecode of this frame in 100ns intervals

Source

pub fn timestamp(&self) -> Option<i64>

A per-frame timestamp filled in by the NDI SDK using a high precision clock.

This is only valid when receiving a frame. It represents the time (in 100 ns intervals measured in UTC time, since the Unix Time Epoch 1/1/1970 00:00 of the exact moment that the frame was submitted by the sending side If this value is None then this value is not available.

Source

pub fn p_data(&self) -> *mut u8

A pointer to the audio data

If FourCC is NDIlib_FourCC_type_FLTP, then this is the floating-point audio data in planar format, with each audio channel stored together with a stride between channels specified by channel_stride_in_bytes.

Source

pub fn four_cc(&self) -> FourCCAudioType

What FourCC type is for this frame

There is currently one supported format: FLTP.

Source

pub fn channel_stride_in_bytes(&self) -> u32

The stride in bytes for a single channel.

This is the number of bytes that are used to step from one audio channel to another.

Source

pub fn metadata(&self) -> String

This is a per frame metadata stream in XML

It is sent and received with the frame.

Trait Implementations§

Source§

impl Debug for AudioData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for AudioData

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for AudioData

Source§

impl Sync for AudioData

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.