forked from openlp/openlp
Downgrade VLC.py to a version that is in use
This commit is contained in:
parent
70db5acba9
commit
b2e54a4baa
592
openlp/core/ui/media/vendor/vlc.py
vendored
592
openlp/core/ui/media/vendor/vlc.py
vendored
@ -49,7 +49,7 @@ import functools
|
||||
from inspect import getargspec
|
||||
|
||||
__version__ = "N/A"
|
||||
build_date = "Thu Nov 5 23:41:43 2015"
|
||||
build_date = "Mon Jan 25 19:40:05 2016"
|
||||
|
||||
# The libvlc doc states that filenames are expected to be in UTF8, do
|
||||
# not rely on sys.getfilesystemencoding() which will be confused,
|
||||
@ -425,20 +425,10 @@ class EventType(_Enum):
|
||||
273: 'MediaPlayerLengthChanged',
|
||||
274: 'MediaPlayerVout',
|
||||
275: 'MediaPlayerScrambledChanged',
|
||||
276: 'MediaPlayerESAdded',
|
||||
277: 'MediaPlayerESDeleted',
|
||||
278: 'MediaPlayerESSelected',
|
||||
279: 'MediaPlayerCorked',
|
||||
280: 'MediaPlayerUncorked',
|
||||
281: 'MediaPlayerMuted',
|
||||
282: 'MediaPlayerUnmuted',
|
||||
283: 'MediaPlayerAudioVolume',
|
||||
284: 'MediaPlayerAudioDevice',
|
||||
0x200: 'MediaListItemAdded',
|
||||
513: 'MediaListWillAddItem',
|
||||
514: 'MediaListItemDeleted',
|
||||
515: 'MediaListWillDeleteItem',
|
||||
516: 'MediaListEndReached',
|
||||
0x300: 'MediaListViewItemAdded',
|
||||
769: 'MediaListViewWillAddItem',
|
||||
770: 'MediaListViewItemDeleted',
|
||||
@ -464,7 +454,6 @@ EventType.MediaDiscovererEnded = EventType(1281)
|
||||
EventType.MediaDiscovererStarted = EventType(0x500)
|
||||
EventType.MediaDurationChanged = EventType(2)
|
||||
EventType.MediaFreed = EventType(4)
|
||||
EventType.MediaListEndReached = EventType(516)
|
||||
EventType.MediaListItemAdded = EventType(0x200)
|
||||
EventType.MediaListItemDeleted = EventType(514)
|
||||
EventType.MediaListPlayerNextItemSet = EventType(1025)
|
||||
@ -478,20 +467,13 @@ EventType.MediaListWillAddItem = EventType(513)
|
||||
EventType.MediaListWillDeleteItem = EventType(515)
|
||||
EventType.MediaMetaChanged = EventType(0)
|
||||
EventType.MediaParsedChanged = EventType(3)
|
||||
EventType.MediaPlayerAudioDevice = EventType(284)
|
||||
EventType.MediaPlayerAudioVolume = EventType(283)
|
||||
EventType.MediaPlayerBackward = EventType(264)
|
||||
EventType.MediaPlayerBuffering = EventType(259)
|
||||
EventType.MediaPlayerCorked = EventType(279)
|
||||
EventType.MediaPlayerESAdded = EventType(276)
|
||||
EventType.MediaPlayerESDeleted = EventType(277)
|
||||
EventType.MediaPlayerESSelected = EventType(278)
|
||||
EventType.MediaPlayerEncounteredError = EventType(266)
|
||||
EventType.MediaPlayerEndReached = EventType(265)
|
||||
EventType.MediaPlayerForward = EventType(263)
|
||||
EventType.MediaPlayerLengthChanged = EventType(273)
|
||||
EventType.MediaPlayerMediaChanged = EventType(0x100)
|
||||
EventType.MediaPlayerMuted = EventType(281)
|
||||
EventType.MediaPlayerNothingSpecial = EventType(257)
|
||||
EventType.MediaPlayerOpening = EventType(258)
|
||||
EventType.MediaPlayerPausableChanged = EventType(270)
|
||||
@ -504,8 +486,6 @@ EventType.MediaPlayerSnapshotTaken = EventType(272)
|
||||
EventType.MediaPlayerStopped = EventType(262)
|
||||
EventType.MediaPlayerTimeChanged = EventType(267)
|
||||
EventType.MediaPlayerTitleChanged = EventType(271)
|
||||
EventType.MediaPlayerUncorked = EventType(280)
|
||||
EventType.MediaPlayerUnmuted = EventType(282)
|
||||
EventType.MediaPlayerVout = EventType(274)
|
||||
EventType.MediaStateChanged = EventType(5)
|
||||
EventType.MediaSubItemAdded = EventType(1)
|
||||
@ -549,19 +529,15 @@ class Meta(_Enum):
|
||||
20: 'Episode',
|
||||
21: 'ShowName',
|
||||
22: 'Actors',
|
||||
23: 'AlbumArtist',
|
||||
24: 'DiscNumber',
|
||||
}
|
||||
Meta.Actors = Meta(22)
|
||||
Meta.Album = Meta(4)
|
||||
Meta.AlbumArtist = Meta(23)
|
||||
Meta.Artist = Meta(1)
|
||||
Meta.ArtworkURL = Meta(15)
|
||||
Meta.Copyright = Meta(3)
|
||||
Meta.Date = Meta(8)
|
||||
Meta.Description = Meta(6)
|
||||
Meta.Director = Meta(18)
|
||||
Meta.DiscNumber = Meta(24)
|
||||
Meta.EncodedBy = Meta(14)
|
||||
Meta.Episode = Meta(20)
|
||||
Meta.Genre = Meta(2)
|
||||
@ -619,40 +595,6 @@ TrackType.text = TrackType(2)
|
||||
TrackType.unknown = TrackType(-1)
|
||||
TrackType.video = TrackType(1)
|
||||
|
||||
class MediaType(_Enum):
|
||||
'''Media type
|
||||
See libvlc_media_get_type.
|
||||
'''
|
||||
_enum_names_ = {
|
||||
0: 'unknown',
|
||||
1: 'file',
|
||||
2: 'directory',
|
||||
3: 'disc',
|
||||
4: 'stream',
|
||||
5: 'playlist',
|
||||
}
|
||||
MediaType.directory = MediaType(2)
|
||||
MediaType.disc = MediaType(3)
|
||||
MediaType.file = MediaType(1)
|
||||
MediaType.playlist = MediaType(5)
|
||||
MediaType.stream = MediaType(4)
|
||||
MediaType.unknown = MediaType(0)
|
||||
|
||||
class MediaParseFlag(_Enum):
|
||||
'''Parse flags used by libvlc_media_parse_with_options()
|
||||
See libvlc_media_parse_with_options.
|
||||
'''
|
||||
_enum_names_ = {
|
||||
0x00: 'local',
|
||||
0x01: 'network',
|
||||
0x02: 'local',
|
||||
0x04: 'network',
|
||||
}
|
||||
MediaParseFlag.local = MediaParseFlag(0x00)
|
||||
MediaParseFlag.local = MediaParseFlag(0x02)
|
||||
MediaParseFlag.network = MediaParseFlag(0x01)
|
||||
MediaParseFlag.network = MediaParseFlag(0x04)
|
||||
|
||||
class PlaybackMode(_Enum):
|
||||
'''Defines playback modes for playlist.
|
||||
'''
|
||||
@ -823,7 +765,7 @@ class Callback(ctypes.c_void_p):
|
||||
class LogCb(ctypes.c_void_p):
|
||||
"""Callback prototype for LibVLC log message handler.
|
||||
\param data data pointer as given to L{libvlc_log_set}()
|
||||
\param level message level (@ref libvlc_log_level)
|
||||
\param level message level (@ref enum libvlc_log_level)
|
||||
\param ctx message context (meta-information about the message)
|
||||
\param fmt printf() format string (as defined by ISO C11)
|
||||
\param args variable argument list for the format
|
||||
@ -832,49 +774,6 @@ class LogCb(ctypes.c_void_p):
|
||||
variable arguments are only valid until the callback returns.
|
||||
"""
|
||||
pass
|
||||
class MediaOpenCb(ctypes.c_void_p):
|
||||
"""Callback prototype to open a custom bitstream input media.
|
||||
The same media item can be opened multiple times. Each time, this callback
|
||||
is invoked. It should allocate and initialize any instance-specific
|
||||
resources, then store them in *datap. The instance resources can be freed
|
||||
in the @ref libvlc_media_close_cb callback.
|
||||
\param opaque private pointer as passed to L{libvlc_media_new_callbacks}()
|
||||
\param datap storage space for a private data pointer [OUT]
|
||||
\param sizep byte length of the bitstream or UINT64_MAX if unknown [OUT]
|
||||
\note For convenience, *datap is initially NULL and *sizep is initially 0.
|
||||
\return 0 on success, non-zero on error. In case of failure, the other
|
||||
callbacks will not be invoked and any value stored in *datap and *sizep is
|
||||
discarded.
|
||||
"""
|
||||
pass
|
||||
class MediaReadCb(ctypes.c_void_p):
|
||||
"""Callback prototype to read data from a custom bitstream input media.
|
||||
\param opaque private pointer as set by the @ref libvlc_media_open_cb
|
||||
callback
|
||||
\param buf start address of the buffer to read data into
|
||||
\param len bytes length of the buffer
|
||||
\return strictly positive number of bytes read, 0 on end-of-stream,
|
||||
or -1 on non-recoverable error
|
||||
\note If no data is immediately available, then the callback should sleep.
|
||||
\warning The application is responsible for avoiding deadlock situations.
|
||||
In particular, the callback should return an error if playback is stopped;
|
||||
if it does not return, then L{libvlc_media_player_stop}() will never return.
|
||||
"""
|
||||
pass
|
||||
class MediaSeekCb(ctypes.c_void_p):
|
||||
"""Callback prototype to seek a custom bitstream input media.
|
||||
\param opaque private pointer as set by the @ref libvlc_media_open_cb
|
||||
callback
|
||||
\param offset absolute byte offset to seek to
|
||||
\return 0 on success, -1 on error.
|
||||
"""
|
||||
pass
|
||||
class MediaCloseCb(ctypes.c_void_p):
|
||||
"""Callback prototype to close a custom bitstream input media.
|
||||
\param opaque private pointer as set by the @ref libvlc_media_open_cb
|
||||
callback
|
||||
"""
|
||||
pass
|
||||
class VideoLockCb(ctypes.c_void_p):
|
||||
"""Callback prototype to allocate and lock a picture buffer.
|
||||
Whenever a new video frame needs to be decoded, the lock callback is
|
||||
@ -932,7 +831,7 @@ the number of bytes per pixel multiplied by the pixel width.
|
||||
Similarly, the number of scanlines must be bigger than of equal to
|
||||
the pixel height.
|
||||
Furthermore, we recommend that pitches and lines be multiple of 32
|
||||
to not break assumptions that might be held by optimized code
|
||||
to not break assumption that might be made by various optimizations
|
||||
in the video decoders, video filters and/or video converters.
|
||||
"""
|
||||
pass
|
||||
@ -1009,7 +908,7 @@ class CallbackDecorators(object):
|
||||
LogCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int, Log_ptr, ctypes.c_char_p, ctypes.c_void_p)
|
||||
LogCb.__doc__ = '''Callback prototype for LibVLC log message handler.
|
||||
\param data data pointer as given to L{libvlc_log_set}()
|
||||
\param level message level (@ref libvlc_log_level)
|
||||
\param level message level (@ref enum libvlc_log_level)
|
||||
\param ctx message context (meta-information about the message)
|
||||
\param fmt printf() format string (as defined by ISO C11)
|
||||
\param args variable argument list for the format
|
||||
@ -1017,45 +916,6 @@ class CallbackDecorators(object):
|
||||
\warning The message context pointer, the format string parameters and the
|
||||
variable arguments are only valid until the callback returns.
|
||||
'''
|
||||
MediaOpenCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_int), ctypes.c_void_p, ListPOINTER(ctypes.c_void_p), ctypes.POINTER(ctypes.c_uint64))
|
||||
MediaOpenCb.__doc__ = '''Callback prototype to open a custom bitstream input media.
|
||||
The same media item can be opened multiple times. Each time, this callback
|
||||
is invoked. It should allocate and initialize any instance-specific
|
||||
resources, then store them in *datap. The instance resources can be freed
|
||||
in the @ref libvlc_media_close_cb callback.
|
||||
\param opaque private pointer as passed to L{libvlc_media_new_callbacks}()
|
||||
\param datap storage space for a private data pointer [OUT]
|
||||
\param sizep byte length of the bitstream or UINT64_MAX if unknown [OUT]
|
||||
\note For convenience, *datap is initially NULL and *sizep is initially 0.
|
||||
\return 0 on success, non-zero on error. In case of failure, the other
|
||||
callbacks will not be invoked and any value stored in *datap and *sizep is
|
||||
discarded.
|
||||
'''
|
||||
MediaReadCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_ssize_t), ctypes.c_void_p, ctypes.c_char_p, ctypes.c_size_t)
|
||||
MediaReadCb.__doc__ = '''Callback prototype to read data from a custom bitstream input media.
|
||||
\param opaque private pointer as set by the @ref libvlc_media_open_cb
|
||||
callback
|
||||
\param buf start address of the buffer to read data into
|
||||
\param len bytes length of the buffer
|
||||
\return strictly positive number of bytes read, 0 on end-of-stream,
|
||||
or -1 on non-recoverable error
|
||||
\note If no data is immediately available, then the callback should sleep.
|
||||
\warning The application is responsible for avoiding deadlock situations.
|
||||
In particular, the callback should return an error if playback is stopped;
|
||||
if it does not return, then L{libvlc_media_player_stop}() will never return.
|
||||
'''
|
||||
MediaSeekCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_int), ctypes.c_void_p, ctypes.c_uint64)
|
||||
MediaSeekCb.__doc__ = '''Callback prototype to seek a custom bitstream input media.
|
||||
\param opaque private pointer as set by the @ref libvlc_media_open_cb
|
||||
callback
|
||||
\param offset absolute byte offset to seek to
|
||||
\return 0 on success, -1 on error.
|
||||
'''
|
||||
MediaCloseCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p)
|
||||
MediaCloseCb.__doc__ = '''Callback prototype to close a custom bitstream input media.
|
||||
\param opaque private pointer as set by the @ref libvlc_media_open_cb
|
||||
callback
|
||||
'''
|
||||
VideoLockCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ListPOINTER(ctypes.c_void_p))
|
||||
VideoLockCb.__doc__ = '''Callback prototype to allocate and lock a picture buffer.
|
||||
Whenever a new video frame needs to be decoded, the lock callback is
|
||||
@ -1110,7 +970,7 @@ the number of bytes per pixel multiplied by the pixel width.
|
||||
Similarly, the number of scanlines must be bigger than of equal to
|
||||
the pixel height.
|
||||
Furthermore, we recommend that pitches and lines be multiple of 32
|
||||
to not break assumptions that might be held by optimized code
|
||||
to not break assumption that might be made by various optimizations
|
||||
in the video decoders, video filters and/or video converters.
|
||||
'''
|
||||
VideoCleanupCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p)
|
||||
@ -1760,19 +1620,6 @@ class Instance(_Ctype):
|
||||
return libvlc_media_new_fd(self, fd)
|
||||
|
||||
|
||||
def media_new_callbacks(self, open_cb, read_cb, seek_cb, close_cb, opaque):
|
||||
'''Create a media with custom callbacks to read the data from.
|
||||
@param open_cb: callback to open the custom bitstream input media.
|
||||
@param read_cb: callback to read data (must not be None).
|
||||
@param seek_cb: callback to seek, or None if seeking is not supported.
|
||||
@param close_cb: callback to close the media, or None if unnecessary.
|
||||
@param opaque: data pointer for the open callback.
|
||||
@return: the newly created media or None on error @note If open_cb is None, the opaque pointer will be passed to read_cb, seek_cb and close_cb, and the stream size will be treated as unknown. @note The callbacks may be called asynchronously (from another thread). A single stream instance need not be reentrant. However the open_cb needs to be reentrant if the media is used by multiple player instances. @warning The callbacks may be used until all or any player instances that were supplied the media item are stopped. See L{media_release}.
|
||||
@version: LibVLC 3.0.0 and later.
|
||||
'''
|
||||
return libvlc_media_new_callbacks(self, open_cb, read_cb, seek_cb, close_cb, opaque)
|
||||
|
||||
|
||||
def media_new_as_node(self, psz_name):
|
||||
'''Create a media as an empty node with a given name.
|
||||
See L{media_release}.
|
||||
@ -1782,22 +1629,12 @@ class Instance(_Ctype):
|
||||
return libvlc_media_new_as_node(self, str_to_bytes(psz_name))
|
||||
|
||||
|
||||
def media_discoverer_new(self, psz_name):
|
||||
'''Create a media discoverer object by name.
|
||||
After this object is created, you should attach to events in order to be
|
||||
notified of the discoverer state.
|
||||
You should also attach to media_list events in order to be notified of new
|
||||
items discovered.
|
||||
You need to call L{media_discoverer_start}() in order to start the
|
||||
discovery.
|
||||
See L{media_discoverer_media_list}
|
||||
See L{media_discoverer_event_manager}
|
||||
See L{media_discoverer_start}.
|
||||
def media_discoverer_new_from_name(self, psz_name):
|
||||
'''Discover media service by name.
|
||||
@param psz_name: service name.
|
||||
@return: media discover object or None in case of error.
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
return libvlc_media_discoverer_new(self, str_to_bytes(psz_name))
|
||||
return libvlc_media_discoverer_new_from_name(self, str_to_bytes(psz_name))
|
||||
|
||||
|
||||
def media_library_new(self):
|
||||
@ -1809,7 +1646,7 @@ class Instance(_Ctype):
|
||||
|
||||
def audio_output_list_get(self):
|
||||
'''Gets the list of available audio output modules.
|
||||
@return: list of available audio outputs. It must be freed with In case of error, None is returned.
|
||||
@return: list of available audio outputs. It must be freed it with In case of error, None is returned.
|
||||
'''
|
||||
return libvlc_audio_output_list_get(self)
|
||||
|
||||
@ -1825,7 +1662,7 @@ class Instance(_Ctype):
|
||||
some circumstances. By default, it is recommended to not specify any
|
||||
explicit audio device.
|
||||
@param psz_aout: audio output name (as returned by L{audio_output_list_get}()).
|
||||
@return: A None-terminated linked list of potential audio output devices. It must be freed with L{audio_output_device_list_release}().
|
||||
@return: A None-terminated linked list of potential audio output devices. It must be freed it with L{audio_output_device_list_release}().
|
||||
@version: LibVLC 2.1.0 or later.
|
||||
'''
|
||||
return libvlc_audio_output_device_list_get(self, str_to_bytes(aout))
|
||||
@ -2255,7 +2092,7 @@ class Media(_Ctype):
|
||||
|
||||
def parse(self):
|
||||
'''Parse a media.
|
||||
This fetches (local) art, meta data and tracks information.
|
||||
This fetches (local) meta data and tracks information.
|
||||
The method is synchronous.
|
||||
See L{parse_async}
|
||||
See L{get_meta}
|
||||
@ -2266,7 +2103,7 @@ class Media(_Ctype):
|
||||
|
||||
def parse_async(self):
|
||||
'''Parse a media.
|
||||
This fetches (local) art, meta data and tracks information.
|
||||
This fetches (local) meta data and tracks information.
|
||||
The method is the asynchronous of L{parse}().
|
||||
To track when this is over you can listen to libvlc_MediaParsedChanged
|
||||
event. However if the media was already parsed you will not receive this
|
||||
@ -2279,27 +2116,6 @@ class Media(_Ctype):
|
||||
return libvlc_media_parse_async(self)
|
||||
|
||||
|
||||
def parse_with_options(self, parse_flag):
|
||||
'''Parse the media asynchronously with options.
|
||||
This fetches (local or network) art, meta data and/or tracks information.
|
||||
This method is the extended version of L{parse_async}().
|
||||
To track when this is over you can listen to libvlc_MediaParsedChanged
|
||||
event. However if this functions returns an error, you will not receive this
|
||||
event.
|
||||
It uses a flag to specify parse options (see libvlc_media_parse_flag_t). All
|
||||
these flags can be combined. By default, media is parsed if it's a local
|
||||
file.
|
||||
See libvlc_MediaParsedChanged
|
||||
See L{get_meta}
|
||||
See L{tracks_get}
|
||||
See libvlc_media_parse_flag_t.
|
||||
@param parse_flag: parse options:
|
||||
@return: -1 in case of error, 0 otherwise.
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
return libvlc_media_parse_with_options(self, parse_flag)
|
||||
|
||||
|
||||
def is_parsed(self):
|
||||
'''Get Parsed status for media descriptor object.
|
||||
See libvlc_MediaParsedChanged.
|
||||
@ -2325,14 +2141,6 @@ class Media(_Ctype):
|
||||
return libvlc_media_get_user_data(self)
|
||||
|
||||
|
||||
def get_type(self):
|
||||
'''Get the media type of the media descriptor object.
|
||||
@return: media type.
|
||||
@version: LibVLC 3.0.0 and later. See libvlc_media_type_t.
|
||||
'''
|
||||
return libvlc_media_get_type(self)
|
||||
|
||||
|
||||
def player_new_from_media(self):
|
||||
'''Create a Media Player object from a Media.
|
||||
@return: a new media player object, or None on error.
|
||||
@ -2348,25 +2156,6 @@ class MediaDiscoverer(_Ctype):
|
||||
'''
|
||||
return _Constructor(cls, ptr)
|
||||
|
||||
def start(self):
|
||||
'''Start media discovery.
|
||||
To stop it, call L{stop}() or
|
||||
L{release}() directly.
|
||||
See L{stop}.
|
||||
@return: -1 in case of error, 0 otherwise.
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
return libvlc_media_discoverer_start(self)
|
||||
|
||||
|
||||
def stop(self):
|
||||
'''Stop media discovery.
|
||||
See L{start}.
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
return libvlc_media_discoverer_stop(self)
|
||||
|
||||
|
||||
def release(self):
|
||||
'''Release media discover object. If the reference count reaches 0, then
|
||||
the object will be released.
|
||||
@ -2647,13 +2436,6 @@ class MediaListPlayer(_Ctype):
|
||||
return libvlc_media_list_player_set_media_player(self, p_mi)
|
||||
|
||||
|
||||
def get_media_player(self):
|
||||
'''Get media player of the media_list_player instance.
|
||||
@return: media player instance @note the caller is responsible for releasing the returned instance.
|
||||
'''
|
||||
return libvlc_media_list_player_get_media_player(self)
|
||||
|
||||
|
||||
def set_media_list(self, p_mlist):
|
||||
'''Set the media list associated with the player.
|
||||
@param p_mlist: list of media.
|
||||
@ -3008,7 +2790,7 @@ class MediaPlayer(_Ctype):
|
||||
Use the vout called "macosx".
|
||||
The drawable is an NSObject that follow the VLCOpenGLVideoViewEmbedding
|
||||
protocol:
|
||||
@code.m
|
||||
@begincode
|
||||
\@protocol VLCOpenGLVideoViewEmbedding <NSObject>
|
||||
- (void)addVoutSubview:(NSView *)view;
|
||||
- (void)removeVoutSubview:(NSView *)view;
|
||||
@ -3017,7 +2799,7 @@ class MediaPlayer(_Ctype):
|
||||
Or it can be an NSView object.
|
||||
If you want to use it along with Qt4 see the QMacCocoaViewContainer. Then
|
||||
the following code should work:
|
||||
@code.mm
|
||||
@begincode
|
||||
|
||||
NSView *video = [[NSView alloc] init];
|
||||
QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent);
|
||||
@ -3039,36 +2821,29 @@ class MediaPlayer(_Ctype):
|
||||
|
||||
|
||||
def set_agl(self, drawable):
|
||||
'''\deprecated Use L{set_nsobject} instead.
|
||||
'''Set the agl handler where the media player should render its video output.
|
||||
@param drawable: the agl handler.
|
||||
'''
|
||||
return libvlc_media_player_set_agl(self, drawable)
|
||||
|
||||
|
||||
def get_agl(self):
|
||||
'''\deprecated Use L{get_nsobject} instead.
|
||||
'''Get the agl handler previously set with L{set_agl}().
|
||||
@return: the agl handler or 0 if none where set.
|
||||
'''
|
||||
return libvlc_media_player_get_agl(self)
|
||||
|
||||
|
||||
def set_xwindow(self, drawable):
|
||||
'''Set an X Window System drawable where the media player should render its
|
||||
video output. The call takes effect when the playback starts. If it is
|
||||
already started, it might need to be stopped before changes apply.
|
||||
If LibVLC was built without X11 output support, then this function has no
|
||||
effects.
|
||||
By default, LibVLC will capture input events on the video rendering area.
|
||||
Use L{video_set_mouse_input}() and L{video_set_key_input}() to
|
||||
disable that and deliver events to the parent window / to the application
|
||||
instead. By design, the X11 protocol delivers input events to only one
|
||||
recipient.
|
||||
@warning
|
||||
The application must call the XInitThreads() function from Xlib before
|
||||
L{new}(), and before any call to XOpenDisplay() directly or via any
|
||||
other library. Failure to call XInitThreads() will seriously impede LibVLC
|
||||
performance. Calling XOpenDisplay() before XInitThreads() will eventually
|
||||
crash the process. That is a limitation of Xlib.
|
||||
@param drawable: X11 window ID @note The specified identifier must correspond to an existing Input/Output class X11 window. Pixmaps are B{not} currently supported. The default X11 server is assumed, i.e. that specified in the DISPLAY environment variable. @warning LibVLC can deal with invalid X11 handle errors, however some display drivers (EGL, GLX, VA and/or VDPAU) can unfortunately not. Thus the window handle must remain valid until playback is stopped, otherwise the process may abort or crash.
|
||||
@bug No more than one window handle per media player instance can be specified. If the media has multiple simultaneously active video tracks, extra tracks will be rendered into external windows beyond the control of the application.
|
||||
video output. If LibVLC was built without X11 output support, then this has
|
||||
no effects.
|
||||
The specified identifier must correspond to an existing Input/Output class
|
||||
X11 window. Pixmaps are B{not} supported. The caller shall ensure that
|
||||
the X11 server is the same as the one the VLC instance has been configured
|
||||
with. This function must be called before video playback is started;
|
||||
otherwise it will only take effect after playback stop and restart.
|
||||
@param drawable: the ID of the X window.
|
||||
'''
|
||||
return libvlc_media_player_set_xwindow(self, drawable)
|
||||
|
||||
@ -3092,15 +2867,6 @@ class MediaPlayer(_Ctype):
|
||||
return libvlc_media_player_get_hwnd(self)
|
||||
|
||||
|
||||
def set_android_context(self, p_jvm, p_awindow_handler):
|
||||
'''Set the android context.
|
||||
@param p_jvm: the Java VM of the android process.
|
||||
@param awindow_handler: org.videolan.libvlc.IAWindowNativeHandler jobject implemented by the org.videolan.libvlc.MediaPlayer class from the libvlc-android project.
|
||||
@version: LibVLC 3.0.0 and later.
|
||||
'''
|
||||
return libvlc_media_player_set_android_context(self, p_jvm, p_awindow_handler)
|
||||
|
||||
|
||||
def audio_set_callbacks(self, play, pause, resume, flush, drain, opaque):
|
||||
'''Set callbacks and private data for decoded audio.
|
||||
Use L{audio_set_format}() or L{audio_set_format_callbacks}()
|
||||
@ -3668,7 +3434,7 @@ class MediaPlayer(_Ctype):
|
||||
@warning: Some audio output devices in the list might not actually work in
|
||||
some circumstances. By default, it is recommended to not specify any
|
||||
explicit audio device.
|
||||
@return: A None-terminated linked list of potential audio output devices. It must be freed with L{audio_output_device_list_release}().
|
||||
@return: A None-terminated linked list of potential audio output devices. It must be freed it with L{audio_output_device_list_release}().
|
||||
@version: LibVLC 2.2.0 or later.
|
||||
'''
|
||||
return libvlc_audio_output_device_enum(self)
|
||||
@ -3702,24 +3468,6 @@ class MediaPlayer(_Ctype):
|
||||
return libvlc_audio_output_device_set(self, str_to_bytes(module), str_to_bytes(device_id))
|
||||
|
||||
|
||||
def audio_output_device_get(self):
|
||||
'''Get the current audio output device identifier.
|
||||
This complements L{audio_output_device_set}().
|
||||
@warning: The initial value for the current audio output device identifier
|
||||
may not be set or may be some unknown value. A LibVLC application should
|
||||
compare this value against the known device identifiers (e.g. those that
|
||||
were previously retrieved by a call to L{audio_output_device_enum} or
|
||||
L{audio_output_device_list_get}) to find the current audio output device.
|
||||
It is possible that the selected audio output device changes (an external
|
||||
change) without a call to L{audio_output_device_set}. That may make this
|
||||
method unsuitable to use if a LibVLC application is attempting to track
|
||||
dynamic audio device changes as they happen.
|
||||
@return: the current audio output device identifier None if no device is selected or in case of error (the result must be released with free() or L{free}()).
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
return libvlc_audio_output_device_get(self)
|
||||
|
||||
|
||||
def audio_toggle_mute(self):
|
||||
'''Toggle mute status.
|
||||
'''
|
||||
@ -3872,27 +3620,6 @@ def libvlc_new(argc, argv):
|
||||
'''Create and initialize a libvlc instance.
|
||||
This functions accept a list of "command line" arguments similar to the
|
||||
main(). These arguments affect the LibVLC instance default configuration.
|
||||
@note
|
||||
LibVLC may create threads. Therefore, any thread-unsafe process
|
||||
initialization must be performed before calling L{libvlc_new}(). In particular
|
||||
and where applicable:
|
||||
- setlocale() and textdomain(),
|
||||
- setenv(), unsetenv() and putenv(),
|
||||
- with the X11 display system, XInitThreads()
|
||||
(see also L{libvlc_media_player_set_xwindow}()) and
|
||||
- on Microsoft Windows, SetErrorMode().
|
||||
- sigprocmask() shall never be invoked; pthread_sigmask() can be used.
|
||||
On POSIX systems, the SIGCHLD signal must B{not} be ignored, i.e. the
|
||||
signal handler must set to SIG_DFL or a function pointer, not SIG_IGN.
|
||||
Also while LibVLC is active, the wait() function shall not be called, and
|
||||
any call to waitpid() shall use a strictly positive value for the first
|
||||
parameter (i.e. the PID). Failure to follow those rules may lead to a
|
||||
deadlock or a busy loop.
|
||||
Also on POSIX systems, it is recommended that the SIGPIPE signal be blocked,
|
||||
even if it is not, in principles, necessary.
|
||||
On Microsoft Windows Vista/2008, the process error mode
|
||||
SEM_FAILCRITICALERRORS flag B{must} with the SetErrorMode() function
|
||||
before using LibVLC. On later versions, it is optional and unnecessary.
|
||||
@param argc: the number of arguments (should be 0).
|
||||
@param argv: list of arguments (should be None).
|
||||
@return: the libvlc instance or None in case of error.
|
||||
@ -4202,22 +3929,6 @@ def libvlc_media_new_fd(p_instance, fd):
|
||||
ctypes.c_void_p, Instance, ctypes.c_int)
|
||||
return f(p_instance, fd)
|
||||
|
||||
def libvlc_media_new_callbacks(instance, open_cb, read_cb, seek_cb, close_cb, opaque):
|
||||
'''Create a media with custom callbacks to read the data from.
|
||||
@param instance: LibVLC instance.
|
||||
@param open_cb: callback to open the custom bitstream input media.
|
||||
@param read_cb: callback to read data (must not be None).
|
||||
@param seek_cb: callback to seek, or None if seeking is not supported.
|
||||
@param close_cb: callback to close the media, or None if unnecessary.
|
||||
@param opaque: data pointer for the open callback.
|
||||
@return: the newly created media or None on error @note If open_cb is None, the opaque pointer will be passed to read_cb, seek_cb and close_cb, and the stream size will be treated as unknown. @note The callbacks may be called asynchronously (from another thread). A single stream instance need not be reentrant. However the open_cb needs to be reentrant if the media is used by multiple player instances. @warning The callbacks may be used until all or any player instances that were supplied the media item are stopped. See L{libvlc_media_release}.
|
||||
@version: LibVLC 3.0.0 and later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_new_callbacks', None) or \
|
||||
_Cfunction('libvlc_media_new_callbacks', ((1,), (1,), (1,), (1,), (1,), (1,),), class_result(Media),
|
||||
ctypes.c_void_p, Instance, MediaOpenCb, MediaReadCb, MediaSeekCb, MediaCloseCb, ctypes.c_void_p)
|
||||
return f(instance, open_cb, read_cb, seek_cb, close_cb, opaque)
|
||||
|
||||
def libvlc_media_new_as_node(p_instance, psz_name):
|
||||
'''Create a media as an empty node with a given name.
|
||||
See L{libvlc_media_release}.
|
||||
@ -4413,7 +4124,7 @@ def libvlc_media_get_duration(p_md):
|
||||
|
||||
def libvlc_media_parse(p_md):
|
||||
'''Parse a media.
|
||||
This fetches (local) art, meta data and tracks information.
|
||||
This fetches (local) meta data and tracks information.
|
||||
The method is synchronous.
|
||||
See L{libvlc_media_parse_async}
|
||||
See L{libvlc_media_get_meta}
|
||||
@ -4427,7 +4138,7 @@ def libvlc_media_parse(p_md):
|
||||
|
||||
def libvlc_media_parse_async(p_md):
|
||||
'''Parse a media.
|
||||
This fetches (local) art, meta data and tracks information.
|
||||
This fetches (local) meta data and tracks information.
|
||||
The method is the asynchronous of L{libvlc_media_parse}().
|
||||
To track when this is over you can listen to libvlc_MediaParsedChanged
|
||||
event. However if the media was already parsed you will not receive this
|
||||
@ -4443,30 +4154,6 @@ def libvlc_media_parse_async(p_md):
|
||||
None, Media)
|
||||
return f(p_md)
|
||||
|
||||
def libvlc_media_parse_with_options(p_md, parse_flag):
|
||||
'''Parse the media asynchronously with options.
|
||||
This fetches (local or network) art, meta data and/or tracks information.
|
||||
This method is the extended version of L{libvlc_media_parse_async}().
|
||||
To track when this is over you can listen to libvlc_MediaParsedChanged
|
||||
event. However if this functions returns an error, you will not receive this
|
||||
event.
|
||||
It uses a flag to specify parse options (see libvlc_media_parse_flag_t). All
|
||||
these flags can be combined. By default, media is parsed if it's a local
|
||||
file.
|
||||
See libvlc_MediaParsedChanged
|
||||
See L{libvlc_media_get_meta}
|
||||
See L{libvlc_media_tracks_get}
|
||||
See libvlc_media_parse_flag_t.
|
||||
@param p_md: media descriptor object.
|
||||
@param parse_flag: parse options:
|
||||
@return: -1 in case of error, 0 otherwise.
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_parse_with_options', None) or \
|
||||
_Cfunction('libvlc_media_parse_with_options', ((1,), (1,),), None,
|
||||
ctypes.c_int, Media, MediaParseFlag)
|
||||
return f(p_md, parse_flag)
|
||||
|
||||
def libvlc_media_is_parsed(p_md):
|
||||
'''Get Parsed status for media descriptor object.
|
||||
See libvlc_MediaParsedChanged.
|
||||
@ -4516,18 +4203,6 @@ def libvlc_media_tracks_get(p_md, tracks):
|
||||
ctypes.c_uint, Media, ctypes.POINTER(ctypes.POINTER(MediaTrack)))
|
||||
return f(p_md, tracks)
|
||||
|
||||
def libvlc_media_get_codec_description(i_type, i_codec):
|
||||
'''Get codec description from media elementary stream.
|
||||
@param i_type: i_type from L{MediaTrack}.
|
||||
@param i_codec: i_codec or i_original_fourcc from L{MediaTrack}.
|
||||
@return: codec description.
|
||||
@version: LibVLC 3.0.0 and later. See L{MediaTrack}.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_get_codec_description', None) or \
|
||||
_Cfunction('libvlc_media_get_codec_description', ((1,), (1,),), None,
|
||||
ctypes.c_char_p, TrackType, ctypes.c_uint32)
|
||||
return f(i_type, i_codec)
|
||||
|
||||
def libvlc_media_tracks_release(p_tracks, i_count):
|
||||
'''Release media descriptor's elementary streams description array.
|
||||
@param p_tracks: tracks info array to release.
|
||||
@ -4539,63 +4214,17 @@ def libvlc_media_tracks_release(p_tracks, i_count):
|
||||
None, ctypes.POINTER(MediaTrack), ctypes.c_uint)
|
||||
return f(p_tracks, i_count)
|
||||
|
||||
def libvlc_media_get_type(p_md):
|
||||
'''Get the media type of the media descriptor object.
|
||||
@param p_md: media descriptor object.
|
||||
@return: media type.
|
||||
@version: LibVLC 3.0.0 and later. See libvlc_media_type_t.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_get_type', None) or \
|
||||
_Cfunction('libvlc_media_get_type', ((1,),), None,
|
||||
MediaType, Media)
|
||||
return f(p_md)
|
||||
|
||||
def libvlc_media_discoverer_new(p_inst, psz_name):
|
||||
'''Create a media discoverer object by name.
|
||||
After this object is created, you should attach to events in order to be
|
||||
notified of the discoverer state.
|
||||
You should also attach to media_list events in order to be notified of new
|
||||
items discovered.
|
||||
You need to call L{libvlc_media_discoverer_start}() in order to start the
|
||||
discovery.
|
||||
See L{libvlc_media_discoverer_media_list}
|
||||
See L{libvlc_media_discoverer_event_manager}
|
||||
See L{libvlc_media_discoverer_start}.
|
||||
def libvlc_media_discoverer_new_from_name(p_inst, psz_name):
|
||||
'''Discover media service by name.
|
||||
@param p_inst: libvlc instance.
|
||||
@param psz_name: service name.
|
||||
@return: media discover object or None in case of error.
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_discoverer_new', None) or \
|
||||
_Cfunction('libvlc_media_discoverer_new', ((1,), (1,),), class_result(MediaDiscoverer),
|
||||
f = _Cfunctions.get('libvlc_media_discoverer_new_from_name', None) or \
|
||||
_Cfunction('libvlc_media_discoverer_new_from_name', ((1,), (1,),), class_result(MediaDiscoverer),
|
||||
ctypes.c_void_p, Instance, ctypes.c_char_p)
|
||||
return f(p_inst, psz_name)
|
||||
|
||||
def libvlc_media_discoverer_start(p_mdis):
|
||||
'''Start media discovery.
|
||||
To stop it, call L{libvlc_media_discoverer_stop}() or
|
||||
L{libvlc_media_discoverer_release}() directly.
|
||||
See L{libvlc_media_discoverer_stop}.
|
||||
@param p_mdis: media discover object.
|
||||
@return: -1 in case of error, 0 otherwise.
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_discoverer_start', None) or \
|
||||
_Cfunction('libvlc_media_discoverer_start', ((1,),), None,
|
||||
ctypes.c_int, MediaDiscoverer)
|
||||
return f(p_mdis)
|
||||
|
||||
def libvlc_media_discoverer_stop(p_mdis):
|
||||
'''Stop media discovery.
|
||||
See L{libvlc_media_discoverer_start}.
|
||||
@param p_mdis: media discover object.
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_discoverer_stop', None) or \
|
||||
_Cfunction('libvlc_media_discoverer_stop', ((1,),), None,
|
||||
None, MediaDiscoverer)
|
||||
return f(p_mdis)
|
||||
|
||||
def libvlc_media_discoverer_release(p_mdis):
|
||||
'''Release media discover object. If the reference count reaches 0, then
|
||||
the object will be released.
|
||||
@ -4916,16 +4545,6 @@ def libvlc_media_list_player_set_media_player(p_mlp, p_mi):
|
||||
None, MediaListPlayer, MediaPlayer)
|
||||
return f(p_mlp, p_mi)
|
||||
|
||||
def libvlc_media_list_player_get_media_player(p_mlp):
|
||||
'''Get media player of the media_list_player instance.
|
||||
@param p_mlp: media list player instance.
|
||||
@return: media player instance @note the caller is responsible for releasing the returned instance.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_list_player_get_media_player', None) or \
|
||||
_Cfunction('libvlc_media_list_player_get_media_player', ((1,),), class_result(MediaPlayer),
|
||||
ctypes.c_void_p, MediaListPlayer)
|
||||
return f(p_mlp)
|
||||
|
||||
def libvlc_media_list_player_set_media_list(p_mlp, p_mlist):
|
||||
'''Set the media list associated with the player.
|
||||
@param p_mlp: media list player instance.
|
||||
@ -5210,7 +4829,7 @@ def libvlc_media_player_set_nsobject(p_mi, drawable):
|
||||
Use the vout called "macosx".
|
||||
The drawable is an NSObject that follow the VLCOpenGLVideoViewEmbedding
|
||||
protocol:
|
||||
@code.m
|
||||
@begincode
|
||||
\@protocol VLCOpenGLVideoViewEmbedding <NSObject>
|
||||
- (void)addVoutSubview:(NSView *)view;
|
||||
- (void)removeVoutSubview:(NSView *)view;
|
||||
@ -5219,7 +4838,7 @@ def libvlc_media_player_set_nsobject(p_mi, drawable):
|
||||
Or it can be an NSView object.
|
||||
If you want to use it along with Qt4 see the QMacCocoaViewContainer. Then
|
||||
the following code should work:
|
||||
@code.mm
|
||||
@begincode
|
||||
|
||||
NSView *video = [[NSView alloc] init];
|
||||
QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent);
|
||||
@ -5247,7 +4866,9 @@ def libvlc_media_player_get_nsobject(p_mi):
|
||||
return f(p_mi)
|
||||
|
||||
def libvlc_media_player_set_agl(p_mi, drawable):
|
||||
'''\deprecated Use L{libvlc_media_player_set_nsobject} instead.
|
||||
'''Set the agl handler where the media player should render its video output.
|
||||
@param p_mi: the Media Player.
|
||||
@param drawable: the agl handler.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_player_set_agl', None) or \
|
||||
_Cfunction('libvlc_media_player_set_agl', ((1,), (1,),), None,
|
||||
@ -5255,7 +4876,9 @@ def libvlc_media_player_set_agl(p_mi, drawable):
|
||||
return f(p_mi, drawable)
|
||||
|
||||
def libvlc_media_player_get_agl(p_mi):
|
||||
'''\deprecated Use L{libvlc_media_player_get_nsobject} instead.
|
||||
'''Get the agl handler previously set with L{libvlc_media_player_set_agl}().
|
||||
@param p_mi: the Media Player.
|
||||
@return: the agl handler or 0 if none where set.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_player_get_agl', None) or \
|
||||
_Cfunction('libvlc_media_player_get_agl', ((1,),), None,
|
||||
@ -5264,24 +4887,15 @@ def libvlc_media_player_get_agl(p_mi):
|
||||
|
||||
def libvlc_media_player_set_xwindow(p_mi, drawable):
|
||||
'''Set an X Window System drawable where the media player should render its
|
||||
video output. The call takes effect when the playback starts. If it is
|
||||
already started, it might need to be stopped before changes apply.
|
||||
If LibVLC was built without X11 output support, then this function has no
|
||||
effects.
|
||||
By default, LibVLC will capture input events on the video rendering area.
|
||||
Use L{libvlc_video_set_mouse_input}() and L{libvlc_video_set_key_input}() to
|
||||
disable that and deliver events to the parent window / to the application
|
||||
instead. By design, the X11 protocol delivers input events to only one
|
||||
recipient.
|
||||
@warning
|
||||
The application must call the XInitThreads() function from Xlib before
|
||||
L{libvlc_new}(), and before any call to XOpenDisplay() directly or via any
|
||||
other library. Failure to call XInitThreads() will seriously impede LibVLC
|
||||
performance. Calling XOpenDisplay() before XInitThreads() will eventually
|
||||
crash the process. That is a limitation of Xlib.
|
||||
@param p_mi: media player.
|
||||
@param drawable: X11 window ID @note The specified identifier must correspond to an existing Input/Output class X11 window. Pixmaps are B{not} currently supported. The default X11 server is assumed, i.e. that specified in the DISPLAY environment variable. @warning LibVLC can deal with invalid X11 handle errors, however some display drivers (EGL, GLX, VA and/or VDPAU) can unfortunately not. Thus the window handle must remain valid until playback is stopped, otherwise the process may abort or crash.
|
||||
@bug No more than one window handle per media player instance can be specified. If the media has multiple simultaneously active video tracks, extra tracks will be rendered into external windows beyond the control of the application.
|
||||
video output. If LibVLC was built without X11 output support, then this has
|
||||
no effects.
|
||||
The specified identifier must correspond to an existing Input/Output class
|
||||
X11 window. Pixmaps are B{not} supported. The caller shall ensure that
|
||||
the X11 server is the same as the one the VLC instance has been configured
|
||||
with. This function must be called before video playback is started;
|
||||
otherwise it will only take effect after playback stop and restart.
|
||||
@param p_mi: the Media Player.
|
||||
@param drawable: the ID of the X window.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_player_set_xwindow', None) or \
|
||||
_Cfunction('libvlc_media_player_set_xwindow', ((1,), (1,),), None,
|
||||
@ -5325,18 +4939,6 @@ def libvlc_media_player_get_hwnd(p_mi):
|
||||
ctypes.c_void_p, MediaPlayer)
|
||||
return f(p_mi)
|
||||
|
||||
def libvlc_media_player_set_android_context(p_mi, p_jvm, p_awindow_handler):
|
||||
'''Set the android context.
|
||||
@param p_mi: the media player.
|
||||
@param p_jvm: the Java VM of the android process.
|
||||
@param awindow_handler: org.videolan.libvlc.IAWindowNativeHandler jobject implemented by the org.videolan.libvlc.MediaPlayer class from the libvlc-android project.
|
||||
@version: LibVLC 3.0.0 and later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_player_set_android_context', None) or \
|
||||
_Cfunction('libvlc_media_player_set_android_context', ((1,), (1,), (1,),), None,
|
||||
None, MediaPlayer, ctypes.c_void_p, ctypes.c_void_p)
|
||||
return f(p_mi, p_jvm, p_awindow_handler)
|
||||
|
||||
def libvlc_audio_set_callbacks(mp, play, pause, resume, flush, drain, opaque):
|
||||
'''Set callbacks and private data for decoded audio.
|
||||
Use L{libvlc_audio_set_format}() or L{libvlc_audio_set_format_callbacks}()
|
||||
@ -5842,7 +5444,7 @@ def libvlc_video_get_spu_count(p_mi):
|
||||
def libvlc_video_get_spu_description(p_mi):
|
||||
'''Get the description of available video subtitles.
|
||||
@param p_mi: the media player.
|
||||
@return: list containing description of available video subtitles. It must be freed with L{libvlc_track_description_list_release}().
|
||||
@return: list containing description of available video subtitles.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_video_get_spu_description', None) or \
|
||||
_Cfunction('libvlc_video_get_spu_description', ((1,),), None,
|
||||
@ -5898,52 +5500,26 @@ def libvlc_video_set_spu_delay(p_mi, i_delay):
|
||||
ctypes.c_int, MediaPlayer, ctypes.c_int64)
|
||||
return f(p_mi, i_delay)
|
||||
|
||||
def libvlc_media_player_get_full_title_descriptions(p_mi, titles):
|
||||
'''Get the full description of available titles.
|
||||
def libvlc_video_get_title_description(p_mi):
|
||||
'''Get the description of available titles.
|
||||
@param p_mi: the media player.
|
||||
@param address: to store an allocated array of title descriptions descriptions (must be freed with L{libvlc_title_descriptions_release}() by the caller) [OUT].
|
||||
@return: the number of titles (-1 on error).
|
||||
@version: LibVLC 3.0.0 and later.
|
||||
@return: list containing description of available titles.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_player_get_full_title_descriptions', None) or \
|
||||
_Cfunction('libvlc_media_player_get_full_title_descriptions', ((1,), (1,),), None,
|
||||
ctypes.c_int, MediaPlayer, ctypes.POINTER(ctypes.POINTER(TitleDescription)))
|
||||
return f(p_mi, titles)
|
||||
f = _Cfunctions.get('libvlc_video_get_title_description', None) or \
|
||||
_Cfunction('libvlc_video_get_title_description', ((1,),), None,
|
||||
ctypes.POINTER(TrackDescription), MediaPlayer)
|
||||
return f(p_mi)
|
||||
|
||||
def libvlc_title_descriptions_release(p_titles, i_count):
|
||||
'''Release a title description.
|
||||
@param title: description array to release.
|
||||
@param number: of title descriptions to release.
|
||||
@version: LibVLC 3.0.0 and later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_title_descriptions_release', None) or \
|
||||
_Cfunction('libvlc_title_descriptions_release', ((1,), (1,),), None,
|
||||
None, ctypes.POINTER(TitleDescription), ctypes.c_uint)
|
||||
return f(p_titles, i_count)
|
||||
|
||||
def libvlc_media_player_get_full_chapter_descriptions(p_mi, i_chapters_of_title, pp_chapters):
|
||||
'''Get the full description of available chapters.
|
||||
def libvlc_video_get_chapter_description(p_mi, i_title):
|
||||
'''Get the description of available chapters for specific title.
|
||||
@param p_mi: the media player.
|
||||
@param index: of the title to query for chapters (uses current title if set to -1).
|
||||
@param address: to store an allocated array of chapter descriptions descriptions (must be freed with L{libvlc_chapter_descriptions_release}() by the caller) [OUT].
|
||||
@return: the number of chapters (-1 on error).
|
||||
@version: LibVLC 3.0.0 and later.
|
||||
@param i_title: selected title.
|
||||
@return: list containing description of available chapter for title i_title.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_media_player_get_full_chapter_descriptions', None) or \
|
||||
_Cfunction('libvlc_media_player_get_full_chapter_descriptions', ((1,), (1,), (1,),), None,
|
||||
ctypes.c_int, MediaPlayer, ctypes.c_int, ctypes.POINTER(ctypes.POINTER(ChapterDescription)))
|
||||
return f(p_mi, i_chapters_of_title, pp_chapters)
|
||||
|
||||
def libvlc_chapter_descriptions_release(p_chapters, i_count):
|
||||
'''Release a chapter description.
|
||||
@param chapter: description array to release.
|
||||
@param number: of chapter descriptions to release.
|
||||
@version: LibVLC 3.0.0 and later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_chapter_descriptions_release', None) or \
|
||||
_Cfunction('libvlc_chapter_descriptions_release', ((1,), (1,),), None,
|
||||
None, ctypes.POINTER(ChapterDescription), ctypes.c_uint)
|
||||
return f(p_chapters, i_count)
|
||||
f = _Cfunctions.get('libvlc_video_get_chapter_description', None) or \
|
||||
_Cfunction('libvlc_video_get_chapter_description', ((1,), (1,),), None,
|
||||
ctypes.POINTER(TrackDescription), MediaPlayer, ctypes.c_int)
|
||||
return f(p_mi, i_title)
|
||||
|
||||
def libvlc_video_get_crop_geometry(p_mi):
|
||||
'''Get current crop filter geometry.
|
||||
@ -6007,7 +5583,7 @@ def libvlc_video_get_track_count(p_mi):
|
||||
def libvlc_video_get_track_description(p_mi):
|
||||
'''Get the description of available video tracks.
|
||||
@param p_mi: media player.
|
||||
@return: list with description of available video tracks, or None on error. It must be freed with L{libvlc_track_description_list_release}().
|
||||
@return: list with description of available video tracks, or None on error.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_video_get_track_description', None) or \
|
||||
_Cfunction('libvlc_video_get_track_description', ((1,),), None,
|
||||
@ -6194,7 +5770,7 @@ def libvlc_video_set_adjust_float(p_mi, option, value):
|
||||
def libvlc_audio_output_list_get(p_instance):
|
||||
'''Gets the list of available audio output modules.
|
||||
@param p_instance: libvlc instance.
|
||||
@return: list of available audio outputs. It must be freed with In case of error, None is returned.
|
||||
@return: list of available audio outputs. It must be freed it with In case of error, None is returned.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_audio_output_list_get', None) or \
|
||||
_Cfunction('libvlc_audio_output_list_get', ((1,),), None,
|
||||
@ -6233,7 +5809,7 @@ def libvlc_audio_output_device_enum(mp):
|
||||
some circumstances. By default, it is recommended to not specify any
|
||||
explicit audio device.
|
||||
@param mp: media player.
|
||||
@return: A None-terminated linked list of potential audio output devices. It must be freed with L{libvlc_audio_output_device_list_release}().
|
||||
@return: A None-terminated linked list of potential audio output devices. It must be freed it with L{libvlc_audio_output_device_list_release}().
|
||||
@version: LibVLC 2.2.0 or later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_audio_output_device_enum', None) or \
|
||||
@ -6253,7 +5829,7 @@ def libvlc_audio_output_device_list_get(p_instance, aout):
|
||||
explicit audio device.
|
||||
@param p_instance: libvlc instance.
|
||||
@param psz_aout: audio output name (as returned by L{libvlc_audio_output_list_get}()).
|
||||
@return: A None-terminated linked list of potential audio output devices. It must be freed with L{libvlc_audio_output_device_list_release}().
|
||||
@return: A None-terminated linked list of potential audio output devices. It must be freed it with L{libvlc_audio_output_device_list_release}().
|
||||
@version: LibVLC 2.1.0 or later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_audio_output_device_list_get', None) or \
|
||||
@ -6302,27 +5878,6 @@ def libvlc_audio_output_device_set(mp, module, device_id):
|
||||
None, MediaPlayer, ctypes.c_char_p, ctypes.c_char_p)
|
||||
return f(mp, module, device_id)
|
||||
|
||||
def libvlc_audio_output_device_get(mp):
|
||||
'''Get the current audio output device identifier.
|
||||
This complements L{libvlc_audio_output_device_set}().
|
||||
@warning: The initial value for the current audio output device identifier
|
||||
may not be set or may be some unknown value. A LibVLC application should
|
||||
compare this value against the known device identifiers (e.g. those that
|
||||
were previously retrieved by a call to L{libvlc_audio_output_device_enum} or
|
||||
L{libvlc_audio_output_device_list_get}) to find the current audio output device.
|
||||
It is possible that the selected audio output device changes (an external
|
||||
change) without a call to L{libvlc_audio_output_device_set}. That may make this
|
||||
method unsuitable to use if a LibVLC application is attempting to track
|
||||
dynamic audio device changes as they happen.
|
||||
@param mp: media player.
|
||||
@return: the current audio output device identifier None if no device is selected or in case of error (the result must be released with free() or L{libvlc_free}()).
|
||||
@version: LibVLC 3.0.0 or later.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_audio_output_device_get', None) or \
|
||||
_Cfunction('libvlc_audio_output_device_get', ((1,),), None,
|
||||
ctypes.c_char_p, MediaPlayer)
|
||||
return f(mp)
|
||||
|
||||
def libvlc_audio_toggle_mute(p_mi):
|
||||
'''Toggle mute status.
|
||||
@param p_mi: media player @warning Toggling mute atomically is not always possible: On some platforms, other processes can mute the VLC audio playback stream asynchronously. Thus, there is a small race condition where toggling will not work. See also the limitations of L{libvlc_audio_set_mute}().
|
||||
@ -6386,7 +5941,7 @@ def libvlc_audio_get_track_count(p_mi):
|
||||
def libvlc_audio_get_track_description(p_mi):
|
||||
'''Get the description of available audio tracks.
|
||||
@param p_mi: media player.
|
||||
@return: list with description of available audio tracks, or None. It must be freed with L{libvlc_track_description_list_release}().
|
||||
@return: list with description of available audio tracks, or None.
|
||||
'''
|
||||
f = _Cfunctions.get('libvlc_audio_get_track_description', None) or \
|
||||
_Cfunction('libvlc_audio_get_track_description', ((1,),), None,
|
||||
@ -6939,7 +6494,7 @@ def libvlc_vlm_get_event_manager(p_instance):
|
||||
# libvlc_printerr
|
||||
# libvlc_set_exit_handler
|
||||
|
||||
# 31 function(s) not wrapped as methods:
|
||||
# 28 function(s) not wrapped as methods:
|
||||
# libvlc_audio_equalizer_get_amp_at_index
|
||||
# libvlc_audio_equalizer_get_band_count
|
||||
# libvlc_audio_equalizer_get_band_frequency
|
||||
@ -6953,7 +6508,6 @@ def libvlc_vlm_get_event_manager(p_instance):
|
||||
# libvlc_audio_equalizer_set_preamp
|
||||
# libvlc_audio_output_device_list_release
|
||||
# libvlc_audio_output_list_release
|
||||
# libvlc_chapter_descriptions_release
|
||||
# libvlc_clearerr
|
||||
# libvlc_clock
|
||||
# libvlc_errmsg
|
||||
@ -6964,11 +6518,9 @@ def libvlc_vlm_get_event_manager(p_instance):
|
||||
# libvlc_get_version
|
||||
# libvlc_log_get_context
|
||||
# libvlc_log_get_object
|
||||
# libvlc_media_get_codec_description
|
||||
# libvlc_media_tracks_release
|
||||
# libvlc_module_description_list_release
|
||||
# libvlc_new
|
||||
# libvlc_title_descriptions_release
|
||||
# libvlc_track_description_list_release
|
||||
# libvlc_vprinterr
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user