MediaControl

This is the MediaControl API, * intended to provide a generic API to movie players. More...

Defines

#define VLC_CONTROL_H   1

Typedefs

typedef int WINDOWHANDLE
typedef mediacontrol_Instance mediacontrol_Instance
 mediacontrol_Instance is an opaque structure, defined in mediacontrol_internal.h.

Functions

void mediacontrol_RGBPicture__free (mediacontrol_RGBPicture *pic)
 Free a RGBPicture structure.
void mediacontrol_PlaylistSeq__free (mediacontrol_PlaylistSeq *ps)
void mediacontrol_StreamInformation__free (mediacontrol_StreamInformation *p_si)
 Free a StreamInformation structure.
mediacontrol_Exceptionmediacontrol_exception_create (void)
 Instanciate and initialize an exception structure.
void mediacontrol_exception_init (mediacontrol_Exception *exception)
 Initialize an existing exception structure.
void mediacontrol_exception_cleanup (mediacontrol_Exception *exception)
 Clean up an existing exception structure after use.
void mediacontrol_exception_free (mediacontrol_Exception *exception)
 Free an exception structure created with mediacontrol_exception_create().
mediacontrol_Instancemediacontrol_new (int argc, char **argv, mediacontrol_Exception *exception)
 Create a MediaControl instance with parameters.
mediacontrol_Instancemediacontrol_new_from_instance (libvlc_instance_t *p_instance, mediacontrol_Exception *exception)
 Create a MediaControl instance from an existing libvlc instance.
libvlc_instance_tmediacontrol_get_libvlc_instance (mediacontrol_Instance *self)
 Get the associated libvlc instance.
libvlc_media_player_tmediacontrol_get_media_player (mediacontrol_Instance *self)
 Get the associated libvlc_media_player.
mediacontrol_Positionmediacontrol_get_media_position (mediacontrol_Instance *self, const mediacontrol_PositionOrigin an_origin, const mediacontrol_PositionKey a_key, mediacontrol_Exception *exception)
 Get the current position.
void mediacontrol_set_media_position (mediacontrol_Instance *self, const mediacontrol_Position *a_position, mediacontrol_Exception *exception)
 Set the position.
void mediacontrol_start (mediacontrol_Instance *self, const mediacontrol_Position *a_position, mediacontrol_Exception *exception)
 Play the movie at a given position.
void mediacontrol_pause (mediacontrol_Instance *self, mediacontrol_Exception *exception)
 Pause the movie at a given position.
void mediacontrol_resume (mediacontrol_Instance *self, mediacontrol_Exception *exception)
 Resume the movie at a given position.
void mediacontrol_stop (mediacontrol_Instance *self, mediacontrol_Exception *exception)
 Stop the movie at a given position.
void mediacontrol_exit (mediacontrol_Instance *self)
 Exit the player.
void mediacontrol_set_mrl (mediacontrol_Instance *self, const char *psz_file, mediacontrol_Exception *exception)
 Set the MRL to be played.
char * mediacontrol_get_mrl (mediacontrol_Instance *self, mediacontrol_Exception *exception)
 Get the MRL to be played.
mediacontrol_RGBPicturemediacontrol_snapshot (mediacontrol_Instance *self, const mediacontrol_Position *a_position, mediacontrol_Exception *exception)
 Get a snapshot.
void mediacontrol_display_text (mediacontrol_Instance *self, const char *message, const mediacontrol_Position *begin, const mediacontrol_Position *end, mediacontrol_Exception *exception)
 Displays the message string, between "begin" and "end" positions.
mediacontrol_StreamInformationmediacontrol_get_stream_information (mediacontrol_Instance *self, mediacontrol_PositionKey a_key, mediacontrol_Exception *exception)
 Get information about a stream.
