player.h File Reference

#include <inttypes.h>
#include <sys/types.h>

Go to the source code of this file.

Data Structures

struct  player_init_param_t
 Parameters for player_init() . More...
struct  mrl_resource_local_args_t
 Arguments for local streams. More...
struct  mrl_resource_cd_args_t
 Arguments for audio CD. More...
struct  mrl_resource_videodisc_args_t
 Arguments for video discs. More...
struct  mrl_resource_tv_args_t
 Arguments for radio/tv streams. More...
struct  mrl_resource_network_args_t
 Arguments for network streams. More...

Typedefs

typedef struct player_s player_t
 Player controller.
typedef struct mrl_s mrl_t
 MRL object.

Enumerations

enum  player_type_t
 

Player types.

More...
enum  player_vo_t
 

Player video outputs.

More...
enum  player_ao_t
 

Player audio outputs.

More...
enum  player_event_t
 

Player events.

More...
enum  player_verbosity_level_t
 

Player verbosity.

More...
enum  mrl_type_t
 

MRL types.

More...
enum  mrl_resource_t
 

MRL resources.

More...
enum  mrl_snapshot_t
 

Snapshot image file type.

More...
enum  mrl_metadata_type_t
 

MRL metadata.

More...
enum  mrl_metadata_cd_type_t
 

MRL CDDA/CDDB metadata.

More...
enum  mrl_metadata_dvd_type_t
 

MRL DVD/DVDNAV metadata.

More...
enum  mrl_properties_type_t
 

MRL properties.

More...
enum  player_mrl_add_t
 

Player MRL add mode.

More...
enum  player_pb_t
 

Player playback mode.

More...
enum  player_loop_t
 

Player loop mode.

More...
enum  player_framedrop_t
 

Player frame dropping mode.

More...
enum  player_x_window_flags_t
 

Player X11 window flags.

More...
enum  player_pb_state_t
 

Player playback state.

More...
enum  player_pb_seek_t
 

Player playback seek mode.

More...
enum  player_mute_t
 

Player mute state.

More...
enum  player_video_aspect_t
 

Player video aspect.

More...
enum  player_sub_alignment_t
 

Player subtitle alignment.

More...
enum  player_dvdnav_t
 

Player DVDnav commands.

More...
enum  player_vdr_t
 

Player VDR commands.

More...

Functions

unsigned int libplayer_version (void)
 Return LIBPLAYER_VERSION_INT constant.
Player (Un)Initialization.

player_tplayer_init (player_type_t type, player_verbosity_level_t verbosity, player_init_param_t *param)
 Initialization of a new player controller.
void player_uninit (player_t *player)
 Uninitialization of a player controller.
void player_set_verbosity (player_t *player, player_verbosity_level_t level)
 Set verbosity level.
Media Resource Locater (MRL) Helpers.

mrl_tmrl_new (player_t *player, mrl_resource_t res, void *args)
 Create a new MRL object.
void mrl_add_subtitle (player_t *player, mrl_t *mrl, char *subtitle)
 Add a subtitle file to a MRL object.
void mrl_free (player_t *player, mrl_t *mrl)
 Free a MRL object.
mrl_type_t mrl_get_type (player_t *player, mrl_t *mrl)
 Get type of the stream.
mrl_resource_t mrl_get_resource (player_t *player, mrl_t *mrl)
 Get resource of the stream.
char * mrl_get_metadata (player_t *player, mrl_t *mrl, mrl_metadata_type_t m)
 Get metadata of the stream.
char * mrl_get_metadata_cd_track (player_t *player, mrl_t *mrl, int trackid, uint32_t *length)
 Get metadata of a track with CDDA/CDDB MRL object.
uint32_t mrl_get_metadata_cd (player_t *player, mrl_t *mrl, mrl_metadata_cd_type_t m)
 Get metadata of a CDDA/CDDB MRL object.
