Module vlc :: Class MediaList
[hide private]
[frames] | no frames]

Class MediaList

source code

object --+    
         |    
    _Ctype --+
             |
            MediaList

Create a new MediaList instance.

Usage: MediaList(list_of_MRLs)

See vlc.Instance.media_list_new documentation for details.

Instance Methods [hide private]
 
get_instance(self) source code
 
add_media(self, mrl)
Add media instance to media list.
source code
 
release(self)
Release media list created with new().
source code
 
retain(self)
Retain reference to a media list.
source code
 
set_media(self, p_md)
Associate media instance with this media list instance.
source code
 
media(self)
Get media instance from this media list instance.
source code
 
insert_media(self, p_md, i_pos)
Insert media instance in media list on a position The lock should be held upon entering this function.
source code
 
remove_index(self, i_pos)
Remove media instance from media list on a position The lock should be held upon entering this function.
source code
 
count(self)
Get count on media list items The lock should be held upon entering this function.
source code
 
__len__(self) source code
 
item_at_index(self, i_pos)
List media instance in media list at a position The lock should be held upon entering this function.
source code
 
__getitem__(self, i) source code
 
__iter__(self) source code
 
index_of_item(self, p_md)
Find index position of List media instance in media list.
source code
 
is_readonly(self)
This indicates if this media list is read-only from a user point of view.
source code
 
lock(self)
Get lock on media list items.
source code
 
unlock(self)
Release lock on media list items The lock should be held upon entering this function.
source code
 
event_manager(self)
Decorator.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
a new object with type S, a subtype of T
__new__(cls, *args) source code

Inherited from _Ctype: from_param

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__new__(cls, *args)
Static Method

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__
(inherited documentation)

add_media(self, mrl)

source code 

Add media instance to media list.

The lock should be held upon entering this function.

Parameters:
  • mrl - a media instance or a MRL.
Returns:
0 on success, -1 if the media list is read-only.

set_media(self, p_md)

source code 

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

Parameters:
  • p_md - media instance to add.

media(self)

source code 

Get media instance from this media list instance. This action will increase the refcount on the media instance. The lock should NOT be held upon entering this function.

Returns:
media instance.

insert_media(self, p_md, i_pos)

source code 

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

Parameters:
  • p_md - a media instance.
  • i_pos - position in array where to insert.
Returns:
0 on success, -1 if the media list is read-only.

remove_index(self, i_pos)

source code 

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

Parameters:
  • i_pos - position in array where to insert.
Returns:
0 on success, -1 if the list is read-only or the item was not found.

count(self)

source code 

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

Returns:
number of items in media list.

item_at_index(self, i_pos)

source code 

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

Parameters:
  • i_pos - position in array where to insert.
Returns:
media instance at position i_pos, or None if not found. In case of success, media_retain() is called to increase the refcount on the media.

index_of_item(self, p_md)

source code 

Find index position of List media instance in media list. Warning: the function will return the first matched position. The lock should be held upon entering this function.

Parameters:
  • p_md - media instance.
Returns:
position of media instance or -1 if media not found.

is_readonly(self)

source code 

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

Returns:
1 on readonly, 0 on readwrite \libvlc_return_bool.

event_manager(self)

source code 

Decorator. Caches a parameterless method's return value each time it is called.

If called later with the same arguments, the cached value is returned (not reevaluated). Adapted from https://wiki.python.org/moin/PythonDecoratorLibrary

Decorators:
  • @memoize_parameterless