VLC  3.0.15
Data Structures | Macros | Typedefs | Enumerations | Functions
libvlc_media.h File Reference

Go to the source code of this file.

Data Structures

struct  libvlc_media_stats_t
 
struct  libvlc_media_track_info_t
 
struct  libvlc_audio_track_t
 
struct  libvlc_video_viewpoint_t
 Viewpoint. More...
 
struct  libvlc_video_track_t
 
struct  libvlc_subtitle_track_t
 
struct  libvlc_media_track_t
 
struct  libvlc_media_slave_t
 A slave of a libvlc_media_t. More...
 

Macros

#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. More...
 
typedef enum libvlc_state_t libvlc_state_t
 Note the order of libvlc_state_t enum must match exactly the order of. More...
 
typedef enum libvlc_track_type_t libvlc_track_type_t
 
typedef struct libvlc_media_stats_t libvlc_media_stats_t
 
typedef struct libvlc_media_track_info_t libvlc_media_track_info_t
 
typedef struct libvlc_audio_track_t libvlc_audio_track_t
 
typedef enum libvlc_video_orient_t libvlc_video_orient_t
 
typedef enum libvlc_video_projection_t libvlc_video_projection_t
 
typedef struct libvlc_video_viewpoint_t libvlc_video_viewpoint_t
 Viewpoint. More...
 
typedef struct libvlc_video_track_t libvlc_video_track_t
 
typedef struct libvlc_subtitle_track_t libvlc_subtitle_track_t
 
typedef struct libvlc_media_track_t libvlc_media_track_t
 
typedef enum libvlc_media_type_t libvlc_media_type_t
 Media type. More...
 
typedef enum libvlc_media_parse_flag_t libvlc_media_parse_flag_t
 Parse flags used by libvlc_media_parse_with_options() More...
 
typedef enum libvlc_media_parsed_status_t libvlc_media_parsed_status_t
 Parse status used sent by libvlc_media_parse_with_options() or returned by libvlc_media_get_parsed_status() More...
 
typedef enum libvlc_media_slave_type_t libvlc_media_slave_type_t
 Type of a media slave: subtitle or audio. More...
 
typedef struct libvlc_media_slave_t libvlc_media_slave_t
 A slave of a libvlc_media_t. More...
 
typedef int(* libvlc_media_open_cb) (void *opaque, void **datap, uint64_t *sizep)
 Callback prototype to open a custom bitstream input media. More...
 
typedef ssize_t(* libvlc_media_read_cb) (void *opaque, unsigned char *buf, size_t len)
 Callback prototype to read data from a custom bitstream input media. More...
 
typedef int(* libvlc_media_seek_cb) (void *opaque, uint64_t offset)
 Callback prototype to seek a custom bitstream input media. More...
 
typedef void(* libvlc_media_close_cb) (void *opaque)
 Callback prototype to close a custom bitstream input media. More...
 

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_Ended, libvlc_Error
}
 Note the order of libvlc_state_t enum must match exactly the order of. More...
 
enum  { libvlc_media_option_trusted = 0x2, libvlc_media_option_unique = 0x100 }
 
enum  libvlc_track_type_t { libvlc_track_unknown = -1, libvlc_track_audio = 0, libvlc_track_video = 1, libvlc_track_text = 2 }
 
enum  libvlc_video_orient_t {
  libvlc_video_orient_top_left, libvlc_video_orient_top_right, libvlc_video_orient_bottom_left, libvlc_video_orient_bottom_right,
  libvlc_video_orient_left_top, libvlc_video_orient_left_bottom, libvlc_video_orient_right_top, libvlc_video_orient_right_bottom
}
 
enum  libvlc_video_projection_t { libvlc_video_projection_rectangular, libvlc_video_projection_equirectangular, libvlc_video_projection_cubemap_layout_standard = 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 = 0x00, libvlc_media_parse_network = 0x01, libvlc_media_fetch_local = 0x02, libvlc_media_fetch_network = 0x04,
  libvlc_media_do_interact = 0x08
}
 Parse flags used by libvlc_media_parse_with_options() More...
 
enum  libvlc_media_parsed_status_t { libvlc_media_parsed_status_skipped = 1, libvlc_media_parsed_status_failed, libvlc_media_parsed_status_timeout, libvlc_media_parsed_status_done }
 Parse status used sent by libvlc_media_parse_with_options() or returned by libvlc_media_get_parsed_status() More...
 
enum  libvlc_media_slave_type_t { libvlc_media_slave_type_subtitle, libvlc_media_slave_type_audio }
 Type of a media slave: subtitle or audio. More...
 