uint32_t mrl_get_metadata_dvd_title (player_t *player, mrl_t *mrl, int titleid, mrl_metadata_dvd_type_t m)
 Get metadata of a title with DVD/DVDNAV MRL object.
char * mrl_get_metadata_dvd (player_t *player, mrl_t *mrl, uint8_t *titles)
 Get metadata of a DVD/DVDNAV MRL object.
int mrl_get_metadata_subtitle (player_t *player, mrl_t *mrl, int pos, uint32_t *id, char **name, char **lang)
 Get subtitle metadata of the MRL object.
uint32_t mrl_get_metadata_subtitle_nb (player_t *player, mrl_t *mrl)
 Get the number of available subtitles.
int mrl_get_metadata_audio (player_t *player, mrl_t *mrl, int pos, uint32_t *id, char **name, char **lang)
 Get audio metadata of the MRL object.
uint32_t mrl_get_metadata_audio_nb (player_t *player, mrl_t *mrl)
 Get the number of available audio streams.
uint32_t mrl_get_property (player_t *player, mrl_t *mrl, mrl_properties_type_t p)
 Get property of the stream.
char * mrl_get_audio_codec (player_t *player, mrl_t *mrl)
 Get audio codec name of the stream.
char * mrl_get_video_codec (player_t *player, mrl_t *mrl)
 Get video codec name of the stream.
off_t mrl_get_size (player_t *player, mrl_t *mrl)
 Get size of the resource.
void mrl_video_snapshot (player_t *player, mrl_t *mrl, int pos, mrl_snapshot_t t, const char *dst)
 Take a video snapshot.
Player to MRL connection.

mrl_tplayer_mrl_get_current (player_t *player)
 Get current MRL set in the internal playlist.
void player_mrl_set (player_t *player, mrl_t *mrl)
 Set MRL object in the internal playlist.
void player_mrl_append (player_t *player, mrl_t *mrl, player_mrl_add_t when)
 Append MRL object in the internal playlist.
void player_mrl_remove (player_t *player)
 Remove current MRL object in the internal playlist.
void player_mrl_remove_all (player_t *player)
 Remove all MRL objects in the internal playlist.
void player_mrl_previous (player_t *player)
 Go the the previous MRL object in the internal playlist.
void player_mrl_next (player_t *player)
 Go the the next MRL object in the internal playlist.
void player_mrl_continue (player_t *player)
 Go to the next MRL object accordingly to the loop and shuffle.
Player tuning & properties.

int player_get_time_pos (player_t *player)
 Get current time position in the current stream.
int player_get_percent_pos (player_t *player)
 Get percent position in the current stream.
void player_set_playback (player_t *player, player_pb_t pb)
 Set playback mode.
void player_set_loop (player_t *player, player_loop_t loop, int value)
 Set loop mode and value.
void player_set_shuffle (player_t *player, int value)
 Shuffle playback in the internal playlist.
void player_set_framedrop (player_t *player, player_framedrop_t fd)
 Set frame dropping with video playback.
void player_set_mouse_position (player_t *player, int x, int y)
 Set the mouse position to the player.
void player_x_window_set_properties (player_t *player, int x, int y, int w, int h, int flags)
 Set properties of X11 window handled by libplayer.
void player_osd_show_text (player_t *player, const char *text, int x, int y, int duration)
 Show a text on the On-screen Display.
void player_osd_state (player_t *player, int value)
 Enable/disable On-screen Display.
Playback related controls.

player_pb_state_t player_playback_get_state (player_t *player)
 Get current playback state.
void player_playback_start (player_t *player)
 Start a new playback.
void player_playback_stop (player_t *player)
 Stop playback.
void player_playback_pause (player_t *player)
 Pause and unpause playback.
void player_playback_seek (player_t *player, int value, player_pb_seek_t seek)
 Seek in the stream.
void player_playback_seek_chapter (player_t *player, int value, int absolute)
 Seek chapter in the stream.
