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...
struct  libvlc_media_open_cbs
 struct defining callbacks for libvlc_media_new_callbacks() 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)

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_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.

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_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_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...

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 (const struct libvlc_media_open_cbs *cbs, void *cbs_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_time_t libvlc_media_get_duration (libvlc_media_t *p_md)
 Get duration (in us) 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 bool libvlc_media_is_parsed (libvlc_media_t *p_md)
 Whether the media has been parsed.
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 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.