Struct MediaList

Source
pub struct MediaList { /* private fields */ }

Implementations§

Source§

impl MediaList

Source

pub fn new(instance: &Instance) -> Option<MediaList>

Create an empty media list.

Source

pub fn set_media(&self, md: &Media)

Associate media instance with this media list instance. If another media instance was present it will be released. The libvlc_media_list_lock should NOT be held upon entering this function.

Source

pub fn media(&self) -> Option<Media>

Get media instance from this media list instance. The MediaList::lock should NOT be held upon entering this function.

Source

pub fn add_media(&self, md: &Media) -> Result<(), ()>

Add media instance to media list. The MediaList::lock should be held upon entering this function.

Source

pub fn insert_media(&self, md: &Media, pos: i32) -> Result<(), ()>

Insert media instance in media list on a position. The MediaList::lock should be held upon entering this function.

Source

pub fn remove_index(&self, pos: i32) -> Result<(), ()>

Remove media instance from media list on a position. The MediaList::lock should be held upon entering this function.

Source

pub fn count(&self) -> i32

Get count on media list items. The MediaList::lock should be held upon entering this function.

Source

pub fn item_at_index(&self, pos: i32) -> Option<Media>

List media instance in media list at a position. The MediaList::lock should be held upon entering this function.

Source

pub fn index_of_item(&self, md: &Media) -> Option<i32>

Find index position of List media instance in media list.

Source

pub fn is_readonly(&self) -> bool

This indicates if this media list is read-only from a user point of view.

Source

pub fn lock(&self)

Get lock on media list items

Source

pub fn unlock(&self)

Release lock on media list items The libvlc_media_list_lock should be held upon entering this function.

Source

pub fn event_manager<'a>(&'a self) -> EventManager<'a>

Get EventManager from this media list instance.

Source

pub fn raw(&self) -> *mut libvlc_media_list_t

Returns raw pointer

Trait Implementations§

Source§

impl Drop for MediaList

Source§

fn drop(&mut self)

Executes the destructor for this type. 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, 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.