summaryrefslogtreecommitdiff
path: root/include/xine.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'include/xine.h.in')
-rw-r--r--include/xine.h.in168
1 files changed, 145 insertions, 23 deletions
diff --git a/include/xine.h.in b/include/xine.h.in
index ceb87780a..1b4ddbd64 100644
--- a/include/xine.h.in
+++ b/include/xine.h.in
@@ -89,8 +89,8 @@ typedef struct xine_video_port_s xine_video_port_t;
#ifndef XINE_DISABLE_DEPRECATED_FEATURES
/* convenience types: simple player UIs might want to call ports drivers */
-typedef xine_audio_port_t xine_ao_driver_t;
-typedef xine_video_port_t xine_vo_driver_t;
+typedef xine_audio_port_t xine_ao_driver_t XINE_DEPRECATED;
+typedef xine_video_port_t xine_vo_driver_t XINE_DEPRECATED;
#endif
@@ -175,6 +175,7 @@ void xine_close_video_driver (xine_t *self, xine_video_port_t *driver) XINE_PRO
#define XINE_VISUAL_TYPE_CACA 8
#define XINE_VISUAL_TYPE_MACOSX 9
#define XINE_VISUAL_TYPE_XCB 11
+#define XINE_VISUAL_TYPE_RAW 12
/*
* free all resources, close all plugins, close engine.
@@ -259,7 +260,7 @@ int xine_play (xine_stream_t *stream, int start_pos, int start_time) XINE_PROTE
*
* returns 1 if OK, 0 on error (use xine_get_error for details)
*/
-int xine_trick_mode (xine_stream_t *stream, int mode, int value) XINE_PROTECTED;
+int xine_trick_mode (xine_stream_t *stream, int mode, int value) XINE_PROTECTED XINE_DEPRECATED;
/* trick modes */
#define XINE_TRICK_MODE_OFF 0
@@ -418,14 +419,64 @@ int xine_get_param (xine_stream_t *stream, int param) XINE_PROTECTED;
* image format can be YUV 4:2:0 or 4:2:2
* will copy the image data into memory that <img> points to
* (interleaved for yuv 4:2:2 or planary for 4:2:0)
+ *
+ * xine_get_current_frame() requires that <img> must be able
+ * to hold the image data. Use a NULL pointer to retrieve the
+ * necessary parameters for calculating the buffer size. Be
+ * aware that the image can change between two successive calls
+ * so you better pause the stream.
+ *
+ * xine_get_current_frame_s() requires to specify the buffer
+ * size and it returns the needed / used size. It won't copy
+ * image data into a too small buffer.
+ *
+ * xine_get_current_frame_alloc() takes care of allocating
+ * a buffer on its own, so image data can be retrieved by
+ * a single call without the need to pause the stream.
+ *
+ * xine_get_current_frame_data() passes the parameters of the
+ * previously mentioned functions plus further information in
+ * a structure and can work like the _s or _alloc function
+ * respectively depending on the passed flags.
*
- * returns 1 on success, 0 failure.
+ * all functions return 1 on success, 0 failure.
*/
int xine_get_current_frame (xine_stream_t *stream,
int *width, int *height,
int *ratio_code, int *format,
uint8_t *img) XINE_PROTECTED;
+int xine_get_current_frame_s (xine_stream_t *stream,
+ int *width, int *height,
+ int *ratio_code, int *format,
+ uint8_t *img, int *img_size) XINE_PROTECTED;
+
+int xine_get_current_frame_alloc (xine_stream_t *stream,
+ int *width, int *height,
+ int *ratio_code, int *format,
+ uint8_t **img, int *img_size) XINE_PROTECTED;
+
+typedef struct {
+
+ int width;
+ int height;
+ int crop_left;
+ int crop_right;
+ int crop_top;
+ int crop_bottom;
+ int ratio_code;
+ int interlaced;
+ int format;
+ int img_size;
+ uint8_t *img;
+} xine_current_frame_data_t;
+
+#define XINE_FRAME_DATA_ALLOCATE_IMG (1<<0)
+
+int xine_get_current_frame_data (xine_stream_t *stream,
+ xine_current_frame_data_t *data,
+ int flags) XINE_PROTECTED;
+
/* xine image formats */
#define XINE_IMGFMT_YV12 (('2'<<24)|('1'<<16)|('V'<<8)|'Y')
#define XINE_IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y')
@@ -514,7 +565,7 @@ int xine_get_video_frame (xine_stream_t *stream,
int *ratio_code,
int *duration, /* msec */
int *format,
- uint8_t *img) XINE_PROTECTED;
+ uint8_t *img) XINE_PROTECTED XINE_DEPRECATED;
/* TODO: xine_get_audio_frame */
@@ -942,6 +993,7 @@ const char *xine_get_meta_info (xine_stream_t *stream, int info) XINE_PROTECTE
#define XINE_META_INFO_INPUT_PLUGIN 9
#define XINE_META_INFO_CDINDEX_DISCID 10
#define XINE_META_INFO_TRACK_NUMBER 11
+#define XINE_META_INFO_COMPOSER 12
/*********************************************************************
@@ -1046,6 +1098,8 @@ const char *xine_get_post_plugin_description (xine_t *self,
/* get lists of available audio and video output plugins */
const char *const *xine_list_audio_output_plugins (xine_t *self) XINE_PROTECTED;
const char *const *xine_list_video_output_plugins (xine_t *self) XINE_PROTECTED;
+/* typemask is (1ULL << XINE_VISUAL_TYPE_FOO) | ... */
+const char *const *xine_list_video_output_plugins_typed (xine_t *self, uint64_t typemask) XINE_PROTECTED;
/* get list of available demultiplexor plugins */
const char *const *xine_list_demuxer_plugins(xine_t *self) XINE_PROTECTED;
@@ -1071,7 +1125,7 @@ void xine_plugins_garbage_collector(xine_t *self) XINE_PROTECTED;
#ifndef XINE_DISABLE_DEPRECATED_FEATURES
/* talk to video output driver - old method */
int xine_gui_send_vo_data (xine_stream_t *self,
- int type, void *data) XINE_PROTECTED;
+ int type, void *data) XINE_PROTECTED XINE_DEPRECATED;
#endif
/* new (preferred) method to talk to video driver. */
@@ -1106,7 +1160,7 @@ typedef struct {
*
* this will be called by the video driver to find out
* how big the video output area size will be for a
- * given video size. The ui should _not_ adjust it's
+ * given video size. The ui should _not_ adjust its
* video out area, just do some calculations and return
* the size. This will be called for every frame, ui
* implementation should be fast.
@@ -1130,12 +1184,12 @@ typedef struct {
* frame output callback
*
* this will be called by the video driver for every frame
- * it's about to draw. ui can adapt it's size if necessary
+ * it's about to draw. ui can adapt its size if necessary
* here.
* note: the ui doesn't have to adjust itself to this
* size, this is just to be taken as a hint.
* ui must return the actual size of the video output
- * area and the video output driver will do it's best
+ * area and the video output driver will do its best
* to adjust the video frames to that size (while
* preserving aspect ratio and stuff).
* dest_x, dest_y: offset inside window
@@ -1206,7 +1260,7 @@ typedef struct {
*
* this will be called by the video driver to find out
* how big the video output area size will be for a
- * given video size. The ui should _not_ adjust it's
+ * given video size. The ui should _not_ adjust its
* video out area, just do some calculations and return
* the size. This will be called for every frame, ui
* implementation should be fast.
@@ -1230,12 +1284,12 @@ typedef struct {
* frame output callback
*
* this will be called by the video driver for every frame
- * it's about to draw. ui can adapt it's size if necessary
+ * it's about to draw. ui can adapt its size if necessary
* here.
* note: the ui doesn't have to adjust itself to this
* size, this is just to be taken as a hint.
* ui must return the actual size of the video output
- * area and the video output driver will do it's best
+ * area and the video output driver will do its best
* to adjust the video frames to that size (while
* preserving aspect ratio and stuff).
* dest_x, dest_y: offset inside window
@@ -1261,6 +1315,73 @@ typedef struct {
} xcb_visual_t;
+/**************************************************
+ * XINE_VO_RAW struct definitions
+ *************************************************/
+/* frame_format definitions */
+#define XINE_VORAW_YV12 1
+#define XINE_VORAW_YUY2 2
+#define XINE_VORAW_RGB 4
+
+/* maximum number of overlays the raw driver can handle */
+#define XINE_VORAW_MAX_OVL 16
+
+/* raw_overlay_t struct used in raw_overlay_cb callback */
+typedef struct {
+ uint8_t *ovl_rgba;
+ int ovl_w, ovl_h; /* overlay's width and height */
+ int ovl_x, ovl_y; /* overlay's top-left display position */
+} raw_overlay_t;
+
+/* this is the visual data struct any raw gui
+ * must supply to the xine_open_video_driver call
+ * ("data" parameter)
+ */
+typedef struct {
+ void *user_data;
+
+ /* OR'ed frame_format
+ * Unsupported frame formats are converted to rgb.
+ * XINE_VORAW_RGB is always assumed by the driver, even if not set.
+ * So a frontend must at least support rgb.
+ * Be aware that rgb requires more cpu than yuv,
+ * so avoid its usage for video playback.
+ * However, it's useful for single frame capture (e.g. thumbs)
+ */
+ int supported_formats;
+
+ /* raw output callback
+ * this will be called by the video driver for every frame
+ *
+ * If frame_format==XINE_VORAW_YV12, data0 points to frame_width*frame_height Y values
+ * data1 points to (frame_width/2)*(frame_height/2) U values
+ * data2 points to (frame_width/2)*(frame_height/2) V values
+ *
+ * If frame_format==XINE_VORAW_YUY2, data0 points to frame_width*frame_height*2 YU/Y²V values
+ * data1 is NULL
+ * data2 is NULL
+ *
+ * If frame_format==XINE_VORAW_RGB, data0 points to frame_width*frame_height*3 RGB values
+ * data1 is NULL
+ * data2 is NULL
+ */
+ void (*raw_output_cb) (void *user_data, int frame_format,
+ int frame_width, int frame_height,
+ double frame_aspect,
+ void *data0, void *data1, void *data2);
+
+ /* raw overlay callback
+ * this will be called by the video driver for every new overlay state
+ * overlays_array points to an array of num_ovl raw_overlay_t
+ * Note that num_ovl can be 0, meaning "end of overlay display"
+ * num_ovl is at most XINE_VORAW_MAX_OVL */
+ void (*raw_overlay_cb) (void *user_data, int num_ovl,
+ raw_overlay_t *overlays_array);
+} raw_visual_t;
+/**********************************************
+ * end of vo_raw defs
+ *********************************************/
+
/*
* this is the visual data struct any fb gui
* may supply to the xine_open_video_driver call
@@ -1524,7 +1645,7 @@ int xine_config_lookup_entry (xine_t *self, const char *key,
/*
* update a config entry (which was returned from lookup_entry() )
*
- * xine will make a deep copy of the data in the entry into it's internal
+ * xine will make a deep copy of the data in the entry into its internal
* config database.
*/
void xine_config_update_entry (xine_t *self,
@@ -1668,6 +1789,7 @@ void xine_config_reset (xine_t *self) XINE_PROTECTED;
#define XINE_EVENT_VDR_SELECTAUDIO 352
#define XINE_EVENT_VDR_TRICKSPEEDMODE 353
#define XINE_EVENT_VDR_PLUGINSTARTED 354
+#define XINE_EVENT_VDR_DISCONTINUITY 355
/* events generated from post plugins */
#define XINE_EVENT_POST_TVTIME_FILMMODE_CHANGE 400
@@ -1796,7 +1918,7 @@ typedef struct {
typedef struct {
int alternative; /* alternative playlist number, usually 0 */
char mrl[1]; /* might (will) be longer */
-} xine_mrl_reference_data_t;
+} xine_mrl_reference_data_t XINE_DEPRECATED;
typedef struct {
int alternative; /* as above */
@@ -1919,8 +2041,8 @@ typedef struct {
* This is the mechanism to report async errors from engine.
*
* If frontend knows about the XINE_MSG_xxx type it may safely
- * ignore the 'explanation' field and provide it's own custom
- * dialog to the 'parameters'.
+ * ignore the 'explanation' field and provide its own custom
+ * dialogue to the 'parameters'.
*
* right column specifies the usual parameters.
*/
@@ -2098,16 +2220,16 @@ void xine_osd_free (xine_osd_t *self) XINE_PROTECTED;
typedef enum {
XINE_TVSYSTEM_PAL = 0,
XINE_TVSYSTEM_NTSC
-} xine_tvsystem;
+} xine_tvsystem XINE_DEPRECATED;
/* connect to nvtvd server and save current TV and X settings */
-int xine_tvmode_init (xine_t *self) XINE_PROTECTED;
+int xine_tvmode_init (xine_t *self) XINE_PROTECTED XINE_DEPRECATED;
/* Turn tvmode on/off (1/0)*/
-int xine_tvmode_use(xine_t *self, int use_tvmode) XINE_PROTECTED;
+int xine_tvmode_use(xine_t *self, int use_tvmode) XINE_PROTECTED XINE_DEPRECATED;
/* Set which tv system to use: XINE_TVSYSTEM_PAL or XINE_TVSYSTEM_NTSC */
-void xine_tvmode_set_tvsystem(xine_t *self, xine_tvsystem system) XINE_PROTECTED;
+void xine_tvmode_set_tvsystem(xine_t *self, xine_tvsystem system) XINE_PROTECTED XINE_DEPRECATED;
/* try to change TV state if enabled
* type select 'regular' (0) or 'TV' (1) state
@@ -2116,16 +2238,16 @@ void xine_tvmode_set_tvsystem(xine_t *self, xine_tvsystem system) XINE_PROTECTED
* fps frame rate the mode should match best or 0 if unknown
* returns: finally selected state
*/
-int xine_tvmode_switch (xine_t *self, int type, int width, int height, double fps) XINE_PROTECTED;
+int xine_tvmode_switch (xine_t *self, int type, int width, int height, double fps) XINE_PROTECTED XINE_DEPRECATED;
/* adapt (maximum) output size to visible area if necessary and return pixel
* aspect and real frame rate if available
*/
void xine_tvmode_size (xine_t *self, int *width, int *height,
- double *pixelratio, double *fps) XINE_PROTECTED;
+ double *pixelratio, double *fps) XINE_PROTECTED XINE_DEPRECATED;
/* restore old TV and X settings and close nvtvd connection */
-void xine_tvmode_exit (xine_t *self) XINE_PROTECTED;
+void xine_tvmode_exit (xine_t *self) XINE_PROTECTED XINE_DEPRECATED;
#endif