libvlc_media
[libvlc]

Collaboration diagram for libvlc_media:
LibVLC Media. More...
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
}
 defgroup libvlc_meta libvlc_meta

LibVLC Media Meta More...


Defines

#define VLC_FORWARD_DECLARE_OBJECT(a)   struct a
 Get subitems of media descriptor object.

Typedefs

typedef struct libvlc_media_t libvlc_media_t

Enumerations

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_t { libvlc_media_option_trusted = 0x2, libvlc_media_option_unique = 0x100 }

Functions

VLC_PUBLIC_API libvlc_media_tlibvlc_media_new (libvlc_instance_t *p_instance, const char *psz_mrl, libvlc_exception_t *p_e)
 Create a media with the given MRL.
VLC_PUBLIC_API libvlc_media_tlibvlc_media_new_as_node (libvlc_instance_t *p_instance, const char *psz_name, libvlc_exception_t *p_e)
 Create a media as an empty node with the passed name.
VLC_PUBLIC_API void libvlc_media_add_option (libvlc_media_t *p_md, const char *ppsz_options)
 Add an option to the media.
VLC_PUBLIC_API void libvlc_media_add_option_flag (libvlc_media_t *p_md, const char *ppsz_options, libvlc_media_option_t i_flags)
 Add an option to the media with configurable flags.
VLC_PUBLIC_API void libvlc_media_retain (libvlc_media_t *p_meta_desc)
 Retain a reference to a media descriptor object (libvlc_media_t).
VLC_PUBLIC_API void libvlc_media_release (libvlc_media_t *p_meta_desc)
 Decrement the reference count of a media descriptor object.
VLC_PUBLIC_API char * libvlc_media_get_mrl (libvlc_media_t *p_md)
 Get the media resource locator (mrl) from a media descriptor object.
VLC_PUBLIC_API libvlc_media_tlibvlc_media_duplicate (libvlc_media_t *)
 Duplicate a media descriptor object.
VLC_PUBLIC_API char * libvlc_media_get_meta (libvlc_media_t *p_meta_desc, libvlc_meta_t e_meta)
 Read the meta of the media.
VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state (libvlc_media_t *p_meta_desc)
 Get current state of media descriptor object.
VLC_PUBLIC_API struct
libvlc_media_list_t
libvlc_media_subitems (libvlc_media_t *p_md)
VLC_PUBLIC_API
libvlc_event_manager_t
libvlc_media_event_manager (libvlc_media_t *p_md)
 Get event manager from media descriptor object.
VLC_PUBLIC_API libvlc_time_t libvlc_media_get_duration (libvlc_media_t *p_md, libvlc_exception_t *p_e)
 Get duration (in ms) of media descriptor object item.
VLC_PUBLIC_API int libvlc_media_is_preparsed (libvlc_media_t *p_md)
 Get preparsed status for media descriptor object.
VLC_PUBLIC_API void libvlc_media_set_user_data (libvlc_media_t *p_md, void *p_new_user_data)
 Sets media descriptor's user_data.
VLC_PUBLIC_API void * libvlc_media_get_user_data (libvlc_media_t *p_md)
 Get media descriptor's user_data.

Detailed Description

LibVLC Media.

LibVLC Media Descriptor handling.


Define Documentation

#define VLC_FORWARD_DECLARE_OBJECT (  )     struct a

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


Typedef Documentation


Enumeration Type Documentation

Enumerator:
libvlc_media_option_trusted 
libvlc_media_option_unique 

defgroup libvlc_meta libvlc_meta

LibVLC Media Meta

Enumerator:
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 

Note the order of libvlc_state_t enum must match exactly the order of.

See also:
mediacontrol_PlayerStatus,

input_state_e enums, and VideoLAN.LibVLC.State (at bindings/cil/src/media.cs).

Expected states by web plugins are: IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4, STOPPING=5, ENDED=6, ERROR=7
Enumerator:
libvlc_NothingSpecial 
libvlc_Opening 
libvlc_Buffering 
libvlc_Playing 
libvlc_Paused 
libvlc_Stopped 
libvlc_Ended 
libvlc_Error 


Function Documentation

VLC_PUBLIC_API void libvlc_media_add_option ( libvlc_media_t p_md,
const char *  ppsz_options 
)

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_instance the instance
ppsz_options the options (as a string)

References input_item_AddOption(), libvlc_media_t::p_input_item, VLC_INPUT_OPTION_TRUSTED, and VLC_INPUT_OPTION_UNIQUE.