void player_playback_speed (player_t *player, float value)
 Change playback speed.
Audio related controls.

int player_audio_volume_get (player_t *player)
 Get current volume.
void player_audio_volume_set (player_t *player, int value)
 Set volume.
player_mute_t player_audio_mute_get (player_t *player)
 Get mute state.
void player_audio_mute_set (player_t *player, player_mute_t value)
 Set mute state.
void player_audio_set_delay (player_t *player, int value, int absolute)
 Set audio delay.
void player_audio_select (player_t *player, int audio_id)
 Select audio ID.
void player_audio_prev (player_t *player)
 Select the previous audio ID.
void player_audio_next (player_t *player)
 Select the next audio ID.
Video related controls.

void player_video_set_aspect (player_t *player, player_video_aspect_t aspect, int8_t value, int absolute)
 Set video aspect.
void player_video_set_panscan (player_t *player, int8_t value, int absolute)
 Set video panscan.
void player_video_set_aspect_ratio (player_t *player, float value)
 Set video aspect ratio.
Subtitles related controls.

void player_subtitle_set_delay (player_t *player, int value)
 Set subtitle delay.
void player_subtitle_set_alignment (player_t *player, player_sub_alignment_t a)
 Set subtitle alignment.
void player_subtitle_set_position (player_t *player, int value)
 Set subtitle position.
void player_subtitle_set_visibility (player_t *player, int value)
 Set subtitle visibility.
void player_subtitle_scale (player_t *player, int value, int absolute)
 Set subtitle scale.
void player_subtitle_select (player_t *player, int sub_id)
 Select subtitle ID.
void player_subtitle_prev (player_t *player)
 Select the previous subtitle ID.
void player_subtitle_next (player_t *player)
 Select the next subtitle ID.
DVD specific controls.

void player_dvd_nav (player_t *player, player_dvdnav_t value)
 DVD Navigation commands.
void player_dvd_angle_select (player_t *player, int angle)
 Select DVD angle.
void player_dvd_angle_prev (player_t *player)
 Select the previous DVD angle.
void player_dvd_angle_next (player_t *player)
 Select the next DVD angle.
void player_dvd_title_select (player_t *player, int title)
 Select DVD title.
void player_dvd_title_prev (player_t *player)
 Select the previous DVD title.
void player_dvd_title_next (player_t *player)
 Select the next DVD title.
TV/DVB specific controls.

void player_tv_channel_select (player_t *player, const char *channel)
 Select TV channel.
void player_tv_channel_prev (player_t *player)
 Select the previous TV channel.
void player_tv_channel_next (player_t *player)
 Select the next TV channel.
Radio specific controls.

void player_radio_channel_select (player_t *player, const char *channel)
 Select radio channel.
void player_radio_channel_prev (player_t *player)
 Select the previous radio channel.
void player_radio_channel_next (player_t *player)
 Select the next radio channel.
VDR specific controls.

void player_vdr (player_t *player, player_vdr_t value)
 VDR commands.
Global libplayer functions.

int libplayer_wrapper_enabled (player_type_t type)
 Test if a wrapper is enabled.
int libplayer_wrapper_supported_res (player_type_t type, mrl_resource_t res)
 Test if a resource is supported by a wrapper.

Detailed Description

GeeXboX libplayer public API header.

Definition in file player.h.


Typedef Documentation

typedef struct mrl_s mrl_t

MRL object.

This handles an audio, video or image resource.

Definition at line 269 of file player.h.

typedef struct player_s player_t

Player controller.

This controls a multimedia player.

Definition at line 111 of file player.h.


Enumeration Type Documentation

MRL CDDA/CDDB metadata.

Definition at line 394 of file player.h.

MRL DVD/DVDNAV metadata.

Definition at line 400 of file player.h.

MRL metadata.

Definition at line 383 of file player.h.

MRL properties.

Definition at line 407 of file player.h.

MRL resources.

Definition at line 286 of file player.h.