Functions

LIBVLC_API libvlc_media_tlibvlc_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. More...
 
LIBVLC_API libvlc_media_tlibvlc_media_new_path (libvlc_instance_t *p_instance, const char *path)
 Create a media for a certain file path. More...
 
LIBVLC_API libvlc_media_tlibvlc_media_new_fd (libvlc_instance_t *p_instance, int fd)
 Create a media for an already open file descriptor. More...
 
LIBVLC_API 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, void *opaque)
 Create a media with custom callbacks to read the data from. More...
 
LIBVLC_API libvlc_media_tlibvlc_media_new_as_node (libvlc_instance_t *p_instance, const char *psz_name)
 Create a media as an empty node with a given name. More...
 
LIBVLC_API void libvlc_media_add_option (libvlc_media_t *p_md, const char *psz_options)
 Add an option to the media. More...
 
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. More...
 
LIBVLC_API void libvlc_media_retain (libvlc_media_t *p_md)
 Retain a reference to a media descriptor object (libvlc_media_t). More...
 
LIBVLC_API void libvlc_media_release (libvlc_media_t *p_md)
 Decrement the reference count of a media descriptor object. More...
 
LIBVLC_API char * libvlc_media_get_mrl (libvlc_media_t *p_md)
 Get the media resource locator (mrl) from a media descriptor object. More...
 
LIBVLC_API libvlc_media_tlibvlc_media_duplicate (libvlc_media_t *p_md)
 Duplicate a media descriptor object. More...
 
LIBVLC_API char * libvlc_media_get_meta (libvlc_media_t *p_md, libvlc_meta_t e_meta)
 Read the meta of the media. More...
 
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) More...
 
LIBVLC_API int libvlc_media_save_meta (libvlc_media_t *p_md)
 Save the meta previously set. More...
 
LIBVLC_API libvlc_state_t libvlc_media_get_state (libvlc_media_t *p_md)
 Get current state of media descriptor object. More...
 
LIBVLC_API int libvlc_media_get_stats (libvlc_media_t *p_md, libvlc_media_stats_t *p_stats)
 Get the current statistics about the media. More...
 
LIBVLC_API struct libvlc_media_list_tlibvlc_media_subitems (libvlc_media_t *p_md)
 Get subitems of media descriptor object. More...
 
LIBVLC_API libvlc_event_manager_tlibvlc_media_event_manager (libvlc_media_t *p_md)
 Get event manager from media descriptor object. More...
 
LIBVLC_API libvlc_time_t libvlc_media_get_duration (libvlc_media_t *p_md)
 Get duration (in ms) of media descriptor object item. More...
 
LIBVLC_API int libvlc_media_parse_with_options (libvlc_media_t *p_md, libvlc_media_parse_flag_t parse_flag, int timeout)
 Parse the media asynchronously with options. More...
 
LIBVLC_API void libvlc_media_parse_stop (libvlc_media_t *p_md)
 Stop the parsing of the media. More...
 
LIBVLC_API libvlc_media_parsed_status_t libvlc_media_get_parsed_status (libvlc_media_t *p_md)
 Get Parsed status for media descriptor object. More...
 
LIBVLC_API void libvlc_media_set_user_data (libvlc_media_t *p_md, void *p_new_user_data)
 Sets media descriptor's user_data. More...
 
LIBVLC_API void * libvlc_media_get_user_data (libvlc_media_t *p_md)
 Get media descriptor's user_data. More...
 
LIBVLC_API unsigned libvlc_media_tracks_get (libvlc_media_t *p_md, libvlc_media_track_t ***tracks)
 Get media descriptor's elementary streams description. More...
 
const LIBVLC_API char * libvlc_media_get_codec_description (libvlc_track_type_t i_type, uint32_t i_codec)
 Get codec description from media elementary stream. More...
 
LIBVLC_API void libvlc_media_tracks_release (libvlc_media_track_t **p_tracks, unsigned i_count)
 Release media descriptor's elementary streams description array. More...
 
LIBVLC_API libvlc_media_type_t libvlc_media_get_type (libvlc_media_t *p_md)
 Get the media type of the media descriptor object. More...
 
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. More...
 
LIBVLC_API void libvlc_media_slaves_clear (libvlc_media_t *p_md)
 Clear all slaves previously added by libvlc_media_slaves_add() or internally. More...
 
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. More...
 
LIBVLC_API void libvlc_media_slaves_release (libvlc_media_slave_t **pp_slaves, unsigned int i_count)
 Release a media descriptor's slave list. More...
 

Detailed Description

LibVLC media item/descriptor external API