libVLC

作者: hello_math | 来源:发表于2015-07-13 09:52 被阅读986次

    1.playlist

    libvlc_playlist_play(libvlc_instance_t*p_instance, int i_id, int i_options, char **ppsz_options)

    Start playing (if there is any item in the playlist).

    p_instance:the playlist instance

    i_id:the item to play. If this is a negative number, the next item will be selected. Otherwise, the item with the given ID will be played

    i_options:the number of options to add to the item

    ppsz_options:the options to add to the item

    2.core

    libvlc_instance_t*libvlc_new(int argc, const char *const *argv)

    Create and initialize a libvlc instance.

    voidlibvlc_release(libvlc_instance_t*p_instance)

    Decrement the reference count of a libvlc instance, and destroy it if it reaches zero.

    voidlibvlc_retain(libvlc_instance_t*p_instance)

    Increments the reference count of a libvlc instance.

    intlibvlc_add_intf(libvlc_instance_t*p_instance, const char *name)

    Try to start a user interface for the libvlc instance.

    voidlibvlc_set_exit_handler(libvlc_instance_t*p_instance, void(*cb)(void *), void *opaque)

    Registers a callback for the LibVLC exit event.

    voidlibvlc_wait(libvlc_instance_t*p_instance)

    Waits until an interface causes the instance to exit.

    voidlibvlc_set_user_agent(libvlc_instance_t*p_instance, const char *name, const char *http)

    Sets the application name.

    voidlibvlc_set_app_id(libvlc_instance_t*p_instance, const char *id, const char *version, const char *icon)

    Sets some meta-information about the application.

    const char *libvlc_get_version(void)

    Retrieve libvlc version.

    const char *libvlc_get_compiler(void)

    Retrieve libvlc compiler version.

    const char *libvlc_get_changeset(void)

    Retrieve libvlc changeset.

    voidlibvlc_free(void *ptr)

    Frees an heap allocation returned by a LibVLC function.

    voidlibvlc_module_description_list_release(libvlc_module_description_t*p_list)

    Release a list of module descriptions.

    libvlc_module_description_t*libvlc_audio_filter_list_get(libvlc_instance_t*p_instance)

    Returns a list of audio filters that are available.

    libvlc_module_description_t*libvlc_video_filter_list_get(libvlc_instance_t*p_instance)

    Returns a list of video filters that are available.

    typedef structlibvlc_instance_tlibvlc_instance_t

    This structure is opaque.

    typedef int64_tlibvlc_time_t

    3.time

    int64_tlibvlc_clock(void)

    Return the current time as defined by LibVLC.

    static int64_tlibvlc_delay(int64_t pts)

    Return the delay (in microseconds) until a certain timestamp.

    4.media

    LIBVLC_APIlibvlc_media_t*libvlc_media_new_location(libvlc_instance_t*p_instance, const char *psz_mrl)

    Create a media with a certain given media resource location, for instance a valid URL.

    LIBVLC_APIlibvlc_media_t*libvlc_media_new_path(libvlc_instance_t*p_instance, const char *path)

    Create a media for a certain file path.

    LIBVLC_APIlibvlc_media_t*libvlc_media_new_fd(libvlc_instance_t*p_instance, int fd)

    Create a media for an already open file descriptor.

    LIBVLC_APIlibvlc_media_t*libvlc_media_new_callbacks(libvlc_instance_t*instance,libvlc_media_open_cbopen_cb,libvlc_media_read_cbread_cb,libvlc_media_seek_cbseek_cb,libvlc_media_close_cbclose_cb, void *opaque)

    Create a media with custom callbacks to read the data from.

    LIBVLC_APIlibvlc_media_t*libvlc_media_new_as_node(libvlc_instance_t*p_instance, const char *psz_name)

    Create a media as an empty node with a given name.

    LIBVLC_APIvoidlibvlc_media_add_option(libvlc_media_t*p_md, const char *psz_options)

    Add an option to the media.

    LIBVLC_APIvoidlibvlc_media_add_option_flag(libvlc_media_t*p_md, const char *psz_options, unsigned i_flags)

    Add an option to the media with configurable flags.

    LIBVLC_APIvoidlibvlc_media_retain(libvlc_media_t*p_md)

    Retain a reference to a media descriptor object (libvlc_media_t).

    LIBVLC_APIvoidlibvlc_media_release(libvlc_media_t*p_md)

    Decrement the reference count of a media descriptor object.

    LIBVLC_APIchar *libvlc_media_get_mrl(libvlc_media_t*p_md)

    Get the media resource locator (mrl) from a media descriptor object.

    LIBVLC_APIlibvlc_media_t*libvlc_media_duplicate(libvlc_media_t*p_md)

    Duplicate a media descriptor object.

    LIBVLC_APIchar *libvlc_media_get_meta(libvlc_media_t*p_md,libvlc_meta_te_meta)

    Read the meta of the media.

    LIBVLC_APIvoidlibvlc_media_set_meta(libvlc_media_t*p_md,libvlc_meta_te_meta, const char *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)

    LIBVLC_APIintlibvlc_media_save_meta(libvlc_media_t*p_md)

    Save the meta previously set.

    LIBVLC_APIlibvlc_state_tlibvlc_media_get_state(libvlc_media_t*p_md)

    Get current state of media descriptor object.

    LIBVLC_APIintlibvlc_media_get_stats(libvlc_media_t*p_md,libvlc_media_stats_t*p_stats)

    Get the current statistics about the media.

    LIBVLC_APIstruct

    libvlc_media_list_t*libvlc_media_subitems(libvlc_media_t*p_md)

    Get subitems of media descriptor object.

    LIBVLC_APIlibvlc_event_manager_t*libvlc_media_event_manager(libvlc_media_t*p_md)

    Get event manager from media descriptor object.

    LIBVLC_APIlibvlc_time_tlibvlc_media_get_duration(libvlc_media_t*p_md)

    Get duration (in ms) of media descriptor object item.

    LIBVLC_APIvoidlibvlc_media_parse(libvlc_media_t*p_md)

    Parse a media.

    LIBVLC_APIvoidlibvlc_media_parse_async(libvlc_media_t*p_md)

    Parse a media.

    LIBVLC_APIintlibvlc_media_parse_with_options(libvlc_media_t*p_md,libvlc_media_parse_flag_tparse_flag)

    Parse the media asynchronously with options.

    LIBVLC_APIintlibvlc_media_is_parsed(libvlc_media_t*p_md)

    Get Parsed status for media descriptor object.

    LIBVLC_APIvoidlibvlc_media_set_user_data(libvlc_media_t*p_md, void *p_new_user_data)

    Sets media descriptor's user_data.

    LIBVLC_APIvoid *libvlc_media_get_user_data(libvlc_media_t*p_md)

    Get media descriptor's user_data.

    LIBVLC_DEPRECATEDLIBVLC_APIintlibvlc_media_get_tracks_info(libvlc_media_t*p_md,libvlc_media_track_info_t**tracks)

    Get media descriptor's elementary streams description.

    LIBVLC_APIunsignedlibvlc_media_tracks_get(libvlc_media_t*p_md,libvlc_media_track_t***tracks)

    Get media descriptor's elementary streams description.

    LIBVLC_APIconst char *libvlc_media_get_codec_description(libvlc_track_type_ti_type, uint32_ti_codec)

    Get codec description from media elementary stream.

    LIBVLC_APIvoidlibvlc_media_tracks_release(libvlc_media_track_t**p_tracks, unsigned i_count)

    Release media descriptor's elementary streams description array.

    LIBVLC_APIlibvlc_media_type_tlibvlc_media_get_type(libvlc_media_t*p_md)

    Get the media type of the media descriptor object.

    enumlibvlc_meta_t{

    libvlc_meta_Title,libvlc_meta_Artist,libvlc_meta_Genre,libvlc_meta_Copyright,

    libvlc_meta_Album,libvlc_meta_TrackNumber,libvlc_meta_Description,libvlc_meta_Rating,

    libvlc_meta_Date,libvlc_meta_Setting,libvlc_meta_URL,libvlc_meta_Language,

    libvlc_meta_NowPlaying,libvlc_meta_Publisher,libvlc_meta_EncodedBy,libvlc_meta_ArtworkURL,

    libvlc_meta_TrackID,libvlc_meta_TrackTotal,libvlc_meta_Director,libvlc_meta_Season,

    libvlc_meta_Episode,libvlc_meta_ShowName,libvlc_meta_Actors,libvlc_meta_AlbumArtist,

    libvlc_meta_DiscNumber

    }

    defgroup libvlc_meta LibVLC meta dataMore...

    typedef enumlibvlc_meta_tlibvlc_meta_t

    defgroup libvlc_meta LibVLC meta data

    typedef structlibvlc_media_stats_tlibvlc_media_stats_t

    defgrouplibvlc_media_stats_tLibVLC media statistics

    enumlibvlc_media_type_t{

    libvlc_media_type_unknown,libvlc_media_type_file,libvlc_media_type_directory,libvlc_media_type_disc,

    libvlc_media_type_stream,libvlc_media_type_playlist

    }

    defgroup libvlc_media_type LibVLC media typeMore...

    typedef enumlibvlc_media_type_tlibvlc_media_type_t

    defgroup libvlc_media_type LibVLC media type

    5.media discovery

    LIBVLC_DEPRECATEDLIBVLC_API

    libvlc_media_discoverer_t*libvlc_media_discoverer_new_from_name(libvlc_instance_t*p_inst, const char *psz_name)

    LIBVLC_API

    libvlc_media_discoverer_t*libvlc_media_discoverer_new(libvlc_instance_t*p_inst, const char *psz_name)

    Create a media discoverer object by name.

    LIBVLC_APIintlibvlc_media_discoverer_start(libvlc_media_discoverer_t*p_mdis)

    Start media discovery.

    LIBVLC_APIvoidlibvlc_media_discoverer_stop(libvlc_media_discoverer_t*p_mdis)

    Stop media discovery.

    LIBVLC_APIvoidlibvlc_media_discoverer_release(libvlc_media_discoverer_t*p_mdis)

    Release media discover object.

    LIBVLC_APIchar *libvlc_media_discoverer_localized_name(libvlc_media_discoverer_t*p_mdis)

    Get media service discover object its localized name.

    LIBVLC_APIlibvlc_media_list_t*libvlc_media_discoverer_media_list(libvlc_media_discoverer_t*p_mdis)

    Get media service discover media list.

    LIBVLC_APIlibvlc_event_manager_t*libvlc_media_discoverer_event_manager(libvlc_media_discoverer_t*p_mdis)

    Get event manager from media service discover object.

    LIBVLC_APIintlibvlc_media_discoverer_is_running(libvlc_media_discoverer_t*p_mdis)

    Query if media service discover object is running.

    6.media library

    LIBVLC_APIlibvlc_media_library_t*libvlc_media_library_new(libvlc_instance_t*p_instance)

    Create an new Media Library object.

    LIBVLC_APIvoidlibvlc_media_library_release(libvlc_media_library_t*p_mlib)

    Release media library object.

    LIBVLC_APIvoidlibvlc_media_library_retain(libvlc_media_library_t*p_mlib)

    Retain a reference to a media library object.

    LIBVLC_APIintlibvlc_media_library_load(libvlc_media_library_t*p_mlib)

    Load media library.

    LIBVLC_APIlibvlc_media_list_t*libvlc_media_library_media_list(libvlc_media_library_t*p_mlib)

    Get media library subitems.

    相关文章

      网友评论

          本文标题:libVLC

          本文链接:https://www.haomeiwen.com/subject/xjyuqttx.html