FFmpegDecoder

Struct FFmpegDecoder 

Source
pub struct FFmpegDecoder;
Expand description

The actual FFmpeg decoder.

To use it, one might write use FFmpegDecoder as Decoder;, use super::decoder::Decoder as DecoderTrait;, and then use Decoder::song_from_path

Trait Implementations§

Source§

impl Decoder for FFmpegDecoder

Source§

fn decode(path: &Path) -> BlissResult<PreAnalyzedSong>

A function that should decode and resample a song, optionally extracting the song’s metadata such as the artist, the album, etc. Read more
Source§

fn song_from_path<P: AsRef<Path>>(path: P) -> BlissResult<Song>

Returns a decoded Song given a file path, or an error if the song could not be analyzed for some reason. Read more
Source§

fn song_from_path_with_options<P: AsRef<Path>>( path: P, analysis_options: AnalysisOptions, ) -> BlissResult<Song>

Returns a decoded Song given a file path, processed with the options analysis_options or an error if the song could not be analyzed for some reason. Use this if you want to analyze a song with older features version. Read more
Source§

fn analyze_paths<P: Into<PathBuf>, F: IntoIterator<Item = P>>( paths: F, ) -> IntoIter<(PathBuf, BlissResult<Song>)>

Analyze songs in paths using multiple threads, and return the analyzed Song objects through an mpsc::IntoIter. Read more
Source§

fn analyze_paths_with_options<P: Into<PathBuf>, F: IntoIterator<Item = P>>( paths: F, analysis_options: AnalysisOptions, ) -> IntoIter<(PathBuf, BlissResult<Song>)>

Analyze songs in paths, and return the analyzed Song objects through an mpsc::IntoIter. number_cores sets the number of cores the analysis will use, capped by your system’s capacity. Most of the time, you want to use the simpler analyze_paths functions, which autodetects the number of cores in your system. Read more

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V