player.h
Go to the documentation of this file.
/*
* GeeXboX libplayer: a multimedia A/V abstraction layer API.
* Copyright (C) 2006-2008 Benjamin Zores <ben@geexbox.org>
* Copyright (C) 2007-2008 Mathieu Schroeter <mathieu.schroeter@gamesover.ch>
*
* This file is part of libplayer.
*
* libplayer is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* libplayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with libplayer; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PLAYER_H
#define PLAYER_H
#ifdef __cplusplus
extern "C" {
#if 0 /* avoid EMACS indent */
}
#endif /* 0 */
#endif /* __cplusplus */
#ifndef pl_unused
#if defined(__GNUC__)
# define pl_unused __attribute__((unused))
#else
# define pl_unused
#endif
#endif
#define PL_STRINGIFY(s) #s
#define PL_TOSTRING(s) PL_STRINGIFY(s)
#define PL_VERSION_INT(a, b, c) (a << 16 | b << 8 | c)
#define PL_VERSION_DOT(a, b, c) a ##.## b ##.## c
#define PL_VERSION(a, b, c) PL_VERSION_DOT(a, b, c)
#define LIBPLAYER_VERSION_MAJOR 2
#define LIBPLAYER_VERSION_MINOR 0
#define LIBPLAYER_VERSION_MICRO 1
#define LIBPLAYER_VERSION_INT PL_VERSION_INT(LIBPLAYER_VERSION_MAJOR, \
LIBPLAYER_VERSION_MINOR, \
LIBPLAYER_VERSION_MICRO)
#define LIBPLAYER_VERSION PL_VERSION(LIBPLAYER_VERSION_MAJOR, \
LIBPLAYER_VERSION_MINOR, \
LIBPLAYER_VERSION_MICRO)
#define LIBPLAYER_VERSION_STR PL_TOSTRING(LIBPLAYER_VERSION)
#define LIBPLAYER_BUILD LIBPLAYER_VERSION_INT
#include <inttypes.h>
#include <sys/types.h>
unsigned int libplayer_version (void);
/***************************************************************************/
/* */
/* Player (Un)Initialization */
/* Mandatory for all operations below */
/* */
/***************************************************************************/
typedef struct player_s player_t;
typedef enum player_type {
PLAYER_TYPE_XINE,
PLAYER_TYPE_MPLAYER,
PLAYER_TYPE_VLC,
PLAYER_TYPE_GSTREAMER,
PLAYER_TYPE_DUMMY
} player_type_t;
typedef enum player_vo {
PLAYER_VO_AUTO = 0,
PLAYER_VO_NULL,
PLAYER_VO_X11,
PLAYER_VO_X11_SDL,
PLAYER_VO_XV,
PLAYER_VO_GL,
PLAYER_VO_FB,
PLAYER_VO_DIRECTFB,
PLAYER_VO_VDPAU,
PLAYER_VO_VAAPI,
} player_vo_t;
typedef enum player_ao {
PLAYER_AO_AUTO = 0,
PLAYER_AO_NULL,
PLAYER_AO_ALSA,
PLAYER_AO_OSS,
PLAYER_AO_PULSE,
} player_ao_t;
typedef enum player_event {
PLAYER_EVENT_UNKNOWN,
PLAYER_EVENT_PLAYBACK_START,
PLAYER_EVENT_PLAYBACK_STOP,
PLAYER_EVENT_PLAYBACK_FINISHED,
PLAYER_EVENT_PLAYLIST_FINISHED,
PLAYER_EVENT_PLAYBACK_PAUSE,
PLAYER_EVENT_PLAYBACK_UNPAUSE,
} player_event_t;
typedef enum {
PLAYER_MSG_NONE, /* no error messages */
PLAYER_MSG_VERBOSE, /* super-verbose mode: mostly for debugging */
PLAYER_MSG_INFO, /* working operations */
PLAYER_MSG_WARNING, /* harmless failures */
PLAYER_MSG_ERROR, /* may result in hazardous behavior */
PLAYER_MSG_CRITICAL, /* prevents lib from working */
} player_verbosity_level_t;
typedef enum {
PLAYER_QUALITY_NORMAL, /* normal picture quality */
PLAYER_QUALITY_LOW, /* slightly degraded picture for fastest playback */
PLAYER_QUALITY_LOWEST, /* degraded picture, suitable for low-end CPU */
} player_quality_level_t;
typedef struct player_init_param_s {
player_ao_t ao;
player_vo_t vo;
uint32_t winid;
int (*event_cb) (player_event_t e, void *data);
void *data;
const char *display;
player_quality_level_t quality;
} player_init_param_t;
player_t *player_init (player_type_t type, player_verbosity_level_t verbosity,
player_init_param_t *param);
void player_uninit (player_t *player);
void player_set_verbosity (player_t *player, player_verbosity_level_t level);
/***************************************************************************/
/* */
/* Media Resource Locater (MRL) Helpers */
/* MRLs can have multiple types and are used to define a stream */
/* */
/***************************************************************************/
typedef struct mrl_s mrl_t;
typedef enum mrl_type {
MRL_TYPE_UNKNOWN,
MRL_TYPE_AUDIO,
MRL_TYPE_VIDEO,
MRL_TYPE_IMAGE,
} mrl_type_t;
/*
* Support by wrappers
*
* GStreamer MPlayer VLC xine
* ------------ ------------ ------------ ------------
*/
typedef enum mrl_resource {
MRL_RESOURCE_UNKNOWN,
/* Local Streams */
MRL_RESOURCE_FIFO, /* NO NO NO NO */
MRL_RESOURCE_FILE, /* YES YES YES YES */
MRL_RESOURCE_STDIN, /* NO NO NO NO */
/* Audio CD */
MRL_RESOURCE_CDDA, /* NO YES NO NO */
MRL_RESOURCE_CDDB, /* NO YES NO NO */
/* Video discs */
MRL_RESOURCE_DVD, /* NO YES YES YES */
MRL_RESOURCE_DVDNAV, /* NO YES YES YES */
MRL_RESOURCE_VCD, /* NO YES NO NO */
/* Radio/Television */
MRL_RESOURCE_DVB, /* NO YES NO NO */
MRL_RESOURCE_PVR, /* NO NO NO NO */
MRL_RESOURCE_RADIO, /* NO YES NO NO */
MRL_RESOURCE_TV, /* NO YES NO NO */
MRL_RESOURCE_VDR, /* NO NO NO YES */
/* Network Streams */
MRL_RESOURCE_FTP, /* NO YES YES NO */
MRL_RESOURCE_HTTP, /* NO YES YES YES */
MRL_RESOURCE_MMS, /* NO YES YES YES */
MRL_RESOURCE_NETVDR, /* NO NO NO YES */
MRL_RESOURCE_RTP, /* NO YES YES YES */
MRL_RESOURCE_RTSP, /* NO YES YES NO */
MRL_RESOURCE_SMB, /* NO YES YES NO */
MRL_RESOURCE_TCP, /* NO NO NO YES */
MRL_RESOURCE_UDP, /* NO YES YES YES */
MRL_RESOURCE_UNSV, /* NO YES YES NO */
} mrl_resource_t;
typedef struct mrl_resource_local_args_s {
char *location; /* YES YES YES YES */
int playlist; /* NO NO NO NO */
} mrl_resource_local_args_t;
typedef struct mrl_resource_cd_args_s {
char *device; /* NO YES NO NO */
uint8_t speed; /* NO YES NO NO */
uint8_t track_start; /* NO YES NO NO */
uint8_t track_end; /* NO YES NO NO */
} mrl_resource_cd_args_t;
typedef struct mrl_resource_videodisc_args_s {
char *device; /* NO YES YES YES */
uint8_t speed; /* NO NO NO NO */
uint8_t angle; /* NO YES YES NO */
uint8_t title_start; /* NO YES YES YES */
uint8_t title_end; /* NO YES NO NO */
uint8_t chapter_start; /* NO NO YES NO */
uint8_t chapter_end; /* NO NO NO NO */
uint8_t track_start; /* NO YES NO NO */
uint8_t track_end; /* NO NO NO NO */
char *audio_lang; /* NO NO NO NO */
char *sub_lang; /* NO NO NO NO */
uint8_t sub_cc; /* NO NO NO NO */
} mrl_resource_videodisc_args_t;
typedef struct mrl_resource_tv_args_s {
char *device; /* NO NO NO YES */
char *driver; /* NO NO NO YES */
char *channel; /* NO YES NO NO */
uint8_t input; /* NO YES NO NO */
int width; /* NO NO NO NO */
int height; /* NO NO NO NO */
int fps; /* NO NO NO NO */
char *output_format; /* NO NO NO NO */
char *norm; /* NO YES NO NO */
} mrl_resource_tv_args_t;
typedef struct mrl_resource_network_args_s {
char *url; /* NO YES NO YES */
char *username; /* NO YES NO NO */
char *password; /* NO YES NO NO */
char *user_agent; /* NO NO NO NO */
} mrl_resource_network_args_t;
typedef enum mrl_snapshot {
MRL_SNAPSHOT_JPG, /* NO YES NO NO */
MRL_SNAPSHOT_PNG, /* NO YES NO NO */
MRL_SNAPSHOT_PPM, /* NO YES NO NO */
MRL_SNAPSHOT_TGA, /* NO NO NO NO */
} mrl_snapshot_t;
typedef enum mrl_metadata_type {
MRL_METADATA_TITLE,
MRL_METADATA_ARTIST,
MRL_METADATA_GENRE,
MRL_METADATA_ALBUM,
MRL_METADATA_YEAR,
MRL_METADATA_TRACK,
MRL_METADATA_COMMENT,
} mrl_metadata_type_t;
typedef enum mrl_metadata_cd_type {
MRL_METADATA_CD_DISCID,
MRL_METADATA_CD_TRACKS,
} mrl_metadata_cd_type_t;
typedef enum mrl_metadata_dvd_type {
MRL_METADATA_DVD_TITLE_CHAPTERS,
MRL_METADATA_DVD_TITLE_ANGLES,
MRL_METADATA_DVD_TITLE_LENGTH,
} mrl_metadata_dvd_type_t;
typedef enum mrl_properties_type {
MRL_PROPERTY_SEEKABLE,
MRL_PROPERTY_LENGTH,
MRL_PROPERTY_AUDIO_BITRATE,
MRL_PROPERTY_AUDIO_BITS,
MRL_PROPERTY_AUDIO_CHANNELS,
MRL_PROPERTY_AUDIO_SAMPLERATE,
MRL_PROPERTY_VIDEO_BITRATE,
MRL_PROPERTY_VIDEO_WIDTH,
MRL_PROPERTY_VIDEO_HEIGHT,
MRL_PROPERTY_VIDEO_ASPECT,
MRL_PROPERTY_VIDEO_CHANNELS,
MRL_PROPERTY_VIDEO_STREAMS,
MRL_PROPERTY_VIDEO_FRAMEDURATION,
} mrl_properties_type_t;
#define PLAYER_VIDEO_ASPECT_RATIO_MULT 10000.0 /* *10000 */
#define PLAYER_VIDEO_FRAMEDURATION_RATIO_DIV 90000.0 /* 1/90000 sec */
mrl_t *mrl_new (player_t *player, mrl_resource_t res, void *args);
void mrl_add_subtitle (player_t *player, mrl_t *mrl, char *subtitle);
void mrl_free (player_t *player, mrl_t *mrl);
mrl_type_t mrl_get_type (player_t *player, mrl_t *mrl);
mrl_resource_t mrl_get_resource (player_t *player, mrl_t *mrl);
char *mrl_get_metadata (player_t *player, mrl_t *mrl, mrl_metadata_type_t m);
char *mrl_get_metadata_cd_track (player_t *player,
mrl_t *mrl, int trackid, uint32_t *length);
uint32_t mrl_get_metadata_cd (player_t *player,
mrl_t *mrl, mrl_metadata_cd_type_t m);
uint32_t mrl_get_metadata_dvd_title (player_t *player, mrl_t *mrl,
int titleid, mrl_metadata_dvd_type_t m);
char *mrl_get_metadata_dvd (player_t *player, mrl_t *mrl, uint8_t *titles);
int mrl_get_metadata_subtitle (player_t *player, mrl_t *mrl, int pos,
uint32_t *id, char **name, char **lang);
uint32_t mrl_get_metadata_subtitle_nb (player_t *player, mrl_t *mrl);
int mrl_get_metadata_audio (player_t *player, mrl_t *mrl, int pos,
uint32_t *id, char **name, char **lang);
uint32_t mrl_get_metadata_audio_nb (player_t *player, mrl_t *mrl);
uint32_t mrl_get_property (player_t *player,
mrl_t *mrl, mrl_properties_type_t p);
char *mrl_get_audio_codec (player_t *player, mrl_t *mrl);
char *mrl_get_video_codec (player_t *player, mrl_t *mrl);
off_t mrl_get_size (player_t *player, mrl_t *mrl);
void mrl_video_snapshot (player_t *player, mrl_t *mrl,
int pos, mrl_snapshot_t t, const char *dst);
/***************************************************************************/
/* */
/* Player to MRL connection */
/* */
/***************************************************************************/
typedef enum player_mrl_add {
PLAYER_MRL_ADD_NOW,
PLAYER_MRL_ADD_QUEUE
} player_mrl_add_t;
mrl_t *player_mrl_get_current (player_t *player);
void player_mrl_set (player_t *player, mrl_t *mrl);
void player_mrl_append (player_t *player, mrl_t *mrl, player_mrl_add_t when);
void player_mrl_remove (player_t *player);
void player_mrl_remove_all (player_t *player);
void player_mrl_previous (player_t *player);
void player_mrl_next (player_t *player);
void player_mrl_continue (player_t *player);
/***************************************************************************/
/* */
/* Player tuning & properties */
/* */
/***************************************************************************/
typedef enum player_pb {
PLAYER_PB_SINGLE = 0,
PLAYER_PB_AUTO,
} player_pb_t;
typedef enum player_loop {
PLAYER_LOOP_DISABLE = 0,
PLAYER_LOOP_ELEMENT,
PLAYER_LOOP_PLAYLIST,
} player_loop_t;
typedef enum player_framedrop {
PLAYER_FRAMEDROP_DISABLE,
PLAYER_FRAMEDROP_SOFT,
PLAYER_FRAMEDROP_HARD,
} player_framedrop_t;
typedef enum player_x_window_flags {
PLAYER_X_WINDOW_AUTO = 0,
PLAYER_X_WINDOW_X = (1 << 0),
PLAYER_X_WINDOW_Y = (1 << 1),
PLAYER_X_WINDOW_W = (1 << 2),
PLAYER_X_WINDOW_H = (1 << 3),
} player_x_window_flags_t;
int player_get_time_pos (player_t *player);
int player_get_percent_pos (player_t *player);
void player_set_playback (player_t *player, player_pb_t pb);
void player_set_loop (player_t *player, player_loop_t loop, int value);
void player_set_shuffle (player_t *player, int value);
void player_set_framedrop (player_t *player, player_framedrop_t fd);
void player_set_mouse_position (player_t *player, int x, int y);
void player_x_window_set_properties (player_t *player,
int x, int y, int w, int h, int flags);
void player_osd_show_text (player_t *player,
const char *text, int x, int y, int duration);
void player_osd_state (player_t *player, int value);
/***************************************************************************/
/* */
/* Playback related controls */
/* */
/***************************************************************************/
typedef enum player_pb_state {
PLAYER_PB_STATE_IDLE,
PLAYER_PB_STATE_PAUSE,
PLAYER_PB_STATE_PLAY,
} player_pb_state_t;
typedef enum player_pb_seek {
PLAYER_PB_SEEK_RELATIVE,
PLAYER_PB_SEEK_ABSOLUTE,
PLAYER_PB_SEEK_PERCENT,
} player_pb_seek_t;
player_pb_state_t player_playback_get_state (player_t *player);
void player_playback_start (player_t *player);
void player_playback_stop (player_t *player);
void player_playback_pause (player_t *player);
void player_playback_seek (player_t *player, int value, player_pb_seek_t seek);
void player_playback_seek_chapter (player_t *player, int value, int absolute);
void player_playback_speed (player_t *player, float value);
/***************************************************************************/
/* */
/* Audio related controls */
/* */
/***************************************************************************/
typedef enum player_mute {
PLAYER_MUTE_UNKNOWN,
PLAYER_MUTE_ON,
PLAYER_MUTE_OFF
} player_mute_t;
int player_audio_volume_get (player_t *player);
void player_audio_volume_set (player_t *player, int value);
player_mute_t player_audio_mute_get (player_t *player);
void player_audio_mute_set (player_t *player, player_mute_t value);
void player_audio_set_delay (player_t *player, int value, int absolute);
void player_audio_select (player_t *player, int audio_id);
void player_audio_prev (player_t *player);
void player_audio_next (player_t *player);
/***************************************************************************/
/* */
/* Video related controls */
/* */
/***************************************************************************/
typedef enum player_video_aspect {
PLAYER_VIDEO_ASPECT_BRIGHTNESS,
PLAYER_VIDEO_ASPECT_CONTRAST,
PLAYER_VIDEO_ASPECT_GAMMA,
PLAYER_VIDEO_ASPECT_HUE,
PLAYER_VIDEO_ASPECT_SATURATION,
} player_video_aspect_t;
void player_video_set_aspect (player_t *player, player_video_aspect_t aspect,
int8_t value, int absolute);
void player_video_set_panscan (player_t *player, int8_t value, int absolute);
void player_video_set_aspect_ratio (player_t *player, float value);
/***************************************************************************/
/* */
/* Subtitles related controls */
/* */
/***************************************************************************/
typedef enum player_sub_alignment {
PLAYER_SUB_ALIGNMENT_TOP,
PLAYER_SUB_ALIGNMENT_CENTER,
PLAYER_SUB_ALIGNMENT_BOTTOM,
} player_sub_alignment_t;
void player_subtitle_set_delay (player_t *player, int value);
void player_subtitle_set_alignment (player_t *player,
player_sub_alignment_t a);
void player_subtitle_set_position (player_t *player, int value);
void player_subtitle_set_visibility (player_t *player, int value);
void player_subtitle_scale (player_t *player, int value, int absolute);
void player_subtitle_select (player_t *player, int sub_id);
void player_subtitle_prev (player_t *player);
void player_subtitle_next (player_t *player);
/***************************************************************************/
/* */
/* DVD specific controls */
/* */
/***************************************************************************/
typedef enum player_dvdnav {
PLAYER_DVDNAV_UP,
PLAYER_DVDNAV_DOWN,
PLAYER_DVDNAV_RIGHT,
PLAYER_DVDNAV_LEFT,
PLAYER_DVDNAV_MENU,
PLAYER_DVDNAV_SELECT,
PLAYER_DVDNAV_PREVMENU,
PLAYER_DVDNAV_MOUSECLICK,
} player_dvdnav_t;
void player_dvd_nav (player_t *player, player_dvdnav_t value);
void player_dvd_angle_select (player_t *player, int angle);
void player_dvd_angle_prev (player_t *player);
void player_dvd_angle_next (player_t *player);
void player_dvd_title_select (player_t *player, int title);
void player_dvd_title_prev (player_t *player);
void player_dvd_title_next (player_t *player);
/***************************************************************************/
/* */
/* TV/DVB specific controls */
/* */
/***************************************************************************/
void player_tv_channel_select (player_t *player, const char *channel);
void player_tv_channel_prev (player_t *player);
void player_tv_channel_next (player_t *player);
/***************************************************************************/
/* */
/* Radio specific controls */
/* */
/***************************************************************************/
void player_radio_channel_select (player_t *player, const char *channel);
void player_radio_channel_prev (player_t *player);
void player_radio_channel_next (player_t *player);
/***************************************************************************/
/* */
/* VDR specific controls */
/* */
/***************************************************************************/
typedef enum player_vdr {
PLAYER_VDR_UP = 0,
PLAYER_VDR_DOWN,
PLAYER_VDR_LEFT,
PLAYER_VDR_RIGHT,
PLAYER_VDR_OK,
PLAYER_VDR_BACK,
PLAYER_VDR_CHANNELPLUS,
PLAYER_VDR_CHANNELMINUS,
PLAYER_VDR_RED,
PLAYER_VDR_GREEN,
PLAYER_VDR_YELLOW,
PLAYER_VDR_BLUE,
PLAYER_VDR_PLAY,
PLAYER_VDR_PAUSE,
PLAYER_VDR_STOP,
PLAYER_VDR_RECORD,
PLAYER_VDR_FASTFWD,
PLAYER_VDR_FASTREW,
PLAYER_VDR_POWER,
PLAYER_VDR_SCHEDULE,
PLAYER_VDR_CHANNELS,
PLAYER_VDR_TIMERS,
PLAYER_VDR_RECORDINGS,
PLAYER_VDR_MENU,
PLAYER_VDR_SETUP,
PLAYER_VDR_COMMANDS,
PLAYER_VDR_0,
PLAYER_VDR_1,
PLAYER_VDR_2,
PLAYER_VDR_3,
PLAYER_VDR_4,
PLAYER_VDR_5,
PLAYER_VDR_6,
PLAYER_VDR_7,
PLAYER_VDR_8,
PLAYER_VDR_9,
PLAYER_VDR_USER_1,
PLAYER_VDR_USER_2,
PLAYER_VDR_USER_3,
PLAYER_VDR_USER_4,
PLAYER_VDR_USER_5,
PLAYER_VDR_USER_6,
PLAYER_VDR_USER_7,
PLAYER_VDR_USER_8,
PLAYER_VDR_USER_9,
PLAYER_VDR_VOLPLUS,
PLAYER_VDR_VOLMINUS,
PLAYER_VDR_MUTE,
PLAYER_VDR_AUDIO,
PLAYER_VDR_INFO,
PLAYER_VDR_CHANNELPREVIOUS,
PLAYER_VDR_NEXT,
PLAYER_VDR_PREVIOUS,
PLAYER_VDR_SUBTITLES,
} player_vdr_t;
void player_vdr (player_t *player, player_vdr_t value);
/***************************************************************************/
/* */
/* Global libplayer functions */
/* */
/***************************************************************************/
int libplayer_wrapper_enabled (player_type_t type);
int libplayer_wrapper_supported_res (player_type_t type, mrl_resource_t res);
#ifdef __cplusplus
#if 0 /* avoid EMACS indent */
{
#endif /* 0 */
}
#endif /* __cplusplus */
#endif /* PLAYER_H */
player_dvd_title_next
void player_dvd_title_next(player_t *player)
Select the next DVD title.
mrl_video_snapshot
void mrl_video_snapshot(player_t *player, mrl_t *mrl, int pos, mrl_snapshot_t t, const char *dst)
Take a video snapshot.
player_init_param_t::data
void * data
Definition: player.h:184
player_set_framedrop
void player_set_framedrop(player_t *player, player_framedrop_t fd)
Set frame dropping with video playback.
player_x_window_set_properties
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.
player_video_set_panscan
void player_video_set_panscan(player_t *player, int8_t value, int absolute)
Set video panscan.
player_audio_volume_set
void player_audio_volume_set(player_t *player, int value)
Set volume.
player_subtitle_set_delay
void player_subtitle_set_delay(player_t *player, int value)
Set subtitle delay.
mrl_get_metadata_audio
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.
player_init_param_t::vo
player_vo_t vo
Definition: player.h:177
mrl_get_metadata_subtitle
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.
mrl_get_metadata
char * mrl_get_metadata(player_t *player, mrl_t *mrl, mrl_metadata_type_t m)
Get metadata of the stream.
mrl_free
void mrl_free(player_t *player, mrl_t *mrl)
Free a MRL object.
mrl_t
struct mrl_s mrl_t
MRL object.
Definition: player.h:269
player_loop_t
player_loop_t
Player loop mode.
Definition: player.h:854
player_tv_channel_next
void player_tv_channel_next(player_t *player)
Select the next TV channel.
player_subtitle_next
void player_subtitle_next(player_t *player)
Select the next subtitle ID.
player_subtitle_scale
void player_subtitle_scale(player_t *player, int value, int absolute)
Set subtitle scale.
player_mrl_continue
void player_mrl_continue(player_t *player)
Go to the next MRL object accordingly to the loop and shuffle.
player_playback_stop
void player_playback_stop(player_t *player)
Stop playback.
player_audio_next
void player_audio_next(player_t *player)
Select the next audio ID.
libplayer_wrapper_enabled
int libplayer_wrapper_enabled(player_type_t type)
Test if a wrapper is enabled.
player_mrl_next
void player_mrl_next(player_t *player)
Go the the next MRL object in the internal playlist.
player_mrl_add_t
player_mrl_add_t
Player MRL add mode.
Definition: player.h:745
mrl_metadata_type_t
mrl_metadata_type_t
MRL metadata.
Definition: player.h:383
player_t
struct player_s player_t
Player controller.
Definition: player.h:111
player_subtitle_set_visibility
void player_subtitle_set_visibility(player_t *player, int value)
Set subtitle visibility.
mrl_new
mrl_t * mrl_new(player_t *player, mrl_resource_t res, void *args)
Create a new MRL object.
mrl_add_subtitle
void mrl_add_subtitle(player_t *player, mrl_t *mrl, char *subtitle)
Add a subtitle file to a MRL object.
player_dvdnav_t
player_dvdnav_t
Player DVDnav commands.
Definition: player.h:1460
mrl_resource_cd_args_t
Arguments for audio CD.
Definition: player.h:330
player_get_time_pos
int player_get_time_pos(player_t *player)
Get current time position in the current stream.
player_set_playback
void player_set_playback(player_t *player, player_pb_t pb)
Set playback mode.
player_osd_state
void player_osd_state(player_t *player, int value)
Enable/disable On-screen Display.
mrl_get_audio_codec
char * mrl_get_audio_codec(player_t *player, mrl_t *mrl)
Get audio codec name of the stream.
player_video_set_aspect_ratio
void player_video_set_aspect_ratio(player_t *player, float value)
Set video aspect ratio.
player_playback_speed
void player_playback_speed(player_t *player, float value)
Change playback speed.
player_audio_prev
void player_audio_prev(player_t *player)
Select the previous audio ID.
player_radio_channel_select
void player_radio_channel_select(player_t *player, const char *channel)
Select radio channel.
player_osd_show_text
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.
mrl_get_video_codec
char * mrl_get_video_codec(player_t *player, mrl_t *mrl)
Get video codec name of the stream.
libplayer_wrapper_supported_res
int libplayer_wrapper_supported_res(player_type_t type, mrl_resource_t res)
Test if a resource is supported by a wrapper.
player_pb_t
player_pb_t
Player playback mode.
Definition: player.h:848
player_audio_select
void player_audio_select(player_t *player, int audio_id)
Select audio ID.
player_audio_mute_get
player_mute_t player_audio_mute_get(player_t *player)
Get mute state.
mrl_properties_type_t
mrl_properties_type_t
MRL properties.
Definition: player.h:407
player_init_param_t::quality
player_quality_level_t quality
Definition: player.h:196
mrl_get_metadata_dvd
char * mrl_get_metadata_dvd(player_t *player, mrl_t *mrl, uint8_t *titles)
Get metadata of a DVD/DVDNAV MRL object.
player_subtitle_set_position
void player_subtitle_set_position(player_t *player, int value)
Set subtitle position.
player_audio_mute_set
void player_audio_mute_set(player_t *player, player_mute_t value)
Set mute state.
player_dvd_angle_prev
void player_dvd_angle_prev(player_t *player)
Select the previous DVD angle.
mrl_resource_t
mrl_resource_t
MRL resources.
Definition: player.h:286
mrl_get_metadata_cd
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.
player_init_param_t
Parameters for player_init() .
Definition: player.h:173
mrl_get_size
off_t mrl_get_size(player_t *player, mrl_t *mrl)
Get size of the resource.
player_audio_volume_get
int player_audio_volume_get(player_t *player)
Get current volume.
player_playback_get_state
player_pb_state_t player_playback_get_state(player_t *player)
Get current playback state.
player_mute_t
player_mute_t
Player mute state.
Definition: player.h:1148
player_pb_state_t
player_pb_state_t
Player playback state.
Definition: player.h:1035
player_set_mouse_position
void player_set_mouse_position(player_t *player, int x, int y)
Set the mouse position to the player.
mrl_resource_local_args_t
Arguments for local streams.
Definition: player.h:324
mrl_get_property
uint32_t mrl_get_property(player_t *player, mrl_t *mrl, mrl_properties_type_t p)
Get property of the stream.
player_video_aspect_t
player_video_aspect_t
Player video aspect.
Definition: player.h:1271
player_sub_alignment_t
player_sub_alignment_t
Player subtitle alignment.
Definition: player.h:1335
player_init_param_t::winid
uint32_t winid
Definition: player.h:179
player_mrl_remove
void player_mrl_remove(player_t *player)
Remove current MRL object in the internal playlist.
player_set_verbosity
void player_set_verbosity(player_t *player, player_verbosity_level_t level)
Set verbosity level.
mrl_type_t
mrl_type_t
MRL types.
Definition: player.h:272
player_mrl_append
void player_mrl_append(player_t *player, mrl_t *mrl, player_mrl_add_t when)
Append MRL object in the internal playlist.
mrl_resource_videodisc_args_t
Arguments for video discs.
Definition: player.h:338
player_dvd_angle_select
void player_dvd_angle_select(player_t *player, int angle)
Select DVD angle.
mrl_get_metadata_subtitle_nb
uint32_t mrl_get_metadata_subtitle_nb(player_t *player, mrl_t *mrl)
Get the number of available subtitles.
player_vo_t
player_vo_t
Player video outputs.
Definition: player.h:123
player_uninit
void player_uninit(player_t *player)
Uninitialization of a player controller.
player_framedrop_t
player_framedrop_t
Player frame dropping mode.
Definition: player.h:861
player_tv_channel_select
void player_tv_channel_select(player_t *player, const char *channel)
Select TV channel.
player_event_t
player_event_t
Player events.
Definition: player.h:146
player_playback_seek
void player_playback_seek(player_t *player, int value, player_pb_seek_t seek)
Seek in the stream.
mrl_get_resource
mrl_resource_t mrl_get_resource(player_t *player, mrl_t *mrl)
Get resource of the stream.
player_mrl_remove_all
void player_mrl_remove_all(player_t *player)
Remove all MRL objects in the internal playlist.
player_ao_t
player_ao_t
Player audio outputs.
Definition: player.h:137
mrl_get_metadata_cd_track
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.
mrl_get_metadata_dvd_title
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.
player_tv_channel_prev
void player_tv_channel_prev(player_t *player)
Select the previous TV channel.
player_verbosity_level_t
player_verbosity_level_t
Player verbosity.
Definition: player.h:157
libplayer_version
unsigned int libplayer_version(void)
Return LIBPLAYER_VERSION_INT constant.
mrl_metadata_dvd_type_t
mrl_metadata_dvd_type_t
MRL DVD/DVDNAV metadata.
Definition: player.h:400
player_init_param_t::ao
player_ao_t ao
Definition: player.h:175
mrl_resource_tv_args_t
Arguments for radio/tv streams.
Definition: player.h:354
player_init_param_t::display
const char * display
Definition: player.h:193
player_vdr_t
player_vdr_t
Player VDR commands.
Definition: player.h:1681
player_mrl_set
void player_mrl_set(player_t *player, mrl_t *mrl)
Set MRL object in the internal playlist.
mrl_get_metadata_audio_nb
uint32_t mrl_get_metadata_audio_nb(player_t *player, mrl_t *mrl)
Get the number of available audio streams.
player_x_window_flags_t
player_x_window_flags_t
Player X11 window flags.
Definition: player.h:868
player_video_set_aspect
void player_video_set_aspect(player_t *player, player_video_aspect_t aspect, int8_t value, int absolute)
Set video aspect.
player_type_t
player_type_t
Player types.
Definition: player.h:114
mrl_resource_network_args_t
Arguments for network streams.
Definition: player.h:367
player_get_percent_pos
int player_get_percent_pos(player_t *player)
Get percent position in the current stream.
player_mrl_get_current
mrl_t * player_mrl_get_current(player_t *player)
Get current MRL set in the internal playlist.
mrl_snapshot_t
mrl_snapshot_t
Snapshot image file type.
Definition: player.h:375
player_set_shuffle
void player_set_shuffle(player_t *player, int value)
Shuffle playback in the internal playlist.
player_dvd_title_select
void player_dvd_title_select(player_t *player, int title)
Select DVD title.
player_playback_seek_chapter
void player_playback_seek_chapter(player_t *player, int value, int absolute)
Seek chapter in the stream.
player_radio_channel_prev
void player_radio_channel_prev(player_t *player)
Select the previous radio channel.
mrl_metadata_cd_type_t
mrl_metadata_cd_type_t
MRL CDDA/CDDB metadata.
Definition: player.h:394
player_playback_start
void player_playback_start(player_t *player)
Start a new playback.
player_vdr
void player_vdr(player_t *player, player_vdr_t value)
VDR commands.
player_audio_set_delay
void player_audio_set_delay(player_t *player, int value, int absolute)
Set audio delay.
player_dvd_title_prev
void player_dvd_title_prev(player_t *player)
Select the previous DVD title.
player_subtitle_prev
void player_subtitle_prev(player_t *player)
Select the previous subtitle ID.
player_radio_channel_next
void player_radio_channel_next(player_t *player)
Select the next radio channel.
mrl_get_type
mrl_type_t mrl_get_type(player_t *player, mrl_t *mrl)
Get type of the stream.
player_dvd_angle_next
void player_dvd_angle_next(player_t *player)
Select the next DVD angle.
player_dvd_nav
void player_dvd_nav(player_t *player, player_dvdnav_t value)
DVD Navigation commands.
player_subtitle_set_alignment
void player_subtitle_set_alignment(player_t *player, player_sub_alignment_t a)
Set subtitle alignment.
player_mrl_previous
void player_mrl_previous(player_t *player)
Go the the previous MRL object in the internal playlist.
player_subtitle_select
void player_subtitle_select(player_t *player, int sub_id)
Select subtitle ID.
player_set_loop
void player_set_loop(player_t *player, player_loop_t loop, int value)
Set loop mode and value.
player_init
player_t * player_init(player_type_t type, player_verbosity_level_t verbosity, player_init_param_t *param)
Initialization of a new player controller.
player_playback_pause
void player_playback_pause(player_t *player)
Pause and unpause playback.
player_pb_seek_t
player_pb_seek_t
Player playback seek mode.
Definition: player.h:1042