VLC 4.0.0-dev
Loading...
Searching...
No Matches
libvlc_media.h File Reference

LibVLC media item/descriptor external API. More...

Include dependency graph for libvlc_media.h:

Go to the source code of this file.

Data Structures

struct  libvlc_media_stats_t
 
struct  libvlc_media_slave_t
 A slave of a libvlc_media_t. More...
 

Macros

#define libvlc_media_filestat_mtime   0
 Type of stat that can be requested from libvlc_media_get_filestat()
 
#define libvlc_media_filestat_size   1
 
#define VLC_FORWARD_DECLARE_OBJECT(a)   struct a
 

Typedefs

typedef struct libvlc_media_t libvlc_media_t
 
typedef enum libvlc_meta_t libvlc_meta_t
 Meta data types.
 
typedef enum libvlc_state_t libvlc_state_t
 libvlc media or media_player state
 
typedef struct libvlc_media_stats_t libvlc_media_stats_t
 
typedef enum libvlc_media_type_t libvlc_media_type_t
 Media type.
 
typedef enum libvlc_media_parse_flag_t libvlc_media_parse_flag_t
 Parse flags used by libvlc_media_parse_request()
 
typedef enum libvlc_media_parsed_status_t libvlc_media_parsed_status_t
 Parse status used sent by libvlc_media_parse_request() or returned by libvlc_media_get_parsed_status()
 
typedef enum libvlc_media_slave_type_t libvlc_media_slave_type_t
 Type of a media slave: subtitle or audio.
 
typedef struct libvlc_media_slave_t libvlc_media_slave_t
 A slave of a libvlc_media_t.
 
typedef int(* libvlc_media_open_cb) (void *opaque, void **datap, uint64_t *sizep)
 Callback prototype to open a custom bitstream input media.
 
typedef ptrdiff_t(* libvlc_media_read_cb) (void *opaque, unsigned char *buf, size_t len)
 Callback prototype to read data from a custom bitstream input media.
 
typedef int(* libvlc_media_seek_cb) (void *opaque, uint64_t offset)
 Callback prototype to seek a custom bitstream input media.
 
typedef void(* libvlc_media_close_cb) (void *opaque)
 Callback prototype to close a custom bitstream input media.
 
typedef struct libvlc_media_thumbnail_request_t libvlc_media_thumbnail_request_t
 libvlc_media_thumbnail_request_t An opaque thumbnail request object
 
typedef enum libvlc_thumbnailer_seek_speed_t libvlc_thumbnailer_seek_speed_t
 

Enumerations

enum  libvlc_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 , libvlc_meta_DiscTotal
}
 Meta data types. More...
 
enum  libvlc_state_t {
  libvlc_NothingSpecial =0 , libvlc_Opening , libvlc_Buffering , libvlc_Playing ,
  libvlc_Paused , libvlc_Stopped , libvlc_Stopping , libvlc_Error
}
 libvlc media or media_player state More...
 
enum  { libvlc_media_option_trusted = 0x2 , libvlc_media_option_unique = 0x100 }
 
enum  libvlc_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
}
 Media type. More...
 
enum  libvlc_media_parse_flag_t {
  libvlc_media_parse_local = 0x01 , libvlc_media_parse_network = 0x02 , libvlc_media_parse_forced = 0x04 , libvlc_media_fetch_local = 0x08 ,
  libvlc_media_fetch_network = 0x10 , libvlc_media_do_interact = 0x20
}
 Parse flags used by libvlc_media_parse_request() More...
 
enum  libvlc_media_parsed_status_t {
  libvlc_media_parsed_status_none , libvlc_media_parsed_status_pending , libvlc_media_parsed_status_skipped , libvlc_media_parsed_status_failed ,
  libvlc_media_parsed_status_timeout , libvlc_media_parsed_status_cancelled , libvlc_media_parsed_status_done
}
 Parse status used sent by libvlc_media_parse_request() or returned by libvlc_media_get_parsed_status() More...
 
enum  libvlc_media_slave_type_t { libvlc_media_slave_type_subtitle , libvlc_media_slave_type_generic , libvlc_media_slave_type_audio = libvlc_media_slave_type_generic }
 Type of a media slave: subtitle or audio. More...
 
enum  libvlc_thumbnailer_seek_speed_t { libvlc_media_thumbnail_seek_precise , libvlc_media_thumbnail_seek_fast }
 

Functions

LIBVLC_API libvlc_media_tlibvlc_media_new_location (const char *psz_mrl)
 Create a media with a certain given media resource location, for instance a valid URL.
 
LIBVLC_API libvlc_media_tlibvlc_media_new_path (const char *path)
 Create a media for a certain file path.
 
LIBVLC_API libvlc_media_tlibvlc_media_new_fd (int fd)
 Create a media for an already open file descriptor.
 
LIBVLC_API libvlc_media_tlibvlc_media_new_callbacks (libvlc_media_open_cb open_cb, libvlc_media_read_cb read_cb, libvlc_media_seek_cb seek_cb, libvlc_media_close_cb close_cb, void *opaque)
 Create a media with custom callbacks to read the data from.
 
LIBVLC_API libvlc_media_tlibvlc_media_new_as_node (const char *psz_name)
 Create a media as an empty node with a given name.
 
LIBVLC_API void libvlc_media_add_option (libvlc_media_t *p_md, const char *psz_options)
 Add an option to the media.
 
LIBVLC_API void libvlc_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_API libvlc_media_tlibvlc_media_retain (libvlc_media_t *p_md)
 Retain a reference to a media descriptor object (libvlc_media_t).
 