Snapshot image file type.

Definition at line 375 of file player.h.

enum mrl_type_t

MRL types.

Definition at line 272 of file player.h.

Player audio outputs.

Definition at line 137 of file player.h.

Player DVDnav commands.

Definition at line 1460 of file player.h.

Player events.

Definition at line 146 of file player.h.

Player frame dropping mode.

Definition at line 861 of file player.h.

Player loop mode.

Definition at line 854 of file player.h.

Player MRL add mode.

Definition at line 745 of file player.h.

Player mute state.

Definition at line 1148 of file player.h.

Player playback seek mode.

Definition at line 1042 of file player.h.

Player playback state.

Definition at line 1035 of file player.h.

Player playback mode.

Definition at line 848 of file player.h.

Player subtitle alignment.

Definition at line 1335 of file player.h.

Player types.

Definition at line 114 of file player.h.

Player VDR commands.

Definition at line 1681 of file player.h.

Player verbosity.

Definition at line 157 of file player.h.

Player video aspect.

Definition at line 1271 of file player.h.

Player video outputs.

Definition at line 123 of file player.h.

Player X11 window flags.

Definition at line 868 of file player.h.


Function Documentation

unsigned int libplayer_version ( void   ) 

Return LIBPLAYER_VERSION_INT constant.

int libplayer_wrapper_enabled ( player_type_t  type  ) 

Test if a wrapper is enabled.

Warning:
MT-Safe in multithreaded applications.
Parameters:
[in] type Player type.
Returns:
1 if enabled, 0 otherwise.
int libplayer_wrapper_supported_res ( player_type_t  type,
mrl_resource_t  res 
)

Test if a resource is supported by a wrapper.

Warning:
MT-Safe in multithreaded applications.
Parameters:
[in] type Player type.
[in] res Resource type.
Returns:
1 if supported, 0 otherwise.
void mrl_add_subtitle ( player_t player,
mrl_t mrl,
char *  subtitle 
)

Add a subtitle file to a MRL object.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[in] subtitle Location of the subtitle file to be added.
void mrl_free ( player_t player,
mrl_t mrl 
)

Free a MRL object.

Never use this function when the MRL (or a linked MRL) is set in the playlist of a player controller.

Warning:
Must be used only as the last mrl function for one MRL object.
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object.
char* mrl_get_audio_codec ( player_t player,
mrl_t mrl 
)

Get audio codec name of the stream.

Wrappers supported (even partially): MPlayer, xine

Warning:
The returned pointer must be freed when no longer used.
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
Returns:
Audio codec name, NULL otherwise.
char* mrl_get_metadata ( player_t player,
mrl_t mrl,
mrl_metadata_type_t  m 
)

Get metadata of the stream.

This function can be slow when the stream is not (fastly) reachable.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
The returned pointer must be freed when no longer used.
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[in] m Type of metadata to get.
Returns:
Metadata string, NULL otherwise.
int mrl_get_metadata_audio ( player_t player,
mrl_t mrl,
int  pos,
uint32_t *  id,
char **  name,
char **  lang 
)

Get audio metadata of the MRL object.

This function can be slow when the stream is not (fastly) reachable.

The pos argument is the position of the audio stream in the internal list of libplayer. The first audio stream begins with 1. id returned by this function can be used with player_audio_select().

Wrappers supported (even partially): MPlayer

Warning:
The pointers (name and lang) must be freed when no longer used.
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[in] pos Position of the audio stream.
[out] id ID of the audio stream, NULL to ignore.
[out] name Name of the audio stream, NULL to ignore.
[out] lang Language of the audio stream, NULL to ignore.
Returns:
1 for success, 0 if the audio stream is not available.
uint32_t mrl_get_metadata_audio_nb ( player_t player,
mrl_t mrl 
)

Get the number of available audio streams.

This function can be slow when the stream is not (fastly) reachable.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
Returns:
Number of audio streams.
uint32_t mrl_get_metadata_cd ( player_t player,
mrl_t mrl,
mrl_metadata_cd_type_t  m 
)

