From 18893b390376dfc12bd14e23638dd7c16a0d3b3d Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sat, 26 Dec 2015 22:34:29 +0100 Subject: [PATCH] Feature: updated vlc.py --- openlp/core/ui/media/vendor/vlc.py | 476 ++++++++++++++--------------- 1 file changed, 238 insertions(+), 238 deletions(-) diff --git a/openlp/core/ui/media/vendor/vlc.py b/openlp/core/ui/media/vendor/vlc.py index 4065825ee..c571c7f35 100644 --- a/openlp/core/ui/media/vendor/vlc.py +++ b/openlp/core/ui/media/vendor/vlc.py @@ -49,7 +49,7 @@ import functools from inspect import getargspec __version__ = "N/A" -build_date = "Wed Sep 30 15:51:48 2015" +build_date = "Thu Nov 5 23:41:43 2015" # The libvlc doc states that filenames are expected to be in UTF8, do # not rely on sys.getfilesystemencoding() which will be confused, @@ -1005,7 +1005,7 @@ class CallbackDecorators(object): Callback = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p) Callback.__doc__ = '''Callback function notification \param p_event the event triggering the callback - ''' + ''' 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}() @@ -1016,7 +1016,7 @@ class CallbackDecorators(object): \note Log message handlers must be thread-safe. \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 @@ -1030,7 +1030,7 @@ in the @ref libvlc_media_close_cb callback. \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 @@ -1043,19 +1043,19 @@ discarded. \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 @@ -1067,7 +1067,7 @@ planes must be aligned on 32-bytes boundaries. of void pointers, this callback must initialize the array) [OUT] \return a private pointer for the display and unlock callbacks to identify the picture buffers - ''' + ''' VideoUnlockCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ListPOINTER(ctypes.c_void_p)) VideoUnlockCb.__doc__ = '''Callback prototype to unlock a picture buffer. When the video frame decoding is complete, the unlock callback is invoked. @@ -1080,7 +1080,7 @@ but before the picture is displayed. callback [IN] \param planes pixel planes as defined by the @ref libvlc_video_lock_cb callback (this parameter is only for convenience) [IN] - ''' + ''' VideoDisplayCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p) VideoDisplayCb.__doc__ = '''Callback prototype to display a picture. When the video frame needs to be shown, as determined by the media playback @@ -1088,7 +1088,7 @@ clock, the display callback is invoked. \param opaque private pointer as passed to L{libvlc_video_set_callbacks}() [IN] \param picture private pointer returned from the @ref libvlc_video_lock_cb callback [IN] - ''' + ''' VideoFormatCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_uint), ListPOINTER(ctypes.c_void_p), ctypes.c_char_p, ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint)) VideoFormatCb.__doc__ = '''Callback prototype to configure picture buffers format. This callback gets the format of the video as output by the video decoder @@ -1112,47 +1112,47 @@ 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 in the video decoders, video filters and/or video converters. - ''' + ''' VideoCleanupCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p) VideoCleanupCb.__doc__ = '''Callback prototype to configure picture buffers format. \param opaque private pointer as passed to L{libvlc_video_set_callbacks}() (and possibly modified by @ref libvlc_video_format_cb) [IN] - ''' + ''' AudioPlayCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_int64) AudioPlayCb.__doc__ = '''Callback prototype for audio playback. \param data data pointer as passed to L{libvlc_audio_set_callbacks}() [IN] \param samples pointer to the first audio sample to play back [IN] \param count number of audio samples to play back \param pts expected play time stamp (see libvlc_delay()) - ''' + ''' AudioPauseCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int64) AudioPauseCb.__doc__ = '''Callback prototype for audio pause. \note The pause callback is never called if the audio is already paused. \param data data pointer as passed to L{libvlc_audio_set_callbacks}() [IN] \param pts time stamp of the pause request (should be elapsed already) - ''' + ''' AudioResumeCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int64) AudioResumeCb.__doc__ = '''Callback prototype for audio resumption (i.e. restart from pause). \note The resume callback is never called if the audio is not paused. \param data data pointer as passed to L{libvlc_audio_set_callbacks}() [IN] \param pts time stamp of the resumption request (should be elapsed already) - ''' + ''' AudioFlushCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_int64) AudioFlushCb.__doc__ = '''Callback prototype for audio buffer flush (i.e. discard all pending buffers and stop playback as soon as possible). \param data data pointer as passed to L{libvlc_audio_set_callbacks}() [IN] - ''' + ''' AudioDrainCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p) AudioDrainCb.__doc__ = '''Callback prototype for audio buffer drain (i.e. wait for pending buffers to be played). \param data data pointer as passed to L{libvlc_audio_set_callbacks}() [IN] - ''' + ''' AudioSetVolumeCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p, ctypes.c_float, ctypes.c_bool) AudioSetVolumeCb.__doc__ = '''Callback prototype for audio volume change. \param data data pointer as passed to L{libvlc_audio_set_callbacks}() [IN] \param volume software volume (1. = nominal, 0. = mute) \param mute muted flag - ''' + ''' AudioSetupCb = ctypes.CFUNCTYPE(ctypes.POINTER(ctypes.c_int), ListPOINTER(ctypes.c_void_p), ctypes.c_char_p, ctypes.POINTER(ctypes.c_uint), ctypes.POINTER(ctypes.c_uint)) AudioSetupCb.__doc__ = '''Callback prototype to setup the audio playback. This is called when the media player needs to create a new audio output. @@ -1162,12 +1162,12 @@ This is called when the media player needs to create a new audio output. \param rate sample rate [IN/OUT] \param channels channels count [IN/OUT] \return 0 on success, anything else to skip audio playback - ''' + ''' AudioCleanupCb = ctypes.CFUNCTYPE(ctypes.c_void_p, ctypes.c_void_p) AudioCleanupCb.__doc__ = '''Callback prototype for audio playback cleanup. This is called when the media player no longer needs an audio output. \param opaque data pointer as passed to L{libvlc_audio_set_callbacks}() [IN] - ''' + ''' cb = CallbackDecorators # End of generated enum types # @@ -1448,7 +1448,7 @@ class EventManager(_Ctype): @note: Only a single notification can be registered for each event type in an EventManager instance. - + ''' _callback_handler = None @@ -1525,7 +1525,7 @@ class Instance(_Ctype): - a string - a list of strings as first parameters - the parameters given as the constructor parameters (must be strings) - + ''' def __new__(cls, *args): @@ -1643,21 +1643,21 @@ class Instance(_Ctype): return module_description_list(libvlc_video_filter_list_get(self)) - + def release(self): '''Decrement the reference count of a libvlc instance, and destroy it if it reaches zero. ''' return libvlc_release(self) - + def retain(self): '''Increments the reference count of a libvlc instance. The initial reference count is 1 after L{new}() returns. ''' return libvlc_retain(self) - + def add_intf(self, name): '''Try to start a user interface for the libvlc instance. @param name: interface name, or None for default. @@ -1665,7 +1665,7 @@ class Instance(_Ctype): ''' return libvlc_add_intf(self, str_to_bytes(name)) - + def set_user_agent(self, name, http): '''Sets the application name. LibVLC passes this as the user agent string when a protocol requires it. @@ -1675,7 +1675,7 @@ class Instance(_Ctype): ''' return libvlc_set_user_agent(self, str_to_bytes(name), str_to_bytes(http)) - + def set_app_id(self, id, version, icon): '''Sets some meta-information about the application. See also L{set_user_agent}(). @@ -1686,7 +1686,7 @@ class Instance(_Ctype): ''' return libvlc_set_app_id(self, str_to_bytes(id), str_to_bytes(version), str_to_bytes(icon)) - + def log_unset(self): '''Unsets the logging callback for a LibVLC instance. This is rarely needed: the callback is implicitly unset when the instance is destroyed. @@ -1696,7 +1696,7 @@ class Instance(_Ctype): ''' return libvlc_log_unset(self) - + def log_set(self, data, p_instance): '''Sets the logging callback for a LibVLC instance. This function is thread-safe: it will wait for any pending callbacks @@ -1707,7 +1707,7 @@ class Instance(_Ctype): ''' return libvlc_log_set(self, data, p_instance) - + def log_set_file(self, stream): '''Sets up logging to a file. @param stream: FILE pointer opened for writing (the FILE pointer must remain valid until L{log_unset}()). @@ -1715,7 +1715,7 @@ class Instance(_Ctype): ''' return libvlc_log_set_file(self, stream) - + def media_new_location(self, psz_mrl): '''Create a media with a certain given media resource location, for instance a valid URL. @@ -1729,7 +1729,7 @@ class Instance(_Ctype): ''' return libvlc_media_new_location(self, str_to_bytes(psz_mrl)) - + def media_new_path(self, path): '''Create a media for a certain file path. See L{media_release}. @@ -1738,7 +1738,7 @@ class Instance(_Ctype): ''' return libvlc_media_new_path(self, str_to_bytes(path)) - + def media_new_fd(self, fd): '''Create a media for an already open file descriptor. The file descriptor shall be open for reading (or reading and writing). @@ -1759,7 +1759,7 @@ 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. @@ -1772,7 +1772,7 @@ class Instance(_Ctype): ''' 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}. @@ -1781,7 +1781,7 @@ 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 @@ -1799,21 +1799,21 @@ class Instance(_Ctype): ''' return libvlc_media_discoverer_new(self, str_to_bytes(psz_name)) - + def media_library_new(self): '''Create an new Media Library object. @return: a new object or None on error. ''' return libvlc_media_library_new(self) - + 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 libvlc_audio_output_list_get(self) - + def audio_output_device_list_get(self, aout): '''Gets a list of audio output devices for a given audio output module, See L{audio_output_device_set}(). @@ -1830,13 +1830,13 @@ class Instance(_Ctype): ''' return libvlc_audio_output_device_list_get(self, str_to_bytes(aout)) - + def vlm_release(self): '''Release the vlm instance related to the given L{Instance}. ''' return libvlc_vlm_release(self) - + def vlm_add_broadcast(self, psz_name, psz_input, psz_output, i_options, ppsz_options, b_enabled, b_loop): '''Add a broadcast, with one input. @param psz_name: the name of the new broadcast. @@ -1850,7 +1850,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_add_broadcast(self, str_to_bytes(psz_name), str_to_bytes(psz_input), str_to_bytes(psz_output), i_options, ppsz_options, b_enabled, b_loop) - + def vlm_add_vod(self, psz_name, psz_input, i_options, ppsz_options, b_enabled, psz_mux): '''Add a vod, with one input. @param psz_name: the name of the new vod media. @@ -1863,7 +1863,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_add_vod(self, str_to_bytes(psz_name), str_to_bytes(psz_input), i_options, ppsz_options, b_enabled, str_to_bytes(psz_mux)) - + def vlm_del_media(self, psz_name): '''Delete a media (VOD or broadcast). @param psz_name: the media to delete. @@ -1871,7 +1871,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_del_media(self, str_to_bytes(psz_name)) - + def vlm_set_enabled(self, psz_name, b_enabled): '''Enable or disable a media (VOD or broadcast). @param psz_name: the media to work on. @@ -1880,7 +1880,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_set_enabled(self, str_to_bytes(psz_name), b_enabled) - + def vlm_set_output(self, psz_name, psz_output): '''Set the output for a media. @param psz_name: the media to work on. @@ -1889,7 +1889,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_set_output(self, str_to_bytes(psz_name), str_to_bytes(psz_output)) - + def vlm_set_input(self, psz_name, psz_input): '''Set a media's input MRL. This will delete all existing inputs and add the specified one. @@ -1899,7 +1899,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_set_input(self, str_to_bytes(psz_name), str_to_bytes(psz_input)) - + def vlm_add_input(self, psz_name, psz_input): '''Add a media's input MRL. This will add the specified one. @param psz_name: the media to work on. @@ -1908,7 +1908,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_add_input(self, str_to_bytes(psz_name), str_to_bytes(psz_input)) - + def vlm_set_loop(self, psz_name, b_loop): '''Set a media's loop status. @param psz_name: the media to work on. @@ -1917,7 +1917,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_set_loop(self, str_to_bytes(psz_name), b_loop) - + def vlm_set_mux(self, psz_name, psz_mux): '''Set a media's vod muxer. @param psz_name: the media to work on. @@ -1926,7 +1926,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_set_mux(self, str_to_bytes(psz_name), str_to_bytes(psz_mux)) - + def vlm_change_media(self, psz_name, psz_input, psz_output, i_options, ppsz_options, b_enabled, b_loop): '''Edit the parameters of a media. This will delete all existing inputs and add the specified one. @@ -1941,7 +1941,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_change_media(self, str_to_bytes(psz_name), str_to_bytes(psz_input), str_to_bytes(psz_output), i_options, ppsz_options, b_enabled, b_loop) - + def vlm_play_media(self, psz_name): '''Play the named broadcast. @param psz_name: the name of the broadcast. @@ -1949,7 +1949,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_play_media(self, str_to_bytes(psz_name)) - + def vlm_stop_media(self, psz_name): '''Stop the named broadcast. @param psz_name: the name of the broadcast. @@ -1957,7 +1957,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_stop_media(self, str_to_bytes(psz_name)) - + def vlm_pause_media(self, psz_name): '''Pause the named broadcast. @param psz_name: the name of the broadcast. @@ -1965,7 +1965,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_pause_media(self, str_to_bytes(psz_name)) - + def vlm_seek_media(self, psz_name, f_percentage): '''Seek in the named broadcast. @param psz_name: the name of the broadcast. @@ -1974,7 +1974,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_seek_media(self, str_to_bytes(psz_name), f_percentage) - + def vlm_show_media(self, psz_name): '''Return information about the named media as a JSON string representation. @@ -1989,7 +1989,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_show_media(self, str_to_bytes(psz_name)) - + def vlm_get_media_instance_position(self, psz_name, i_instance): '''Get vlm_media instance position by name or instance id. @param psz_name: name of vlm media instance. @@ -1998,7 +1998,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_get_media_instance_position(self, str_to_bytes(psz_name), i_instance) - + def vlm_get_media_instance_time(self, psz_name, i_instance): '''Get vlm_media instance time by name or instance id. @param psz_name: name of vlm media instance. @@ -2007,7 +2007,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_get_media_instance_time(self, str_to_bytes(psz_name), i_instance) - + def vlm_get_media_instance_length(self, psz_name, i_instance): '''Get vlm_media instance length by name or instance id. @param psz_name: name of vlm media instance. @@ -2016,7 +2016,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_get_media_instance_length(self, str_to_bytes(psz_name), i_instance) - + def vlm_get_media_instance_rate(self, psz_name, i_instance): '''Get vlm_media instance playback rate by name or instance id. @param psz_name: name of vlm media instance. @@ -2025,7 +2025,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_get_media_instance_rate(self, str_to_bytes(psz_name), i_instance) - + def vlm_get_media_instance_title(self, psz_name, i_instance): '''Get vlm_media instance title number by name or instance id. @param psz_name: name of vlm media instance. @@ -2035,7 +2035,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_get_media_instance_title(self, str_to_bytes(psz_name), i_instance) - + def vlm_get_media_instance_chapter(self, psz_name, i_instance): '''Get vlm_media instance chapter number by name or instance id. @param psz_name: name of vlm media instance. @@ -2045,7 +2045,7 @@ class Instance(_Ctype): ''' return libvlc_vlm_get_media_instance_chapter(self, str_to_bytes(psz_name), i_instance) - + def vlm_get_media_instance_seekable(self, psz_name, i_instance): '''Is libvlc instance seekable ? @param psz_name: name of vlm media instance. @@ -2065,11 +2065,11 @@ class Instance(_Ctype): class Media(_Ctype): '''Create a new Media instance. - + Usage: Media(MRL, *options) See vlc.Instance.media_new documentation for details. - + ''' def __new__(cls, *args): @@ -2113,7 +2113,7 @@ class Media(_Ctype): return info - + def add_option(self, psz_options): '''Add an option to the media. This option will be used to determine how the media_player will @@ -2130,7 +2130,7 @@ class Media(_Ctype): ''' return libvlc_media_add_option(self, str_to_bytes(psz_options)) - + def add_option_flag(self, psz_options, i_flags): '''Add an option to the media with configurable flags. This option will be used to determine how the media_player will @@ -2146,7 +2146,7 @@ class Media(_Ctype): ''' return libvlc_media_add_option_flag(self, str_to_bytes(psz_options), i_flags) - + def retain(self): '''Retain a reference to a media descriptor object (libvlc_media_t). Use L{release}() to decrement the reference count of a @@ -2154,7 +2154,7 @@ class Media(_Ctype): ''' return libvlc_media_retain(self) - + def release(self): '''Decrement the reference count of a media descriptor object. If the reference count is 0, then L{release}() will release the @@ -2164,20 +2164,20 @@ class Media(_Ctype): ''' return libvlc_media_release(self) - + def get_mrl(self): '''Get the media resource locator (mrl) from a media descriptor object. @return: string with mrl of media descriptor object. ''' return libvlc_media_get_mrl(self) - + def duplicate(self): '''Duplicate a media descriptor object. ''' return libvlc_media_duplicate(self) - + def get_meta(self, e_meta): '''Read the meta of the media. If the media has not yet been parsed this will return None. @@ -2192,7 +2192,7 @@ class Media(_Ctype): ''' return libvlc_media_get_meta(self, e_meta) - + def set_meta(self, e_meta, psz_value): '''Set the meta of the media (this function will not save the meta, call L{save_meta} in order to save the meta). @@ -2201,14 +2201,14 @@ class Media(_Ctype): ''' return libvlc_media_set_meta(self, e_meta, str_to_bytes(psz_value)) - + def save_meta(self): '''Save the meta previously set. @return: true if the write operation was successful. ''' return libvlc_media_save_meta(self) - + def get_state(self): '''Get current state of media descriptor object. Possible media states are defined in libvlc_structures.c ( libvlc_NothingSpecial=0, @@ -2220,7 +2220,7 @@ class Media(_Ctype): ''' return libvlc_media_get_state(self) - + def get_stats(self, p_stats): '''Get the current statistics about the media. @param p_stats:: structure that contain the statistics about the media (this structure must be allocated by the caller). @@ -2228,7 +2228,7 @@ class Media(_Ctype): ''' return libvlc_media_get_stats(self, p_stats) - + def subitems(self): '''Get subitems of media descriptor object. This will increment the reference count of supplied media descriptor object. Use @@ -2245,14 +2245,14 @@ class Media(_Ctype): ''' return libvlc_media_event_manager(self) - + def get_duration(self): '''Get duration (in ms) of media descriptor object item. @return: duration of media item or -1 on error. ''' return libvlc_media_get_duration(self) - + def parse(self): '''Parse a media. This fetches (local) art, meta data and tracks information. @@ -2263,7 +2263,7 @@ class Media(_Ctype): ''' return libvlc_media_parse(self) - + def parse_async(self): '''Parse a media. This fetches (local) art, meta data and tracks information. @@ -2278,7 +2278,7 @@ 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. @@ -2299,7 +2299,7 @@ class Media(_Ctype): ''' return libvlc_media_parse_with_options(self, parse_flag) - + def is_parsed(self): '''Get Parsed status for media descriptor object. See libvlc_MediaParsedChanged. @@ -2307,7 +2307,7 @@ class Media(_Ctype): ''' return libvlc_media_is_parsed(self) - + def set_user_data(self, p_new_user_data): '''Sets media descriptor's user_data. user_data is specialized data accessed by the host application, VLC.framework uses it as a pointer to @@ -2316,7 +2316,7 @@ class Media(_Ctype): ''' return libvlc_media_set_user_data(self, p_new_user_data) - + def get_user_data(self): '''Get media descriptor's user_data. user_data is specialized data accessed by the host application, VLC.framework uses it as a pointer to @@ -2324,7 +2324,7 @@ 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. @@ -2332,7 +2332,7 @@ class Media(_Ctype): ''' 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. @@ -2347,7 +2347,7 @@ class MediaDiscoverer(_Ctype): '''(INTERNAL) ctypes wrapper constructor. ''' return _Constructor(cls, ptr) - + def start(self): '''Start media discovery. To stop it, call L{stop}() or @@ -2358,7 +2358,7 @@ class MediaDiscoverer(_Ctype): ''' return libvlc_media_discoverer_start(self) - + def stop(self): '''Stop media discovery. See L{start}. @@ -2366,21 +2366,21 @@ class MediaDiscoverer(_Ctype): ''' 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. ''' return libvlc_media_discoverer_release(self) - + def localized_name(self): '''Get media service discover object its localized name. @return: localized name. ''' return libvlc_media_discoverer_localized_name(self) - + def media_list(self): '''Get media service discover media list. @return: list of media items. @@ -2394,7 +2394,7 @@ class MediaDiscoverer(_Ctype): ''' return libvlc_media_discoverer_event_manager(self) - + def is_running(self): '''Query if media service discover object is running. @return: true if running, false if not \libvlc_return_bool. @@ -2409,7 +2409,7 @@ class MediaLibrary(_Ctype): '''(INTERNAL) ctypes wrapper constructor. ''' return _Constructor(cls, ptr) - + def release(self): '''Release media library object. This functions decrements the reference count of the media library object. If it reaches 0, @@ -2417,7 +2417,7 @@ class MediaLibrary(_Ctype): ''' return libvlc_media_library_release(self) - + def retain(self): '''Retain a reference to a media library object. This function will increment the reference counting for this object. Use @@ -2425,14 +2425,14 @@ class MediaLibrary(_Ctype): ''' return libvlc_media_library_retain(self) - + def load(self): '''Load media library. @return: 0 on success, -1 on error. ''' return libvlc_media_library_load(self) - + def media_list(self): '''Get media library subitems. @return: media list subitems. @@ -2441,11 +2441,11 @@ class MediaLibrary(_Ctype): class MediaList(_Ctype): '''Create a new MediaList instance. - + Usage: MediaList(list_of_MRLs) See vlc.Instance.media_list_new documentation for details. - + ''' def __new__(cls, *args): @@ -2461,10 +2461,10 @@ class MediaList(_Ctype): def get_instance(self): return getattr(self, '_instance', None) - + def add_media(self, mrl): """Add media instance to media list. - + The L{lock} should be held upon entering this function. @param mrl: a media instance or a MRL. @return: 0 on success, -1 if the media list is read-only. @@ -2474,19 +2474,19 @@ class MediaList(_Ctype): return libvlc_media_list_add_media(self, mrl) - + def release(self): '''Release media list created with L{new}(). ''' return libvlc_media_list_release(self) - + def retain(self): '''Retain reference to a media list. ''' return libvlc_media_list_retain(self) - + def set_media(self, p_md): '''Associate media instance with this media list instance. If another media instance was present it will be released. @@ -2495,7 +2495,7 @@ class MediaList(_Ctype): ''' return libvlc_media_list_set_media(self, p_md) - + def media(self): '''Get media instance from this media list instance. This action will increase the refcount on the media instance. @@ -2504,7 +2504,7 @@ class MediaList(_Ctype): ''' return libvlc_media_list_media(self) - + def insert_media(self, p_md, i_pos): '''Insert media instance in media list on a position The L{lock} should be held upon entering this function. @@ -2514,7 +2514,7 @@ class MediaList(_Ctype): ''' return libvlc_media_list_insert_media(self, p_md, i_pos) - + def remove_index(self, i_pos): '''Remove media instance from media list on a position The L{lock} should be held upon entering this function. @@ -2523,7 +2523,7 @@ class MediaList(_Ctype): ''' return libvlc_media_list_remove_index(self, i_pos) - + def count(self): '''Get count on media list items The L{lock} should be held upon entering this function. @@ -2534,7 +2534,7 @@ class MediaList(_Ctype): def __len__(self): return libvlc_media_list_count(self) - + def item_at_index(self, i_pos): '''List media instance in media list at a position The L{lock} should be held upon entering this function. @@ -2550,7 +2550,7 @@ class MediaList(_Ctype): for i in range(len(self)): yield self[i] - + def index_of_item(self, p_md): '''Find index position of List media instance in media list. Warning: the function will return the first matched position. @@ -2560,20 +2560,20 @@ class MediaList(_Ctype): ''' return libvlc_media_list_index_of_item(self, p_md) - + def is_readonly(self): '''This indicates if this media list is read-only from a user point of view. @return: 1 on readonly, 0 on readwrite \libvlc_return_bool. ''' return libvlc_media_list_is_readonly(self) - + def lock(self): '''Get lock on media list items. ''' return libvlc_media_list_lock(self) - + def unlock(self): '''Release lock on media list items The L{lock} should be held upon entering this function. @@ -2594,7 +2594,7 @@ class MediaListPlayer(_Ctype): It may take as parameter either: - a vlc.Instance - nothing - + ''' def __new__(cls, arg=None): @@ -2615,7 +2615,7 @@ class MediaListPlayer(_Ctype): return self._instance #PYCHOK expected - + def release(self): '''Release a media_list_player after use Decrement the reference count of a media player object. If the @@ -2625,7 +2625,7 @@ class MediaListPlayer(_Ctype): ''' return libvlc_media_list_player_release(self) - + def retain(self): '''Retain a reference to a media player list object. Use L{release}() to decrement reference count. @@ -2639,54 +2639,54 @@ class MediaListPlayer(_Ctype): ''' return libvlc_media_list_player_event_manager(self) - + def set_media_player(self, p_mi): '''Replace media player in media_list_player with this instance. @param p_mi: media player instance. ''' 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. ''' return libvlc_media_list_player_set_media_list(self, p_mlist) - + def play(self): '''Play media list. ''' return libvlc_media_list_player_play(self) - + def pause(self): '''Toggle pause (or resume) media list. ''' return libvlc_media_list_player_pause(self) - + def is_playing(self): '''Is media list playing? @return: true for playing and false for not playing \libvlc_return_bool. ''' return libvlc_media_list_player_is_playing(self) - + def get_state(self): '''Get current libvlc_state of media list player. @return: libvlc_state_t for media list player. ''' return libvlc_media_list_player_get_state(self) - + def play_item_at_index(self, i_index): '''Play media list item at position index. @param i_index: index in media list to play. @@ -2701,7 +2701,7 @@ class MediaListPlayer(_Ctype): for i in range(len(self)): yield self[i] - + def play_item(self, p_md): '''Play the given media item. @param p_md: the media instance. @@ -2709,27 +2709,27 @@ class MediaListPlayer(_Ctype): ''' return libvlc_media_list_player_play_item(self, p_md) - + def stop(self): '''Stop playing media list. ''' return libvlc_media_list_player_stop(self) - + def next(self): '''Play next item from media list. @return: 0 upon success -1 if there is no next item. ''' return libvlc_media_list_player_next(self) - + def previous(self): '''Play previous item from media list. @return: 0 upon success -1 if there is no previous item. ''' return libvlc_media_list_player_previous(self) - + def set_playback_mode(self, e_mode): '''Sets the playback mode for the playlist. @param e_mode: playback mode specification. @@ -2742,13 +2742,13 @@ class MediaPlayer(_Ctype): It may take as parameter either: - a string (media URI), options... In this case, a vlc.Instance will be created. - a vlc.Instance, a string (media URI), options... - + ''' def __new__(cls, *args): if len(args) == 1 and isinstance(args[0], _Ints): return _Constructor(cls, args[0]) - + if args and isinstance(args[0], Instance): instance = args[0] args = args[1:] @@ -2845,13 +2845,13 @@ class MediaPlayer(_Ctype): Specify where the media player should render its video output. If LibVLC was built without Win32/Win64 API output support, then this has no effects. - + @param drawable: windows handle of the drawable. """ if not isinstance(drawable, ctypes.c_void_p): drawable = ctypes.c_void_p(int(drawable)) libvlc_media_player_set_hwnd(self, drawable) - + def video_get_width(self, num=0): """Get the width of a video in pixels. @@ -2891,7 +2891,7 @@ class MediaPlayer(_Ctype): raise VLCException('invalid video number (%s)' % (num,)) - + def release(self): '''Release a media_player after use Decrement the reference count of a media player object. If the @@ -2901,14 +2901,14 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_release(self) - + def retain(self): '''Retain a reference to a media player object. Use L{release}() to decrement reference count. ''' return libvlc_media_player_retain(self) - + def set_media(self, p_md): '''Set the media that will be used by the media_player. If any, previous md will be released. @@ -2916,7 +2916,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_set_media(self, p_md) - + def get_media(self): '''Get the media used by the media_player. @return: the media associated with p_mi, or None if no media is associated. @@ -2930,21 +2930,21 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_event_manager(self) - + def is_playing(self): '''is_playing. @return: 1 if the media player is playing, 0 otherwise \libvlc_return_bool. ''' return libvlc_media_player_is_playing(self) - + def play(self): '''Play. @return: 0 if playback started (and was already started), or -1 on error. ''' return libvlc_media_player_play(self) - + def set_pause(self, do_pause): '''Pause or resume (no effect if there is no media). @param do_pause: play/resume if zero, pause if non-zero. @@ -2952,19 +2952,19 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_set_pause(self, do_pause) - + def pause(self): '''Toggle pause (no effect if there is no media). ''' return libvlc_media_player_pause(self) - + def stop(self): '''Stop (no effect if there is no media). ''' return libvlc_media_player_stop(self) - + def video_set_callbacks(self, lock, unlock, display, opaque): '''Set callbacks and private data to render decoded video to a custom area in memory. @@ -2978,7 +2978,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_callbacks(self, lock, unlock, display, opaque) - + def video_set_format(self, chroma, width, height, pitch): '''Set decoded video chroma and dimensions. This only works in combination with L{video_set_callbacks}(), @@ -2992,7 +2992,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_format(self, str_to_bytes(chroma), width, height, pitch) - + def video_set_format_callbacks(self, setup, cleanup): '''Set decoded video chroma and dimensions. This only works in combination with L{video_set_callbacks}(). @@ -3002,7 +3002,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_format_callbacks(self, setup, cleanup) - + def set_nsobject(self, drawable): '''Set the NSView handler where the media player should render its video output. Use the vout called "macosx". @@ -3018,38 +3018,38 @@ class MediaPlayer(_Ctype): If you want to use it along with Qt4 see the QMacCocoaViewContainer. Then the following code should work: @code.mm - + NSView *video = [[NSView alloc] init]; QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent); L{set_nsobject}(mp, video); [video release]; - + @endcode You can find a live example in VLCVideoView in VLCKit.framework. @param drawable: the drawable that is either an NSView or an object following the VLCOpenGLVideoViewEmbedding protocol. ''' return libvlc_media_player_set_nsobject(self, drawable) - + def get_nsobject(self): '''Get the NSView handler previously set with L{set_nsobject}(). @return: the NSView handler or 0 if none where set. ''' return libvlc_media_player_get_nsobject(self) - + def set_agl(self, drawable): '''\deprecated Use L{set_nsobject} instead. ''' return libvlc_media_player_set_agl(self, drawable) - + def get_agl(self): '''\deprecated Use L{get_nsobject} instead. ''' 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 @@ -3072,7 +3072,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_set_xwindow(self, drawable) - + def get_xwindow(self): '''Get the X Window System window identifier previously set with L{set_xwindow}(). Note that this will return the identifier @@ -3082,7 +3082,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_get_xwindow(self) - + def get_hwnd(self): '''Get the Windows API window handle (HWND) previously set with L{set_hwnd}(). The handle will be returned even if LibVLC @@ -3091,7 +3091,7 @@ 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. @@ -3100,7 +3100,7 @@ class MediaPlayer(_Ctype): ''' 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}() @@ -3115,7 +3115,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_set_callbacks(self, play, pause, resume, flush, drain, opaque) - + def audio_set_volume_callback(self, set_volume): '''Set callbacks and private data for decoded audio. This only works in combination with L{audio_set_callbacks}(). @@ -3126,7 +3126,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_set_volume_callback(self, set_volume) - + def audio_set_format_callbacks(self, setup, cleanup): '''Set decoded audio format. This only works in combination with L{audio_set_callbacks}(). @@ -3136,7 +3136,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_set_format_callbacks(self, setup, cleanup) - + def audio_set_format(self, format, rate, channels): '''Set decoded audio format. This only works in combination with L{audio_set_callbacks}(), @@ -3148,21 +3148,21 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_set_format(self, str_to_bytes(format), rate, channels) - + def get_length(self): '''Get the current movie length (in ms). @return: the movie length (in ms), or -1 if there is no media. ''' return libvlc_media_player_get_length(self) - + def get_time(self): '''Get the current movie time (in ms). @return: the movie time (in ms), or -1 if there is no media. ''' return libvlc_media_player_get_time(self) - + def set_time(self, i_time): '''Set the movie time (in ms). This has no effect if no media is being played. Not all formats and protocols support this. @@ -3170,14 +3170,14 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_set_time(self, i_time) - + def get_position(self): '''Get movie position as percentage between 0.0 and 1.0. @return: movie position, or -1. in case of error. ''' return libvlc_media_player_get_position(self) - + def set_position(self, f_pos): '''Set movie position as percentage between 0.0 and 1.0. This has no effect if playback is not enabled. @@ -3186,35 +3186,35 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_set_position(self, f_pos) - + def set_chapter(self, i_chapter): '''Set movie chapter (if applicable). @param i_chapter: chapter number to play. ''' return libvlc_media_player_set_chapter(self, i_chapter) - + def get_chapter(self): '''Get movie chapter. @return: chapter number currently playing, or -1 if there is no media. ''' return libvlc_media_player_get_chapter(self) - + def get_chapter_count(self): '''Get movie chapter count. @return: number of chapters in movie, or -1. ''' return libvlc_media_player_get_chapter_count(self) - + def will_play(self): '''Is the player able to play. @return: boolean \libvlc_return_bool. ''' return libvlc_media_player_will_play(self) - + def get_chapter_count_for_title(self, i_title): '''Get title chapter count. @param i_title: title. @@ -3222,40 +3222,40 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_get_chapter_count_for_title(self, i_title) - + def set_title(self, i_title): '''Set movie title. @param i_title: title number to play. ''' return libvlc_media_player_set_title(self, i_title) - + def get_title(self): '''Get movie title. @return: title number currently playing, or -1. ''' return libvlc_media_player_get_title(self) - + def get_title_count(self): '''Get movie title count. @return: title number count, or -1. ''' return libvlc_media_player_get_title_count(self) - + def previous_chapter(self): '''Set previous chapter (if applicable). ''' return libvlc_media_player_previous_chapter(self) - + def next_chapter(self): '''Set next chapter (if applicable). ''' return libvlc_media_player_next_chapter(self) - + def get_rate(self): '''Get the requested movie play rate. @warning: Depending on the underlying media, the requested rate may be @@ -3264,7 +3264,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_get_rate(self) - + def set_rate(self, rate): '''Set movie play rate. @param rate: movie play rate to set. @@ -3272,42 +3272,42 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_set_rate(self, rate) - + def get_state(self): '''Get current movie state. @return: the current state of the media player (playing, paused, ...) See libvlc_state_t. ''' return libvlc_media_player_get_state(self) - + def get_fps(self): '''Get movie fps rate. @return: frames per second (fps) for this playing movie, or 0 if unspecified. ''' return libvlc_media_player_get_fps(self) - + def has_vout(self): '''How many video outputs does this media player have? @return: the number of video outputs. ''' return libvlc_media_player_has_vout(self) - + def is_seekable(self): '''Is this media player seekable? @return: true if the media player can seek \libvlc_return_bool. ''' return libvlc_media_player_is_seekable(self) - + def can_pause(self): '''Can this media player be paused? @return: true if the media player can pause \libvlc_return_bool. ''' return libvlc_media_player_can_pause(self) - + def program_scrambled(self): '''Check if the current program is scrambled. @return: true if the current program is scrambled \libvlc_return_bool. @@ -3315,13 +3315,13 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_program_scrambled(self) - + def next_frame(self): '''Display the next frame (if supported). ''' return libvlc_media_player_next_frame(self) - + def navigate(self, navigate): '''Navigate through DVD Menu. @param navigate: the Navigation mode. @@ -3329,7 +3329,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_navigate(self, navigate) - + def set_video_title_display(self, position, timeout): '''Set if, and how, the video title will be shown when media is played. @param position: position at which to display the title, or libvlc_position_disable to prevent the title from being displayed. @@ -3338,7 +3338,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_media_player_set_video_title_display(self, position, timeout) - + def toggle_fullscreen(self): '''Toggle fullscreen status on non-embedded video outputs. @warning: The same limitations applies to this function @@ -3346,7 +3346,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_toggle_fullscreen(self) - + def set_fullscreen(self, b_fullscreen): '''Enable or disable fullscreen. @warning: With most window managers, only a top-level windows can be in @@ -3359,14 +3359,14 @@ class MediaPlayer(_Ctype): ''' return libvlc_set_fullscreen(self, b_fullscreen) - + def get_fullscreen(self): '''Get current fullscreen status. @return: the fullscreen status (boolean) \libvlc_return_bool. ''' return libvlc_get_fullscreen(self) - + def video_set_key_input(self, on): '''Enable or disable key press events handling, according to the LibVLC hotkeys configuration. By default and for historical reasons, keyboard events are @@ -3380,7 +3380,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_key_input(self, on) - + def video_set_mouse_input(self, on): '''Enable or disable mouse click events handling. By default, those events are handled. This is needed for DVD menus to work, as well as a few video @@ -3391,7 +3391,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_mouse_input(self, on) - + def video_get_scale(self): '''Get the current video scaling factor. See also L{video_set_scale}(). @@ -3399,7 +3399,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_get_scale(self) - + def video_set_scale(self, f_factor): '''Set the video scaling factor. That is the ratio of the number of pixels on screen to the number of pixels in the original decoded video in each @@ -3410,35 +3410,35 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_scale(self, f_factor) - + def video_get_aspect_ratio(self): '''Get current video aspect ratio. @return: the video aspect ratio or None if unspecified (the result must be released with free() or L{free}()). ''' return libvlc_video_get_aspect_ratio(self) - + def video_set_aspect_ratio(self, psz_aspect): '''Set new video aspect ratio. @param psz_aspect: new video aspect-ratio or None to reset to default @note Invalid aspect ratios are ignored. ''' return libvlc_video_set_aspect_ratio(self, str_to_bytes(psz_aspect)) - + def video_get_spu(self): '''Get current video subtitle. @return: the video subtitle selected, or -1 if none. ''' return libvlc_video_get_spu(self) - + def video_get_spu_count(self): '''Get the number of available video subtitles. @return: the number of available video subtitles. ''' return libvlc_video_get_spu_count(self) - + def video_set_spu(self, i_spu): '''Set new video subtitle. @param i_spu: video subtitle track to select (i_id from track description). @@ -3446,7 +3446,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_spu(self, i_spu) - + def video_set_subtitle_file(self, psz_subtitle): '''Set new video subtitle file. @param psz_subtitle: new video subtitle file. @@ -3454,7 +3454,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_subtitle_file(self, str_to_bytes(psz_subtitle)) - + def video_get_spu_delay(self): '''Get the current subtitle delay. Positive values means subtitles are being displayed later, negative values earlier. @@ -3463,7 +3463,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_get_spu_delay(self) - + def video_set_spu_delay(self, i_delay): '''Set the subtitle delay. This affects the timing of when the subtitle will be displayed. Positive values result in subtitles being displayed later, @@ -3475,55 +3475,55 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_spu_delay(self, i_delay) - + def video_get_crop_geometry(self): '''Get current crop filter geometry. @return: the crop filter geometry or None if unset. ''' return libvlc_video_get_crop_geometry(self) - + def video_set_crop_geometry(self, psz_geometry): '''Set new crop filter geometry. @param psz_geometry: new crop filter geometry (None to unset). ''' return libvlc_video_set_crop_geometry(self, str_to_bytes(psz_geometry)) - + def video_get_teletext(self): '''Get current teletext page requested. @return: the current teletext page requested. ''' return libvlc_video_get_teletext(self) - + def video_set_teletext(self, i_page): '''Set new teletext page to retrieve. @param i_page: teletex page number requested. ''' return libvlc_video_set_teletext(self, i_page) - + def toggle_teletext(self): '''Toggle teletext transparent status on video output. ''' return libvlc_toggle_teletext(self) - + def video_get_track_count(self): '''Get number of available video tracks. @return: the number of available video tracks (int). ''' return libvlc_video_get_track_count(self) - + def video_get_track(self): '''Get current video track. @return: the video track ID (int) or -1 if no active input. ''' return libvlc_video_get_track(self) - + def video_set_track(self, i_track): '''Set video track. @param i_track: the track ID (i_id field from track description). @@ -3531,7 +3531,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_track(self, i_track) - + def video_take_snapshot(self, num, psz_filepath, i_width, i_height): '''Take a snapshot of the current video window. If i_width AND i_height is 0, original size is used. @@ -3544,28 +3544,28 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_take_snapshot(self, num, str_to_bytes(psz_filepath), i_width, i_height) - + def video_set_deinterlace(self, psz_mode): '''Enable or disable deinterlace filter. @param psz_mode: type of deinterlace filter, None to disable. ''' return libvlc_video_set_deinterlace(self, str_to_bytes(psz_mode)) - + def video_get_marquee_int(self, option): '''Get an integer marquee option value. @param option: marq option to get See libvlc_video_marquee_int_option_t. ''' return libvlc_video_get_marquee_int(self, option) - + def video_get_marquee_string(self, option): '''Get a string marquee option value. @param option: marq option to get See libvlc_video_marquee_string_option_t. ''' return libvlc_video_get_marquee_string(self, option) - + def video_set_marquee_int(self, option, i_val): '''Enable, disable or set an integer marquee option Setting libvlc_marquee_Enable has the side effect of enabling (arg !0) @@ -3575,7 +3575,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_marquee_int(self, option, i_val) - + def video_set_marquee_string(self, option, psz_text): '''Set a marquee string option. @param option: marq option to set See libvlc_video_marquee_string_option_t. @@ -3583,14 +3583,14 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_marquee_string(self, option, str_to_bytes(psz_text)) - + def video_get_logo_int(self, option): '''Get integer logo option. @param option: logo option to get, values of libvlc_video_logo_option_t. ''' return libvlc_video_get_logo_int(self, option) - + def video_set_logo_int(self, option, value): '''Set logo option as integer. Options that take a different type value are ignored. @@ -3601,7 +3601,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_logo_int(self, option, value) - + def video_set_logo_string(self, option, psz_value): '''Set logo option as string. Options that take a different type value are ignored. @@ -3610,7 +3610,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_logo_string(self, option, str_to_bytes(psz_value)) - + def video_get_adjust_int(self, option): '''Get integer adjust option. @param option: adjust option to get, values of libvlc_video_adjust_option_t. @@ -3618,7 +3618,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_get_adjust_int(self, option) - + def video_set_adjust_int(self, option, value): '''Set adjust option as integer. Options that take a different type value are ignored. @@ -3630,7 +3630,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_adjust_int(self, option, value) - + def video_get_adjust_float(self, option): '''Get float adjust option. @param option: adjust option to get, values of libvlc_video_adjust_option_t. @@ -3638,7 +3638,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_get_adjust_float(self, option) - + def video_set_adjust_float(self, option, value): '''Set adjust option as float. Options that take a different type value are ignored. @@ -3648,7 +3648,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_video_set_adjust_float(self, option, value) - + def audio_output_set(self, psz_name): '''Selects an audio output module. @note: Any change will take be effect only after playback is stopped and @@ -3658,7 +3658,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_output_set(self, str_to_bytes(psz_name)) - + def audio_output_device_enum(self): '''Gets a list of potential audio output devices, See L{audio_output_device_set}(). @@ -3673,7 +3673,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_output_device_enum(self) - + def audio_output_device_set(self, module, device_id): '''Configures an explicit audio output device. If the module paramater is None, audio output will be moved to the device @@ -3701,7 +3701,7 @@ 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}(). @@ -3719,34 +3719,34 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_output_device_get(self) - + def audio_toggle_mute(self): '''Toggle mute status. ''' return libvlc_audio_toggle_mute(self) - + def audio_get_mute(self): '''Get current mute status. @return: the mute status (boolean) if defined, -1 if undefined/unapplicable. ''' return libvlc_audio_get_mute(self) - + def audio_set_mute(self, status): '''Set mute status. @param status: If status is true then mute, otherwise unmute @warning This function does not always work. If there are no active audio playback stream, the mute status might not be available. If digital pass-through (S/PDIF, HDMI...) is in use, muting may be unapplicable. Also some audio output plugins do not support muting at all. @note To force silent playback, disable all audio tracks. This is more efficient and reliable than mute. ''' return libvlc_audio_set_mute(self, status) - + def audio_get_volume(self): '''Get current software audio volume. @return: the software volume in percents (0 = mute, 100 = nominal / 0dB). ''' return libvlc_audio_get_volume(self) - + def audio_set_volume(self, i_volume): '''Set current software audio volume. @param i_volume: the volume in percents (0 = mute, 100 = 0dB). @@ -3754,21 +3754,21 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_set_volume(self, i_volume) - + def audio_get_track_count(self): '''Get number of available audio tracks. @return: the number of available audio tracks (int), or -1 if unavailable. ''' return libvlc_audio_get_track_count(self) - + def audio_get_track(self): '''Get current audio track. @return: the audio track ID or -1 if no active input. ''' return libvlc_audio_get_track(self) - + def audio_set_track(self, i_track): '''Set current audio track. @param i_track: the track ID (i_id field from track description). @@ -3776,14 +3776,14 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_set_track(self, i_track) - + def audio_get_channel(self): '''Get current audio channel. @return: the audio channel See libvlc_audio_output_channel_t. ''' return libvlc_audio_get_channel(self) - + def audio_set_channel(self, channel): '''Set current audio channel. @param channel: the audio channel, See libvlc_audio_output_channel_t. @@ -3791,7 +3791,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_set_channel(self, channel) - + def audio_get_delay(self): '''Get current audio delay. @return: the audio delay (microseconds). @@ -3799,7 +3799,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_get_delay(self) - + def audio_set_delay(self, i_delay): '''Set current audio delay. The audio delay will be reset to zero each time the media changes. @param i_delay: the audio delay (microseconds). @@ -3808,7 +3808,7 @@ class MediaPlayer(_Ctype): ''' return libvlc_audio_set_delay(self, i_delay) - + def set_equalizer(self, p_equalizer): '''Apply new equalizer settings to a media player. The equalizer is first created by invoking L{audio_equalizer_new}() or @@ -5220,12 +5220,12 @@ def libvlc_media_player_set_nsobject(p_mi, drawable): If you want to use it along with Qt4 see the QMacCocoaViewContainer. Then the following code should work: @code.mm - + NSView *video = [[NSView alloc] init]; QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent); L{libvlc_media_player_set_nsobject}(mp, video); [video release]; - + @endcode You can find a live example in VLCVideoView in VLCKit.framework. @param p_mi: the Media Player.