unsigned short mediacontrol_sound_get_volume (mediacontrol_Instance *self, mediacontrol_Exception *exception)
 Get the current audio level, normalized in [0.
void mediacontrol_sound_set_volume (mediacontrol_Instance *self, const unsigned short volume, mediacontrol_Exception *exception)
 Set the audio level.
int mediacontrol_set_visual (mediacontrol_Instance *self, WINDOWHANDLE visual_id, mediacontrol_Exception *exception)
 Set the video output window.
int mediacontrol_get_rate (mediacontrol_Instance *self, mediacontrol_Exception *exception)
 Get the current playing rate, in percent.
void mediacontrol_set_rate (mediacontrol_Instance *self, const int rate, mediacontrol_Exception *exception)
 Set the playing rate, in percent.
int mediacontrol_get_fullscreen (mediacontrol_Instance *self, mediacontrol_Exception *exception)
 Get current fullscreen status.
void mediacontrol_set_fullscreen (mediacontrol_Instance *self, const int b_fullscreen, mediacontrol_Exception *exception)
 Set fullscreen status.

Detailed Description

This is the MediaControl API, * intended to provide a generic API to movie players.


Define Documentation

#define VLC_CONTROL_H   1


Typedef Documentation

typedef struct mediacontrol_Instance mediacontrol_Instance

mediacontrol_Instance is an opaque structure, defined in mediacontrol_internal.h.

API users do not have to mess with it.

typedef int WINDOWHANDLE


Function Documentation

void mediacontrol_display_text ( mediacontrol_Instance self,
const char *  message,
const mediacontrol_Position begin,
const mediacontrol_Position end,
mediacontrol_Exception exception 
)

Displays the message string, between "begin" and "end" positions.

Parameters:
self the mediacontrol instance
message the message to display
begin the begin position
end the end position
exception an initialized exception pointer

void mediacontrol_exception_cleanup ( mediacontrol_Exception exception  ) 

Clean up an existing exception structure after use.

Parameters:
p_exception the exception to clean up.

mediacontrol_Exception* mediacontrol_exception_create ( void   ) 

Instanciate and initialize an exception structure.

Returns:
the exception

void mediacontrol_exception_free ( mediacontrol_Exception exception  ) 

Free an exception structure created with mediacontrol_exception_create().

Returns:
the exception

void mediacontrol_exception_init ( mediacontrol_Exception exception  ) 

Initialize an existing exception structure.

Parameters:
p_exception the exception to initialize.

void mediacontrol_exit ( mediacontrol_Instance self  ) 

Exit the player.

Parameters:
self the mediacontrol instance

int mediacontrol_get_fullscreen ( mediacontrol_Instance self,
mediacontrol_Exception exception 
)

Get current fullscreen status.

Parameters:
self the mediacontrol instance
exception an initialized exception pointer
Returns:
the fullscreen status

libvlc_instance_t* mediacontrol_get_libvlc_instance ( mediacontrol_Instance self  ) 

Get the associated libvlc instance.

Parameters:
self,: the mediacontrol instance
Returns:
a libvlc instance

libvlc_media_player_t* mediacontrol_get_media_player ( mediacontrol_Instance self  ) 

Get the associated libvlc_media_player.

Parameters:
self,: the mediacontrol instance
Returns:
a libvlc_media_player_t instance

mediacontrol_Position* mediacontrol_get_media_position ( mediacontrol_Instance self,
const mediacontrol_PositionOrigin  an_origin,
const mediacontrol_PositionKey  a_key,
mediacontrol_Exception exception 
)

Get the current position.

Parameters:
self the mediacontrol instance
an_origin the position origin
a_key the position unit
exception an initialized exception pointer
Returns:
a mediacontrol_Position

char* mediacontrol_get_mrl ( mediacontrol_Instance self,
mediacontrol_Exception exception 
)

Get the MRL to be played.

Parameters:
self the mediacontrol instance
exception an initialized exception pointer

int mediacontrol_get_rate ( mediacontrol_Instance self,
mediacontrol_Exception exception 
)

Get the current playing rate, in percent.

Parameters:
self the mediacontrol instance
exception an initialized exception pointer
Returns:
the rate

mediacontrol_StreamInformation* mediacontrol_get_stream_information ( mediacontrol_Instance self,
mediacontrol_PositionKey  a_key,
mediacontrol_Exception exception 
)

Get information about a stream.

Parameters:
self the mediacontrol instance
a_key the time unit
exception an initialized exception pointer
Returns:
a mediacontrol_StreamInformation

mediacontrol_Instance* mediacontrol_new ( int  argc,
char **  argv,
mediacontrol_Exception exception 
)

Create a MediaControl instance with parameters.

Parameters:
argc the number of arguments
argv parameters
exception an initialized exception pointer
Returns:
a mediacontrol_Instance

mediacontrol_Instance* mediacontrol_new_from_instance ( libvlc_instance_t p_instance,
mediacontrol_Exception exception 
)

Create a MediaControl instance from an existing libvlc instance.

Parameters:
p_instance the libvlc instance
exception an initialized exception pointer
Returns:
a mediacontrol_Instance

void mediacontrol_pause ( mediacontrol_Instance self,
mediacontrol_Exception exception 
)

Pause the movie at a given position.

Parameters:
self the mediacontrol instance
exception an initialized exception pointer

void mediacontrol_PlaylistSeq__free ( mediacontrol_PlaylistSeq ps  ) 

void mediacontrol_resume ( mediacontrol_Instance self,
mediacontrol_Exception exception 
)

Resume the movie at a given position.

Parameters:
self the mediacontrol instance
exception an initialized exception pointer

void mediacontrol_RGBPicture__free ( mediacontrol_RGBPicture pic  ) 

Free a RGBPicture structure.

Parameters:
pic,: the RGBPicture structure

void mediacontrol_set_fullscreen ( mediacontrol_Instance self,
const int  b_fullscreen,
mediacontrol_Exception exception 
)

Set fullscreen status.

Parameters:
self the mediacontrol instance
b_fullscreen the desired status
exception an initialized exception pointer

void mediacontrol_set_media_position ( mediacontrol_Instance self,
const mediacontrol_Position a_position,
mediacontrol_Exception exception 
)

Set the position.

Parameters:
self the mediacontrol instance
a_position a mediacontrol_Position
exception an initialized exception pointer

void mediacontrol_set_mrl ( mediacontrol_Instance self,
const char *  psz_file,
mediacontrol_Exception exception 
)

Set the MRL to be played.

Parameters:
self the mediacontrol instance
psz_file the MRL
exception an initialized exception pointer

void mediacontrol_set_rate ( mediacontrol_Instance self,
const int  rate,
mediacontrol_Exception exception 
)

Set the playing rate, in percent.

Parameters:
self the mediacontrol instance
rate the desired rate
exception an initialized exception pointer

int mediacontrol_set_visual ( mediacontrol_Instance self,
WINDOWHANDLE  visual_id,
mediacontrol_Exception exception 
)

Set the video output window.

Parameters:
self the mediacontrol instance
visual_id the Xid or HWND, depending on the platform
exception an initialized exception pointer

mediacontrol_RGBPicture* mediacontrol_snapshot ( mediacontrol_Instance self,
const mediacontrol_Position a_position,
mediacontrol_Exception exception 
)

Get a snapshot.

Parameters:
self the mediacontrol instance
a_position the desired position (ignored for now)
exception an initialized exception pointer
Returns:
a RGBpicture

unsigned short mediacontrol_sound_get_volume ( mediacontrol_Instance self,
mediacontrol_Exception exception 
)

Get the current audio level, normalized in [0.

.100]

Parameters:
self the mediacontrol instance
exception an initialized exception pointer
Returns:
the volume

void mediacontrol_sound_set_volume ( mediacontrol_Instance self,
const unsigned short  volume,
mediacontrol_Exception exception 
)

Set the audio level.

Parameters:
self the mediacontrol instance
volume the volume (normalized in [0..100])
exception an initialized exception pointer

void mediacontrol_start ( mediacontrol_Instance self,
const mediacontrol_Position a_position,
mediacontrol_Exception exception 
)

Play the movie at a given position.

Parameters:
self the mediacontrol instance
a_position a mediacontrol_Position
exception an initialized exception pointer

void mediacontrol_stop ( mediacontrol_Instance self,
mediacontrol_Exception exception 
)

Stop the movie at a given position.

Parameters:
self the mediacontrol instance
exception an initialized exception pointer

void mediacontrol_StreamInformation__free ( mediacontrol_StreamInformation p_si  ) 

Free a StreamInformation structure.

Parameters:
pic,: the StreamInformation structure


Generated on Wed Aug 13 08:05:54 2008 for VLC by  doxygen 1.5.1