Get metadata of a CDDA/CDDB MRL object.

This function can be slow when the stream is not (fastly) reachable.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[in] m Type of metadata to get.
Returns:
Metadata value.
char* mrl_get_metadata_cd_track ( player_t player,
mrl_t mrl,
int  trackid,
uint32_t *  length 
)

Get metadata of a track with CDDA/CDDB MRL object.

This function can be slow when the stream is not (fastly) reachable.

Wrappers supported (even partially): MPlayer

Warning:
The returned pointer must be freed when no longer used.
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[in] trackid Track ID on the CD.
[out] length Length of the track (millisecond).
Returns:
Title of the track (CDDB only), NULL otherwise.
char* mrl_get_metadata_dvd ( player_t player,
mrl_t mrl,
uint8_t *  titles 
)

Get metadata of a DVD/DVDNAV MRL object.

This function can be slow when the stream is not (fastly) reachable.

Wrappers supported (even partially): MPlayer, xine

Warning:
The returned pointer must be freed when no longer used.
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[out] titles How many titles on the DVD.
Returns:
Volume ID, NULL otherwise.
uint32_t mrl_get_metadata_dvd_title ( player_t player,
mrl_t mrl,
int  titleid,
mrl_metadata_dvd_type_t  m 
)

Get metadata of a title with DVD/DVDNAV MRL object.

This function can be slow when the stream is not (fastly) reachable.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[in] titleid Title ID on the DVD.
[in] m Type of metadata to get.
Returns:
Metadata value.
int mrl_get_metadata_subtitle ( player_t player,
mrl_t mrl,
int  pos,
uint32_t *  id,
char **  name,
char **  lang 
)

Get subtitle metadata of the MRL object.

This function can be slow when the stream is not (fastly) reachable.

The pos argument is the position of the subtitle in the internal list of libplayer. The first subtitle begins with 1. id returned by this function can be used with player_subtitle_select().

Wrappers supported (even partially): MPlayer

Warning:
The pointers (name and lang) must be freed when no longer used.
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[in] pos Position of the subtitle.
[out] id ID of the subtitle, NULL to ignore.
[out] name Name of the subtitle, NULL to ignore.
[out] lang Language of the subtitle, NULL to ignore.
Returns:
1 for success, 0 if the subtitle is not available.
uint32_t mrl_get_metadata_subtitle_nb ( player_t player,
mrl_t mrl 
)

Get the number of available subtitles.

This function can be slow when the stream is not (fastly) reachable.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
Returns:
Number of subtitles.
uint32_t mrl_get_property ( player_t player,
mrl_t mrl,
mrl_properties_type_t  p 
)

Get property of the stream.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[in] p Type of property.
Returns:
Property value.
mrl_resource_t mrl_get_resource ( player_t player,
mrl_t mrl 
)

Get resource of the stream.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
Returns:
Resource of MRL object.
off_t mrl_get_size ( player_t player,
mrl_t mrl 
)

Get size of the resource.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
Returns:
Size of the stream (bytes).
mrl_type_t mrl_get_type ( player_t player,
mrl_t mrl 
)

Get type of the stream.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
Returns:
Type of MRL object.
char* mrl_get_video_codec ( player_t player,
mrl_t mrl 
)

Get video codec name of the stream.

Wrappers supported (even partially): MPlayer, xine

Warning:
The returned pointer must be freed when no longer used.
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
Returns:
Video codec name, NULL otherwise.
mrl_t* mrl_new ( player_t player,
mrl_resource_t  res,
void *  args 
)

Create a new MRL object.

This function can be slow when the stream is not (fastly) reachable.

The argument args and the strings provided with args must be allocated dynamically. The pointers are freed by libplayer when a mrl is no longer available.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] res Resource type.
[in] args Arguments specific to the resource type.
Returns:
MRL object, NULL otherwise.
void mrl_video_snapshot ( player_t player,
mrl_t mrl,
int  pos,
mrl_snapshot_t  t,
const char *  dst 
)