LIBVLC_API void libvlc_media_release (libvlc_media_t *p_md)
 Decrement the reference count of a media descriptor object.
 
LIBVLC_API char * libvlc_media_get_mrl (libvlc_media_t *p_md)
 Get the media resource locator (mrl) from a media descriptor object.
 
LIBVLC_API libvlc_media_tlibvlc_media_duplicate (libvlc_media_t *p_md)
 Duplicate a media descriptor object.
 
LIBVLC_API char * libvlc_media_get_meta (libvlc_media_t *p_md, libvlc_meta_t e_meta)
 Read the meta of the media.
 
LIBVLC_API void libvlc_media_set_meta (libvlc_media_t *p_md, libvlc_meta_t e_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_API char * libvlc_media_get_meta_extra (libvlc_media_t *p_md, const char *psz_name)
 Read the meta extra of the media.
 
LIBVLC_API void libvlc_media_set_meta_extra (libvlc_media_t *p_md, const char *psz_name, 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_API unsigned libvlc_media_get_meta_extra_names (libvlc_media_t *p_md, char ***pppsz_names)
 Read the meta extra names of the media.
 
LIBVLC_API void libvlc_media_meta_extra_names_release (char **ppsz_names, unsigned i_count)
 Release a media meta extra names.
 
LIBVLC_API int libvlc_media_save_meta (libvlc_instance_t *inst, libvlc_media_t *p_md)
 Save the meta previously set.
 
LIBVLC_API bool libvlc_media_get_stats (libvlc_media_t *p_md, libvlc_media_stats_t *p_stats)
 Get the current statistics about the media.
 
LIBVLC_API struct libvlc_media_list_tlibvlc_media_subitems (libvlc_media_t *p_md)
 Get subitems of media descriptor object.
 
LIBVLC_API libvlc_event_manager_tlibvlc_media_event_manager (libvlc_media_t *p_md)
 Get event manager from media descriptor object.
 
LIBVLC_API libvlc_time_t libvlc_media_get_duration (libvlc_media_t *p_md)
 Get duration (in ms) of media descriptor object item.
 
LIBVLC_API int libvlc_media_get_filestat (libvlc_media_t *p_md, unsigned type, uint64_t *out)
 Get a 'stat' value of media descriptor object item.
 
LIBVLC_API int libvlc_media_parse_request (libvlc_instance_t *inst, libvlc_media_t *p_md, libvlc_media_parse_flag_t parse_flag, int timeout)
 Parse the media asynchronously with options.
 
LIBVLC_API void libvlc_media_parse_stop (libvlc_instance_t *inst, libvlc_media_t *p_md)
 Stop the parsing of the media.
 
LIBVLC_API libvlc_media_parsed_status_t libvlc_media_get_parsed_status (libvlc_media_t *p_md)
 Get Parsed status for media descriptor object.
 
LIBVLC_API void libvlc_media_set_user_data (libvlc_media_t *p_md, void *p_new_user_data)
 Sets media descriptor's user_data.
 
LIBVLC_API void * libvlc_media_get_user_data (libvlc_media_t *p_md)
 Get media descriptor's user_data.
 
LIBVLC_API libvlc_media_tracklist_tlibvlc_media_get_tracklist (libvlc_media_t *p_md, libvlc_track_type_t type)
 Get the track list for one type.
 
LIBVLC_API const char * libvlc_media_get_codec_description (libvlc_track_type_t i_type, uint32_t i_codec)
 Get codec description from media elementary stream.
 
LIBVLC_API libvlc_media_type_t libvlc_media_get_type (libvlc_media_t *p_md)
 Get the media type of the media descriptor object.
 
LIBVLC_API libvlc_media_thumbnail_request_tlibvlc_media_thumbnail_request_by_time (libvlc_instance_t *inst, libvlc_media_t *md, libvlc_time_t time, libvlc_thumbnailer_seek_speed_t speed, unsigned int width, unsigned int height, bool crop, libvlc_picture_type_t picture_type, libvlc_time_t timeout)
 libvlc_media_request_thumbnail_by_time Start an asynchronous thumbnail generation
 
LIBVLC_API libvlc_media_thumbnail_request_tlibvlc_media_thumbnail_request_by_pos (libvlc_instance_t *inst, libvlc_media_t *md, double pos, libvlc_thumbnailer_seek_speed_t speed, unsigned int width, unsigned int height, bool crop, libvlc_picture_type_t picture_type, libvlc_time_t timeout)
 libvlc_media_request_thumbnail_by_pos Start an asynchronous thumbnail generation
 
LIBVLC_API void libvlc_media_thumbnail_request_destroy (libvlc_media_thumbnail_request_t *p_req)
 libvlc_media_thumbnail_destroy destroys a thumbnail request
 
LIBVLC_API int libvlc_media_slaves_add (libvlc_media_t *p_md, libvlc_media_slave_type_t i_type, unsigned int i_priority, const char *psz_uri)
 Add a slave to the current media.
 
LIBVLC_API void libvlc_media_slaves_clear (libvlc_media_t *p_md)
 Clear all slaves previously added by libvlc_media_slaves_add() or internally.
 
LIBVLC_API unsigned int libvlc_media_slaves_get (libvlc_media_t *p_md, libvlc_media_slave_t ***ppp_slaves)
 Get a media descriptor's slave list.
 
LIBVLC_API void libvlc_media_slaves_release (libvlc_media_slave_t **pp_slaves, unsigned int i_count)
 Release a media descriptor's slave list.
 

Detailed Description

LibVLC media item/descriptor external API.