This is not a complete interface to libvlc, although most functions are present.
This interface specifies the exposed methods only, the types and structures are all factored out separately in the "internal" sub-package.
This code and that in the internal sub-package is structured out of necessity to interoperate with the libvlc native library. This code was originally derived (but has now been completely re-written) from the original JVLC source code, the copyright of which belongs to the VideoLAN team, which was distributed under GPL version 2 or later.
This system property may be useful for debugging:
-Djna.dump_memory=trueIn the native header file, generally "char*" types must be freed, but "const char*" need (must) not.
This interface is essentially a translation of the LibVLC header files to Java, with changes for JNA/Java types. The documentation in that VLC header file is reproduced here for convenience, with the appropriate Javadoc documentation convention changes, the copyright of which (mostly) belongs to the VLC authors.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intlibvlc_add_intf(libvlc_instance_t p_instance, String name) Try to start a user interface for the libvlc instance.static floatlibvlc_audio_equalizer_get_amp_at_index(libvlc_equalizer_t p_equalizer, int u_band) Get the amplification value for a particular equalizer frequency band.static intGet the number of distinct frequency bands for an equalizer.static floatlibvlc_audio_equalizer_get_band_frequency(int u_index) Get a particular equalizer band frequency.static floatlibvlc_audio_equalizer_get_preamp(libvlc_equalizer_t p_equalizer) Get the current pre-amplification value from an equalizer.static intGet the number of equalizer presets.static Stringlibvlc_audio_equalizer_get_preset_name(int u_index) Get the name of a particular equalizer preset.static libvlc_equalizer_tCreate a new default equalizer, with all frequency values zeroed.static libvlc_equalizer_tlibvlc_audio_equalizer_new_from_preset(int u_index) Create a new equalizer, with initial frequency values copied from an existing preset.static voidlibvlc_audio_equalizer_release(libvlc_equalizer_t p_equalizer) Release a previously created equalizer instance.static intlibvlc_audio_equalizer_set_amp_at_index(libvlc_equalizer_t p_equalizer, float f_amp, int u_band) Set a new amplification value for a particular equalizer frequency band.static intlibvlc_audio_equalizer_set_preamp(libvlc_equalizer_t p_equalizer, float f_preamp) Set a new pre-amplification value for an equalizer.static libvlc_module_description_tlibvlc_audio_filter_list_get(libvlc_instance_t p_instance) Returns a list of audio filters that are available.static intGet current audio channel.static longGet current audio delay.static intGet current mute status.static intGet current audio track.static intGet number of available audio tracks.static libvlc_track_description_tGet the description of available audio tracks.static intGet current software audio volume.static libvlc_audio_output_device_tGets a list of potential audio output devices, seelibvlc_audio_output_device_set(libvlc_media_player_t, String, String).static com.sun.jna.PointerGet the current audio output device identifier.static libvlc_audio_output_device_tlibvlc_audio_output_device_list_get(libvlc_instance_t p_instance, String psz_aout) Gets a list of audio output devices for a given audio output.static voidlibvlc_audio_output_device_list_release(com.sun.jna.Pointer p_list) Frees a list of available audio output devices.static voidlibvlc_audio_output_device_set(libvlc_media_player_t p_mi, String psz_audio_output, String psz_device_id) Configures an explicit audio output device.static libvlc_audio_output_tlibvlc_audio_output_list_get(libvlc_instance_t p_instance) Gets the list of available audio outputsstatic voidlibvlc_audio_output_list_release(com.sun.jna.Pointer p_list) Frees the list of available audio outputsstatic intlibvlc_audio_output_set(libvlc_media_player_t p_mi, String psz_name) Sets the audio output.static voidlibvlc_audio_set_callbacks(libvlc_media_player_t mp, libvlc_audio_play_cb play, libvlc_audio_pause_cb pause, libvlc_audio_resume_cb resume, libvlc_audio_flush_cb flush, libvlc_audio_drain_cb drain, com.sun.jna.Pointer opaque) Set callbacks and private data for decoded audio.static intlibvlc_audio_set_channel(libvlc_media_player_t p_mi, int channel) Set current audio channel.static intlibvlc_audio_set_delay(libvlc_media_player_t p_mi, long i_delay) Set current audio delay.static voidlibvlc_audio_set_format(libvlc_media_player_t mp, String format, int rate, int channels) Set decoded audio format.static voidlibvlc_audio_set_format_callbacks(libvlc_media_player_t mp, libvlc_audio_setup_cb setup, libvlc_audio_cleanup_cb cleanup) Set decoded audio format.static voidlibvlc_audio_set_mute(libvlc_media_player_t p_mi, int status) Set mute status.static intlibvlc_audio_set_track(libvlc_media_player_t p_mi, int i_track) Set current audio track.static intlibvlc_audio_set_volume(libvlc_media_player_t p_mi, int i_volume) Set current software audio volume.static voidSet callbacks and private data for decoded audio.static voidToggle mute status.static voidlibvlc_chapter_descriptions_release(com.sun.jna.Pointer p_chapters, int i_count) Release chapter descriptions.static voidClears the LibVLC error status for the current thread.static longReturn the current time as defined by LibVLC.static intDismiss a dialog.static com.sun.jna.PointerReturn the opaque pointer associated with the dialog id.static intlibvlc_dialog_post_action(libvlc_dialog_id p_id, int i_action) Post a question answer.static intlibvlc_dialog_post_login(libvlc_dialog_id p_id, String psz_username, String psz_password, int b_store) Post a login answer.static voidlibvlc_dialog_set_callbacks(libvlc_instance_t p_instance, libvlc_dialog_cbs p_cbs, com.sun.jna.Pointer p_data) Register callbacks in order to handle VLC dialogs.static voidlibvlc_dialog_set_context(libvlc_dialog_id p_id, com.sun.jna.Pointer p_context) Associate an opaque pointer with the dialog id.static StringA human-readable error message for the last LibVLC error in the calling thread.static intlibvlc_event_attach(libvlc_event_manager_t p_event_manager, int i_event_type, libvlc_callback_t f_callback, com.sun.jna.Pointer user_data) Register for an event notification.static voidlibvlc_event_detach(libvlc_event_manager_t p_event_manager, int i_event_type, libvlc_callback_t f_callback, com.sun.jna.Pointer p_user_data) Unregister an event notification.static voidlibvlc_free(com.sun.jna.Pointer ptr) Frees an heap allocation returned by a LibVLC function.static StringRetrieve libvlc changeset.static StringRetrieve libvlc compiler version.static intGet current fullscreen status.static StringRetrieve libvlc version.static voidlibvlc_log_get_context(libvlc_log_t ctx, com.sun.jna.ptr.PointerByReference module, com.sun.jna.ptr.PointerByReference file, com.sun.jna.ptr.IntByReference line) Gets debugging informations about a log message: the name of the VLC module emitting the message and the message location within the source code.static voidlibvlc_log_get_object(libvlc_log_t ctx, com.sun.jna.ptr.PointerByReference name, com.sun.jna.ptr.PointerByReference header, com.sun.jna.ptr.IntByReference id) Gets VLC object informations about a log message: the type name of the VLC object emitting the message, the object header if any and a temporaly-unique object identifier.static voidlibvlc_log_set(libvlc_instance_t p_instance, libvlc_log_cb cb, com.sun.jna.Pointer data) Sets the logging callback for a LibVLC instance.static voidlibvlc_log_unset(libvlc_instance_t p_instance) Unsets the logging callback for a LibVLC instance.static voidlibvlc_media_add_option(libvlc_media_t p_md, String ppsz_options) Add an option to the media.static voidlibvlc_media_add_option_flag(libvlc_media_t p_md, String ppsz_options, int i_flags) Add an option to the media with configurable flags.static intQuery if media service discover object is running.static size_tlibvlc_media_discoverer_list_get(libvlc_instance_t p_inst, int i_cat, com.sun.jna.ptr.PointerByReference ppp_services) Get media discoverer services by categorystatic voidlibvlc_media_discoverer_list_release(com.sun.jna.Pointer pp_services, size_t i_count) Release an array of media discoverer servicesstatic libvlc_media_list_tGet media service discover media list.static libvlc_media_discoverer_tlibvlc_media_discoverer_new(libvlc_instance_t p_inst, String psz_name) Create a media discoverer object by name.static voidRelease media discover object.static intStart media discovery.static voidStop media discovery.static libvlc_media_tDuplicate a media descriptor object.static libvlc_event_manager_tGet event manager from media descriptor object.static Stringlibvlc_media_get_codec_description(int i_type, int i_codec) Get codec description from media elementary stream.static longGet duration (in ms) of media descriptor object item.static com.sun.jna.Pointerlibvlc_media_get_meta(libvlc_media_t p_md, int e_meta) Read the meta of the media.static com.sun.jna.PointerGet the media resource locator (mrl) from a media descriptor objectstatic intGet Parsed status for media descriptor object.static intlibvlc_media_get_state(libvlc_media_t p_meta_desc) Get current state of media descriptor object.static intlibvlc_media_get_stats(libvlc_media_t p_md, libvlc_media_stats_t p_stats) get the current statistics about the mediastatic intGet the media type of the media descriptor object.static com.sun.jna.PointerGet media descriptor's user_data.static intAdd media instance to media list The libvlc_media_list_lock should be held upon entering this function.static intGet count on media list items The libvlc_media_list_lock should be held upon entering this function.static libvlc_event_manager_tGet libvlc_event_manager from this media list instance.static intFind index position of List media instance in media list.static intlibvlc_media_list_insert_media(libvlc_media_list_t p_ml, libvlc_media_t p_md, int i_pos) Insert media instance in media list on a position The libvlc_media_list_lock should be held upon entering this function.static intThis indicates if this media list is read-only from a user point of viewstatic libvlc_media_tlibvlc_media_list_item_at_index(libvlc_media_list_t p_ml, int i_pos) List media instance in media list at a position The libvlc_media_list_lock should be held upon entering this function.static voidGet lock on media list itemsstatic libvlc_media_tGet media instance from this media list instance.static libvlc_media_list_tlibvlc_media_list_new(libvlc_instance_t p_instance) Create an empty media list.static libvlc_event_manager_tReturn the event manager of this media_list_player.static libvlc_media_player_tGet media player of the media_list_player instance.static intGet current libvlc_state of media list playerstatic intIs media list playing?static libvlc_media_list_player_tlibvlc_media_list_player_new(libvlc_instance_t p_instance) Create new media_list_player.static intPlay next item from media liststatic voidPause media liststatic voidPlay media liststatic intPlay the given media itemstatic intlibvlc_media_list_player_play_item_at_index(libvlc_media_list_player_t p_mlp, int i_index) Play media list item at position indexstatic intPlay previous item from media liststatic voidRelease a media_list_player after use.static voidRetain a reference to a media player list object.static voidlibvlc_media_list_player_set_media_list(libvlc_media_list_player_t p_mlp, libvlc_media_list_t p_mlist) Set the media list associated with the playerstatic voidlibvlc_media_list_player_set_media_player(libvlc_media_list_player_t p_mlp, libvlc_media_player_t p_mi) Replace media player in media_list_player with this instance.static voidlibvlc_media_list_player_set_pause(libvlc_media_list_player_t p_mlp, int do_pause) Pause or resume media liststatic voidlibvlc_media_list_player_set_playback_mode(libvlc_media_list_player_t p_mlp, int e_mode) Sets the playback mode for the playliststatic voidStop playing media liststatic voidRelease media list created with libvlc_media_list_new().static intlibvlc_media_list_remove_index(libvlc_media_list_t p_ml, int i_pos) Remove media instance from media list on a position The libvlc_media_list_lock should be held upon entering this function.static voidRetain reference to a media liststatic voidAssociate media instance with this media list instance.static voidRelease lock on media list items The libvlc_media_list_lock should be held upon entering this function.static libvlc_media_tlibvlc_media_new_as_node(libvlc_instance_t p_instance, String psz_name) Create a media as an empty node with a given name.static libvlc_media_tlibvlc_media_new_callbacks(libvlc_instance_t instance, libvlc_media_open_cb open_cb, libvlc_media_read_cb read_cb, libvlc_media_seek_cb seek_cb, libvlc_media_close_cb close_cb, com.sun.jna.Pointer opaque) Create a media with custom callbacks to read the data from.static libvlc_media_tlibvlc_media_new_location(libvlc_instance_t p_instance, String psz_mrl) Create a media with a certain given media resource location.static libvlc_media_tlibvlc_media_new_path(libvlc_instance_t p_instance, String path) Create a media with a certain file path.static voidParse a media.static voidStop the parsing of the media When the media parsing is stopped, the libvlc_MediaParsedChanged event will be sent with the libvlc_media_parsed_status_timeout status.static intlibvlc_media_parse_with_options(libvlc_media_t p_md, int parse_flag, int timeout) Parse the media asynchronously with options.static intlibvlc_media_player_add_slave(libvlc_media_player_t p_mi, int i_type, String psz_uri, int b_select) Add a slave to the current media player.static intCan this media player be paused?static libvlc_event_manager_tGet the Event Manager from which the media player send event.static intGet movie chapter.static intGet movie chapter countstatic intlibvlc_media_player_get_chapter_count_for_title(libvlc_media_player_t p_mi, int i_title) Get title chapter countstatic intlibvlc_media_player_get_full_chapter_descriptions(libvlc_media_player_t p_mi, int i_chapters_of_title, com.sun.jna.ptr.PointerByReference pp_chapters) Get the full description of available chapters.static intlibvlc_media_player_get_full_title_descriptions(libvlc_media_player_t p_mi, com.sun.jna.ptr.PointerByReference titles) Get the full description of available titlesstatic com.sun.jna.PointerGet the Windows API window handle (HWND) previously set with libvlc_media_player_set_hwnd().static longGet the current movie length (in ms).static libvlc_media_tGet the media used by the media_player.static com.sun.jna.PointerGet the NSView handler previously set with libvlc_media_player_set_nsobject().static floatGet movie position.static floatGet the requested movie play rate.static intGets the media role.static intGet current movie statestatic longGet the current movie time (in ms).static intGet movie titlestatic intGet movie title countstatic intGet the X Window System window identifier previously set with libvlc_media_player_set_xwindow().static intHow many video outputs does this media player have?static intis_playingstatic intIs this media player seekable?static voidlibvlc_media_player_navigate(libvlc_media_player_t p_mi, int navigate) Navigate through DVD Menustatic libvlc_media_player_tlibvlc_media_player_new(libvlc_instance_t p_libvlc_instance) Create an empty Media Player objectstatic libvlc_media_player_tCreate a Media Player object from a Mediastatic voidSet next chapter (if applicable)static voidDisplay the next frame (if supported)static voidToggle pause (no effect if there is no media)static intPlaystatic voidSet previous chapter (if applicable)static intIs the current program scrambled?static voidRelease a media_player after use Decrement the reference count of a media player object.static voidRetain a reference to a media player object.static voidlibvlc_media_player_set_chapter(libvlc_media_player_t p_mi, int i_chapter) Set movie chapter (if applicable).static intlibvlc_media_player_set_equalizer(libvlc_media_player_t p_mi, libvlc_equalizer_t p_equalizer) Apply new equalizer settings to a media player.static voidlibvlc_media_player_set_hwnd(libvlc_media_player_t p_mi, com.sun.jna.Pointer drawable) Set a Win32/Win64 API window handle (HWND) where the media player should render its video output.static voidSet the media that will be used by the media_player.static voidlibvlc_media_player_set_nsobject(libvlc_media_player_t p_mi, long drawable) Set the NSView handler where the media player should render its video output.static voidlibvlc_media_player_set_pause(libvlc_media_player_t mp, int do_pause) Pause or resume (no effect if there is no media)static voidlibvlc_media_player_set_position(libvlc_media_player_t p_mi, float f_pos) Set movie position as percentage between 0.0 and 1.0.static intlibvlc_media_player_set_rate(libvlc_media_player_t p_mi, float rate) Set movie play ratestatic intSet a renderer to the media player Must be called before the first call of libvlc_media_player_play() to take effect.static intlibvlc_media_player_set_role(libvlc_media_player_t p_mi, int role) Sets the media role.static voidlibvlc_media_player_set_time(libvlc_media_player_t p_mi, long i_time) Set the movie time (in ms).static voidlibvlc_media_player_set_title(libvlc_media_player_t p_mi, int i_title) Set movie titlestatic voidlibvlc_media_player_set_video_title_display(libvlc_media_player_t p_mi, int position, int timeout) Set if, and how, the video title will be shown when media is played.static voidlibvlc_media_player_set_xwindow(libvlc_media_player_t p_mi, int drawable) Set an X Window System drawable where the media player should render its video output.static voidStop (no effect if there is no media)static intIs the player able to playstatic voidDecrement the reference count of a media descriptor object.static voidRetain a reference to a media descriptor object (libvlc_media_t).static intSave the meta previously setstatic voidlibvlc_media_set_meta(libvlc_media_t p_md, int e_meta, String psz_value) Set the meta of the media (this function will not save the meta, call libvlc_media_save_meta in order to save the meta)static voidlibvlc_media_set_user_data(libvlc_media_t p_md, com.sun.jna.Pointer p_new_user_data) Sets media descriptor's user_data.static intlibvlc_media_slaves_add(libvlc_media_t p_md, int i_type, int i_priority, String psz_uri) Add a slave to the current media.static voidClear all slaves previously added by libvlc_media_slaves_add() or internally.static intlibvlc_media_slaves_get(libvlc_media_t p_md, com.sun.jna.ptr.PointerByReference ppp_slaves) Get a media descriptor's slave list The list will contain slaves parsed by VLC or previously added by libvlc_media_slaves_add().static voidlibvlc_media_slaves_release(com.sun.jna.Pointer pp_slaves, int i_count) Release a media descriptor's slave liststatic libvlc_media_list_tGet subitems of media descriptor object.static voidCancels a thumbnailing requestlibvlc_media_thumbnail_request_by_pos(libvlc_media_t md, float pos, int speed, int width, int height, int picture_type, long timeout) Start an asynchronous thumbnail generation If the request is successfuly queued, the libvlc_MediaThumbnailGenerated is guaranteed to be emited.libvlc_media_thumbnail_request_by_time(libvlc_media_t md, long time, int speed, int width, int height, int picture_type, long timeout) Start an asynchronous thumbnail generation If the request is successfuly queued, the libvlc_MediaThumbnailGenerated is guaranteed to be emited.static intlibvlc_media_tracks_get(libvlc_media_t p_md, com.sun.jna.ptr.PointerByReference tracks) Get media descriptor's elementary streams descriptionstatic voidlibvlc_media_tracks_release(com.sun.jna.Pointer p_tracks, int i_count) Release media descriptor's elementary streams description arraystatic voidlibvlc_module_description_list_release(com.sun.jna.Pointer p_list) Release a list of module descriptions.static libvlc_instance_tlibvlc_new(int argc, com.sun.jna.StringArray argv) Create and initialize a libvlc instance.static com.sun.jna.PointerReturns the image internal buffer, including potential padding.static intReturns the height of the image in pixelsstatic intReturns the image stride, ie.static longReturns the time at which this picture was generated, in millisecondsstatic intReturns the width of the image in pixelsstatic voidDecrement the reference count of this picture.static voidIncrement the reference count of this picture.static intlibvlc_picture_save(libvlc_picture_t pic, String path) Saves this picture to a file.static intReturns the picture typestatic voidlibvlc_release(libvlc_instance_t p_instance) Decrement the reference count of a libvlc instance, and destroy it if it reaches zero.static libvlc_event_manager_tGet the event manager of the renderer discoverer The possible events to attach are @ref libvlc_RendererDiscovererItemAdded and @ref libvlc_RendererDiscovererItemDeleted.static size_tlibvlc_renderer_discoverer_list_get(libvlc_instance_t p_inst, com.sun.jna.ptr.PointerByReference ppp_services) Get media discoverer servicesstatic voidlibvlc_renderer_discoverer_list_release(com.sun.jna.Pointer pp_services, size_t i_count) Release an array of media discoverer servicesstatic libvlc_renderer_discoverer_tlibvlc_renderer_discoverer_new(libvlc_instance_t p_inst, String psz_name) Create a renderer discoverer object by name After this object is created, you should attach to events in order to be notified of the discoverer events.static voidRelease a renderer discoverer objectstatic intStart renderer discovery To stop it, call libvlc_renderer_discoverer_stop() or libvlc_renderer_discoverer_release() directly.static voidStop renderer discovery.static intGet the flags of a renderer itemstatic libvlc_renderer_item_tHold a renderer item, i.e.static StringGet the icon uri of a renderer itemstatic StringGet the human readable name of a renderer itemstatic voidReleases a renderer item, i.e.static StringGet the type (not translated) of a renderer item.static voidlibvlc_retain(libvlc_instance_t p_instance) Increments the reference count of a libvlc instance.static voidlibvlc_set_app_id(libvlc_instance_t p_instance, String id, String version, String icon) Sets some meta-informations about the application.static voidlibvlc_set_fullscreen(libvlc_media_player_t p_mi, int b_fullscreen) Enable or disable fullscreen.static voidlibvlc_set_user_agent(libvlc_instance_t p_instance, String name, String http) Sets the application name.static voidlibvlc_title_descriptions_release(com.sun.jna.Pointer p_titles, int i_count) Release title descriptions.static voidToggle fullscreen status on non-embedded video outputs.static voidlibvlc_track_description_list_release(com.sun.jna.Pointer p_track_description) Release (free) libvlc_track_description_tstatic libvlc_module_description_tlibvlc_video_filter_list_get(libvlc_instance_t p_instance) Returns a list of video filters that are available.static floatlibvlc_video_get_adjust_float(libvlc_media_player_t p_mi, int option) Get float adjust option.static intlibvlc_video_get_adjust_int(libvlc_media_player_t p_mi, int option) Get integer adjust option.static com.sun.jna.PointerGet current video aspect ratio.static com.sun.jna.PointerGet current crop filter geometry.static intlibvlc_video_get_cursor(libvlc_media_player_t p_mi, int num, com.sun.jna.Pointer px, com.sun.jna.Pointer py) Get the mouse pointer coordinates over a video.static intlibvlc_video_get_logo_int(libvlc_media_player_t p_mi, int option) Get integer logo option.static intlibvlc_video_get_marquee_int(libvlc_media_player_t p_mi, int option) Get an integer marquee option valuestatic com.sun.jna.Pointerlibvlc_video_get_marquee_string(libvlc_media_player_t p_mi, int option) Get a string marquee option valuestatic floatGet the current video scaling factor.static intlibvlc_video_get_size(libvlc_media_player_t p_mi, int num, com.sun.jna.ptr.IntByReference px, com.sun.jna.ptr.IntByReference py) Get the pixel dimensions of a video.static intGet current video subtitle.static intGet the number of available video subtitles.static longGet the current subtitle delay.static libvlc_track_description_tGet the description of available video subtitles.static intGet current teletext page requested or 0 if it's disabled.static intGet current video track.static intGet number of available video tracks.static libvlc_track_description_tGet the description of available video tracks.static libvlc_video_viewpoint_tCreate a video viewpoint structure.static voidlibvlc_video_set_adjust_float(libvlc_media_player_t p_mi, int option, float value) Set adjust option as float.static voidlibvlc_video_set_adjust_int(libvlc_media_player_t p_mi, int option, int value) Set adjust option as integer.static voidlibvlc_video_set_aspect_ratio(libvlc_media_player_t p_mi, String psz_aspect) Set new video aspect ratio.static voidlibvlc_video_set_callbacks(libvlc_media_player_t mp, libvlc_lock_callback_t lock, libvlc_unlock_callback_t unlock, libvlc_display_callback_t display, com.sun.jna.Pointer opaque) Set callbacks and private data to render decoded video to a custom area in memory.static voidlibvlc_video_set_crop_geometry(libvlc_media_player_t p_mi, String psz_geometry) Set new crop filter geometry.static voidlibvlc_video_set_deinterlace(libvlc_media_player_t p_mi, String psz_mode) Enable or disable deinterlace filterstatic voidlibvlc_video_set_format(libvlc_media_player_t mp, String chroma, int width, int height, int pitch) Set decoded video chroma and dimensions.static voidlibvlc_video_set_format_callbacks(libvlc_media_player_t mp, libvlc_video_format_cb setup, libvlc_video_cleanup_cb cleanup) Set decoded video chroma and dimensions.static voidlibvlc_video_set_key_input(libvlc_media_player_t p_mi, int on) Enable or disable key press events handling, according to the LibVLC hotkeys configuration.static voidlibvlc_video_set_logo_int(libvlc_media_player_t p_mi, int option, int value) Set logo option as integer.static voidlibvlc_video_set_logo_string(libvlc_media_player_t p_mi, int option, String psz_value) Set logo option as string.static voidlibvlc_video_set_marquee_int(libvlc_media_player_t p_mi, int option, int i_val) Enable, disable or set an integer marquee option Setting libvlc_marquee_Enable has the side effect of enabling (arg !0) or disabling (arg 0) the marq filter.static voidlibvlc_video_set_marquee_string(libvlc_media_player_t p_mi, int option, String psz_text) Set a marquee string optionstatic voidlibvlc_video_set_mouse_input(libvlc_media_player_t p_mi, int on) Enable or disable mouse click events handling.static voidlibvlc_video_set_scale(libvlc_media_player_t p_mi, float f_factor) Set the video scaling factor.static intlibvlc_video_set_spu(libvlc_media_player_t p_mi, int i_spu) Set new video subtitle.static intlibvlc_video_set_spu_delay(libvlc_media_player_t p_mi, long i_delay) Set the subtitle delay.static voidlibvlc_video_set_teletext(libvlc_media_player_t p_mi, int i_page) Set new teletext page to retrieve.static intlibvlc_video_set_track(libvlc_media_player_t p_mi, int i_track) Set video track.static intlibvlc_video_take_snapshot(libvlc_media_player_t p_mi, int num, String psz_filepath, int i_width, int i_height) Take a snapshot of the current video window.static intlibvlc_video_update_viewpoint(libvlc_media_player_t p_mi, libvlc_video_viewpoint_t p_viewpoint, int b_absolute) Update the video viewpoint information.
-
Method Details
-
libvlc_errmsg
A human-readable error message for the last LibVLC error in the calling thread. The resulting string is valid until another error occurs (at least until the next LibVLC call).This will be NULL if there was no error.
- Returns:
- error message, or
NULL
-
libvlc_clearerr
public static void libvlc_clearerr()Clears the LibVLC error status for the current thread. This is optional. By default, the error status is automatically overridden when a new error occurs, and destroyed when the thread exits. -
libvlc_new
Create and initialize a libvlc instance.- Parameters:
argc- the number of argumentsargv- command-line-type arguments- Returns:
- the libvlc instance or NULL in case of error
-
libvlc_release
Decrement the reference count of a libvlc instance, and destroy it if it reaches zero.- Parameters:
p_instance- the instance to destroy
-
libvlc_retain
Increments the reference count of a libvlc instance. The initial reference count is 1 after libvlc_new() returns.- Parameters:
p_instance- the instance to reference
-
libvlc_add_intf
Try to start a user interface for the libvlc instance.- Parameters:
p_instance- the instancename- interface name, or NULL for default- Returns:
- 0 on success, -1 on error.
-
libvlc_set_user_agent
Sets the application name. LibVLC passes this as the user agent string when a protocol requires it.- Parameters:
p_instance- LibVLC instancename- human-readable application name, e.g. "FooBar player 1.2.3"http- HTTP User Agent, e.g. "FooBar/1.2.3 Python/2.6.0"- Since:
- LibVLC 1.1.1
-
libvlc_set_app_id
public static void libvlc_set_app_id(libvlc_instance_t p_instance, String id, String version, String icon) Sets some meta-informations about the application.See also
libvlc_set_user_agent(libvlc_instance_t, String, String).- Parameters:
p_instance- LibVLC instanceid- Java-style application identifier, e.g. "com.acme.foobar"version- application version numbers, e.g. "1.2.3"icon- application icon name, e.g. "foobar"- Since:
- LibVLC 2.1.0
-
libvlc_get_version
Retrieve libvlc version. Example: "1.1.0-git The Luggage"- Returns:
- a string containing the libvlc version
-
libvlc_get_compiler
Retrieve libvlc compiler version. Example: "gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)"- Returns:
- a string containing the libvlc compiler version
-
libvlc_get_changeset
Retrieve libvlc changeset. Example: "aa9bce0bc4"- Returns:
- a string containing the libvlc changeset
-
libvlc_free
public static void libvlc_free(com.sun.jna.Pointer ptr) Frees an heap allocation returned by a LibVLC function. If you know you're using the same underlying C run-time as the LibVLC implementation, then you can call ANSI C free() directly instead.- Parameters:
ptr- the pointer
-
libvlc_event_attach
public static int libvlc_event_attach(libvlc_event_manager_t p_event_manager, int i_event_type, libvlc_callback_t f_callback, com.sun.jna.Pointer user_data) Register for an event notification.- Parameters:
p_event_manager- the event manager to which you want to attach to. Generally it is obtained by vlc_my_object_event_manager() where my_object is the object you want to listen to.i_event_type- the desired event to which we want to listenf_callback- the function to call when i_event_type occursuser_data- user provided data to carry with the event- Returns:
- 0 on success, ENOMEM on error
-
libvlc_event_detach
public static void libvlc_event_detach(libvlc_event_manager_t p_event_manager, int i_event_type, libvlc_callback_t f_callback, com.sun.jna.Pointer p_user_data) Unregister an event notification.- Parameters:
p_event_manager- the event manageri_event_type- the desired event to which we want to unregisterf_callback- the function to call when i_event_type occursp_user_data- user provided data to carry with the event
-
libvlc_log_get_context
public static void libvlc_log_get_context(libvlc_log_t ctx, com.sun.jna.ptr.PointerByReference module, com.sun.jna.ptr.PointerByReference file, com.sun.jna.ptr.IntByReference line) Gets debugging informations about a log message: the name of the VLC module emitting the message and the message location within the source code.The returned module name and file name will be NULL if unknown.
The returned line number will similarly be zero if unknown.
The returned module name and source code file name, if non-NULL, are only valid until the logging callback returns.*
- Parameters:
ctx- message context (as passed to thelibvlc_log_cb)module- module name storage (or NULL) [OUT]file- source code file name storage (or NULL) [OUT]line- source code file line number storage (or NULL) [OUT]- Since:
- LibVLC 2.1.0 or later
-
libvlc_log_get_object
public static void libvlc_log_get_object(libvlc_log_t ctx, com.sun.jna.ptr.PointerByReference name, com.sun.jna.ptr.PointerByReference header, com.sun.jna.ptr.IntByReference id) Gets VLC object informations about a log message: the type name of the VLC object emitting the message, the object header if any and a temporaly-unique object identifier. These informations are mainly meant for manual troubleshooting.The returned type name may be "generic" if unknown, but it cannot be NULL.
The returned header will be NULL if unset; in current versions, the header is used to distinguish for VLM inputs.
The returned object ID will be zero if the message is not associated with any VLC object.
The returned module name and source code file name, if non-NULL, are only valid until the logging callback returns.
- Parameters:
ctx- message context (as passed to thelibvlc_log_cb)name- object name storage (or NULL) [OUT]header- object header (or NULL) [OUT]id- source code file line number storage (or NULL) [OUT]- Since:
- LibVLC 2.1.0 or later
-
libvlc_log_unset
Unsets the logging callback for a LibVLC instance. This is rarely needed: the callback is implicitly unset when the instance is destroyed.This function will wait for any pending callbacks invocation to complete (causing a deadlock if called from within the callback).
- Parameters:
p_instance- the instance- Since:
- LibVLC 2.1.0 or later
-
libvlc_log_set
public static void libvlc_log_set(libvlc_instance_t p_instance, libvlc_log_cb cb, com.sun.jna.Pointer data) Sets the logging callback for a LibVLC instance.This function is thread-safe: it will wait for any pending callbacks invocation to complete.
Some log messages (especially debug) are emitted by LibVLC while is being initialized. These messages cannot be captured with this interface.
A deadlock may occur if this function is called from the callback.
- Parameters:
p_instance- the instancecb- callback function pointerdata- opaque data pointer for the callback function- Since:
- LibVLC 2.1.0 or later
-
libvlc_module_description_list_release
public static void libvlc_module_description_list_release(com.sun.jna.Pointer p_list) Release a list of module descriptions.- Parameters:
p_list- the list to be released
-
libvlc_audio_filter_list_get
public static libvlc_module_description_t libvlc_audio_filter_list_get(libvlc_instance_t p_instance) Returns a list of audio filters that are available.- Parameters:
p_instance- libvlc instance- Returns:
- a list of module descriptions. It should be freed with libvlc_module_description_list_release(). In case of an error, NULL is returned.
- See Also:
-
libvlc_video_filter_list_get
public static libvlc_module_description_t libvlc_video_filter_list_get(libvlc_instance_t p_instance) Returns a list of video filters that are available.- Parameters:
p_instance- libvlc instance- Returns:
- a list of module descriptions. It should be freed with libvlc_module_description_list_release(). In case of an error, NULL is returned.
- See Also:
-
libvlc_clock
public static long libvlc_clock()Return the current time as defined by LibVLC. The unit is the microsecond. Time increases monotonically (regardless of time zone changes and RTC adjustments). The origin is arbitrary but consistent across the whole system (e.g. the system uptime, the time since the system was booted). \note On systems that support it, the POSIX monotonic clock is used.- Returns:
- clock value
-
libvlc_media_new_location
public static libvlc_media_t libvlc_media_new_location(libvlc_instance_t p_instance, String psz_mrl) Create a media with a certain given media resource location.- Parameters:
p_instance- the instancepsz_mrl- the MRL to read- Returns:
- the newly created media or NULL on error
- See Also:
-
libvlc_media_new_path
Create a media with a certain file path.- Parameters:
p_instance- the instancepath- local filesystem path- Returns:
- the newly created media or NULL on error
- See Also:
-
libvlc_media_new_callbacks
public static libvlc_media_t libvlc_media_new_callbacks(libvlc_instance_t instance, libvlc_media_open_cb open_cb, libvlc_media_read_cb read_cb, libvlc_media_seek_cb seek_cb, libvlc_media_close_cb close_cb, com.sun.jna.Pointer opaque) Create a media with custom callbacks to read the data from.If open_cb is NULL, the opaque pointer will be passed to read_cb, seek_cb and close_cb, and the stream size will be treated as unknown.
The callbacks may be called asynchronously (from another thread). A single stream instance need not be reentrant. However the open_cb needs to be reentrant if the media is used by multiple player instances.
The callbacks may be used until all or any player instances that were supplied the media item are stopped.
- Parameters:
instance- LibVLC instanceopen_cb- callback to open the custom bitstream input mediaread_cb- callback to read data (must not be NULL)seek_cb- callback to seek, or NULL if seeking is not supportedclose_cb- callback to close the media, or NULL if unnecessaryopaque- data pointer for the open callback- Returns:
- the newly created media or NULL on error
- Since:
- LibVLC 3.0.0 and later.
- See Also:
-
libvlc_media_new_as_node
public static libvlc_media_t libvlc_media_new_as_node(libvlc_instance_t p_instance, String psz_name) Create a media as an empty node with a given name.- Parameters:
p_instance- the instancepsz_name- the name of the node- Returns:
- the new empty media or NULL on error
- See Also:
-
libvlc_media_add_option
Add an option to the media. This option will be used to determine how the media_player will read the media. This allows to use VLC's advanced reading/streaming options on a per-media basis. The options are detailed in vlc --long-help, for instance "--sout-all"- Parameters:
p_md- the media descriptorppsz_options- the options (as a string)
-
libvlc_media_add_option_flag
public static void libvlc_media_add_option_flag(libvlc_media_t p_md, String ppsz_options, int i_flags) Add an option to the media with configurable flags. This option will be used to determine how the media_player will read the media. This allows to use VLC's advanced reading/streaming options on a per-media basis. The options are detailed in vlc --long-help, for instance "--sout-all"- Parameters:
p_md- the media descriptorppsz_options- the options (as a string)i_flags- the flags for this option
-
libvlc_media_retain
Retain a reference to a media descriptor object (libvlc_media_t). Use libvlc_media_release() to decrement the reference count of a media descriptor object.- Parameters:
p_md- the media descriptor
-
libvlc_media_release
Decrement the reference count of a media descriptor object. If the reference count is 0, then libvlc_media_release() will release the media descriptor object. It will send out an libvlc_MediaFreed event to all listeners. If the media descriptor object has been released it should not be used again.- Parameters:
p_md- the media descriptor
-
libvlc_media_get_mrl
Get the media resource locator (mrl) from a media descriptor object- Parameters:
p_md- a media descriptor object- Returns:
- string with mrl of media descriptor object
-
libvlc_media_duplicate
Duplicate a media descriptor object.- Parameters:
p_md- a media descriptor object.- Returns:
- duplicated media descriptor
-
libvlc_media_get_meta
Read the meta of the media. If the media has not yet been parsed this will return NULL. This methods automatically calls libvlc_media_parse_async(), so after calling it you may receive a libvlc_MediaMetaChanged event. If you prefer a synchronous version ensure that you call libvlc_media_parse() before get_meta().- Parameters:
p_md- the media descriptore_meta- the meta to read- Returns:
- the media's meta
- See Also:
-
libvlc_media_set_meta
Set the meta of the media (this function will not save the meta, call libvlc_media_save_meta in order to save the meta)- Parameters:
p_md- the media descriptore_meta- the meta to writepsz_value- the media's meta
-
libvlc_media_save_meta
Save the meta previously set- Parameters:
p_md- the media desriptor- Returns:
- true if the write operation was successfull
-
libvlc_media_get_state
Get current state of media descriptor object. Possible media states are defined in libvlc_structures.c (libvlc_NothingSpecial=0, libvlc_Opening, libvlc_Buffering, libvlc_Playing, libvlc_Paused, libvlc_Stopped, libvlc_Ended, libvlc_Error).- Parameters:
p_meta_desc- a media descriptor object- Returns:
- state of media descriptor object
-
libvlc_media_get_stats
get the current statistics about the media- Parameters:
p_md- media descriptor objectp_stats- structure that contain the statistics about the media (this structure must be allocated by the caller)- Returns:
- true if the statistics are available, false otherwise
-
libvlc_media_subitems
Get subitems of media descriptor object. This will increment the reference count of supplied media descriptor object. Use libvlc_media_list_release() to decrement the reference counting.- Parameters:
p_md- media descriptor object- Returns:
- list of media descriptor subitems or NULL This method uses libvlc_media_list_t, however, media_list usage is optional and this is here for convenience
-
libvlc_media_event_manager
Get event manager from media descriptor object. NOTE: this function doesn't increment reference counting.- Parameters:
p_md- a media descriptor object- Returns:
- event manager object
-
libvlc_media_get_duration
Get duration (in ms) of media descriptor object item.- Parameters:
p_md- media descriptor object- Returns:
- duration of media item or -1 on error
-
libvlc_media_parse_async
Parse a media. This fetches (local) art, meta data and tracks information. The method is the asynchronous of libvlc_media_parse(). To track when this is over you can listen to libvlc_MediaParsedChanged event. However if the media was already parsed you will not receive this event.- Parameters:
media- media descriptor object- See Also:
-
libvlc_media_parse_with_options
Parse the media asynchronously with options. This fetches (local or network) art, meta data and/or tracks information. This method is the extended version of libvlc_media_parse_with_options(). To track when this is over you can listen to libvlc_MediaParsedChanged event. However if this functions returns an error, you will not receive any events. It uses a flag to specify parse options. All these flags can be combined. By default, media is parsed if it's a local file. Parsing can be aborted with libvlc_media_parse_stop().- Parameters:
p_md- media descriptor objectparse_flag- parse optionstimeout- maximum time allowed to preparse the media. If -1, the default "preparse-timeout" option will be used as a timeout. If 0, it will wait indefinitely. If > 0, the timeout will be used (in milliseconds).- Returns:
- -1 in case of error, 0 otherwise
- Since:
- LibVLC 3.0.0 or later
- See Also:
-
libvlc_media_parse_stop
Stop the parsing of the media When the media parsing is stopped, the libvlc_MediaParsedChanged event will be sent with the libvlc_media_parsed_status_timeout status.- Parameters:
p_md- media descriptor object- Since:
- version LibVLC 3.0.0 or later
- See Also:
-
libvlc_media_get_parsed_status
Get Parsed status for media descriptor object.- Parameters:
p_md- media descriptor object- Returns:
- a value of the libvlc_media_parsed_status_t enum
- Since:
- LibVLC 3.0.0 or later
-
libvlc_media_set_user_data
public static void libvlc_media_set_user_data(libvlc_media_t p_md, com.sun.jna.Pointer 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 an native object that references a libvlc_media_t pointer- Parameters:
p_md- media descriptor objectp_new_user_data- pointer to user data
-
libvlc_media_get_user_data
Get media descriptor's user_data. user_data is specialized data accessed by the host application, VLC.framework uses it as a pointer to an native object that references a libvlc_media_t pointer- Parameters:
p_md- media descriptor object- Returns:
- user-data pointer
-
libvlc_media_tracks_get
public static int libvlc_media_tracks_get(libvlc_media_t p_md, com.sun.jna.ptr.PointerByReference tracks) Get media descriptor's elementary streams descriptionNote, you need to parse or play the media at least once before calling this function.
Not doing this will result in an empty array.
- Parameters:
p_md- media descriptor objecttracks- address to store an allocated array of Elementary Streams descriptions (must be freed with libvlc_media_tracks_release by the caller) [OUT]- Returns:
- the number of Elementary Streams (zero on error)
- Since:
- LibVLC 2.1.0 and later.
-
libvlc_media_tracks_release
public static void libvlc_media_tracks_release(com.sun.jna.Pointer p_tracks, int i_count) Release media descriptor's elementary streams description array- Parameters:
p_tracks- tracks info array to releasei_count- number of elements in the array- Since:
- LibVLC 2.1.0 and later.
-
libvlc_media_get_type
Get the media type of the media descriptor object.- Parameters:
p_md- media descriptor object- Returns:
- media type
- Since:
- LibVLC 3.0.0 and later.
-
libvlc_media_thumbnail_request_by_time
public static libvlc_media_thumbnail_request_t libvlc_media_thumbnail_request_by_time(libvlc_media_t md, long time, int speed, int width, int height, int picture_type, long timeout) Start an asynchronous thumbnail generation If the request is successfuly queued, the libvlc_MediaThumbnailGenerated is guaranteed to be emited.- Parameters:
md- media descriptor objecttime- The time at which the thumbnail should be generatedspeed- The seeking speed \sa{libvlc_thumbnailer_seek_speed_t}width- The thumbnail widthheight- the thumbnail heightpicture_type- The thumbnail picture type \sa{libvlc_picture_type_t}timeout- A timeout value in ms, or 0 to disable timeout- Returns:
- A valid opaque request object, or NULL in case of failure.
- Since:
- libvlc 4.0 or later
- See Also:
-
libvlc_media_thumbnail_request_by_pos
public static libvlc_media_thumbnail_request_t libvlc_media_thumbnail_request_by_pos(libvlc_media_t md, float pos, int speed, int width, int height, int picture_type, long timeout) Start an asynchronous thumbnail generation If the request is successfuly queued, the libvlc_MediaThumbnailGenerated is guaranteed to be emited.- Parameters:
md- media descriptor objectpos- The position at which the thumbnail should be generatedspeed- The seeking speed \sa{libvlc_thumbnailer_seek_speed_t}width- The thumbnail widthheight- the thumbnail heightpicture_type- The thumbnail picture type \sa{libvlc_picture_type_t}timeout- A timeout value in ms, or 0 to disable timeout- Returns:
- A valid opaque request object, or NULL in case of failure.
- Since:
- libvlc 4.0 or later
- See Also:
-
libvlc_media_thumbnail_cancel
Cancels a thumbnailing requestCancelling the request will still cause libvlc_MediaThumbnailGenerated event to be emitted, with a NULL libvlc_picture_t.
If the request is cancelled after its completion, the behavior is undefined.
- Parameters:
p_req- An opaque thumbnail request object.
-
libvlc_media_get_codec_description
Get codec description from media elementary stream.- Parameters:
i_type- i_type from libvlc_media_track_ti_codec- i_codec or i_original_fourcc from libvlc_media_track_t- Returns:
- codec description
- Since:
- LibVLC 3.0.0 and later.
-
libvlc_media_slaves_add
public static int libvlc_media_slaves_add(libvlc_media_t p_md, int i_type, int i_priority, String psz_uri) Add a slave to the current media.A slave is an external input source that may contains an additional subtitle track (like a .srt) or an additional audio track (like a .ac3).
This function must be called before the media is parsed (via libvlc_media_parse_with_options()) or before the media is played (via libvlc_media_player_play())
- Parameters:
p_md- media descriptor objecti_type- subtitle or audioi_priority- from 0 (low priority) to 4 (high priority)psz_uri- Uri of the slave (should contain a valid scheme).- Returns:
- 0 on success, -1 on error.
- Since:
- LibVLC 3.0.0 and later.
-
libvlc_media_slaves_clear
Clear all slaves previously added by libvlc_media_slaves_add() or internally.- Parameters:
p_md- media descriptor object- Since:
- LibVLC 3.0.0 and later.
-
libvlc_media_slaves_get
public static int libvlc_media_slaves_get(libvlc_media_t p_md, com.sun.jna.ptr.PointerByReference ppp_slaves) Get a media descriptor's slave list The list will contain slaves parsed by VLC or previously added by libvlc_media_slaves_add(). The typical use case of this function is to save a list of slave in a database for a later use.- Parameters:
p_md- media descriptor objectppp_slaves- address to store an allocated array of slaves (must be freed with libvlc_media_slaves_release()) [OUT]- Returns:
- the number of slaves (zero on error)
- Since:
- LibVLC 3.0.0 and later.
-
libvlc_media_slaves_release
public static void libvlc_media_slaves_release(com.sun.jna.Pointer pp_slaves, int i_count) Release a media descriptor's slave list- Parameters:
pp_slaves- slave array to releasei_count- number of elements in the array- Since:
- LibVLC 3.0.0 and later.
-
libvlc_media_player_new
Create an empty Media Player object- Parameters:
p_libvlc_instance- the libvlc instance in which the Media Player should be created.- Returns:
- a new media player object, or NULL on error.
-
libvlc_media_player_new_from_media
Create a Media Player object from a Media- Parameters:
p_md- the media. Afterwards the p_md can be safely destroyed.- Returns:
- a new media player object, or NULL on error.
-
libvlc_media_player_release
Release a media_player after use Decrement the reference count of a media player object. If the reference count is 0, then libvlc_media_player_release() will release the media player object. If the media player object has been released, then it should not be used again.- Parameters:
p_mi- the Media Player to free
-
libvlc_media_player_retain
Retain a reference to a media player object. Use libvlc_media_player_release() to decrement reference count.- Parameters:
p_mi- media player object
-
libvlc_media_player_set_media
Set the media that will be used by the media_player. If any, previous md will be released.- Parameters:
p_mi- the Media Playerp_md- the Media. Afterwards the p_md can be safely destroyed.
-
libvlc_media_player_get_media
Get the media used by the media_player.You do not need to invoke libvlc_media_player_release().
- Parameters:
p_mi- the Media Player- Returns:
- the media associated with p_mi, or NULL if no media is associated
-
libvlc_media_player_event_manager
Get the Event Manager from which the media player send event.- Parameters:
p_mi- the Media Player- Returns:
- the event manager associated with p_mi
-
libvlc_media_player_is_playing
is_playing- Parameters:
p_mi- the Media Player- Returns:
- 1 if the media player is playing, 0 otherwise
-
libvlc_media_player_play
Play- Parameters:
p_mi- the Media Player- Returns:
- 0 if playback started (and was already started), or -1 on error.
-
libvlc_media_player_set_pause
Pause or resume (no effect if there is no media)- Parameters:
mp- the Media Playerdo_pause- play/resume if zero, pause if non-zero- Since:
- LibVLC 1.1.1
-
libvlc_media_player_pause
Toggle pause (no effect if there is no media)- Parameters:
p_mi- the Media Player
-
libvlc_media_player_stop
Stop (no effect if there is no media)- Parameters:
p_mi- the Media Player
-
libvlc_media_player_set_renderer
public static int libvlc_media_player_set_renderer(libvlc_media_player_t p_mi, libvlc_renderer_item_t p_item) Set a renderer to the media player Must be called before the first call of libvlc_media_player_play() to take effect.- Parameters:
p_mi- the Media Playerp_item- an item discovered by libvlc_renderer_discoverer_start()- Returns:
- 0 on success, -1 on error.
- Since:
- LibVLC 3.0.0 or later
- See Also:
-
libvlc_video_set_callbacks
public static void libvlc_video_set_callbacks(libvlc_media_player_t mp, libvlc_lock_callback_t lock, libvlc_unlock_callback_t unlock, libvlc_display_callback_t display, com.sun.jna.Pointer opaque) Set callbacks and private data to render decoded video to a custom area in memory.Use libvlc_video_set_format() or libvlc_video_set_format_callbacks() to configure the decoded format.
- Parameters:
mp- the media playerlock- callback to allocate video memoryunlock- callback to release video memorydisplay- callback when ready to display a video frameopaque- private pointer for the three callbacks (as first parameter)- Since:
- LibVLC 1.1.1
-
libvlc_video_set_format
public static void libvlc_video_set_format(libvlc_media_player_t mp, String chroma, int width, int height, int pitch) Set decoded video chroma and dimensions.This only works in combination with libvlc_video_set_callbacks(), and is mutually exclusive with libvlc_video_set_format_callbacks().
- Parameters:
mp- the media playerchroma- a four-characters string identifying the chroma (e.g. "RV32" or "YUYV")width- pixel widthheight- pixel heightpitch- line pitch (in bytes)- Since:
- LibVLC 1.1.1 bug: All pixel planes are expected to have the same pitch. To use the YCbCr color space with chrominance subsampling, consider using libvlc_video_set_format_callback() instead.
-
libvlc_video_set_format_callbacks
public static void libvlc_video_set_format_callbacks(libvlc_media_player_t mp, libvlc_video_format_cb setup, libvlc_video_cleanup_cb cleanup) Set decoded video chroma and dimensions. This only works in combination with libvlc_video_set_callbacks().- Parameters:
mp- the media playersetup- callback to select the video format (cannot be NULL)cleanup- callback to release any allocated resources (or NULL)- Since:
- LibVLC 2.0.0 or later
-
libvlc_media_player_set_nsobject
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:\@protocol VLCOpenGLVideoViewEmbedding <NSObject> - (void)addVoutSubview:(NSView*)view; - (void)removeVoutSubview:(NSView *)view; \@endOr it can be an NSView object. If you want to use it along with Qt4 see the QMacCocoaViewContainer. Then the following code should work:{ NSView *video = [[NSView alloc] init]; QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent); libvlc_media_player_set_nsobject(mp, video); [video release]; }You can find a live example in VLCVideoView in VLCKit.framework.- Parameters:
p_mi- the Media Playerdrawable- the drawable that is either an NSView or an object following the VLCOpenGLVideoViewEmbedding protocol.
-
libvlc_media_player_get_nsobject
Get the NSView handler previously set with libvlc_media_player_set_nsobject().- Parameters:
p_mi- the Media Player- Returns:
- the NSView handler or 0 if none where set
-
libvlc_media_player_set_xwindow
Set an X Window System drawable where the media player should render its video output. If LibVLC was built without X11 output support, then this has no effects. The specified identifier must correspond to an existing Input/Output class X11 window. Pixmaps are not supported. The caller shall ensure that the X11 server is the same as the one the VLC instance has been configured with.- Parameters:
p_mi- the Media Playerdrawable- the ID of the X window
-
libvlc_media_player_get_xwindow
Get the X Window System window identifier previously set with libvlc_media_player_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).- Parameters:
p_mi- the Media Player- Returns:
- an X window ID, or 0 if none where set.
-
libvlc_media_player_set_hwnd
public static void libvlc_media_player_set_hwnd(libvlc_media_player_t p_mi, com.sun.jna.Pointer drawable) Set a Win32/Win64 API window handle (HWND) where the media player should render its video output. If LibVLC was built without Win32/Win64 API output support, then this has no effects.- Parameters:
p_mi- the Media Playerdrawable- windows handle of the drawable
-
libvlc_media_player_get_hwnd
Get the Windows API window handle (HWND) previously set with libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC is not currently outputting any video to it.- Parameters:
p_mi- the Media Player- Returns:
- a window handle or NULL if there are none.
-
libvlc_audio_set_callbacks
public static void libvlc_audio_set_callbacks(libvlc_media_player_t mp, libvlc_audio_play_cb play, libvlc_audio_pause_cb pause, libvlc_audio_resume_cb resume, libvlc_audio_flush_cb flush, libvlc_audio_drain_cb drain, com.sun.jna.Pointer opaque) Set callbacks and private data for decoded audio.Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks() to configure the decoded audio format.
- Parameters:
mp- the media playerplay- callback to play audio samples (must not be NULL)pause- callback to pause playback (or NULL to ignore)resume- callback to resume playback (or NULL to ignore)flush- callback to flush audio buffers (or NULL to ignore)drain- callback to drain audio buffers (or NULL to ignore)opaque- private pointer for the audio callbacks (as first parameter)- Since:
- LibVLC 2.0.0 or later
-
libvlc_audio_set_volume_callback
public static void libvlc_audio_set_volume_callback(libvlc_media_player_t mp, libvlc_audio_set_volume_cb set_volume) Set callbacks and private data for decoded audio. Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks() to configure the decoded audio format.- Parameters:
mp- the media playerset_volume- callback to apply audio volume, or NULL to apply volume in software- Since:
- LibVLC 2.0.0 or later
-
libvlc_audio_set_format_callbacks
public static void libvlc_audio_set_format_callbacks(libvlc_media_player_t mp, libvlc_audio_setup_cb setup, libvlc_audio_cleanup_cb cleanup) Set decoded audio format. This only works in combination with libvlc_audio_set_callbacks().- Parameters:
mp- the media playersetup- callback to select the audio format (cannot be NULL)cleanup- callback to release any allocated resources (or NULL)- Since:
- LibVLC 2.0.0 or later
-
libvlc_audio_set_format
public static void libvlc_audio_set_format(libvlc_media_player_t mp, String format, int rate, int channels) Set decoded audio format. This only works in combination with libvlc_audio_set_callbacks(), and is mutually exclusive with libvlc_audio_set_format_callbacks().- Parameters:
mp- the media playerformat- a four-characters string identifying the sample format (e.g. "S16N" or "f32l")rate- sample rate (expressed in Hz)channels- channels count- Since:
- LibVLC 2.0.0 or later
-
libvlc_media_player_get_length
Get the current movie length (in ms).- Parameters:
p_mi- the Media Player- Returns:
- the movie length (in ms), or -1 if there is no media.
-
libvlc_media_player_get_time
Get the current movie time (in ms).- Parameters:
p_mi- the Media Player- Returns:
- the movie time (in ms), or -1 if there is no media.
-
libvlc_media_player_set_time
Set the movie time (in ms).This has no effect if no media is being played.
Not all formats and protocols support this.
- Parameters:
p_mi- the Media Playeri_time- the movie time (in ms).
-
libvlc_media_player_get_position
Get movie position.- Parameters:
p_mi- the Media Player- Returns:
- movie position, or -1. in case of error
-
libvlc_media_player_set_position
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.
- Parameters:
p_mi- the Media Playerf_pos- the position
-
libvlc_media_player_set_chapter
Set movie chapter (if applicable).- Parameters:
p_mi- the Media Playeri_chapter- chapter number to play
-
libvlc_media_player_get_chapter
Get movie chapter.- Parameters:
p_mi- the Media Player- Returns:
- chapter number currently playing, or -1 if there is no media.
-
libvlc_media_player_get_chapter_count
Get movie chapter count- Parameters:
p_mi- the Media Player- Returns:
- number of chapters in movie, or -1.
-
libvlc_media_player_will_play
Is the player able to play- Parameters:
p_mi- the Media Player- Returns:
- boolean
-
libvlc_media_player_get_chapter_count_for_title
public static int libvlc_media_player_get_chapter_count_for_title(libvlc_media_player_t p_mi, int i_title) Get title chapter count- Parameters:
p_mi- the Media Playeri_title- title- Returns:
- number of chapters in title, or -1
-
libvlc_media_player_set_title
Set movie title- Parameters:
p_mi- the Media Playeri_title- title number to play
-
libvlc_media_player_get_title
Get movie title- Parameters:
p_mi- the Media Player- Returns:
- title number currently playing, or -1
-
libvlc_media_player_get_title_count
Get movie title count- Parameters:
p_mi- the Media Player- Returns:
- title number count, or -1
-
libvlc_media_player_previous_chapter
Set previous chapter (if applicable)- Parameters:
p_mi- the Media Player
-
libvlc_media_player_next_chapter
Set next chapter (if applicable)- Parameters:
p_mi- the Media Player
-
libvlc_media_player_get_rate
Get the requested movie play rate.Depending on the underlying media, the requested rate may be different from the real playback rate.
- Parameters:
p_mi- the Media Player- Returns:
- movie play rate
-
libvlc_media_player_set_rate
Set movie play rate- Parameters:
p_mi- the Media Playerrate- movie play rate to set- Returns:
- -1 if an error was detected, 0 otherwise (but even then, it might not actually work depending on the underlying media protocol)
-
libvlc_media_player_get_state
Get current movie state- Parameters:
p_mi- the Media Player- Returns:
- the current state of the media player (playing, paused, ...) @see State
-
libvlc_media_player_has_vout
How many video outputs does this media player have?- Parameters:
p_mi- the media player- Returns:
- the number of video outputs
-
libvlc_media_player_is_seekable
Is this media player seekable?- Parameters:
p_mi- the media player- Returns:
- true if the media player can seek
-
libvlc_media_player_can_pause
Can this media player be paused?- Parameters:
p_mi- the media player- Returns:
- true if the media player can pause
-
libvlc_media_player_program_scrambled
Is the current program scrambled?- Parameters:
p_mi- the media player- Returns:
- true if the current program is scrambled
- Since:
- libVLC 2.2.0
-
libvlc_media_player_next_frame
Display the next frame (if supported)- Parameters:
p_mi- the media player
-
libvlc_media_player_set_video_title_display
public static void libvlc_media_player_set_video_title_display(libvlc_media_player_t p_mi, int position, int timeout) Set if, and how, the video title will be shown when media is played.- Parameters:
p_mi- the media playerposition- position at which to display the title, or libvlc_position_disable to prevent the title from being displayedtimeout- title display timeout in milliseconds (ignored if libvlc_position_disable)- Since:
- libVLC 2.1.0 or later
-
libvlc_media_player_add_slave
public static int libvlc_media_player_add_slave(libvlc_media_player_t p_mi, int i_type, String psz_uri, int b_select) Add a slave to the current media player. If the player is playing, the slave will be added directly. This call will also update the slave list of the attached libvlc_media_t.- Parameters:
p_mi- the media playeri_type- subtitle or audiopsz_uri- Uri of the slave (should contain a valid scheme).b_select- True if this slave should be selected when it's loaded- Returns:
- 0 on success, -1 on error.
- Since:
- LibVLC 3.0.0 and later.
- See Also:
-
libvlc_track_description_list_release
public static void libvlc_track_description_list_release(com.sun.jna.Pointer p_track_description) Release (free) libvlc_track_description_t- Parameters:
p_track_description- the structure to release
-
libvlc_toggle_fullscreen
Toggle fullscreen status on non-embedded video outputs.The same limitations applies to this function as to libvlc_set_fullscreen().
- Parameters:
p_mi- the media player
-
libvlc_set_fullscreen
Enable or disable fullscreen.With most window managers, only a top-level windows can be in full-screen mode. Hence, this function will not operate properly if libvlc_media_player_set_xid() 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 before fullscreen mode is enabled. You will want to reparent it back to its normal parent when disabling fullscreen.
- Parameters:
p_mi- the media playerb_fullscreen- boolean for fullscreen status
-
libvlc_get_fullscreen
Get current fullscreen status.- Parameters:
p_mi- the media player- Returns:
- the fullscreen status (boolean)
-
libvlc_video_set_key_input
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.On X11, there can be only one subscriber for key press and mouse click events per window. If your application has subscribed to those events for the X window ID of the video widget, then LibVLC will not be able to handle key presses and mouse clicks in any case.
This function is only implemented for X11 and Win32 at the moment.
- Parameters:
p_mi- the media playeron- true to handle key press events, false to ignore them.
-
libvlc_video_set_mouse_input
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 also libvlc_video_set_key_input().
This function is only implemented for X11 and Win32 at the moment.
- Parameters:
p_mi- the media playeron- true to handle mouse click events, false to ignore them.
-
libvlc_video_get_size
public static int libvlc_video_get_size(libvlc_media_player_t p_mi, int num, com.sun.jna.ptr.IntByReference px, com.sun.jna.ptr.IntByReference py) Get the pixel dimensions of a video.- Parameters:
p_mi- media playernum- number of the video (starting from, and most commonly 0)px- pointer to get the pixel width [OUT]py- pointer to get the pixel height [OUT]- Returns:
- 0 on success, -1 if the specified video does not exist
-
libvlc_video_get_cursor
public static int libvlc_video_get_cursor(libvlc_media_player_t p_mi, int num, com.sun.jna.Pointer px, com.sun.jna.Pointer py) Get the mouse pointer coordinates over a video. Coordinates are expressed in terms of the decoded video resolution, not in terms of pixels on the screen/viewport (to get the latter, you can query your windowing system directly). Either of the coordinates may be negative or larger than the corresponding dimension of the video, if the cursor is outside the rendering area.The coordinates may be out-of-date if the pointer is not located on the video rendering area. LibVLC does not track the pointer if it is outside of the video widget.
LibVLC does not support multiple pointers (it does of course support multiple input devices sharing the same pointer) at the moment.
- Parameters:
p_mi- media playernum- number of the video (starting from, and most commonly 0)px- pointer to get the abscissa [OUT]py- pointer to get the ordinate [OUT]- Returns:
- 0 on success, -1 if the specified video does not exist
-
libvlc_video_get_scale
Get the current video scaling factor. See also libvlc_video_set_scale().- Parameters:
p_mi- the media player- Returns:
- the currently configured zoom factor, or 0. if the video is set to fit to the output window/drawable automatically.
-
libvlc_video_set_scale
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 scaling.- Parameters:
p_mi- the media playerf_factor- the scaling factor, or zero
-
libvlc_video_get_aspect_ratio
Get current video aspect ratio.- Parameters:
p_mi- the media player- Returns:
- the video aspect ratio or NULL if unspecified (the result must be released with free()).
-
libvlc_video_set_aspect_ratio
Set new video aspect ratio. Note: invalid aspect ratios are ignored.- Parameters:
p_mi- the media playerpsz_aspect- new video aspect-ratio or NULL to reset to default
-
libvlc_video_new_viewpoint
Create a video viewpoint structure.- Returns:
- video viewpoint or NULL (the result must be released with free() or libvlc_free()).
- Since:
- LibVLC 3.0.0 and later
-
libvlc_video_update_viewpoint
public static int libvlc_video_update_viewpoint(libvlc_media_player_t p_mi, libvlc_video_viewpoint_t p_viewpoint, int b_absolute) Update the video viewpoint information.It is safe to call this function before the media player is started.
The values are set asynchronously, it will be used by the next frame displayed.
- Parameters:
p_mi- the media playerp_viewpoint- video viewpoint allocated via libvlc_video_new_viewpoint()b_absolute- if true replace the old viewpoint with the new one. If false, increase/decrease it.- Returns:
- -1 in case of error, 0 otherwise
- Since:
- LibVLC 3.0.0 and later
-
libvlc_video_get_spu
Get current video subtitle.- Parameters:
p_mi- the media player- Returns:
- the video subtitle selected, or -1 if none
-
libvlc_video_get_spu_count
Get the number of available video subtitles.- Parameters:
p_mi- the media player- Returns:
- the number of available video subtitles
-
libvlc_video_get_spu_description
public static libvlc_track_description_t libvlc_video_get_spu_description(libvlc_media_player_t p_mi) Get the description of available video subtitles.- Parameters:
p_mi- the media player- Returns:
- list containing description of available video subtitles
-
libvlc_video_set_spu
Set new video subtitle.- Parameters:
p_mi- the media playeri_spu- new video subtitle to select- Returns:
- 0 on success, -1 if out of range
-
libvlc_video_get_spu_delay
Get the current subtitle delay. Positive values means subtitles are being displayed later, negative values earlier.- Parameters:
p_mi- media player- Returns:
- time (in microseconds) the display of subtitles is being delayed
- Since:
- LibVLC 2.0.0 or later
-
libvlc_video_set_spu_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 zero each time the media changes.- Parameters:
p_mi- media playeri_delay- time (in microseconds) the display of subtitles should be delayed- Returns:
- 0 on success, -1 on error
- Since:
- LibVLC 2.0.0 or later
-
libvlc_media_player_get_full_title_descriptions
public static int libvlc_media_player_get_full_title_descriptions(libvlc_media_player_t p_mi, com.sun.jna.ptr.PointerByReference titles) Get the full description of available titles- Parameters:
p_mi- the media playertitles- address to store an allocated array of title descriptions descriptions (must be freed with libvlc_title_descriptions_release() by the caller) [OUT]- Returns:
- the number of titles (-1 on error)
- Since:
- LibVLC 3.0.0 and later.
-
libvlc_title_descriptions_release
public static void libvlc_title_descriptions_release(com.sun.jna.Pointer p_titles, int i_count) Release title descriptions.- Parameters:
p_titles- title description array to releasei_count- number of title descriptions to release- Since:
- LibVLC 3.0.0 and later
-
libvlc_media_player_get_full_chapter_descriptions
public static int libvlc_media_player_get_full_chapter_descriptions(libvlc_media_player_t p_mi, int i_chapters_of_title, com.sun.jna.ptr.PointerByReference pp_chapters) Get the full description of available chapters.- Parameters:
p_mi- the media playeri_chapters_of_title- index of the title to query for chapters (uses current title if set to -1)pp_chapters- address to store an allocated array of chapter descriptions descriptions (must be freed with libvlc_chapter_descriptions_release() by the caller) [OUT]- Returns:
- the number of chapters (-1 on error)
- Since:
- LibVLC 3.0.0 and later.
-
libvlc_chapter_descriptions_release
public static void libvlc_chapter_descriptions_release(com.sun.jna.Pointer p_chapters, int i_count) Release chapter descriptions.- Parameters:
p_chapters- chapter description array to releasei_count- number of chapter descriptions to release- Since:
- LibVLC 3.0.0 and later
-
libvlc_video_get_crop_geometry
Get current crop filter geometry.- Parameters:
p_mi- the media player- Returns:
- the crop filter geometry or NULL if unset
-
libvlc_video_set_crop_geometry
Set new crop filter geometry.- Parameters:
p_mi- the media playerpsz_geometry- new crop filter geometry (NULL to unset)
-
libvlc_video_get_teletext
Get current teletext page requested or 0 if it's disabled.- Parameters:
p_mi- the media player- Returns:
- the current teletext page requested.
-
libvlc_video_set_teletext
Set new teletext page to retrieve.- Parameters:
p_mi- the media playeri_page- teletex page number requested. This value can be 0 to disable teletext or a number in the range 0 to 1000 to show the requested page or a TeletextKey. 100 is the default teletext page.
-
libvlc_video_get_track_count
Get number of available video tracks.- Parameters:
p_mi- media player- Returns:
- the number of available video tracks (int)
-
libvlc_video_get_track_description
public static libvlc_track_description_t libvlc_video_get_track_description(libvlc_media_player_t p_mi) Get the description of available video tracks.- Parameters:
p_mi- media player- Returns:
- list with description of available video tracks, or NULL on error
-
libvlc_video_get_track
Get current video track.- Parameters:
p_mi- media player- Returns:
- the video track ID (int) or -1 if no active input
-
libvlc_video_set_track
Set video track.- Parameters:
p_mi- media playeri_track- the track ID (i_id field from track description)- Returns:
- 0 on success, -1 if out of range
-
libvlc_video_take_snapshot
public static int libvlc_video_take_snapshot(libvlc_media_player_t p_mi, int num, String psz_filepath, int i_width, int i_height) 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.- Parameters:
p_mi- media player instancenum- number of video output (typically 0 for the first/only one)psz_filepath- the path where to save the screenshot toi_width- the snapshot's widthi_height- the snapshot's height- Returns:
- 0 on success, -1 if the video was not found
-
libvlc_video_set_deinterlace
Enable or disable deinterlace filter- Parameters:
p_mi- libvlc media playerpsz_mode- type of deinterlace filter, NULL to disable
-
libvlc_video_get_marquee_int
Get an integer marquee option value- Parameters:
p_mi- libvlc media playeroption- marq option to get @see libvlc_video_marquee_int_option_t- Returns:
- marquee option value
-
libvlc_video_get_marquee_string
public static com.sun.jna.Pointer libvlc_video_get_marquee_string(libvlc_media_player_t p_mi, int option) Get a string marquee option value- Parameters:
p_mi- libvlc media playeroption- marq option to get @see libvlc_video_marquee_string_option_t- Returns:
- marquee option value
-
libvlc_video_set_marquee_int
Enable, disable or set an integer marquee option Setting libvlc_marquee_Enable has the side effect of enabling (arg !0) or disabling (arg 0) the marq filter.- Parameters:
p_mi- libvlc media playeroption- marq option to set @see libvlc_video_marquee_int_option_ti_val- marq option value
-
libvlc_video_set_marquee_string
public static void libvlc_video_set_marquee_string(libvlc_media_player_t p_mi, int option, String psz_text) Set a marquee string option- Parameters:
p_mi- libvlc media playeroption- marq option to set @see libvlc_video_marquee_string_option_tpsz_text- marq option value
-
libvlc_video_get_logo_int
Get integer logo option.- Parameters:
p_mi- libvlc media player instanceoption- logo option to get, values of libvlc_video_logo_option_t- Returns:
- logo option value
-
libvlc_video_set_logo_int
Set logo option as integer. Options that take a different type value are ignored. Passing libvlc_logo_enable as option value has the side effect of starting (arg !0) or stopping (arg 0) the logo filter.- Parameters:
p_mi- libvlc media player instanceoption- logo option to set, values of libvlc_video_logo_option_tvalue- logo option value
-
libvlc_video_set_logo_string
public static void libvlc_video_set_logo_string(libvlc_media_player_t p_mi, int option, String psz_value) Set logo option as string. Options that take a different type value are ignored.- Parameters:
p_mi- libvlc media player instanceoption- logo option to set, values of libvlc_video_logo_option_tpsz_value- logo option value
-
libvlc_video_get_adjust_int
Get integer adjust option.- Parameters:
p_mi- libvlc media player instanceoption- adjust option to get, values of libvlc_video_adjust_option_t- Returns:
- value
- Since:
- LibVLC 1.1.1
-
libvlc_video_set_adjust_int
Set adjust option as integer. Options that take a different type value are ignored. Passing libvlc_adjust_enable as option value has the side effect of starting (arg !0) or stopping (arg 0) the adjust filter.- Parameters:
p_mi- libvlc media player instanceoption- adust option to set, values of libvlc_video_adjust_option_tvalue- adjust option value- Since:
- LibVLC 1.1.1
-
libvlc_video_get_adjust_float
Get float adjust option.- Parameters:
p_mi- libvlc media player instanceoption- adjust option to get, values of libvlc_video_adjust_option_t- Returns:
- value
- Since:
- LibVLC 1.1.1
-
libvlc_video_set_adjust_float
public static void libvlc_video_set_adjust_float(libvlc_media_player_t p_mi, int option, float value) Set adjust option as float. Options that take a different type value are ignored.- Parameters:
p_mi- libvlc media player instanceoption- adust option to set, values of libvlc_video_adjust_option_tvalue- adjust option value- Since:
- LibVLC 1.1.1
-
libvlc_audio_output_list_get
Gets the list of available audio outputs- Parameters:
p_instance- libvlc instance- Returns:
- list of available audio outputs. It must be freed it with
libvlc_audio_output_list_release(Pointer). In case of error, NULL is returned.
-
libvlc_audio_output_list_release
public static void libvlc_audio_output_list_release(com.sun.jna.Pointer p_list) Frees the list of available audio outputs- Parameters:
p_list- list with audio outputs for release
-
libvlc_audio_output_set
Sets the audio output.Note: Any change will take be effect only after playback is stopped and restarted. Audio output cannot be changed while playing.
- Parameters:
p_mi- media playerpsz_name- name of audio output, use psz_name of @see libvlc_audio_output_t- Returns:
- 0 if function succeded, -1 on error
-
libvlc_audio_output_device_enum
public static libvlc_audio_output_device_t libvlc_audio_output_device_enum(libvlc_media_player_t mp) Gets a list of potential audio output devices, seelibvlc_audio_output_device_set(libvlc_media_player_t, String, String).Not all audio outputs support enumerating devices. The audio output may be functional even if the list is empty (NULL).
The list may not be exhaustive.
Some audio output devices in the list might not actually work in some circumstances. By default, it is recommended to not specify any explicit audio device.
- Parameters:
mp- media player- Returns:
- NULL-terminated linked list of potential audio output devices. It must be freed
with
libvlc_audio_output_device_list_release(Pointer). - Since:
- LibVLC 2.2.0 or later.
-
libvlc_audio_output_device_list_get
public static libvlc_audio_output_device_t libvlc_audio_output_device_list_get(libvlc_instance_t p_instance, String psz_aout) Gets a list of audio output devices for a given audio output.See
libvlc_audio_output_device_set(libvlc_media_player_t, String, String).Not all audio outputs support this. In particular, an empty (NULL) list of devices does not imply that the specified audio output does not work.
The list might not be exhaustive.
Some audio output devices in the list might not actually work in some circumstances. By default, it is recommended to not specify any explicit audio device.
- Parameters:
p_instance- libvlc instancepsz_aout- audio output name (as returned by libvlc_audio_output_list_get())- Returns:
- A NULL-terminated linked list of potential audio output devices. It must be freed it with libvlc_audio_output_device_list_release()
- Since:
- LibVLC 2.1.0 or later.
-
libvlc_audio_output_device_list_release
public static void libvlc_audio_output_device_list_release(com.sun.jna.Pointer p_list) Frees a list of available audio output devices.- Parameters:
p_list- list with audio outputs for release- Since:
- LibVLC 2.1.0 or later.
-
libvlc_audio_output_device_set
public static void libvlc_audio_output_device_set(libvlc_media_player_t p_mi, String psz_audio_output, String psz_device_id) Configures an explicit audio output device.If the module parameter is NULL, audio output will be moved to the device specified by the device identifier string immediately. This is the recommended usage.
A list of adequate potential device strings can be obtained with libvlc_audio_output_device_enum().
However passing NULL is supported in LibVLC version 2.2.0 and later only; in earlier versions, this function would have no effects when the module parameter was NULL.
If the module parameter is not NULL, the device parameter of the corresponding audio output, if it exists, will be set to the specified string. Note that some audio output modules do not have such a parameter (notably MMDevice and PulseAudio).
A list of adequate potential device strings can be obtained with libvlc_audio_output_device_list_get().
This function does not select the specified audio output plugin. libvlc_audio_output_set() is used for that purpose.
The syntax for the device parameter depends on the audio output.
Some audio output modules require further parameters (e.g. a channels map in the case of ALSA).
- Parameters:
p_mi- media playerpsz_audio_output- if NULL, current audio output module; if non-NULL, name of audio output module (@see libvlc_audio_output_t)psz_device_id- device identifier string
-
libvlc_audio_output_device_get
Get the current audio output device identifier. This complements libvlc_audio_output_device_set(). The initial value for the current audio output device identifier may not be set or may be some unknown value. A LibVLC application should compare this value against the known device identifiers (e.g. those that were previously retrieved by a call to libvlc_audio_output_device_enum or libvlc_audio_output_device_list_get) to find the current audio output device. It is possible that the selected audio output device changes (an external change) without a call to libvlc_audio_output_device_set. That may make this method unsuitable to use if a LibVLC application is attempting to track dynamic audio device changes as they happen.- Parameters:
mp- media player- Returns:
- the current audio output device identifier NULL if no device is selected or in case of error (the result must be released with free() or libvlc_free()).
- Since:
- LibVLC 3.0.0 or later.
-
libvlc_audio_toggle_mute
Toggle mute status.- Parameters:
p_mi- media player
-
libvlc_audio_get_mute
Get current mute status.- Parameters:
p_mi- media player- Returns:
- the mute status (boolean)
-
libvlc_audio_set_mute
Set mute status.- Parameters:
p_mi- media playerstatus- If status is true then mute, otherwise unmute
-
libvlc_audio_get_volume
Get current software audio volume.- Parameters:
p_mi- media player- Returns:
- the software volume in percents (0 = mute, 100 = nominal / 0dB)
-
libvlc_audio_set_volume
Set current software audio volume.- Parameters:
p_mi- media playeri_volume- the volume in percents (0 = mute, 100 = 0dB)- Returns:
- 0 if the volume was set, -1 if it was out of range
-
libvlc_audio_get_track_count
Get number of available audio tracks.- Parameters:
p_mi- media player- Returns:
- the number of available audio tracks (int), or -1 if unavailable
-
libvlc_audio_get_track_description
public static libvlc_track_description_t libvlc_audio_get_track_description(libvlc_media_player_t p_mi) Get the description of available audio tracks.- Parameters:
p_mi- media player- Returns:
- list with description of available audio tracks, or NULL
-
libvlc_audio_get_track
Get current audio track.- Parameters:
p_mi- media player- Returns:
- the audio track ID or -1 if no active input.
-
libvlc_audio_set_track
Set current audio track.- Parameters:
p_mi- media playeri_track- the track ID (i_id field from track description)- Returns:
- 0 on success, -1 on error
-
libvlc_audio_get_channel
Get current audio channel.- Parameters:
p_mi- media player- Returns:
- the audio channel @see AudioChannel
-
libvlc_audio_set_channel
Set current audio channel.- Parameters:
p_mi- media playerchannel- the audio channel, @see AudioChannel- Returns:
- 0 on success, -1 on error
-
libvlc_audio_get_delay
Get current audio delay.- Parameters:
p_mi- media player- Returns:
- amount audio is being delayed by, in microseconds
- Since:
- LibVLC 1.1.1
-
libvlc_audio_set_delay
Set current audio delay. The delay is only active for the current media item and will be reset to zero each time the media changes.- Parameters:
p_mi- media playeri_delay- amount to delay audio by, in microseconds- Returns:
- 0 on success, -1 on error
- Since:
- LibVLC 1.1.1
-
libvlc_audio_equalizer_get_preset_count
public static int libvlc_audio_equalizer_get_preset_count()Get the number of equalizer presets.- Returns:
- number of presets
- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_get_preset_name
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.
- Parameters:
u_index- index of the preset, counting from zero- Returns:
- preset name, or NULL if there is no such preset
- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_get_band_count
public static int libvlc_audio_equalizer_get_band_count()Get the number of distinct frequency bands for an equalizer.- Returns:
- number of frequency bands
- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_get_band_frequency
public static float libvlc_audio_equalizer_get_band_frequency(int 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.
- Parameters:
u_index- index of the band, counting from zero- Returns:
- equalizer band frequency (Hz), or -1 if there is no such band
- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_new
Create a new default equalizer, with all frequency values zeroed.The new equalizer can subsequently be applied to a media player by invoking libvlc_media_player_set_equalizer().
The returned handle should be freed via libvlc_audio_equalizer_release() when it is no longer needed.
- Returns:
- opaque equalizer handle, or NULL on error
- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_new_from_preset
Create a new equalizer, with initial frequency values copied from an existing preset.The new equalizer can subsequently be applied to a media player by invoking libvlc_media_player_set_equalizer().
The returned handle should be freed via libvlc_audio_equalizer_release() when it is no longer needed.
- Parameters:
u_index- index of the preset, counting from zero- Returns:
- opaque equalizer handle, or NULL on error
- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_release
Release a previously created equalizer instance.The equalizer was previously created by using libvlc_audio_equalizer_new() or libvlc_audio_equalizer_new_from_preset().
It is safe to invoke this method with a NULL p_equalizer parameter for no effect.
- Parameters:
p_equalizer- opaque equalizer handle, or NULL- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_set_preamp
Set a new pre-amplification value for an equalizer.The new equalizer settings are subsequently applied to a media player by invoking libvlc_media_player_set_equalizer().
- Parameters:
p_equalizer- valid equalizer handle, must not be NULLf_preamp- preamp value (-20.0 to 20.0 Hz)- Returns:
- zero on success, -1 on error
- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_get_preamp
Get the current pre-amplification value from an equalizer.- Parameters:
p_equalizer- valid equalizer handle, must not be NULL- Returns:
- preamp value (Hz)
- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_set_amp_at_index
public static int libvlc_audio_equalizer_set_amp_at_index(libvlc_equalizer_t p_equalizer, float f_amp, int u_band) Set a new amplification value for a particular equalizer frequency band.The new equalizer settings are subsequently applied to a media player by invoking libvlc_media_player_set_equalizer().
- Parameters:
p_equalizer- valid equalizer handle, must not be NULLf_amp- amplification value (-20.0 to 20.0 Hz)u_band- index, counting from zero, of the frequency band to set- Returns:
- zero on success, -1 on error
- Since:
- LibVLC 2.2.0 or later
-
libvlc_audio_equalizer_get_amp_at_index
public static float libvlc_audio_equalizer_get_amp_at_index(libvlc_equalizer_t p_equalizer, int u_band) Get the amplification value for a particular equalizer frequency band.- Parameters:
p_equalizer- valid equalizer handle, must not be NULLu_band- index, counting from zero, of the frequency band to get- Returns:
- amplification value (Hz); zero if there is no such frequency band
- Since:
- LibVLC 2.2.0 or later
-
libvlc_media_player_set_equalizer
public static int libvlc_media_player_set_equalizer(libvlc_media_player_t p_mi, libvlc_equalizer_t p_equalizer) Apply new equalizer settings to a media player.The equalizer is first created by invoking libvlc_audio_equalizer_new() or libvlc_audio_equalizer_new_from_preset().
It is possible to apply new equalizer settings to a media player whether the media player is currently playing media or not.
Invoking this method will immediately apply the new equalizer settings to the audio output of the currently playing media if there is any.
If there is no currently playing media, the new equalizer settings will be applied later if and when new media is played.
Equalizer settings will automatically be applied to subsequently played media.
To disable the equalizer for a media player invoke this method passing NULL for the p_equalizer parameter.
The media player does not keep a reference to the supplied equalizer so it is safe for an application to release the equalizer reference any time after this method returns.
- Parameters:
p_mi- opaque media player handlep_equalizer- opaque equalizer handle, or NULL to disable the equalizer for this media player- Returns:
- zero on success, -1 on error
- Since:
- LibVLC 2.2.0 or later
-
libvlc_media_player_get_role
Gets the media role.- Parameters:
p_mi- opaque media player handle- Returns:
- the media player role (MediaPlayerRole)
- Since:
- LibVLC 3.0.0 or later
-
libvlc_media_player_set_role
Sets the media role.- Parameters:
p_mi- opaque media player handlerole- the media player role (MediaPlayerRole)- Returns:
- 0 on success, -1 on error
- Since:
- LibVLC 3.0.0 or later
-
libvlc_media_list_new
Create an empty media list.- Parameters:
p_instance- libvlc instance- Returns:
- empty media list, or NULL on error
-
libvlc_media_list_release
Release media list created with libvlc_media_list_new().- Parameters:
p_ml- a media list created with libvlc_media_list_new()
-
libvlc_media_list_retain
Retain reference to a media list- Parameters:
p_ml- a media list created with libvlc_media_list_new()
-
libvlc_media_list_set_media
Associate media instance with this media list instance. If another media instance was present it will be released. The libvlc_media_list_lock should NOT be held upon entering this function.- Parameters:
p_ml- a media list instancep_md- media instance to add
-
libvlc_media_list_media
Get media instance from this media list instance. This action will increase the refcount on the media instance. The libvlc_media_list_lock should NOT be held upon entering this function.- Parameters:
p_ml- a media list instance- Returns:
- media instance
-
libvlc_media_list_add_media
Add media instance to media list The libvlc_media_list_lock should be held upon entering this function.- Parameters:
p_ml- a media list instancep_md- a media instance- Returns:
- 0 on success, -1 if the media list is read-only
-
libvlc_media_list_insert_media
public static int libvlc_media_list_insert_media(libvlc_media_list_t p_ml, libvlc_media_t p_md, int i_pos) Insert media instance in media list on a position The libvlc_media_list_lock should be held upon entering this function.- Parameters:
p_ml- a media list instancep_md- a media instancei_pos- position in array where to insert- Returns:
- 0 on success, -1 if the media list si read-only
-
libvlc_media_list_remove_index
Remove media instance from media list on a position The libvlc_media_list_lock should be held upon entering this function.- Parameters:
p_ml- a media list instancei_pos- position in array where to insert- Returns:
- 0 on success, -1 if the list is read-only or the item was not found
-
libvlc_media_list_count
Get count on media list items The libvlc_media_list_lock should be held upon entering this function.- Parameters:
p_ml- a media list instance- Returns:
- number of items in media list
-
libvlc_media_list_item_at_index
List media instance in media list at a position The libvlc_media_list_lock should be held upon entering this function.- Parameters:
p_ml- a media list instancei_pos- position in array where to insert- Returns:
- media instance at position i_pos, or NULL if not found. In case of success, libvlc_media_retain() is called to increase the refcount on the media.
-
libvlc_media_list_index_of_item
Find index position of List media instance in media list. Warning: the function will return the first matched position. The libvlc_media_list_lock should be held upon entering this function.- Parameters:
p_ml- a media list instancep_md- media list instance- Returns:
- position of media instance
-
libvlc_media_list_is_readonly
This indicates if this media list is read-only from a user point of view- Parameters:
p_ml- media list instance- Returns:
- 0 on readonly, 1 on readwrite FIXME I am pretty sure the documented return values are the wrong way around
-
libvlc_media_list_lock
Get lock on media list items- Parameters:
p_ml- a media list instance
-
libvlc_media_list_unlock
Release lock on media list items The libvlc_media_list_lock should be held upon entering this function.- Parameters:
p_ml- a media list instance
-
libvlc_media_list_event_manager
Get libvlc_event_manager from this media list instance. The p_event_manager is immutable, so you don't have to hold the lock- Parameters:
p_ml- a media list instance- Returns:
- libvlc_event_manager
-
libvlc_media_list_player_new
Create new media_list_player.- Parameters:
p_instance- libvlc instance- Returns:
- media list player instance or NULL on error
-
libvlc_media_list_player_release
Release a media_list_player after use. Decrement the reference count of a* media player object. If the reference count is 0, then libvlc_media_list_player_release() will release the media player object. If the media player object has been released, then it should not be used again.- Parameters:
p_mlp- media list player instance
-
libvlc_media_list_player_retain
Retain a reference to a media player list object. Use libvlc_media_list_player_release() to decrement reference count.- Parameters:
p_mlp- media player list object
-
libvlc_media_list_player_event_manager
public static libvlc_event_manager_t libvlc_media_list_player_event_manager(libvlc_media_list_player_t p_mlp) Return the event manager of this media_list_player.- Parameters:
p_mlp- media list player instance- Returns:
- the event manager
-
libvlc_media_list_player_set_media_player
public static void libvlc_media_list_player_set_media_player(libvlc_media_list_player_t p_mlp, libvlc_media_player_t p_mi) Replace media player in media_list_player with this instance.- Parameters:
p_mlp- media list player instancep_mi- media player instance
-
libvlc_media_list_player_get_media_player
public static libvlc_media_player_t libvlc_media_list_player_get_media_player(libvlc_media_list_player_t p_mlp) Get media player of the media_list_player instance.Note: the caller is responsible for releasing the returned instance.
- Parameters:
p_mlp- media list player instance- Returns:
- media player instance
- Since:
- LibVLC 3.0.0
-
libvlc_media_list_player_set_media_list
public static void libvlc_media_list_player_set_media_list(libvlc_media_list_player_t p_mlp, libvlc_media_list_t p_mlist) Set the media list associated with the player- Parameters:
p_mlp- media list player instancep_mlist- list of media
-
libvlc_media_list_player_play
Play media list- Parameters:
p_mlp- media list player instance
-
libvlc_media_list_player_pause
Pause media list- Parameters:
p_mlp- media list player instance
-
libvlc_media_list_player_set_pause
public static void libvlc_media_list_player_set_pause(libvlc_media_list_player_t p_mlp, int do_pause) Pause or resume media list- Parameters:
p_mlp- media list player instancedo_pause- play/resume if zero, pause if non-zero- Since:
- LibVLC 3.0.0 or later
-
libvlc_media_list_player_is_playing
Is media list playing?- Parameters:
p_mlp- media list player instance- Returns:
- true for playing and false for not playing
-
libvlc_media_list_player_get_state
Get current libvlc_state of media list player- Parameters:
p_mlp- media list player instance- Returns:
- State for media list player
-
libvlc_media_list_player_play_item_at_index
public static int libvlc_media_list_player_play_item_at_index(libvlc_media_list_player_t p_mlp, int i_index) Play media list item at position index- Parameters:
p_mlp- media list player instancei_index- index in media list to play- Returns:
- 0 upon success -1 if the item wasn't found
-
libvlc_media_list_player_play_item
public static int libvlc_media_list_player_play_item(libvlc_media_list_player_t p_mlp, libvlc_media_t p_md) Play the given media item- Parameters:
p_mlp- media list player instancep_md- the media instance- Returns:
- 0 upon success, -1 if the media is not part of the media list
-
libvlc_media_list_player_stop
Stop playing media list- Parameters:
p_mlp- media list player instance
-
libvlc_media_list_player_next
Play next item from media list- Parameters:
p_mlp- media list player instance- Returns:
- 0 upon success -1 if there is no next item
-
libvlc_media_list_player_previous
Play previous item from media list- Parameters:
p_mlp- media list player instance- Returns:
- 0 upon success -1 if there is no previous item
-
libvlc_media_list_player_set_playback_mode
public static void libvlc_media_list_player_set_playback_mode(libvlc_media_list_player_t p_mlp, int e_mode) Sets the playback mode for the playlist- Parameters:
p_mlp- media list player instancee_mode- playback mode specification
-
libvlc_dialog_set_callbacks
public static void libvlc_dialog_set_callbacks(libvlc_instance_t p_instance, libvlc_dialog_cbs p_cbs, com.sun.jna.Pointer p_data) Register callbacks in order to handle VLC dialogs.- Parameters:
p_instance- the instancep_cbs- a pointer to callbacks, or NULL to unregister callbacks.p_data- opaque pointer for the callback- Since:
- LibVLC 3.0.0 and later.
-
libvlc_dialog_set_context
Associate an opaque pointer with the dialog id.- Parameters:
p_id- id of the dialogp_context- opaque pointer associated with the dialog id- Since:
- LibVLC 3.0.0 and later.
-
libvlc_dialog_get_context
Return the opaque pointer associated with the dialog id.- Parameters:
p_id- id of the dialog- Returns:
- opaque pointer associated with the dialog id
- Since:
- LibVLC 3.0.0 and later.
-
libvlc_dialog_post_login
public static int libvlc_dialog_post_login(libvlc_dialog_id p_id, String psz_username, String psz_password, int b_store) Post a login answer.After this call, p_id won't be valid anymore
- Parameters:
p_id- id of the dialogpsz_username- valid and non empty stringpsz_password- valid string (can be empty)b_store- if true, store the credentials- Returns:
- 0 on success, or -1 on error
- Since:
- LibVLC 3.0.0 and later.
- See Also:
-
libvlc_dialog_post_action
Post a question answer.After this call, p_id won't be valid anymore
- Parameters:
p_id- id of the dialogi_action- 1 for action1, 2 for action2- Returns:
- 0 on success, or -1 on error
- Since:
- LibVLC 3.0.0 and later.
- See Also:
-
libvlc_dialog_dismiss
Dismiss a dialog.After this call, p_id won't be valid anymore
- Parameters:
p_id- id of the dialog- Returns:
- 0 on success, or -1 on error
- Since:
- LibVLC 3.0.0 and later.
- See Also:
-
libvlc_media_discoverer_new
public static libvlc_media_discoverer_t libvlc_media_discoverer_new(libvlc_instance_t p_inst, String psz_name) Create a media discoverer object by name. After this object is created, you should attach to events in order to be notified of the discoverer state. You should also attach to media_list events in order to be notified of new items discovered. You need to calllibvlc_media_discoverer_start(libvlc_media_discoverer_t)in order to start the discovery.- Parameters:
p_inst- libvlc instancepsz_name- service name- Returns:
- media discover object or NULL in case of error
- Since:
- LibVLC 3.0.0 or later
- See Also:
-
libvlc_media_discoverer_start
Start media discovery. To stop it, call libvlc_media_discoverer_stop() or libvlc_media_discoverer_release() directly.- Parameters:
p_mdis- media discover object- Returns:
- -1 in case of error, 0 otherwise
- Since:
- LibVLC 3.0.0 or later
- See Also:
-
libvlc_media_discoverer_stop
Stop media discovery.- Parameters:
p_mdis- media discover object- Since:
- LibVLC 3.0.0 or later
- See Also:
-
libvlc_media_discoverer_release
Release media discover object. If the reference count reaches 0, then the object will be released.- Parameters:
p_mdis- media service discover object
-
libvlc_media_discoverer_media_list
public static libvlc_media_list_t libvlc_media_discoverer_media_list(libvlc_media_discoverer_t p_mdis) Get media service discover media list.- Parameters:
p_mdis- media service discover object- Returns:
- list of media items
-
libvlc_media_discoverer_is_running
Query if media service discover object is running.- Parameters:
p_mdis- media service discover object- Returns:
- true if running, false if not
-
libvlc_media_discoverer_list_get
public static size_t libvlc_media_discoverer_list_get(libvlc_instance_t p_inst, int i_cat, com.sun.jna.ptr.PointerByReference ppp_services) Get media discoverer services by category- Parameters:
p_inst- libvlc instancei_cat- category of services to fetchppp_services- address to store an allocated array of media discoverer services (must be freed with libvlc_media_discoverer_list_release() by the caller) [OUT]- Returns:
- the number of media discoverer services (0 on error)
- Since:
- LibVLC 3.0.0 and later.
-
libvlc_media_discoverer_list_release
public static void libvlc_media_discoverer_list_release(com.sun.jna.Pointer pp_services, size_t i_count) Release an array of media discoverer services- Parameters:
pp_services- array to releasei_count- number of elements in the array- Since:
- LibVLC 3.0.0 and later.
- See Also:
-
libvlc_renderer_item_hold
Hold a renderer item, i.e. creates a new reference This functions need to called from the libvlc_RendererDiscovererItemAdded callback if the libvlc user wants to use this item after. (for display or for passing it to the mediaplayer for example).- Returns:
- the current item
- Since:
- LibVLC 3.0.0 or later
-
libvlc_renderer_item_release
Releases a renderer item, i.e. decrements its reference counter- Since:
- LibVLC 3.0.0 or later
-
libvlc_renderer_item_name
Get the human readable name of a renderer item- Returns:
- the name of the item (can't be NULL, must *not* be freed)
- Since:
- LibVLC 3.0.0 or later
-
libvlc_renderer_item_type
Get the type (not translated) of a renderer item. For now, the type can only be "chromecast" ("upnp", "airplay" may come later).- Returns:
- the type of the item (can't be NULL, must *not* be freed)
- Since:
- LibVLC 3.0.0 or later
-
libvlc_renderer_item_icon_uri
Get the icon uri of a renderer item- Returns:
- the uri of the item's icon (can be NULL, must *not* be freed)
- Since:
- LibVLC 3.0.0 or later
-
libvlc_renderer_item_flags
Get the flags of a renderer item- Returns:
- bitwise flag: capabilities of the renderer, see
- Since:
- LibVLC 3.0.0 or later
-
libvlc_renderer_discoverer_new
public static libvlc_renderer_discoverer_t libvlc_renderer_discoverer_new(libvlc_instance_t p_inst, String psz_name) Create a renderer discoverer object by name After this object is created, you should attach to events in order to be notified of the discoverer events. You need to call libvlc_renderer_discoverer_start() in order to start the discovery.- Parameters:
p_inst- libvlc instancepsz_name- service name; use libvlc_renderer_discoverer_list_get() to get a list of the discoverer names available in this libVLC instance- Returns:
- media discover object or NULL in case of error
- Since:
- LibVLC 3.0.0 or later
- See Also:
-
libvlc_renderer_discoverer_release
Release a renderer discoverer object- Parameters:
p_rd- renderer discoverer object- Since:
- LibVLC 3.0.0 or later
-
libvlc_renderer_discoverer_start
Start renderer discovery To stop it, call libvlc_renderer_discoverer_stop() or libvlc_renderer_discoverer_release() directly.- Parameters:
p_rd- renderer discoverer object- Returns:
- -1 in case of error, 0 otherwise
- Since:
- LibVLC 3.0.0 or later
- See Also:
-
libvlc_renderer_discoverer_stop
Stop renderer discovery.- Parameters:
p_rd- renderer discoverer object- Since:
- LibVLC 3.0.0 or later
- See Also:
-
libvlc_renderer_discoverer_event_manager
public static libvlc_event_manager_t libvlc_renderer_discoverer_event_manager(libvlc_renderer_discoverer_t p_rd) Get the event manager of the renderer discoverer The possible events to attach are @ref libvlc_RendererDiscovererItemAdded and @ref libvlc_RendererDiscovererItemDeleted. The @ref libvlc_renderer_item_t struct passed to event callbacks is owned by VLC, users should take care of holding/releasing this struct for their internal usage.- Returns:
- a valid event manager (can't fail)
- Since:
- LibVLC 3.0.0 or later
- See Also:
-
libvlc_renderer_discoverer_list_get
public static size_t libvlc_renderer_discoverer_list_get(libvlc_instance_t p_inst, com.sun.jna.ptr.PointerByReference ppp_services) Get media discoverer services- Parameters:
p_inst- libvlc instanceppp_services- address to store an allocated array of renderer discoverer services (must be freed with libvlc_renderer_list_release() by the caller) [OUT]- Returns:
- the number of media discoverer services (0 on error)
- Since:
- LibVLC 3.0.0 and later
- See Also:
-
libvlc_renderer_discoverer_list_release
public static void libvlc_renderer_discoverer_list_release(com.sun.jna.Pointer pp_services, size_t i_count) Release an array of media discoverer services- Parameters:
pp_services- array to releasei_count- number of elements in the array- Since:
- LibVLC 3.0.0 and later
- See Also:
-
libvlc_picture_retain
Increment the reference count of this picture.- Parameters:
pic- A picture object- Since:
- libvlc 4.0 or later
- See Also:
-
libvlc_picture_release
Decrement the reference count of this picture. When the reference count reaches 0, the picture will be released. The picture must not be accessed after calling this function.- Parameters:
pic- A picture object- Since:
- libvlc 4.0 or later
- See Also:
-
libvlc_picture_save
Saves this picture to a file. The image format is the same as the one returned by \link libvlc_picture_type \endlink- Parameters:
pic- A picture objectpath- The path to the generated file- Returns:
- 0 in case of success, -1 otherwise
- Since:
- libvlc 4.0 or later
-
libvlc_picture_get_buffer
public static com.sun.jna.Pointer libvlc_picture_get_buffer(libvlc_picture_t pic, size_tByReference size) Returns the image internal buffer, including potential padding. The libvlc_picture_t owns the returned buffer, which must not be modified nor freed.- Parameters:
pic- A picture objectsize- A pointer to a size_t that will hold the size of the buffer [required]- Returns:
- A pointer to the internal buffer.
- Since:
- libvlc 4.0 or later
-
libvlc_picture_type
Returns the picture type- Parameters:
pic- A picture object- Since:
- libvlc 4.0 or later
-
libvlc_picture_get_stride
Returns the image stride, ie. the number of bytes per line. This can only be called on images of type libvlc_picture_Argb- Parameters:
pic- A picture object- Since:
- libvlc 4.0 or later
-
libvlc_picture_get_width
Returns the width of the image in pixels- Parameters:
pic- A picture object- Since:
- libvlc 4.0 or later
-
libvlc_picture_get_height
Returns the height of the image in pixels- Parameters:
pic- A picture object- Since:
- libvlc 4.0 or later
-
libvlc_picture_get_time
Returns the time at which this picture was generated, in milliseconds- Parameters:
pic- A picture object- Since:
- libvlc 4.0 or later
-