Take a video snapshot.

One frame at the pos (in second) is saved to dst.

Wrappers supported (even partially): MPlayer, VLC

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object, NULL for current.
[in] pos Time position (second).
[in] t Image file type.
[in] dst Destination file, NULL for default filename in the current directory.
player_mute_t player_audio_mute_get ( player_t player  ) 

Get mute state.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
Returns:
Mute state.
void player_audio_mute_set ( player_t player,
player_mute_t  value 
)

Set mute state.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Mute state to set.
void player_audio_next ( player_t player  ) 

Select the next audio ID.

It stays on the same audio ID if no next stream exists.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_audio_prev ( player_t player  ) 

Select the previous audio ID.

It stays on the same audio ID if no previous stream exists.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_audio_select ( player_t player,
int  audio_id 
)

Select audio ID.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] audio_id ID of the audio stream to select.
void player_audio_set_delay ( player_t player,
int  value,
int  absolute 
)

Set audio delay.

Only useful with video files to set delay between audio and video streams.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Delay to set (millisecond).
[in] absolute Mode, 0 for relative.
int player_audio_volume_get ( player_t player  ) 

Get current volume.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
Returns:
Volume (percent).
void player_audio_volume_set ( player_t player,
int  value 
)

Set volume.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Volume to set (percent).
void player_dvd_angle_next ( player_t player  ) 

Select the next DVD angle.

It stays on the same if no next angle exists.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_dvd_angle_prev ( player_t player  ) 

Select the previous DVD angle.

It stays on the same if no previous angle exists.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_dvd_angle_select ( player_t player,
int  angle 
)

Select DVD angle.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] angle Angle to select.
void player_dvd_nav ( player_t player,
player_dvdnav_t  value 
)

DVD Navigation commands.

Wrappers supported (even partially): MPlayer, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Command to send.
void player_dvd_title_next ( player_t player  ) 

Select the next DVD title.

It stays on the same if no next title exists.

Wrappers supported (even partially): VLC

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_dvd_title_prev ( player_t player  ) 

Select the previous DVD title.

It stays on the same if no previous title exists.

Wrappers supported (even partially): VLC

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_dvd_title_select ( player_t player,
int  title 
)

Select DVD title.

Wrappers supported (even partially): MPlayer, VLC

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] title Title to select.
int player_get_percent_pos ( player_t player  ) 

Get percent position in the current stream.

Wrapper supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
Returns:
Percent position.
int player_get_time_pos ( player_t player  ) 

Get current time position in the current stream.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
Returns:
Time position (millisecond).
player_t* player_init ( player_type_t  type,
player_verbosity_level_t  verbosity,
player_init_param_t param 
)

Initialization of a new player controller.

Multiple player controllers can be initialized with any wrappers. The same Window ID can be used to attach their video.

For a description of each parameters supported by this function:

See also:
player_init_param_t

When a parameter in param is 0 (or NULL), its default value is used. If param is NULL, then all default values are forced for all parameters.

Wrappers supported (even partially): GStreamer, MPlayer, VLC, xine

Parameters:
[in] type Type of wrapper to load.
[in] verbosity Level of verbosity to set.
[in] param Parameters, NULL for default values.
Returns:
Player controller, NULL otherwise.
void player_mrl_append ( player_t player,
mrl_t mrl,
player_mrl_add_t  when 
)

Append MRL object in the internal playlist.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object to append.
[in] when Just append, or append and go to the end to play.
void player_mrl_continue ( player_t player  ) 

Go to the next MRL object accordingly to the loop and shuffle.

The behaviour is the same that player_mrl_next() if the 'loop' or the 'shuffle' is not enabled and the playback mode is not AUTO.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
mrl_t* player_mrl_get_current ( player_t player  ) 