Referenced by mediacontrol_start().

VLC_PUBLIC_API void libvlc_media_add_option_flag ( libvlc_media_t p_md,
const char *  ppsz_options,
libvlc_media_option_t  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_instance the instance
ppsz_options the options (as a string)
i_flags the flags for this option

References input_item_AddOption(), and libvlc_media_t::p_input_item.

VLC_PUBLIC_API libvlc_media_t* libvlc_media_duplicate ( libvlc_media_t  ) 

Duplicate a media descriptor object.

Parameters:
p_meta_desc a media descriptor object.

References libvlc_media_new_from_input_item(), libvlc_media_t::p_input_item, and libvlc_media_t::p_libvlc_instance.

VLC_PUBLIC_API libvlc_event_manager_t* libvlc_media_event_manager ( libvlc_media_t p_md  ) 

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

References libvlc_media_t::p_event_manager.

VLC_PUBLIC_API libvlc_time_t libvlc_media_get_duration ( libvlc_media_t p_md,
libvlc_exception_t p_e 
)

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

Parameters:
p_md media descriptor object
p_e an initialized exception object
Returns:
duration of media item

References input_item_GetDuration(), libvlc_exception_raise(), libvlc_printerr(), and libvlc_media_t::p_input_item.

VLC_PUBLIC_API char* libvlc_media_get_meta ( libvlc_media_t p_meta_desc,
libvlc_meta_t  e_meta 
)

VLC_PUBLIC_API char* libvlc_media_get_mrl ( libvlc_media_t p_md  ) 

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

References input_item_GetURI(), and libvlc_media_t::p_input_item.

Referenced by mediacontrol_get_mrl(), mediacontrol_get_stream_information(), and mediacontrol_start().

VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state ( libvlc_media_t p_meta_desc  ) 

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

See also:
libvlc_state_t
Parameters:
p_meta_desc a media descriptor object
Returns:
state of media descriptor object

References libvlc_media_t::state.

Referenced by libvlc_media_player_get_state().

VLC_PUBLIC_API void* libvlc_media_get_user_data ( libvlc_media_t p_md  ) 

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

References libvlc_media_t::p_user_data.

VLC_PUBLIC_API int libvlc_media_is_preparsed ( libvlc_media_t p_md  ) 

Get preparsed status for media descriptor object.

Parameters:
p_md media descriptor object
Returns:
true if media object has been preparsed otherwise it returns false

References input_item_IsPreparsed(), and libvlc_media_t::p_input_item.

VLC_PUBLIC_API libvlc_media_t* libvlc_media_new ( libvlc_instance_t p_instance,
const char *  psz_mrl,
libvlc_exception_t p_e 
)

Create a media with the given MRL.

Parameters:
p_instance the instance
psz_mrl the MRL to read
p_e an initialized exception pointer
Returns:
the newly created media

References input_item_New, libvlc_exception_raise(), libvlc_media_new_from_input_item(), libvlc_printerr(), libvlc_instance_t::p_libvlc_int, and vlc_gc_decref.

Referenced by mediacontrol_set_mrl(), and mediacontrol_start().

VLC_PUBLIC_API libvlc_media_t* libvlc_media_new_as_node ( libvlc_instance_t p_instance,
const char *  psz_name,
libvlc_exception_t p_e 
)

Create a media as an empty node with the passed name.

Parameters:
p_instance the instance
psz_name the name of the node
p_e an initialized exception pointer
Returns:
the new empty media

References input_item_New, libvlc_exception_raise(), libvlc_media_list_new(), libvlc_media_new_from_input_item(), libvlc_printerr(), libvlc_media_t::p_libvlc_instance, libvlc_instance_t::p_libvlc_int, and libvlc_media_t::p_subitems.

Referenced by services_discovery_item_added().

VLC_PUBLIC_API void libvlc_media_release ( libvlc_media_t p_meta_desc  ) 

VLC_PUBLIC_API void libvlc_media_retain ( libvlc_media_t p_meta_desc  ) 

VLC_PUBLIC_API void libvlc_media_set_user_data ( libvlc_media_t p_md,
void *  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 object
p_new_user_data pointer to user data

References libvlc_media_t::p_user_data.

VLC_PUBLIC_API struct libvlc_media_list_t* libvlc_media_subitems ( libvlc_media_t p_md  )  [read]


Generated on Sat Nov 21 08:06:02 2009 for VLC by  doxygen 1.5.6