desc stringlengths 3 26.7k | decl stringlengths 11 7.89k | bodies stringlengths 8 553k |
|---|---|---|
'Toggle pause (or resume) media list.'
| def pause(self):
| return libvlc_media_list_player_pause(self)
|
'Is media list playing?
@return: true for playing and false for not playing \libvlc_return_bool.'
| def is_playing(self):
| return libvlc_media_list_player_is_playing(self)
|
'Get current libvlc_state of media list player.
@return: libvlc_state_t for media list player.'
| def get_state(self):
| return libvlc_media_list_player_get_state(self)
|
'Play media list item at position index.
@param i_index: index in media list to play.
@return: 0 upon success -1 if the item wasn\'t found.'
| def play_item_at_index(self, i_index):
| return libvlc_media_list_player_play_item_at_index(self, i_index)
|
'Play the given media item.
@param p_md: the media instance.
@return: 0 upon success, -1 if the media is not part of the media list.'
| def play_item(self, p_md):
| return libvlc_media_list_player_play_item(self, p_md)
|
'Stop playing media list.'
| def stop(self):
| return libvlc_media_list_player_stop(self)
|
'Play next item from media list.
@return: 0 upon success -1 if there is no next item.'
| def next(self):
| return libvlc_media_list_player_next(self)
|
'Play previous item from media list.
@return: 0 upon success -1 if there is no previous item.'
| def previous(self):
| return libvlc_media_list_player_previous(self)
|
'Sets the playback mode for the playlist.
@param e_mode: playback mode specification.'
| def set_playback_mode(self, e_mode):
| return libvlc_media_list_player_set_playback_mode(self, e_mode)
|
'Return the associated Instance.'
| def get_instance(self):
| return self._instance
|
'Set the MRL to play.
Warning: most audio and video options, such as text renderer,
have no effects on an individual media. These options must be
set at the vlc.Instance or vlc.MediaPlayer instanciation.
@param mrl: The MRL
@param options: optional media option=value strings
@return: the Media object'
| def set_mrl(self, mrl, *options):
| m = self.get_instance().media_new(mrl, *options)
self.set_media(m)
return m
|
'Get the description of available video subtitles.'
| def video_get_spu_description(self):
| return track_description_list(libvlc_video_get_spu_description(self))
|
'Get the description of available titles.'
| def video_get_title_description(self):
| return track_description_list(libvlc_video_get_title_description(self))
|
'Get the description of available chapters for specific title.
@param title: selected title (int)'
| def video_get_chapter_description(self, title):
| return track_description_list(libvlc_video_get_chapter_description(self, title))
|
'Get the description of available video tracks.'
| def video_get_track_description(self):
| return track_description_list(libvlc_video_get_track_description(self))
|
'Get the description of available audio tracks.'
| def audio_get_track_description(self):
| return track_description_list(libvlc_audio_get_track_description(self))
|
'Get the full description of available titles.
@return: the titles list
@version: LibVLC 3.0.0 and later.'
| def get_full_title_descriptions(self):
| titleDescription_pp = ctypes.POINTER(TitleDescription)()
n = libvlc_media_player_get_full_title_descriptions(self, ctypes.byref(titleDescription_pp))
info = ctypes.cast(ctypes.titleDescription_pp, ctypes.POINTER((ctypes.POINTER(TitleDescription) * n)))
return info
|
'Get the full description of available chapters.
@param index: of the title to query for chapters.
@return: the chapter list
@version: LibVLC 3.0.0 and later.'
| def get_full_chapter_descriptions(self, i_chapters_of_title):
| chapterDescription_pp = ctypes.POINTER(ChapterDescription)()
n = libvlc_media_player_get_full_chapter_descriptions(self, ctypes.byref(chapterDescription_pp))
info = ctypes.cast(ctypes.chapterDescription_pp, ctypes.POINTER((ctypes.POINTER(ChapterDescription) * n)))
return info
|
'Get the video size in pixels as 2-tuple (width, height).
@param num: video number (default 0).'
| def video_get_size(self, num=0):
| r = libvlc_video_get_size(self, num)
if (isinstance(r, tuple) and (len(r) == 2)):
return r
else:
raise VLCException(('invalid video number (%s)' % (num,)))
|
'Set a Win32/Win64 API window handle (HWND).
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.'
| def set_hwnd(self, drawable):
| if (not isinstance(drawable, ctypes.c_void_p)):
drawable = ctypes.c_void_p(int(drawable))
libvlc_media_player_set_hwnd(self, drawable)
|
'Get the width of a video in pixels.
@param num: video number (default 0).'
| def video_get_width(self, num=0):
| return self.video_get_size(num)[0]
|
'Get the height of a video in pixels.
@param num: video number (default 0).'
| def video_get_height(self, num=0):
| return self.video_get_size(num)[1]
|
'Get the mouse pointer coordinates over a video as 2-tuple (x, y).
Coordinates are expressed in terms of the decoded video resolution,
B{not} in terms of pixels on the screen/viewport. To get the
latter, you must query your windowing system directly.
Either coordinate may be negative or larger than the corresponding
s... | def video_get_cursor(self, num=0):
| r = libvlc_video_get_cursor(self, num)
if (isinstance(r, tuple) and (len(r) == 2)):
return r
raise VLCException(('invalid video number (%s)' % (num,)))
|
'Release a media_player after use
Decrement the reference count of a media player object. If the
reference count is 0, then L{release}() will
release the media player object. If the media player object
has been released, then it should not be used again.'
| def release(self):
| return libvlc_media_player_release(self)
|
'Retain a reference to a media player object. Use
L{release}() to decrement reference count.'
| def retain(self):
| return libvlc_media_player_retain(self)
|
'Set the media that will be used by the media_player. If any,
previous md will be released.
@param p_md: the Media. Afterwards the p_md can be safely destroyed.'
| def set_media(self, p_md):
| return libvlc_media_player_set_media(self, p_md)
|
'Get the media used by the media_player.
@return: the media associated with p_mi, or None if no media is associated.'
| def get_media(self):
| return libvlc_media_player_get_media(self)
|
'Get the Event Manager from which the media player send event.
@return: the event manager associated with p_mi.'
| @memoize_parameterless
def event_manager(self):
| return libvlc_media_player_event_manager(self)
|
'is_playing.
@return: 1 if the media player is playing, 0 otherwise \libvlc_return_bool.'
| def is_playing(self):
| return libvlc_media_player_is_playing(self)
|
'Play.
@return: 0 if playback started (and was already started), or -1 on error.'
| def play(self):
| return libvlc_media_player_play(self)
|
'Pause or resume (no effect if there is no media).
@param do_pause: play/resume if zero, pause if non-zero.
@version: LibVLC 1.1.1 or later.'
| def set_pause(self, do_pause):
| return libvlc_media_player_set_pause(self, do_pause)
|
'Toggle pause (no effect if there is no media).'
| def pause(self):
| return libvlc_media_player_pause(self)
|
'Stop (no effect if there is no media).'
| def stop(self):
| return libvlc_media_player_stop(self)
|
'Set callbacks and private data to render decoded video to a custom area
in memory.
Use L{video_set_format}() or L{video_set_format_callbacks}()
to configure the decoded format.
@param lock: callback to lock video memory (must not be None).
@param unlock: callback to unlock video memory (or None if not needed).
@param ... | def video_set_callbacks(self, lock, unlock, display, opaque):
| return libvlc_video_set_callbacks(self, lock, unlock, display, opaque)
|
'Set decoded video chroma and dimensions.
This only works in combination with L{video_set_callbacks}(),
and is mutually exclusive with L{video_set_format_callbacks}().
@param chroma: a four-characters string identifying the chroma (e.g. "RV32" or "YUYV").
@param width: pixel width.
@param height: pixel height.
@param p... | def video_set_format(self, chroma, width, height, pitch):
| return libvlc_video_set_format(self, str_to_bytes(chroma), width, height, pitch)
|
'Set decoded video chroma and dimensions. This only works in combination with
L{video_set_callbacks}().
@param setup: callback to select the video format (cannot be None).
@param cleanup: callback to release any allocated resources (or None).
@version: LibVLC 2.0.0 or later.'
| def video_set_format_callbacks(self, setup, cleanup):
| return libvlc_video_set_format_callbacks(self, setup, cleanup)
|
'Set the NSView handler where the media player should render its video output.
Use the vout called "macosx".
The drawable is an NSObject that follow the VLCOpenGLVideoViewEmbedding
protocol:
@code.m
\@protocol VLCOpenGLVideoViewEmbedding <NSObject>
- (void)addVoutSubview:(NSView *)view;
- (void)removeVoutSubview:(NSVie... | def set_nsobject(self, drawable):
| return libvlc_media_player_set_nsobject(self, drawable)
|
'Get the NSView handler previously set with L{set_nsobject}().
@return: the NSView handler or 0 if none where set.'
| def get_nsobject(self):
| return libvlc_media_player_get_nsobject(self)
|
'\deprecated Use L{set_nsobject} instead.'
| def set_agl(self, drawable):
| return libvlc_media_player_set_agl(self, drawable)
|
'\deprecated Use L{get_nsobject} instead.'
| def get_agl(self):
| return libvlc_media_player_get_agl(self)
|
'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 c... | def set_xwindow(self, drawable):
| return libvlc_media_player_set_xwindow(self, drawable)
|
'Get the X Window System window identifier previously set with
L{set_xwindow}(). Note that this will return the identifier
even if VLC is not currently using it (for instance if it is playing an
audio-only input).
@return: an X window ID, or 0 if none where set.'
| def get_xwindow(self):
| return libvlc_media_player_get_xwindow(self)
|
'Get the Windows API window handle (HWND) previously set with
L{set_hwnd}(). The handle will be returned even if LibVLC
is not currently outputting any video to it.
@return: a window handle or None if there are none.'
| def get_hwnd(self):
| return libvlc_media_player_get_hwnd(self)
|
'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.'
| def set_android_context(self, p_jvm, p_awindow_handler):
| return libvlc_media_player_set_android_context(self, p_jvm, p_awindow_handler)
|
'Set callbacks and private data for decoded audio.
Use L{audio_set_format}() or L{audio_set_format_callbacks}()
to configure the decoded audio format.
@param play: callback to play audio samples (must not be None).
@param pause: callback to pause playback (or None to ignore).
@param resume: callback to resume playback ... | def audio_set_callbacks(self, play, pause, resume, flush, drain, opaque):
| return libvlc_audio_set_callbacks(self, play, pause, resume, flush, drain, opaque)
|
'Set callbacks and private data for decoded audio. This only works in
combination with L{audio_set_callbacks}().
Use L{audio_set_format}() or L{audio_set_format_callbacks}()
to configure the decoded audio format.
@param set_volume: callback to apply audio volume, or None to apply volume in software.
@version: LibVLC 2.... | def audio_set_volume_callback(self, set_volume):
| return libvlc_audio_set_volume_callback(self, set_volume)
|
'Set decoded audio format. This only works in combination with
L{audio_set_callbacks}().
@param setup: callback to select the audio format (cannot be None).
@param cleanup: callback to release any allocated resources (or None).
@version: LibVLC 2.0.0 or later.'
| def audio_set_format_callbacks(self, setup, cleanup):
| return libvlc_audio_set_format_callbacks(self, setup, cleanup)
|
'Set decoded audio format.
This only works in combination with L{audio_set_callbacks}(),
and is mutually exclusive with L{audio_set_format_callbacks}().
@param format: a four-characters string identifying the sample format (e.g. "S16N" or "FL32").
@param rate: sample rate (expressed in Hz).
@param channels: channels co... | def audio_set_format(self, format, rate, channels):
| return libvlc_audio_set_format(self, str_to_bytes(format), rate, channels)
|
'Get the current movie length (in ms).
@return: the movie length (in ms), or -1 if there is no media.'
| def get_length(self):
| return libvlc_media_player_get_length(self)
|
'Get the current movie time (in ms).
@return: the movie time (in ms), or -1 if there is no media.'
| def get_time(self):
| return libvlc_media_player_get_time(self)
|
'Set the movie time (in ms). This has no effect if no media is being played.
Not all formats and protocols support this.
@param i_time: the movie time (in ms).'
| def set_time(self, i_time):
| return libvlc_media_player_set_time(self, i_time)
|
'Get movie position as percentage between 0.0 and 1.0.
@return: movie position, or -1. in case of error.'
| def get_position(self):
| return libvlc_media_player_get_position(self)
|
'Set movie position as percentage between 0.0 and 1.0.
This has no effect if playback is not enabled.
This might not work depending on the underlying input format and protocol.
@param f_pos: the position.'
| def set_position(self, f_pos):
| return libvlc_media_player_set_position(self, f_pos)
|
'Set movie chapter (if applicable).
@param i_chapter: chapter number to play.'
| def set_chapter(self, i_chapter):
| return libvlc_media_player_set_chapter(self, i_chapter)
|
'Get movie chapter.
@return: chapter number currently playing, or -1 if there is no media.'
| def get_chapter(self):
| return libvlc_media_player_get_chapter(self)
|
'Get movie chapter count.
@return: number of chapters in movie, or -1.'
| def get_chapter_count(self):
| return libvlc_media_player_get_chapter_count(self)
|
'Is the player able to play.
@return: boolean \libvlc_return_bool.'
| def will_play(self):
| return libvlc_media_player_will_play(self)
|
'Get title chapter count.
@param i_title: title.
@return: number of chapters in title, or -1.'
| def get_chapter_count_for_title(self, i_title):
| return libvlc_media_player_get_chapter_count_for_title(self, i_title)
|
'Set movie title.
@param i_title: title number to play.'
| def set_title(self, i_title):
| return libvlc_media_player_set_title(self, i_title)
|
'Get movie title.
@return: title number currently playing, or -1.'
| def get_title(self):
| return libvlc_media_player_get_title(self)
|
'Get movie title count.
@return: title number count, or -1.'
| def get_title_count(self):
| return libvlc_media_player_get_title_count(self)
|
'Set previous chapter (if applicable).'
| def previous_chapter(self):
| return libvlc_media_player_previous_chapter(self)
|
'Set next chapter (if applicable).'
| def next_chapter(self):
| return libvlc_media_player_next_chapter(self)
|
'Get the requested movie play rate.
@warning: Depending on the underlying media, the requested rate may be
different from the real playback rate.
@return: movie play rate.'
| def get_rate(self):
| return libvlc_media_player_get_rate(self)
|
'Set movie play rate.
@param rate: movie play rate to set.
@return: -1 if an error was detected, 0 otherwise (but even then, it might not actually work depending on the underlying media protocol).'
| def set_rate(self, rate):
| return libvlc_media_player_set_rate(self, rate)
|
'Get current movie state.
@return: the current state of the media player (playing, paused, ...) See libvlc_state_t.'
| def get_state(self):
| return libvlc_media_player_get_state(self)
|
'Get movie fps rate.
@return: frames per second (fps) for this playing movie, or 0 if unspecified.'
| def get_fps(self):
| return libvlc_media_player_get_fps(self)
|
'How many video outputs does this media player have?
@return: the number of video outputs.'
| def has_vout(self):
| return libvlc_media_player_has_vout(self)
|
'Is this media player seekable?
@return: true if the media player can seek \libvlc_return_bool.'
| def is_seekable(self):
| return libvlc_media_player_is_seekable(self)
|
'Can this media player be paused?
@return: true if the media player can pause \libvlc_return_bool.'
| def can_pause(self):
| return libvlc_media_player_can_pause(self)
|
'Check if the current program is scrambled.
@return: true if the current program is scrambled \libvlc_return_bool.
@version: LibVLC 2.2.0 or later.'
| def program_scrambled(self):
| return libvlc_media_player_program_scrambled(self)
|
'Display the next frame (if supported).'
| def next_frame(self):
| return libvlc_media_player_next_frame(self)
|
'Navigate through DVD Menu.
@param navigate: the Navigation mode.
@version: libVLC 2.0.0 or later.'
| def navigate(self, navigate):
| return libvlc_media_player_navigate(self, navigate)
|
'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.
@param timeout: title display timeout in milliseconds (ignored if libvlc_position_disable).
@version: libVLC 2.1.0 or later... | def set_video_title_display(self, position, timeout):
| return libvlc_media_player_set_video_title_display(self, position, timeout)
|
'Toggle fullscreen status on non-embedded video outputs.
@warning: The same limitations applies to this function
as to L{set_fullscreen}().'
| def toggle_fullscreen(self):
| return libvlc_toggle_fullscreen(self)
|
'Enable or disable fullscreen.
@warning: With most window managers, only a top-level windows can be in
full-screen mode. Hence, this function will not operate properly if
L{set_xwindow}() was used to embed the video in a
non-top-level window. In that case, the embedding window must be reparented
to the root window B{be... | def set_fullscreen(self, b_fullscreen):
| return libvlc_set_fullscreen(self, b_fullscreen)
|
'Get current fullscreen status.
@return: the fullscreen status (boolean) \libvlc_return_bool.'
| def get_fullscreen(self):
| return libvlc_get_fullscreen(self)
|
'Enable or disable key press events handling, according to the LibVLC hotkeys
configuration. By default and for historical reasons, keyboard events are
handled by the LibVLC video widget.
@note: On X11, there can be only one subscriber for key press and mouse
click events per window. If your application has subscribed ... | def video_set_key_input(self, on):
| return libvlc_video_set_key_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
filters such as "puzzle".
See L{video_set_key_input}().
@warning: This function is only implemented for X11 and Win32 at the moment.
@param on: true to handle mouse click ev... | def video_set_mouse_input(self, on):
| return libvlc_video_set_mouse_input(self, on)
|
'Get the current video scaling factor.
See also L{video_set_scale}().
@return: the currently configured zoom factor, or 0. if the video is set to fit to the output window/drawable automatically.'
| def video_get_scale(self):
| return libvlc_video_get_scale(self)
|
'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
dimension. Zero is a special value; it will adjust the video to the output
window/drawable (in windowed mode) or the entire screen.
Note that not all video outputs support sca... | def video_set_scale(self, f_factor):
| return libvlc_video_set_scale(self, f_factor)
|
'Get current video aspect ratio.
@return: the video aspect ratio or None if unspecified (the result must be released with free() or L{free}()).'
| def video_get_aspect_ratio(self):
| return libvlc_video_get_aspect_ratio(self)
|
'Set new video aspect ratio.
@param psz_aspect: new video aspect-ratio or None to reset to default @note Invalid aspect ratios are ignored.'
| def video_set_aspect_ratio(self, psz_aspect):
| return libvlc_video_set_aspect_ratio(self, str_to_bytes(psz_aspect))
|
'Get current video subtitle.
@return: the video subtitle selected, or -1 if none.'
| def video_get_spu(self):
| return libvlc_video_get_spu(self)
|
'Get the number of available video subtitles.
@return: the number of available video subtitles.'
| def video_get_spu_count(self):
| return libvlc_video_get_spu_count(self)
|
'Set new video subtitle.
@param i_spu: video subtitle track to select (i_id from track description).
@return: 0 on success, -1 if out of range.'
| def video_set_spu(self, i_spu):
| return libvlc_video_set_spu(self, i_spu)
|
'Set new video subtitle file.
@param psz_subtitle: new video subtitle file.
@return: the success status (boolean).'
| def video_set_subtitle_file(self, psz_subtitle):
| return libvlc_video_set_subtitle_file(self, str_to_bytes(psz_subtitle))
|
'Get the current subtitle delay. Positive values means subtitles are being
displayed later, negative values earlier.
@return: time (in microseconds) the display of subtitles is being delayed.
@version: LibVLC 2.0.0 or later.'
| def video_get_spu_delay(self):
| return libvlc_video_get_spu_delay(self)
|
'Set the subtitle delay. This affects the timing of when the subtitle will
be displayed. Positive values result in subtitles being displayed later,
while negative values will result in subtitles being displayed earlier.
The subtitle delay will be reset to zero each time the media changes.
@param i_delay: time (in micro... | def video_set_spu_delay(self, i_delay):
| return libvlc_video_set_spu_delay(self, i_delay)
|
'Get current crop filter geometry.
@return: the crop filter geometry or None if unset.'
| def video_get_crop_geometry(self):
| return libvlc_video_get_crop_geometry(self)
|
'Set new crop filter geometry.
@param psz_geometry: new crop filter geometry (None to unset).'
| def video_set_crop_geometry(self, psz_geometry):
| return libvlc_video_set_crop_geometry(self, str_to_bytes(psz_geometry))
|
'Get current teletext page requested.
@return: the current teletext page requested.'
| def video_get_teletext(self):
| return libvlc_video_get_teletext(self)
|
'Set new teletext page to retrieve.
@param i_page: teletex page number requested.'
| def video_set_teletext(self, i_page):
| return libvlc_video_set_teletext(self, i_page)
|
'Toggle teletext transparent status on video output.'
| def toggle_teletext(self):
| return libvlc_toggle_teletext(self)
|
'Get number of available video tracks.
@return: the number of available video tracks (int).'
| def video_get_track_count(self):
| return libvlc_video_get_track_count(self)
|
'Get current video track.
@return: the video track ID (int) or -1 if no active input.'
| def video_get_track(self):
| return libvlc_video_get_track(self)
|
'Set video track.
@param i_track: the track ID (i_id field from track description).
@return: 0 on success, -1 if out of range.'
| def video_set_track(self, i_track):
| return libvlc_video_set_track(self, i_track)
|
'Take a snapshot of the current video window.
If i_width AND i_height is 0, original size is used.
If i_width XOR i_height is 0, original aspect-ratio is preserved.
@param num: number of video output (typically 0 for the first/only one).
@param psz_filepath: the path where to save the screenshot to.
@param i_width: the... | def video_take_snapshot(self, num, psz_filepath, i_width, i_height):
| return libvlc_video_take_snapshot(self, num, str_to_bytes(psz_filepath), i_width, i_height)
|
'Enable or disable deinterlace filter.
@param psz_mode: type of deinterlace filter, None to disable.'
| def video_set_deinterlace(self, psz_mode):
| return libvlc_video_set_deinterlace(self, str_to_bytes(psz_mode))
|
'Get an integer marquee option value.
@param option: marq option to get See libvlc_video_marquee_int_option_t.'
| def video_get_marquee_int(self, option):
| return libvlc_video_get_marquee_int(self, option)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.