Get current MRL set in the internal playlist.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
Returns:
MRL object.
void player_mrl_next ( player_t player  ) 

Go the the next MRL object in the internal playlist.

Playback is started if a next MRL object exists.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_mrl_previous ( player_t player  ) 

Go the the previous MRL object in the internal playlist.

Playback is started if a previous MRL object exists.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_mrl_remove ( player_t player  ) 

Remove current MRL object in the internal playlist.

Current MRL object is freed on the way.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_mrl_remove_all ( player_t player  ) 

Remove all MRL objects in the internal playlist.

All MRL objects are freed on the way.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_mrl_set ( player_t player,
mrl_t mrl 
)

Set MRL object in the internal playlist.

If a MRL was already set in the playlist, then the current is freed and replaced by the new MRL object.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] mrl MRL object to set.
void player_osd_show_text ( player_t player,
const char *  text,
int  x,
int  y,
int  duration 
)

Show a text on the On-screen Display.

Coordinates are not usable with MPlayer wrapper. The text is always shown from the top-left corner.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] text Text to show on the OSD.
[in] x X coordinate (pixel).
[in] y Y coordinate (pixel).
[in] duration Duration (millisecond).
void player_osd_state ( player_t player,
int  value 
)

Enable/disable On-screen Display.

With the MPlayer wrapper, this function must be called after every player_playback_start() if OSD must be disabled.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Different of 0 to enable.
player_pb_state_t player_playback_get_state ( player_t player  ) 

Get current playback state.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
Returns:
Playback state.
void player_playback_pause ( player_t player  ) 

Pause and unpause playback.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_playback_seek ( player_t player,
int  value,
player_pb_seek_t  seek 
)

Seek in the stream.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Value for seeking (millisecond or percent).
[in] seek Seeking mode.
void player_playback_seek_chapter ( player_t player,
int  value,
int  absolute 
)

Seek chapter in the stream.

Wrappers supported (even partially): MPlayer, VLC

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Value for seeking.
[in] absolute Mode, 0 for relative.
void player_playback_speed ( player_t player,
float  value 
)

Change playback speed.

This function can't be used to play in backward.

Wrappers supported (even partially): MPlayer, xine, VLC

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Factor of playback speed to set.
void player_playback_start ( player_t player  ) 

Start a new playback.

The playback is always started from the beginning.

Wrappers supported (even partially): GStreamer, MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_playback_stop ( player_t player  ) 

Stop playback.

Wrappers supported (even partially): GStreamer, MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_radio_channel_next ( player_t player  ) 

Select the next radio channel.

It stays on the same if no next channel exists.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_radio_channel_prev ( player_t player  ) 

Select the previous radio channel.

It stays on the same if no previous channel exists.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_radio_channel_select ( player_t player,
const char *  channel 
)

Select radio channel.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] channel Channel to select.
void player_set_framedrop ( player_t player,
player_framedrop_t  fd 
)

Set frame dropping with video playback.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] fd Frame dropping type to set.
void player_set_loop ( player_t player,
player_loop_t  loop,
int  value 
)

Set loop mode and value.

Only enabled if playback mode is auto, see player_set_playback().

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] loop Mode to use (one element or the whole playlist).
[in] value How many loops, negative for infinite.
void player_set_mouse_position ( player_t player,
int  x,
int  y 
)

Set the mouse position to the player.

The main goal is to select buttons in DVD menu. The coordinates are relative to the top-left corner of the root window. The root window is winid passed with player_init().

Wrappers supported (even partially): MPlayer, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] x X coordinate (pixel).
[in] y Y coordinate (pixel).
void player_set_playback ( player_t player,
player_pb_t  pb 
)

Set playback mode.

If the playback mode is set to PLAYER_PB_AUTO, then loop and shuffle can be used with the internal playlist. By default, AUTO will just going to the next available MRL object in the playlist and start a new playback.

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] pb Mode to use.
void player_set_shuffle ( player_t player,
int  value 
)

