_id stringlengths 2 7 | title stringlengths 1 88 | partition stringclasses 3
values | text stringlengths 75 19.8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q231700 | libvlc_module_description_list_release | train | def libvlc_module_description_list_release(p_list):
'''Release a list of module descriptions.
@param p_list: the list to be released.
'''
f = _Cfunctions.get('libvlc_module_description_list_release', None) or \
_Cfunction('libvlc_module_description_list_release', ((1,),), None,
... | python | {
"resource": ""
} |
q231701 | libvlc_audio_filter_list_get | train | def libvlc_audio_filter_list_get(p_instance):
'''Returns a list of audio filters that are available.
@param p_instance: libvlc instance.
@return: a list of module descriptions. It should be freed with L{libvlc_module_description_list_release}(). In case of an error, NULL is returned. See L{ModuleDescription... | python | {
"resource": ""
} |
q231702 | libvlc_media_new_location | train | def libvlc_media_new_location(p_instance, psz_mrl):
'''Create a media with a certain given media resource location,
for instance a valid URL.
@note: To refer to a local file with this function,
the file://... URI syntax B{must} be used (see IETF RFC3986).
We recommend using L{libvlc_media_new_path}(... | python | {
"resource": ""
} |
q231703 | libvlc_media_duplicate | train | def libvlc_media_duplicate(p_md):
'''Duplicate a media descriptor object.
@param p_md: a media descriptor object.
'''
f = _Cfunctions.get('libvlc_media_duplicate', None) or \
_Cfunction('libvlc_media_duplicate', ((1,),), class_result(Media),
ctypes.c_void_p, Media)
return... | python | {
"resource": ""
} |
q231704 | libvlc_media_save_meta | train | def libvlc_media_save_meta(p_md):
'''Save the meta previously set.
@param p_md: the media desriptor.
@return: true if the write operation was successful.
'''
f = _Cfunctions.get('libvlc_media_save_meta', None) or \
_Cfunction('libvlc_media_save_meta', ((1,),), None,
ctype... | python | {
"resource": ""
} |
q231705 | libvlc_media_get_stats | train | def libvlc_media_get_stats(p_md, p_stats):
'''Get the current statistics about the media.
@param p_md:: media descriptor object.
@param p_stats:: structure that contain the statistics about the media (this structure must be allocated by the caller).
@return: true if the statistics are available, false o... | python | {
"resource": ""
} |
q231706 | libvlc_media_get_codec_description | train | 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}.
... | python | {
"resource": ""
} |
q231707 | libvlc_media_tracks_release | train | 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.
@param i_count: number of elements in the array.
@version: LibVLC 2.1.0 and later.
'''
f = _Cfunctions.get('libvlc_media_tracks_r... | python | {
"resource": ""
} |
q231708 | libvlc_media_get_type | train | 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_medi... | python | {
"resource": ""
} |
q231709 | libvlc_media_discoverer_localized_name | train | def libvlc_media_discoverer_localized_name(p_mdis):
'''Get media service discover object its localized name.
@param p_mdis: media discover object.
@return: localized name.
'''
f = _Cfunctions.get('libvlc_media_discoverer_localized_name', None) or \
_Cfunction('libvlc_media_discoverer_localiz... | python | {
"resource": ""
} |
q231710 | libvlc_media_discoverer_media_list | train | def libvlc_media_discoverer_media_list(p_mdis):
'''Get media service discover media list.
@param p_mdis: media service discover object.
@return: list of media items.
'''
f = _Cfunctions.get('libvlc_media_discoverer_media_list', None) or \
_Cfunction('libvlc_media_discoverer_media_list', ((1,... | python | {
"resource": ""
} |
q231711 | libvlc_media_discoverer_event_manager | train | def libvlc_media_discoverer_event_manager(p_mdis):
'''Get event manager from media service discover object.
@param p_mdis: media service discover object.
@return: event manager object.
'''
f = _Cfunctions.get('libvlc_media_discoverer_event_manager', None) or \
_Cfunction('libvlc_media_discov... | python | {
"resource": ""
} |
q231712 | libvlc_media_discoverer_is_running | train | def libvlc_media_discoverer_is_running(p_mdis):
'''Query if media service discover object is running.
@param p_mdis: media service discover object.
@return: true if running, false if not \libvlc_return_bool.
'''
f = _Cfunctions.get('libvlc_media_discoverer_is_running', None) or \
_Cfunction(... | python | {
"resource": ""
} |
q231713 | libvlc_media_library_new | train | def libvlc_media_library_new(p_instance):
'''Create an new Media Library object.
@param p_instance: the libvlc instance.
@return: a new object or NULL on error.
'''
f = _Cfunctions.get('libvlc_media_library_new', None) or \
_Cfunction('libvlc_media_library_new', ((1,),), class_result(MediaLi... | python | {
"resource": ""
} |
q231714 | libvlc_media_library_load | train | def libvlc_media_library_load(p_mlib):
'''Load media library.
@param p_mlib: media library object.
@return: 0 on success, -1 on error.
'''
f = _Cfunctions.get('libvlc_media_library_load', None) or \
_Cfunction('libvlc_media_library_load', ((1,),), None,
ctypes.c_int, Medi... | python | {
"resource": ""
} |
q231715 | libvlc_media_library_media_list | train | def libvlc_media_library_media_list(p_mlib):
'''Get media library subitems.
@param p_mlib: media library object.
@return: media list subitems.
'''
f = _Cfunctions.get('libvlc_media_library_media_list', None) or \
_Cfunction('libvlc_media_library_media_list', ((1,),), class_result(MediaList),... | python | {
"resource": ""
} |
q231716 | libvlc_media_list_new | train | def libvlc_media_list_new(p_instance):
'''Create an empty media list.
@param p_instance: libvlc instance.
@return: empty media list, or NULL on error.
'''
f = _Cfunctions.get('libvlc_media_list_new', None) or \
_Cfunction('libvlc_media_list_new', ((1,),), class_result(MediaList),
... | python | {
"resource": ""
} |
q231717 | libvlc_media_list_event_manager | train | def libvlc_media_list_event_manager(p_ml):
'''Get libvlc_event_manager from this media list instance.
The p_event_manager is immutable, so you don't have to hold the lock.
@param p_ml: a media list instance.
@return: libvlc_event_manager.
'''
f = _Cfunctions.get('libvlc_media_list_event_manager'... | python | {
"resource": ""
} |
q231718 | libvlc_media_list_player_new | train | def libvlc_media_list_player_new(p_instance):
'''Create new media_list_player.
@param p_instance: libvlc instance.
@return: media list player instance or NULL on error.
'''
f = _Cfunctions.get('libvlc_media_list_player_new', None) or \
_Cfunction('libvlc_media_list_player_new', ((1,),), clas... | python | {
"resource": ""
} |
q231719 | libvlc_media_list_player_event_manager | train | def libvlc_media_list_player_event_manager(p_mlp):
'''Return the event manager of this media_list_player.
@param p_mlp: media list player instance.
@return: the event manager.
'''
f = _Cfunctions.get('libvlc_media_list_player_event_manager', None) or \
_Cfunction('libvlc_media_list_player_ev... | python | {
"resource": ""
} |
q231720 | libvlc_media_list_player_set_media_player | train | def libvlc_media_list_player_set_media_player(p_mlp, p_mi):
'''Replace media player in media_list_player with this instance.
@param p_mlp: media list player instance.
@param p_mi: media player instance.
'''
f = _Cfunctions.get('libvlc_media_list_player_set_media_player', None) or \
_Cfunctio... | python | {
"resource": ""
} |
q231721 | libvlc_media_list_player_set_media_list | train | 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.
@param p_mlist: list of media.
'''
f = _Cfunctions.get('libvlc_media_list_player_set_media_list', None) or \
_Cfunction('libvlc_media_list_... | python | {
"resource": ""
} |
q231722 | libvlc_media_list_player_is_playing | train | def libvlc_media_list_player_is_playing(p_mlp):
'''Is media list playing?
@param p_mlp: media list player instance.
@return: true for playing and false for not playing \libvlc_return_bool.
'''
f = _Cfunctions.get('libvlc_media_list_player_is_playing', None) or \
_Cfunction('libvlc_media_list... | python | {
"resource": ""
} |
q231723 | libvlc_media_list_player_get_state | train | def libvlc_media_list_player_get_state(p_mlp):
'''Get current libvlc_state of media list player.
@param p_mlp: media list player instance.
@return: libvlc_state_t for media list player.
'''
f = _Cfunctions.get('libvlc_media_list_player_get_state', None) or \
_Cfunction('libvlc_media_list_pla... | python | {
"resource": ""
} |
q231724 | libvlc_media_list_player_play_item_at_index | train | def libvlc_media_list_player_play_item_at_index(p_mlp, i_index):
'''Play media list item at position index.
@param p_mlp: media list player instance.
@param i_index: index in media list to play.
@return: 0 upon success -1 if the item wasn't found.
'''
f = _Cfunctions.get('libvlc_media_list_playe... | python | {
"resource": ""
} |
q231725 | libvlc_media_list_player_play_item | train | def libvlc_media_list_player_play_item(p_mlp, p_md):
'''Play the given media item.
@param p_mlp: media list player instance.
@param p_md: the media instance.
@return: 0 upon success, -1 if the media is not part of the media list.
'''
f = _Cfunctions.get('libvlc_media_list_player_play_item', None... | python | {
"resource": ""
} |
q231726 | libvlc_media_list_player_set_playback_mode | train | def libvlc_media_list_player_set_playback_mode(p_mlp, e_mode):
'''Sets the playback mode for the playlist.
@param p_mlp: media list player instance.
@param e_mode: playback mode specification.
'''
f = _Cfunctions.get('libvlc_media_list_player_set_playback_mode', None) or \
_Cfunction('libvlc... | python | {
"resource": ""
} |
q231727 | libvlc_media_player_new | train | def libvlc_media_player_new(p_libvlc_instance):
'''Create an empty Media Player object.
@param p_libvlc_instance: the libvlc instance in which the Media Player should be created.
@return: a new media player object, or NULL on error.
'''
f = _Cfunctions.get('libvlc_media_player_new', None) or \
... | python | {
"resource": ""
} |
q231728 | libvlc_media_player_new_from_media | train | def libvlc_media_player_new_from_media(p_md):
'''Create a Media Player object from a Media.
@param p_md: the media. Afterwards the p_md can be safely destroyed.
@return: a new media player object, or NULL on error.
'''
f = _Cfunctions.get('libvlc_media_player_new_from_media', None) or \
_Cfu... | python | {
"resource": ""
} |
q231729 | libvlc_media_player_set_media | train | def libvlc_media_player_set_media(p_mi, p_md):
'''Set the media that will be used by the media_player. If any,
previous md will be released.
@param p_mi: the Media Player.
@param p_md: the Media. Afterwards the p_md can be safely destroyed.
'''
f = _Cfunctions.get('libvlc_media_player_set_media'... | python | {
"resource": ""
} |
q231730 | libvlc_media_player_get_media | train | def libvlc_media_player_get_media(p_mi):
'''Get the media used by the media_player.
@param p_mi: the Media Player.
@return: the media associated with p_mi, or NULL if no media is associated.
'''
f = _Cfunctions.get('libvlc_media_player_get_media', None) or \
_Cfunction('libvlc_media_player_g... | python | {
"resource": ""
} |
q231731 | libvlc_media_player_event_manager | train | def libvlc_media_player_event_manager(p_mi):
'''Get the Event Manager from which the media player send event.
@param p_mi: the Media Player.
@return: the event manager associated with p_mi.
'''
f = _Cfunctions.get('libvlc_media_player_event_manager', None) or \
_Cfunction('libvlc_media_playe... | python | {
"resource": ""
} |
q231732 | libvlc_media_player_set_agl | train | def libvlc_media_player_set_agl(p_mi, drawable):
'''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_se... | python | {
"resource": ""
} |
q231733 | libvlc_media_player_set_position | train | def libvlc_media_player_set_position(p_mi, f_pos):
'''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 p_mi: the Media Player.
@param f_pos: the position.
'''
... | python | {
"resource": ""
} |
q231734 | libvlc_media_player_get_chapter_count_for_title | train | def libvlc_media_player_get_chapter_count_for_title(p_mi, i_title):
'''Get title chapter count.
@param p_mi: the Media Player.
@param i_title: title.
@return: number of chapters in title, or -1.
'''
f = _Cfunctions.get('libvlc_media_player_get_chapter_count_for_title', None) or \
_Cfunct... | python | {
"resource": ""
} |
q231735 | libvlc_media_player_set_rate | train | def libvlc_media_player_set_rate(p_mi, rate):
'''Set movie play rate.
@param p_mi: the Media Player.
@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).
'''
f = _Cfunctions.... | python | {
"resource": ""
} |
q231736 | libvlc_media_player_get_state | train | def libvlc_media_player_get_state(p_mi):
'''Get current movie state.
@param p_mi: the Media Player.
@return: the current state of the media player (playing, paused, ...) See libvlc_state_t.
'''
f = _Cfunctions.get('libvlc_media_player_get_state', None) or \
_Cfunction('libvlc_media_player_ge... | python | {
"resource": ""
} |
q231737 | libvlc_media_player_get_fps | train | def libvlc_media_player_get_fps(p_mi):
'''Get movie fps rate.
@param p_mi: the Media Player.
@return: frames per second (fps) for this playing movie, or 0 if unspecified.
'''
f = _Cfunctions.get('libvlc_media_player_get_fps', None) or \
_Cfunction('libvlc_media_player_get_fps', ((1,),), None... | python | {
"resource": ""
} |
q231738 | libvlc_media_player_has_vout | train | def libvlc_media_player_has_vout(p_mi):
'''How many video outputs does this media player have?
@param p_mi: the media player.
@return: the number of video outputs.
'''
f = _Cfunctions.get('libvlc_media_player_has_vout', None) or \
_Cfunction('libvlc_media_player_has_vout', ((1,),), None,
... | python | {
"resource": ""
} |
q231739 | libvlc_media_player_navigate | train | def libvlc_media_player_navigate(p_mi, navigate):
'''Navigate through DVD Menu.
@param p_mi: the Media Player.
@param navigate: the Navigation mode.
@version: libVLC 2.0.0 or later.
'''
f = _Cfunctions.get('libvlc_media_player_navigate', None) or \
_Cfunction('libvlc_media_player_navigat... | python | {
"resource": ""
} |
q231740 | libvlc_media_player_set_video_title_display | train | def libvlc_media_player_set_video_title_display(p_mi, position, timeout):
'''Set if, and how, the video title will be shown when media is played.
@param p_mi: the media player.
@param position: position at which to display the title, or libvlc_position_disable to prevent the title from being displayed.
... | python | {
"resource": ""
} |
q231741 | libvlc_set_fullscreen | train | def libvlc_set_fullscreen(p_mi, b_fullscreen):
'''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{libvlc_media_player_set_xwindow}() was used to embed the video in a
non-top-le... | python | {
"resource": ""
} |
q231742 | libvlc_video_set_key_input | train | def libvlc_video_set_key_input(p_mi, on):
'''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
... | python | {
"resource": ""
} |
q231743 | libvlc_video_get_size | train | def libvlc_video_get_size(p_mi, num):
'''Get the pixel dimensions of a video.
@param p_mi: media player.
@param num: number of the video (starting from, and most commonly 0).
@return: px pixel width, py pixel height.
'''
f = _Cfunctions.get('libvlc_video_get_size', None) or \
_Cfunction(... | python | {
"resource": ""
} |
q231744 | libvlc_video_get_aspect_ratio | train | def libvlc_video_get_aspect_ratio(p_mi):
'''Get current video aspect ratio.
@param p_mi: the media player.
@return: the video aspect ratio or NULL if unspecified (the result must be released with free() or L{libvlc_free}()).
'''
f = _Cfunctions.get('libvlc_video_get_aspect_ratio', None) or \
... | python | {
"resource": ""
} |
q231745 | libvlc_video_set_aspect_ratio | train | def libvlc_video_set_aspect_ratio(p_mi, psz_aspect):
'''Set new video aspect ratio.
@param p_mi: the media player.
@param psz_aspect: new video aspect-ratio or NULL to reset to default @note Invalid aspect ratios are ignored.
'''
f = _Cfunctions.get('libvlc_video_set_aspect_ratio', None) or \
... | python | {
"resource": ""
} |
q231746 | libvlc_video_get_spu | train | def libvlc_video_get_spu(p_mi):
'''Get current video subtitle.
@param p_mi: the media player.
@return: the video subtitle selected, or -1 if none.
'''
f = _Cfunctions.get('libvlc_video_get_spu', None) or \
_Cfunction('libvlc_video_get_spu', ((1,),), None,
ctypes.c_int, Me... | python | {
"resource": ""
} |
q231747 | libvlc_video_set_spu | train | def libvlc_video_set_spu(p_mi, i_spu):
'''Set new video subtitle.
@param p_mi: the media player.
@param i_spu: video subtitle track to select (i_id from track description).
@return: 0 on success, -1 if out of range.
'''
f = _Cfunctions.get('libvlc_video_set_spu', None) or \
_Cfunction('l... | python | {
"resource": ""
} |
q231748 | libvlc_video_set_subtitle_file | train | def libvlc_video_set_subtitle_file(p_mi, psz_subtitle):
'''Set new video subtitle file.
@param p_mi: the media player.
@param psz_subtitle: new video subtitle file.
@return: the success status (boolean).
'''
f = _Cfunctions.get('libvlc_video_set_subtitle_file', None) or \
_Cfunction('lib... | python | {
"resource": ""
} |
q231749 | libvlc_video_set_spu_delay | train | def libvlc_video_set_spu_delay(p_mi, 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,
while negative values will result in subtitles being displayed earlier.
The subtitle delay will be reset to... | python | {
"resource": ""
} |
q231750 | libvlc_video_get_chapter_description | train | 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 i_title: selected title.
@return: list containing description of available chapter for title i_title.
'''
f = _Cfunctions.get('libvlc_vi... | python | {
"resource": ""
} |
q231751 | libvlc_video_set_crop_geometry | train | def libvlc_video_set_crop_geometry(p_mi, psz_geometry):
'''Set new crop filter geometry.
@param p_mi: the media player.
@param psz_geometry: new crop filter geometry (NULL to unset).
'''
f = _Cfunctions.get('libvlc_video_set_crop_geometry', None) or \
_Cfunction('libvlc_video_set_crop_geomet... | python | {
"resource": ""
} |
q231752 | libvlc_video_set_teletext | train | def libvlc_video_set_teletext(p_mi, i_page):
'''Set new teletext page to retrieve.
@param p_mi: the media player.
@param i_page: teletex page number requested.
'''
f = _Cfunctions.get('libvlc_video_set_teletext', None) or \
_Cfunction('libvlc_video_set_teletext', ((1,), (1,),), None,
... | python | {
"resource": ""
} |
q231753 | libvlc_video_get_track_description | train | 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 NULL on error.
'''
f = _Cfunctions.get('libvlc_video_get_track_description', None) or \
_Cfunction('libvlc_v... | python | {
"resource": ""
} |
q231754 | libvlc_video_set_deinterlace | train | def libvlc_video_set_deinterlace(p_mi, psz_mode):
'''Enable or disable deinterlace filter.
@param p_mi: libvlc media player.
@param psz_mode: type of deinterlace filter, NULL to disable.
'''
f = _Cfunctions.get('libvlc_video_set_deinterlace', None) or \
_Cfunction('libvlc_video_set_deinterla... | python | {
"resource": ""
} |
q231755 | libvlc_video_get_marquee_string | train | def libvlc_video_get_marquee_string(p_mi, option):
'''Get a string marquee option value.
@param p_mi: libvlc media player.
@param option: marq option to get See libvlc_video_marquee_string_option_t.
'''
f = _Cfunctions.get('libvlc_video_get_marquee_string', None) or \
_Cfunction('libvlc_vide... | python | {
"resource": ""
} |
q231756 | libvlc_video_set_marquee_string | train | def libvlc_video_set_marquee_string(p_mi, option, psz_text):
'''Set a marquee string option.
@param p_mi: libvlc media player.
@param option: marq option to set See libvlc_video_marquee_string_option_t.
@param psz_text: marq option value.
'''
f = _Cfunctions.get('libvlc_video_set_marquee_string'... | python | {
"resource": ""
} |
q231757 | libvlc_video_get_logo_int | train | def libvlc_video_get_logo_int(p_mi, option):
'''Get integer logo option.
@param p_mi: libvlc media player instance.
@param option: logo option to get, values of libvlc_video_logo_option_t.
'''
f = _Cfunctions.get('libvlc_video_get_logo_int', None) or \
_Cfunction('libvlc_video_get_logo_int',... | python | {
"resource": ""
} |
q231758 | libvlc_video_set_logo_string | train | def libvlc_video_set_logo_string(p_mi, option, psz_value):
'''Set logo option as string. Options that take a different type value
are ignored.
@param p_mi: libvlc media player instance.
@param option: logo option to set, values of libvlc_video_logo_option_t.
@param psz_value: logo option value.
... | python | {
"resource": ""
} |
q231759 | libvlc_video_get_adjust_float | train | def libvlc_video_get_adjust_float(p_mi, option):
'''Get float adjust option.
@param p_mi: libvlc media player instance.
@param option: adjust option to get, values of libvlc_video_adjust_option_t.
@version: LibVLC 1.1.1 and later.
'''
f = _Cfunctions.get('libvlc_video_get_adjust_float', None) or... | python | {
"resource": ""
} |
q231760 | libvlc_video_set_adjust_float | train | def libvlc_video_set_adjust_float(p_mi, option, value):
'''Set adjust option as float. Options that take a different type value
are ignored.
@param p_mi: libvlc media player instance.
@param option: adust option to set, values of libvlc_video_adjust_option_t.
@param value: adjust option value.
@... | python | {
"resource": ""
} |
q231761 | libvlc_audio_output_list_get | train | 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 it with In case of error, NULL is returned.
'''
f = _Cfunctions.get('libvlc_audio_output_list_get', None) o... | python | {
"resource": ""
} |
q231762 | libvlc_audio_output_list_release | train | def libvlc_audio_output_list_release(p_list):
'''Frees the list of available audio output modules.
@param p_list: list with audio outputs for release.
'''
f = _Cfunctions.get('libvlc_audio_output_list_release', None) or \
_Cfunction('libvlc_audio_output_list_release', ((1,),), None,
... | python | {
"resource": ""
} |
q231763 | libvlc_audio_output_set | train | def libvlc_audio_output_set(p_mi, psz_name):
'''Selects an audio output module.
@note: Any change will take be effect only after playback is stopped and
restarted. Audio output cannot be changed while playing.
@param p_mi: media player.
@param psz_name: name of audio output, use psz_name of See L{Au... | python | {
"resource": ""
} |
q231764 | libvlc_audio_output_device_list_release | train | def libvlc_audio_output_device_list_release(p_list):
'''Frees a list of available audio output devices.
@param p_list: list with audio outputs for release.
@version: LibVLC 2.1.0 or later.
'''
f = _Cfunctions.get('libvlc_audio_output_device_list_release', None) or \
_Cfunction('libvlc_audio_... | python | {
"resource": ""
} |
q231765 | libvlc_audio_set_mute | train | def libvlc_audio_set_mute(p_mi, status):
'''Set mute status.
@param p_mi: media player.
@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/P... | python | {
"resource": ""
} |
q231766 | libvlc_audio_set_volume | train | def libvlc_audio_set_volume(p_mi, i_volume):
'''Set current software audio volume.
@param p_mi: media player.
@param i_volume: the volume in percents (0 = mute, 100 = 0dB).
@return: 0 if the volume was set, -1 if it was out of range.
'''
f = _Cfunctions.get('libvlc_audio_set_volume', None) or \
... | python | {
"resource": ""
} |
q231767 | libvlc_audio_set_track | train | def libvlc_audio_set_track(p_mi, i_track):
'''Set current audio track.
@param p_mi: media player.
@param i_track: the track ID (i_id field from track description).
@return: 0 on success, -1 on error.
'''
f = _Cfunctions.get('libvlc_audio_set_track', None) or \
_Cfunction('libvlc_audio_se... | python | {
"resource": ""
} |
q231768 | libvlc_audio_set_channel | train | def libvlc_audio_set_channel(p_mi, channel):
'''Set current audio channel.
@param p_mi: media player.
@param channel: the audio channel, See libvlc_audio_output_channel_t.
@return: 0 on success, -1 on error.
'''
f = _Cfunctions.get('libvlc_audio_set_channel', None) or \
_Cfunction('libvl... | python | {
"resource": ""
} |
q231769 | libvlc_audio_get_delay | train | def libvlc_audio_get_delay(p_mi):
'''Get current audio delay.
@param p_mi: media player.
@return: the audio delay (microseconds).
@version: LibVLC 1.1.1 or later.
'''
f = _Cfunctions.get('libvlc_audio_get_delay', None) or \
_Cfunction('libvlc_audio_get_delay', ((1,),), None,
... | python | {
"resource": ""
} |
q231770 | libvlc_audio_equalizer_get_preset_name | train | def libvlc_audio_equalizer_get_preset_name(u_index):
'''Get the name of a particular equalizer preset.
This name can be used, for example, to prepare a preset label or menu in a user
interface.
@param u_index: index of the preset, counting from zero.
@return: preset name, or NULL if there is no such... | python | {
"resource": ""
} |
q231771 | libvlc_audio_equalizer_get_band_frequency | train | def libvlc_audio_equalizer_get_band_frequency(u_index):
'''Get a particular equalizer band frequency.
This value can be used, for example, to create a label for an equalizer band control
in a user interface.
@param u_index: index of the band, counting from zero.
@return: equalizer band frequency (Hz... | python | {
"resource": ""
} |
q231772 | libvlc_audio_equalizer_get_preamp | train | def libvlc_audio_equalizer_get_preamp(p_equalizer):
'''Get the current pre-amplification value from an equalizer.
@param p_equalizer: valid equalizer handle, must not be NULL.
@return: preamp value (Hz).
@version: LibVLC 2.2.0 or later.
'''
f = _Cfunctions.get('libvlc_audio_equalizer_get_preamp'... | python | {
"resource": ""
} |
q231773 | libvlc_audio_equalizer_get_amp_at_index | train | def libvlc_audio_equalizer_get_amp_at_index(p_equalizer, u_band):
'''Get the amplification value for a particular equalizer frequency band.
@param p_equalizer: valid equalizer handle, must not be NULL.
@param u_band: index, counting from zero, of the frequency band to get.
@return: amplification value (... | python | {
"resource": ""
} |
q231774 | libvlc_vlm_set_loop | train | def libvlc_vlm_set_loop(p_instance, psz_name, b_loop):
'''Set a media's loop status.
@param p_instance: the instance.
@param psz_name: the media to work on.
@param b_loop: the new status.
@return: 0 on success, -1 on error.
'''
f = _Cfunctions.get('libvlc_vlm_set_loop', None) or \
_C... | python | {
"resource": ""
} |
q231775 | libvlc_vlm_seek_media | train | def libvlc_vlm_seek_media(p_instance, psz_name, f_percentage):
'''Seek in the named broadcast.
@param p_instance: the instance.
@param psz_name: the name of the broadcast.
@param f_percentage: the percentage to seek to.
@return: 0 on success, -1 on error.
'''
f = _Cfunctions.get('libvlc_vlm_... | python | {
"resource": ""
} |
q231776 | libvlc_vlm_show_media | train | def libvlc_vlm_show_media(p_instance, psz_name):
'''Return information about the named media as a JSON
string representation.
This function is mainly intended for debugging use,
if you want programmatic access to the state of
a vlm_media_instance_t, please use the corresponding
libvlc_vlm_get_me... | python | {
"resource": ""
} |
q231777 | libvlc_vlm_get_media_instance_position | train | def libvlc_vlm_get_media_instance_position(p_instance, psz_name, i_instance):
'''Get vlm_media instance position by name or instance id.
@param p_instance: a libvlc instance.
@param psz_name: name of vlm media instance.
@param i_instance: instance id.
@return: position as float or -1. on error.
... | python | {
"resource": ""
} |
q231778 | libvlc_vlm_get_media_instance_time | train | def libvlc_vlm_get_media_instance_time(p_instance, psz_name, i_instance):
'''Get vlm_media instance time by name or instance id.
@param p_instance: a libvlc instance.
@param psz_name: name of vlm media instance.
@param i_instance: instance id.
@return: time as integer or -1 on error.
'''
f =... | python | {
"resource": ""
} |
q231779 | libvlc_vlm_get_event_manager | train | def libvlc_vlm_get_event_manager(p_instance):
'''Get libvlc_event_manager from a vlm media.
The p_event_manager is immutable, so you don't have to hold the lock.
@param p_instance: a libvlc instance.
@return: libvlc_event_manager.
'''
f = _Cfunctions.get('libvlc_vlm_get_event_manager', None) or ... | python | {
"resource": ""
} |
q231780 | debug_callback | train | def debug_callback(event, *args, **kwds):
'''Example callback, useful for debugging.
'''
l = ['event %s' % (event.type,)]
if args:
l.extend(map(str, args))
if kwds:
l.extend(sorted('%s=%s' % t for t in kwds.items()))
print('Debug callback (%s)' % ', '.join(l)) | python | {
"resource": ""
} |
q231781 | EventManager.event_attach | train | def event_attach(self, eventtype, callback, *args, **kwds):
"""Register an event notification.
@param eventtype: the desired event type to be notified about.
@param callback: the function to call when the event occurs.
@param args: optional positional arguments for the callback.
... | python | {
"resource": ""
} |
q231782 | Instance.media_player_new | train | def media_player_new(self, uri=None):
"""Create a new MediaPlayer instance.
@param uri: an optional URI to play in the player.
"""
p = libvlc_media_player_new(self)
if uri:
p.set_media(self.media_new(uri))
p._instance = self
return p | python | {
"resource": ""
} |
q231783 | Instance.media_new | train | def media_new(self, mrl, *options):
"""Create a new Media instance.
If mrl contains a colon (:) preceded by more than 1 letter, it
will be treated as a URL. Else, it will be considered as a
local path. If you need more control, directly use
media_new_location/media_new_path meth... | python | {
"resource": ""
} |
q231784 | Instance.media_list_new | train | def media_list_new(self, mrls=None):
"""Create a new MediaList instance.
@param mrls: optional list of MRL strings
"""
l = libvlc_media_list_new(self)
# We should take the lock, but since we did not leak the
# reference, nobody else can access it.
if mrls:
... | python | {
"resource": ""
} |
q231785 | Instance.audio_output_enumerate_devices | train | def audio_output_enumerate_devices(self):
"""Enumerate the defined audio output devices.
@return: list of dicts {name:, description:, devices:}
"""
r = []
head = libvlc_audio_output_list_get(self)
if head:
i = head
while i:
i = i.c... | python | {
"resource": ""
} |
q231786 | Instance.vlm_add_input | train | 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.
@param psz_input: the input MRL.
@return: 0 on success, -1 on error.
'''
return libvlc_vlm_add_input(self, str_to_bytes(psz_na... | python | {
"resource": ""
} |
q231787 | Instance.vlm_change_media | train | 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.
@param psz_name: the name of the new broadcast.
@param psz_input: the input MRL.
... | python | {
"resource": ""
} |
q231788 | MediaPlayer.set_mrl | train | def set_mrl(self, mrl, *options):
"""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 opt... | python | {
"resource": ""
} |
q231789 | _Action.do | train | def do(self):
'Do or redo the action'
self._runner = self._generator(*self.args, **self.kwargs)
rets = next(self._runner)
if isinstance(rets, tuple):
self._text = rets[0]
return rets[1:]
elif rets is None:
self._text = ''
r... | python | {
"resource": ""
} |
q231790 | Stack.redo | train | def redo(self):
''' Redo the last undone action.
This is only possible if no other actions have occurred since the
last undo call.
'''
if self.canredo():
undoable = self._redos.pop()
with self._pausereceiver():
try:
... | python | {
"resource": ""
} |
q231791 | Stack.clear | train | def clear(self):
''' Clear the undo list. '''
self._undos.clear()
self._redos.clear()
self._savepoint = None
self._receiver = self._undos | python | {
"resource": ""
} |
q231792 | Rect.is_bbox_not_intersecting | train | def is_bbox_not_intersecting(self, other):
"""Returns False iif bounding boxed of self and other intersect"""
self_x_min, self_x_max, self_y_min, self_y_max = self.get_bbox()
other_x_min, other_x_max, other_y_min, other_y_max = other.get_bbox()
return \
self_x_min > other_x... | python | {
"resource": ""
} |
q231793 | RotoOriginRect.is_edge_not_excluding_vertices | train | def is_edge_not_excluding_vertices(self, other):
"""Returns False iif any edge excludes all vertices of other."""
c_a = cos(self.angle)
s_a = sin(self.angle)
# Get min and max of other.
other_x_min, other_x_max, other_y_min, other_y_max = other.get_bbox()
self_x_diff ... | python | {
"resource": ""
} |
q231794 | RotoOriginRect.collides | train | def collides(self, other):
"""Returns collision with axis aligned rect"""
angle = self.angle
width = self.width
height = self.height
if angle == 0:
return other.collides(Rect(-0.5 * width,
-0.5 * height, width, height))
... | python | {
"resource": ""
} |
q231795 | RotoRect.get_vec_lr | train | def get_vec_lr(self):
"""Returns vector from left to right"""
return self.width * self.cos_a(), -self.width * self.sin_a() | python | {
"resource": ""
} |
q231796 | RotoRect.get_vec_tb | train | def get_vec_tb(self):
"""Returns vector from top to bottom"""
return self.height * self.sin_a(), self.height * self.cos_a() | python | {
"resource": ""
} |
q231797 | RotoRect.get_center | train | def get_center(self):
"""Returns rectangle center"""
lr_x, lr_y = self.get_vec_lr()
tb_x, tb_y = self.get_vec_tb()
center_x = self.x + (lr_x + tb_x) / 2.0
center_y = self.y + (lr_y + tb_y) / 2.0
return center_x, center_y | python | {
"resource": ""
} |
q231798 | RotoRect.get_edges | train | def get_edges(self):
"""Returns 2-tuples for each edge
top_left
top_right
bottom_left
bottom_right
"""
lr_x, lr_y = self.get_vec_lr()
tb_x, tb_y = self.get_vec_tb()
top_left = self.x, self.y
top_right = self.x + lr_x, self.y + lr_y
... | python | {
"resource": ""
} |
q231799 | RotoRect.collides_axisaligned_rect | train | def collides_axisaligned_rect(self, other):
"""Returns collision with axis aligned other rect"""
# Shift both rects so that self is centered at origin
self_shifted = RotoOriginRect(self.width, self.height, -self.angle)
s_a = self.sin_a()
c_a = self.cos_a()
center_x = ... | python | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.