Shuffle playback in the internal playlist.

Only enabled if playback mode is auto, see player_set_playback().

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Different of 0 to enable.
void player_set_verbosity ( player_t player,
player_verbosity_level_t  level 
)

Set verbosity level.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] level Level of verbosity to set.
void player_subtitle_next ( player_t player  ) 

Select the next subtitle ID.

It stays on the same subtitle ID if no next subtitle exists.

Wrappers supported (even partially): MPlayer, VLC

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_subtitle_prev ( player_t player  ) 

Select the previous subtitle ID.

It stays on the same subtitle ID if no previous subtitle exists.

Wrappers supported (even partially): MPlayer, VLC

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_subtitle_scale ( player_t player,
int  value,
int  absolute 
)

Set subtitle scale.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Scale to set.
[in] absolute Mode, 0 for relative.
void player_subtitle_select ( player_t player,
int  sub_id 
)

Select subtitle ID.

Wrappers supported (even partially): MPlayer, VLC

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] sub_id ID of the subtitle to select.
void player_subtitle_set_alignment ( player_t player,
player_sub_alignment_t  a 
)

Set subtitle alignment.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] a Alignment to set.
void player_subtitle_set_delay ( player_t player,
int  value 
)

Set subtitle delay.

Only useful with video files to set delay between audio stream and the subtitles.

Wrappers supported (even partially): MPlayer, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Delay to set (millisecond).
void player_subtitle_set_position ( player_t player,
int  value 
)

Set subtitle position.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Position to set.
void player_subtitle_set_visibility ( player_t player,
int  value 
)

Set subtitle visibility.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Different of 0 to view the subtitles.
void player_tv_channel_next ( player_t player  ) 

Select the next TV channel.

It stays on the same if no next channel exists.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_tv_channel_prev ( player_t player  ) 

Select the previous TV channel.

It stays on the same if no previous channel exists.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
void player_tv_channel_select ( player_t player,
const char *  channel 
)

Select TV channel.

Wrappers supported (even partially): MPlayer

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] channel Channel to select.
void player_uninit ( player_t player  ) 

Uninitialization of a player controller.

All MRL objects in the internal playlist will be freed.

Wrappers supported (even partially): GStreamer, MPlayer, VLC, xine

Warning:
Must be used only as the last player function for a controller.
Parameters:
[in] player Player controller.
void player_vdr ( player_t player,
player_vdr_t  value 
)

VDR commands.

Wrappers supported (even partially): xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Command to send.
void player_video_set_aspect ( player_t player,
player_video_aspect_t  aspect,
int8_t  value,
int  absolute 
)

Set video aspect.

Wrappers supported (even partially): none

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] aspect Aspect to change.
[in] value Value for aspect to set.
[in] absolute Mode, 0 for relative.
void player_video_set_aspect_ratio ( player_t player,
float  value 
)

Set video aspect ratio.

Wrappers supported (even partially): MPlayer, VLC, xine

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Ratio to set.
void player_video_set_panscan ( player_t player,
int8_t  value,
int  absolute 
)

Set video panscan.

Wrappers supported (even partially): none

Warning:
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] value Value for panscan to set.
[in] absolute Mode, 0 for relative.
void player_x_window_set_properties ( player_t player,
int  x,
int  y,
int  w,
int  h,
int  flags 
)

Set properties of X11 window handled by libplayer.

Origin to the top-left corner.

Wrappers supported (even partially): MPlayer, xine

Warning:
Only usable with video outputs X11 compliant.
MT-Safe in multithreaded applications (see MT-Level).
Parameters:
[in] player Player controller.
[in] x X coordinate (pixel).
[in] y Y coordinate (pixel).
[in] w Width (pixel).
[in] h Height (pixel).
[in] flags Flags to select properties to change.
Generated on Sun Oct 3 19:26:14 2010 for libplayer by  doxygen 1.6.3