xine-lib: xine-lib-1.2.13/include/xine.h Source File

xine-lib 1.2.13-20230125hg15249

xine.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2000-2022 the xine project
3 *
4 * This file is part of xine, a free video player.
5 *
6 * xine is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * xine is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 *
20 * public xine-lib (libxine) interface and documentation
21 *
22 *
23 * some programming guidelines about this api:
24 * -------------------------------------------
25 *
26 * (1) libxine has (per stream instance) a fairly static memory
27 * model
28 * (2) as a rule of thumb, never free() or realloc() any pointers
29 * returned by the xine engine (unless stated otherwise)
30 * or, in other words:
31 * do not free() stuff you have not malloc()ed
32 * (3) xine is multi-threaded, make sure your programming environment
33 * can handle this.
34 * for x11-related stuff this means that you either have to properly
35 * use xlockdisplay() or use two seperate connections to the x-server
36 *
37 */
38/*_x_ Lines formatted like this one are xine-lib developer comments. */
39/*_x_ They will be removed from the installed version of this header. */
40
41#ifndef HAVE_XINE_H
42#define HAVE_XINE_H
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48#include <stdarg.h>
49#include <sys/time.h>
50#include <sys/types.h>
51
52#if defined(WIN32) && !defined(XINE_COMPILE)
53#include <windows.h>
54#endif
55
56#include <xine/os_types.h>
57#include <xine/attributes.h>
58#include <xine/version.h>
59
60/* This enables some experimental features. These are not part of the
61 * official libxine API, so use them only, if you absolutely need them.
62 * Although we make efforts to keep even this part of the API as stable
63 * as possible, this is not guaranteed. Incompatible changes can occur.
64 */
65/* #define XINE_ENABLE_EXPERIMENTAL_FEATURES */
66
67/* This disables some deprecated features. These are still part of the
68 * official libxine API and you may still use them. During the current
69 * major release series, these will always be available and will stay
70 * compatible. However, removal is likely to occur as soon as possible.
71 */
72/* #define XINE_DISABLE_DEPRECATED_FEATURES */
73
74
75/*********************************************************************
76 * xine opaque data types *
77 *********************************************************************/
78
79 typedef struct xine_s xine_t;
80 typedef struct xine_stream_s xine_stream_t;
81 typedef struct xine_audio_port_s xine_audio_port_t;
82 typedef struct xine_video_port_s xine_video_port_t;
83
84/*********************************************************************
85 * global engine handling *
86 *********************************************************************/
87
88/*
89 * version information
90 */
91
92/* dynamic info from actually linked libxine */
93const char *xine_get_version_string (void) XINE_PROTECTED;
94void xine_get_version (int *major, int *minor, int *sub) XINE_PROTECTED;
95
96/* compare given version to libxine version,
97 return 1 if compatible, 0 otherwise */
98int xine_check_version (int major, int minor, int sub) XINE_PROTECTED;
99
100/*
101 * pre-init the xine engine
102 *
103 * will first malloc and init a xine_t, create an empty config
104 * system, then scan through all installed plugins and add them
105 * to an internal list for later use.
106 *
107 * to fully init the xine engine, you have to load config values
108 * (either using your own storage method and calling
109 * xine_config_register_entry, or by using the xine_load_config
110 * utility function - see below) and then call xine_init
111 *
112 * the only proper way to shut down the xine engine is to
113 * call xine_exit() - do not try to free() the xine pointer
114 * yourself and do not try to access any internal data structures
115 */
116 xine_t *xine_new (void) XINE_PROTECTED;
117
118/* allow the setting of some flags before xine_init
119 * FIXME-ABI: this is currently GLOBAL
120 */
121void xine_set_flags (xine_t *, int) XINE_PROTECTED XINE_WEAK;
122#define XINE_FLAG_NO_WRITE_CACHE 1
123
124/*
125 * post_init the xine engine
126 */
127void xine_init (xine_t *self) XINE_PROTECTED;
128
129/*
130 * helper functions to find and init audio/video drivers
131 * from xine's plugin collection
132 *
133 * id : identifier of the driver, may be NULL for auto-detection
134 * data : special data struct for ui/driver communications, depends
135 * on driver
136 * visual: video driver flavor selector, constants see below
137 *
138 * both functions may return NULL if driver failed to load, was not
139 * found ...
140 *
141 * use xine_close_audio/video_driver() to close loaded drivers
142 * and free resources allocated by them
143 */
144 xine_audio_port_t *xine_open_audio_driver (xine_t *self, const char *id,
145 const void *data) XINE_PROTECTED;
146 xine_video_port_t *xine_open_video_driver (xine_t *self, const char *id,
147 int visual, const void *data) XINE_PROTECTED;
148
149void xine_close_audio_driver (xine_t *self, xine_audio_port_t *driver) XINE_PROTECTED;
150void xine_close_video_driver (xine_t *self, xine_video_port_t *driver) XINE_PROTECTED;
151
152/* valid visual types */
153#define XINE_VISUAL_TYPE_NONE 0
154#define XINE_VISUAL_TYPE_X11 1
155#define XINE_VISUAL_TYPE_X11_2 10
156#define XINE_VISUAL_TYPE_AA 2
157#define XINE_VISUAL_TYPE_FB 3
158#define XINE_VISUAL_TYPE_GTK 4
159#define XINE_VISUAL_TYPE_DFB 5
160#define XINE_VISUAL_TYPE_PM 6 /* used by the OS/2 port */
161#define XINE_VISUAL_TYPE_DIRECTX 7 /* used by the win32/msvc port */
162#define XINE_VISUAL_TYPE_CACA 8
163#define XINE_VISUAL_TYPE_MACOSX 9
164#define XINE_VISUAL_TYPE_XCB 11
165#define XINE_VISUAL_TYPE_RAW 12
166#define XINE_VISUAL_TYPE_WAYLAND 13
167
168/*
169 * free all resources, close all plugins, close engine.
170 * self pointer is no longer valid after this call.
171 */
172void xine_exit (xine_t *self) XINE_PROTECTED;
173
174
175/*********************************************************************
176 * stream handling *
177 *********************************************************************/
178
179/*
180 * create a new stream for media playback/access
181 *
182 * returns xine_stream_t* if OK,
183 * NULL on error (use xine_get_error for details)
184 *
185 * the only proper way to free the stream pointer returned by this
186 * function is to call xine_dispose() on it. do not try to access any
187 * fields in xine_stream_t, they're all private and subject to change
188 * without further notice.
189 */
190 xine_stream_t *xine_stream_new (xine_t *self,
191 xine_audio_port_t *ao, xine_video_port_t *vo) XINE_PROTECTED;
192
193/*
194 * A side stream is like a side car on a bike. It has its own mrl, input, and demux.
195 * Everything else is handled by the master (play, seek, pause, close, dispose).
196 * This is intended for streams who have separate mrls for audio, video, and subtitle.
197 * Index 0 just returns the master itself, 1 ... 3 are free for side mrls. */
198#define XINE_SIDE_STREAMS 1
199 xine_stream_t *xine_get_side_stream (xine_stream_t *master, int index) XINE_PROTECTED;
200
201/*
202 * Make one stream the slave of another.
203 * This establishes a binary master slave relation on streams, where
204 * certain operations (specified by parameter "affection") on the master
205 * stream are also applied to the slave stream.
206 * If you want more than one stream to react to one master, you have to
207 * apply the calls in a top down way:
208 * xine_stream_master_slave(stream1, stream2, 3);
209 * xine_stream_master_slave(stream2, stream3, 3);
210 * This will make stream1 affect stream2 and stream2 affect stream3, so
211 * effectively, operations on stream1 propagate to stream2 and 3.
212 *
213 * Please note that subsequent master_slave calls on the same streams
214 * will overwrite their previous master/slave setting.
215 * Be sure to not mess around.
216 *
217 * returns 1 on success, 0 on failure
218 */
219int xine_stream_master_slave(xine_stream_t *master, xine_stream_t *slave,
220 int affection) XINE_PROTECTED;
221
222/* affection is some of the following ORed together: */
223/* playing the master plays the slave */
224#define XINE_MASTER_SLAVE_PLAY (1<<0)
225/* slave stops on master stop */
226#define XINE_MASTER_SLAVE_STOP (1<<1)
227/* slave is synced to master's speed */
228#define XINE_MASTER_SLAVE_SPEED (1<<2)
229
230/*
231 * open a stream
232 *
233 * look for input / demux / decoder plugins, find out about the format
234 * see if it is supported, set up internal buffers and threads
235 *
236 * returns 1 if OK, 0 on error (use xine_get_error for details)
237 */
238int xine_open (xine_stream_t *stream, const char *mrl) XINE_PROTECTED;
239
242#define XINE_KEYFRAMES 1
244 typedef struct {
245 int msecs;
246 int normpos;
247} xine_keyframes_entry_t;
248
260int xine_keyframes_find (xine_stream_t *stream, xine_keyframes_entry_t *pos, int offs) XINE_PROTECTED;
261
267 xine_keyframes_entry_t *xine_keyframes_get (xine_stream_t *stream, int *size) XINE_PROTECTED;
268
269/*
270 * play a stream from a given position
271 *
272 * start_pos: 0..65535
273 * start_time: milliseconds
274 * if both start position parameters are != 0 start_pos will be used
275 * for non-seekable streams both values will be ignored
276 *
277 * returns 1 if OK, 0 on error (use xine_get_error for details)
278 */
279int xine_play (xine_stream_t *stream, int start_pos, int start_time) XINE_PROTECTED;
280
281/*
282 * stop stream playback
283 * xine_stream_t stays valid for new xine_open or xine_play
284 */
285void xine_stop (xine_stream_t *stream) XINE_PROTECTED;
286
287/*
288 * stop stream playback, free all stream-related resources
289 * xine_stream_t stays valid for new xine_open
290 */
291void xine_close (xine_stream_t *stream) XINE_PROTECTED;
292
293/*
294 * ask current/recent input plugin to eject media - may or may not work,
295 * depending on input plugin capabilities
296 */
297int xine_eject (xine_stream_t *stream) XINE_PROTECTED;
298
299/*
300 * stop playback, dispose all stream-related resources
301 * xine_stream_t no longer valid when after this
302 */
303void xine_dispose (xine_stream_t *stream) XINE_PROTECTED;
304
305/*
306 * set/get engine parameters.
307 */
308void xine_engine_set_param(xine_t *self, int param, int value) XINE_PROTECTED;
309int xine_engine_get_param(xine_t *self, int param) XINE_PROTECTED;
310
311#define XINE_ENGINE_PARAM_VERBOSITY 1
312
313/*
314 * set/get xine stream parameters
315 * e.g. playback speed, constants see below
316 */
317void xine_set_param (xine_stream_t *stream, int param, int value) XINE_PROTECTED;
318int xine_get_param (xine_stream_t *stream, int param) XINE_PROTECTED;
319
320/*
321 * xine stream parameters
322 */
323#define XINE_PARAM_SPEED 1 /* see below */
324#define XINE_PARAM_AV_OFFSET 2 /* unit: 1/90000 sec */
325#define XINE_PARAM_AUDIO_CHANNEL_LOGICAL 3 /* -1 => auto, -2 => off */
326#define XINE_PARAM_SPU_CHANNEL 4
327#define XINE_PARAM_VIDEO_CHANNEL 5
328#define XINE_PARAM_AUDIO_VOLUME 6 /* 0..100 */
329#define XINE_PARAM_AUDIO_MUTE 7 /* 1=>mute, 0=>unmute */
330#define XINE_PARAM_AUDIO_COMPR_LEVEL 8 /* <100=>off, % compress otherw*/
331#define XINE_PARAM_AUDIO_AMP_LEVEL 9 /* 0..200, (val - 100) / 2 dB, 100 = default */
332#define XINE_PARAM_AUDIO_REPORT_LEVEL 10 /* 1=>send events, 0=> don't */
333#define XINE_PARAM_VERBOSITY 11 /* control console output */
334#define XINE_PARAM_SPU_OFFSET 12 /* unit: 1/90000 sec */
335#define XINE_PARAM_IGNORE_VIDEO 13 /* disable video decoding */
336#define XINE_PARAM_IGNORE_AUDIO 14 /* disable audio decoding */
337#define XINE_PARAM_IGNORE_SPU 15 /* disable spu decoding */
338#define XINE_PARAM_BROADCASTER_PORT 16 /* 0: disable, x: server port */
339#define XINE_PARAM_METRONOM_PREBUFFER 17 /* unit: 1/90000 sec */
340#define XINE_PARAM_EQ_30HZ 18 /* equalizer gains -100..100 */
341#define XINE_PARAM_EQ_60HZ 19 /* equalizer gains -100..100 */
342#define XINE_PARAM_EQ_125HZ 20 /* equalizer gains -100..100 */
343#define XINE_PARAM_EQ_250HZ 21 /* equalizer gains -100..100 */
344#define XINE_PARAM_EQ_500HZ 22 /* equalizer gains -100..100 */
345#define XINE_PARAM_EQ_1000HZ 23 /* equalizer gains -100..100 */
346#define XINE_PARAM_EQ_2000HZ 24 /* equalizer gains -100..100 */
347#define XINE_PARAM_EQ_4000HZ 25 /* equalizer gains -100..100 */
348#define XINE_PARAM_EQ_8000HZ 26 /* equalizer gains -100..100 */
349#define XINE_PARAM_EQ_16000HZ 27 /* equalizer gains -100..100 */
350#define XINE_PARAM_AUDIO_CLOSE_DEVICE 28 /* force closing audio device */
351#define XINE_PARAM_AUDIO_AMP_MUTE 29 /* 1=>mute, 0=>unmute */
352#define XINE_PARAM_FINE_SPEED 30 /* 1.000.000 => normal speed */
353#define XINE_PARAM_EARLY_FINISHED_EVENT 31 /* send event when demux finish*/
354#define XINE_PARAM_GAPLESS_SWITCH 32 /* next stream only gapless swi*/
355#define XINE_PARAM_DELAY_FINISHED_EVENT 33 /* 1/10sec,0=>disable,-1=>forev*/
356
357/*
358 * speed values for XINE_PARAM_SPEED parameter.
359 *
360 * alternatively, one may use XINE_PARAM_FINE_SPEED for greater
361 * control of the speed value, where:
362 * XINE_PARAM_SPEED / 4 <-> XINE_PARAM_FINE_SPEED / 1000000
363 */
364#define XINE_SPEED_PAUSE 0
365#define XINE_SPEED_SLOW_4 1
366#define XINE_SPEED_SLOW_2 2
367#define XINE_SPEED_NORMAL 4
368#define XINE_SPEED_FAST_2 8
369#define XINE_SPEED_FAST_4 16
370
371/* normal speed value for XINE_PARAM_FINE_SPEED parameter */
372#define XINE_FINE_SPEED_NORMAL 1000000
373
374/* video parameters */
375#define XINE_PARAM_VO_DEINTERLACE 0x01000000 /* bool */
376#define XINE_PARAM_VO_ASPECT_RATIO 0x01000001 /* see below */
377#define XINE_PARAM_VO_HUE 0x01000002 /* 0..65535 */
378#define XINE_PARAM_VO_SATURATION 0x01000003 /* 0..65535 */
379#define XINE_PARAM_VO_CONTRAST 0x01000004 /* 0..65535 */
380#define XINE_PARAM_VO_BRIGHTNESS 0x01000005 /* 0..65535 */
381#define XINE_PARAM_VO_GAMMA 0x0100000c /* 0..65535 */
382#define XINE_PARAM_VO_ZOOM_X 0x01000008 /* percent */
383#define XINE_PARAM_VO_ZOOM_Y 0x0100000d /* percent */
384#define XINE_PARAM_VO_PAN_SCAN 0x01000009 /* bool */
385#define XINE_PARAM_VO_TVMODE 0x0100000a /* ??? */
386#define XINE_PARAM_VO_WINDOW_WIDTH 0x0100000f /* readonly */
387#define XINE_PARAM_VO_WINDOW_HEIGHT 0x01000010 /* readonly */
388#define XINE_PARAM_VO_SHARPNESS 0x01000018 /* 0..65535 */
389#define XINE_PARAM_VO_NOISE_REDUCTION 0x01000019 /* 0..65535 */
390#define XINE_PARAM_VO_TRANSFORM 0x0100001f /* see below */
391#define XINE_PARAM_VO_CROP_LEFT 0x01000020 /* crop frame pixels */
392#define XINE_PARAM_VO_CROP_RIGHT 0x01000021 /* crop frame pixels */
393#define XINE_PARAM_VO_CROP_TOP 0x01000022 /* crop frame pixels */
394#define XINE_PARAM_VO_CROP_BOTTOM 0x01000023 /* crop frame pixels */
395#define XINE_PARAM_VO_SINGLE_STEP 0x01000024 /* 1 = "advance to next frame, then pause" */
396
397#define XINE_VO_TRANSFORM_FLIP_H 0x00000001
398#define XINE_VO_TRANSFORM_FLIP_V 0x00000002
399
400#define XINE_VO_ZOOM_STEP 100
401#define XINE_VO_ZOOM_MAX 400
402#define XINE_VO_ZOOM_MIN -85
403
404/* possible ratios for XINE_PARAM_VO_ASPECT_RATIO */
405#define XINE_VO_ASPECT_AUTO 0
406#define XINE_VO_ASPECT_SQUARE 1 /* 1:1 */
407#define XINE_VO_ASPECT_4_3 2 /* 4:3 */
408#define XINE_VO_ASPECT_ANAMORPHIC 3 /* 16:9 */
409#define XINE_VO_ASPECT_DVB 4 /* 2.11:1 */
410#define XINE_VO_ASPECT_NUM_RATIOS 5
411#ifndef XINE_DISABLE_DEPRECATED_FEATURES
412#define XINE_VO_ASPECT_PAN_SCAN 41
413#define XINE_VO_ASPECT_DONT_TOUCH 42
414#endif
415
416/* stream format detection strategies */
417
418/* recognize stream type first by content then by extension. */
419#define XINE_DEMUX_DEFAULT_STRATEGY 0
420/* recognize stream type first by extension then by content. */
421#define XINE_DEMUX_REVERT_STRATEGY 1
422/* recognize stream type by content only. */
423#define XINE_DEMUX_CONTENT_STRATEGY 2
424/* recognize stream type by extension only. */
425#define XINE_DEMUX_EXTENSION_STRATEGY 3
426
427/* verbosity settings */
428#define XINE_VERBOSITY_NONE 0
429#define XINE_VERBOSITY_LOG 1
430#define XINE_VERBOSITY_DEBUG 2
431
432/*
433 * snapshot function
434 *
435 * image format can be YUV 4:2:0 or 4:2:2
436 * will copy the image data into memory that <img> points to
437 * (interleaved for yuv 4:2:2 or planary for 4:2:0)
438 *
439 * xine_get_current_frame() requires that <img> must be able
440 * to hold the image data. Use a NULL pointer to retrieve the
441 * necessary parameters for calculating the buffer size. Be
442 * aware that the image can change between two successive calls
443 * so you better pause the stream.
444 *
445 * xine_get_current_frame_s() requires to specify the buffer
446 * size and it returns the needed / used size. It won't copy
447 * image data into a too small buffer.
448 *
449 * xine_get_current_frame_alloc() takes care of allocating
450 * a buffer on its own, so image data can be retrieved by
451 * a single call without the need to pause the stream.
452 *
453 * xine_get_current_frame_data() passes the parameters of the
454 * previously mentioned functions plus further information in
455 * a structure and can work like the _s or _alloc function
456 * respectively depending on the passed flags.
457 *
458 * all functions return 1 on success, 0 failure.
459 */
460int xine_get_current_frame (xine_stream_t *stream,
461 int *width, int *height,
462 int *ratio_code, int *format,
463 uint8_t *img) XINE_PROTECTED XINE_DEPRECATED;
464
465int xine_get_current_frame_s (xine_stream_t *stream,
466 int *width, int *height,
467 int *ratio_code, int *format,
468 uint8_t *img, int *img_size) XINE_PROTECTED;
469
470int xine_get_current_frame_alloc (xine_stream_t *stream,
471 int *width, int *height,
472 int *ratio_code, int *format,
473 uint8_t **img, int *img_size) XINE_PROTECTED;
474
475 typedef struct xine_current_frame_data_s xine_current_frame_data_t;
476
477 struct xine_current_frame_data_s {
478 int width;
479 int height;
480 int crop_left;
481 int crop_right;
482 int crop_top;
483 int crop_bottom;
484 int ratio_code;
485 int interlaced;
486 int format;
487 int img_size;
488 uint8_t *img;
489};
490
491#define XINE_FRAME_DATA_ALLOCATE_IMG (1<<0)
492
493int xine_get_current_frame_data (xine_stream_t *stream,
494 xine_current_frame_data_t *data,
495 int flags) XINE_PROTECTED;
496
497/* xine image formats */
498#define XINE_IMGFMT_YV12 (('2'<<24)|('1'<<16)|('V'<<8)|'Y')
499#define XINE_IMGFMT_NV12 (('2'<<24)|('1'<<16)|('V'<<8)|'N')
500#define XINE_IMGFMT_YUY2 (('2'<<24)|('Y'<<16)|('U'<<8)|'Y')
501#define XINE_IMGFMT_XVMC (('C'<<24)|('M'<<16)|('v'<<8)|'X')
502#define XINE_IMGFMT_XXMC (('C'<<24)|('M'<<16)|('x'<<8)|'X')
503#define XINE_IMGFMT_VDPAU (('A'<<24)|('P'<<16)|('D'<<8)|'V')
504#define XINE_IMGFMT_VAAPI (('P'<<24)|('A'<<16)|('A'<<8)|'V')
505#define XINE_IMGFMT_YV12_DEEP (('6'<<24)|('1'<<16)|('V'<<8)|'Y') /* Note: actual bit depth in frame flags */
506
507/* get current xine's virtual presentation timestamp (1/90000 sec)
508 * note: this is mostly internal data.
509 * one can use vpts with xine_osd_show() and xine_osd_hide().
510 */
511int64_t xine_get_current_vpts(xine_stream_t *stream) XINE_PROTECTED;
512
513
514/*
515 * Continuous video frame grabbing feature.
516 *
517 * In opposite to the 'xine_get_current_frame' based snapshot function this grabbing
518 * feature allow continuous grabbing of last or next displayed video frame.
519 * Grabbed video frames are returned in simple three byte RGB format.
520 *
521 * Depending on the capabilities of the used video output driver video image data is
522 * taken as close as possible at the end of the video processing chain. Thus a returned
523 * video image could contain the blended OSD data, is deinterlaced, cropped and scaled
524 * and video properties like hue, sat could be applied.
525 * If a video output driver does not have a decent grabbing implementation then there
526 * is a generic fallback feature that grabs the video frame as they are taken from the video
527 * display queue (like the xine_get_current_frame' function).
528 * In this case color correct conversation to a RGB image incorporating source cropping
529 * and scaling to the requested grab size is also supported.
530 *
531 * The caller must first request a new video grab frame using the public 'xine_new_grab_video_frame'
532 * function. Then the caller should populate the frame with the wanted source cropping, grab image
533 * size and control flags. After that grab requests could be done by calling the supplied grab() feature
534 * of the frame. At the end a call to the supplied dispose() feature of the frame releases all needed
535 * resources.
536 * The caller should have acquired a port ticket while calling these features.
537 *
538 */
539#define HAVE_XINE_GRAB_VIDEO_FRAME 1
540
541/*
542 * frame structure used for grabbing video frames of format RGB.
543 */
544 typedef struct xine_grab_video_frame_s xine_grab_video_frame_t;
545 struct xine_grab_video_frame_s {
546 /*
547 * grab last/next displayed image.
548 * returns 0 if grab is successful, 1 on timeout and -1 on error
549 */
550 int (*grab) (xine_grab_video_frame_t *self);
551
552 /*
553 * free all resources.
554 */
555 void (*dispose) (xine_grab_video_frame_t *self);
556
557 /*
558 * Cropping of source image. Has to be specified by caller.
559 */
560 int crop_left;
561 int crop_right;
562 int crop_top;
563 int crop_bottom;
564
565 /*
566 * Parameters of returned RGB image.
567 * Caller can specify wanted frame size giving width and/or height a value > 0.
568 * In this case the grabbed image is scaled to the requested size.
569 * Otherwise the grab function returns the actual size of the grabbed image
570 * in width/height without scaling the image.
571 */
572 int width, height; /* requested/returned size of image */
573 uint8_t *img; /* returned RGB image data taking three bytes per pixel */
574 int64_t vpts; /* virtual presentation timestamp (1/90000 sec) of returned frame */
575
576 int timeout; /* Max. time to wait for next displayed frame in milliseconds */
577 int flags; /* Controlling flags. See XINE_GRAB_VIDEO_FRAME_FLAGS_* definitions */
578};
579
580#define XINE_GRAB_VIDEO_FRAME_FLAGS_CONTINUOUS 0x01 /* optimize resource allocation for continuous frame grabbing */
581#define XINE_GRAB_VIDEO_FRAME_FLAGS_WAIT_NEXT 0x02 /* wait for next display frame instead of using last displayed frame */
582
583#define XINE_GRAB_VIDEO_FRAME_DEFAULT_TIMEOUT 500
584
585/*
586 * Allocate new grab video frame. Returns NULL on error.
587 */
588 xine_grab_video_frame_t* xine_new_grab_video_frame (xine_stream_t *stream) XINE_PROTECTED;
589
590
591/*********************************************************************
592 * media processing *
593 *********************************************************************/
594
595#ifdef XINE_ENABLE_EXPERIMENTAL_FEATURES
596
597/*
598 * access to decoded audio and video frames from a stream
599 * these functions are intended to provide the basis for
600 * re-encoding and other video processing applications
601 *
602 * note that the xine playback engine will block when
603 * rendering to a framegrab port: to unblock the stream,
604 * you must fetch the frames manually with the
605 * xine_get_next_* functions. this ensures that a
606 * framegrab port is guaranteed to never miss a frame.
607 *
608 */
609
610 xine_video_port_t *xine_new_framegrab_video_port (xine_t *self) XINE_PROTECTED;
611
612typedef struct {
613
614 int64_t vpts; /* timestamp 1/90000 sec for a/v sync */
615 int64_t duration;
616 double aspect_ratio;
617 int width, height;
618 int colorspace; /* XINE_IMGFMT_* */
619
620 int pos_stream; /* bytes from stream start */
621 int pos_time; /* milliseconds */
622
623 int frame_number; /* frame number (may be unknown) */
624
625 uint8_t *data;
626 void *xine_frame; /* used internally by xine engine */
627} xine_video_frame_t;
628
629int xine_get_next_video_frame (xine_video_port_t *port,
630 xine_video_frame_t *frame) XINE_PROTECTED;
631
632void xine_free_video_frame (xine_video_port_t *port, xine_video_frame_t *frame) XINE_PROTECTED;
633
634 xine_audio_port_t *xine_new_framegrab_audio_port (xine_t *self) XINE_PROTECTED;
635
636typedef struct {
637
638 int64_t vpts; /* timestamp 1/90000 sec for a/v sync */
639 int num_samples;
640 int sample_rate;
641 int num_channels;
642 int bits_per_sample; /* per channel */
643
644 uint8_t *data;
645 void *xine_frame; /* used internally by xine engine */
646
647 off_t pos_stream; /* bytes from stream start */
648 int pos_time; /* milliseconds */
649} xine_audio_frame_t;
650
651int xine_get_next_audio_frame (xine_audio_port_t *port,
652 xine_audio_frame_t *frame) XINE_PROTECTED;
653
654void xine_free_audio_frame (xine_audio_port_t *port, xine_audio_frame_t *frame) XINE_PROTECTED;
655
656#endif
657
658
659/*********************************************************************
660 * post plugin handling *
661 *********************************************************************/
662
663/*
664 * post effect plugin functions
665 *
666 * after the data leaves the decoder it can pass an arbitrary tree
667 * of post plugins allowing for effects to be applied to the video
668 * frames/audio buffers before they reach the output stage
669 */
670
671 typedef struct xine_post_s xine_post_t;
672
673 struct xine_post_s {
674
675 /* a NULL-terminated array of audio input ports this post plugin
676 * provides; you can hand these to other post plugin's outputs or
677 * pass them to the initialization of streams
678 */
679 xine_audio_port_t **audio_input;
680
681 /* a NULL-terminated array of video input ports this post plugin
682 * provides; you can hand these to other post plugin's outputs or
683 * pass them to the initialization of streams
684 */
685 xine_video_port_t **video_input;
686
687 /* the type of the post plugin
688 * one of XINE_POST_TYPE_* can be used here
689 */
690 int type;
691
692};
693
694/*
695 * initialize a post plugin
696 *
697 * returns xine_post_t* on success, NULL on failure
698 *
699 * Initializes the post plugin with the given name and connects its
700 * outputs to the NULL-terminated arrays of audio and video ports.
701 * Some plugins also care about the number of inputs you request
702 * (e.g. mixer plugins), others simply ignore this number.
703 */
704 xine_post_t *xine_post_init(xine_t *xine, const char *name,
705 int inputs,
706 xine_audio_port_t **audio_target,
707 xine_video_port_t **video_target) XINE_PROTECTED;
708
709/* get a list of all available post plugins */
710const char *const *xine_list_post_plugins(xine_t *xine) XINE_PROTECTED;
711
712/* get a list of all post plugins of one type */
713const char *const *xine_list_post_plugins_typed(xine_t *xine, uint32_t type) XINE_PROTECTED;
714
715/*
716 * post plugin input/output
717 *
718 * These structures encapsulate inputs/outputs for post plugins
719 * to transfer arbitrary data. Frontends can also provide inputs
720 * and outputs and connect them to post plugins to exchange data
721 * with them.
722 */
723
724 typedef struct xine_post_in_s xine_post_in_t;
725 typedef struct xine_post_out_s xine_post_out_t;
726
727 struct xine_post_in_s {
728
729 /* the name identifying this input */
730 const char *name;
731
732 /* the data pointer; input is directed to this memory location,
733 * so you simply access the pointer to access the input data */
734 void *data;
735
736 /* the datatype of this input, use one of XINE_POST_DATA_* here */
737 int type;
738
739};
740
741 struct xine_post_out_s {
742
743 /* the name identifying this output */
744 const char *name;
745
746 /* the data pointer; output should be directed to this memory location,
747 * so in the easy case you simply write through the pointer */
748 void *data;
749
750 /* this function is called, when the output should be redirected
751 * to another input, you sould set the data pointer to direct
752 * any output to this new input;
753 * a special situation is, when this function is called with a NULL
754 * argument: in this case you should disconnect the data pointer
755 * from any output and if necessary to avoid writing to some stray
756 * memory you should make it point to some dummy location,
757 * returns 1 on success, 0 on failure;
758 * if you do not implement rewiring, set this to NULL */
759 int (*rewire) (xine_post_out_t *self, void *data);
760
761 /* the datatype of this output, use one of XINE_POST_DATA_* here */
762 int type;
763
764};
765
766/* get a list of all inputs of a post plugin */
767const char *const *xine_post_list_inputs(xine_post_t *self) XINE_PROTECTED;
768
769/* get a list of all outputs of a post plugin */
770const char *const *xine_post_list_outputs(xine_post_t *self) XINE_PROTECTED;
771
772/* retrieve one specific input of a post plugin */
773 xine_post_in_t *xine_post_input(xine_post_t *self, const char *name) XINE_PROTECTED;
774
775/* retrieve one specific output of a post plugin */
776 xine_post_out_t *xine_post_output(xine_post_t *self, const char *name) XINE_PROTECTED;
777
778/*
779 * wire an input to an output
780 * returns 1 on success, 0 on failure
781 */
782int xine_post_wire(xine_post_out_t *source, xine_post_in_t *target) XINE_PROTECTED;
783
784/*
785 * wire a video port to a video output
786 * This can be used to rewire different post plugins to the video output
787 * plugin layer. The ports you hand in at xine_post_init() will already
788 * be wired with the post plugin, so you need this function for
789 * _re_connecting only.
790 *
791 * returns 1 on success, 0 on failure
792 */
793int xine_post_wire_video_port(xine_post_out_t *source, xine_video_port_t *vo) XINE_PROTECTED;
794
795/*
796 * wire an audio port to an audio output
797 * This can be used to rewire different post plugins to the audio output
798 * plugin layer. The ports you hand in at xine_post_init() will already
799 * be wired with the post plugin, so you need this function for
800 * _re_connecting only.
801 *
802 * returns 1 on success, 0 on failure
803 */
804int xine_post_wire_audio_port(xine_post_out_t *source, xine_audio_port_t *ao) XINE_PROTECTED;
805
806/*
807 * Extracts an output for a stream. Use this to rewire the outputs of streams.
808 */
809 xine_post_out_t * xine_get_video_source(xine_stream_t *stream) XINE_PROTECTED;
810 xine_post_out_t * xine_get_audio_source(xine_stream_t *stream) XINE_PROTECTED;
811
812/*
813 * disposes the post plugin
814 * please make sure that no other post plugin and no stream is
815 * connected to any of this plugin's inputs
816 */
817void xine_post_dispose(xine_t *xine, xine_post_t *self) XINE_PROTECTED;
818
819
820/* post plugin types */
821#define XINE_POST_TYPE_VIDEO_FILTER 0x010000
822#define XINE_POST_TYPE_VIDEO_VISUALIZATION 0x010001
823#define XINE_POST_TYPE_VIDEO_COMPOSE 0x010002
824#define XINE_POST_TYPE_AUDIO_FILTER 0x020000
825#define XINE_POST_TYPE_AUDIO_VISUALIZATION 0x020001
826
827
828/* post plugin data types */
829
830/* video port data
831 * input->data is a xine_video_port_t*
832 * output->data usually is a xine_video_port_t**
833 */
834#define XINE_POST_DATA_VIDEO 0
835
836/* audio port data
837 * input->data is a xine_audio_port_t*
838 * output->data usually is a xine_audio_port_t**
839 */
840#define XINE_POST_DATA_AUDIO 1
841
842/* integer data
843 * input->data is a int*
844 * output->data usually is a int*
845 */
846#define XINE_POST_DATA_INT 3
847
848/* double precision floating point data
849 * input->data is a double*
850 * output->data usually is a double*
851 */
852#define XINE_POST_DATA_DOUBLE 4
853
854/* parameters api (used by frontends)
855 * input->data is xine_post_api_t* (see below)
856 */
857#define XINE_POST_DATA_PARAMETERS 5
858
859/* defines a single parameter entry. */
860 typedef struct {
861 int type; /* POST_PARAM_TYPE_xxx */
862 const char *name; /* name of this parameter */
863 int size; /* sizeof(parameter) */
864 int offset; /* offset in bytes from struct ptr */
865 char **enum_values; /* enumeration (first=0) or NULL */
866 double range_min; /* minimum value */
867 double range_max; /* maximum value */
868 int readonly; /* 0 = read/write, 1=read-only */
869 const char *description; /* user-friendly description */
870} xine_post_api_parameter_t;
871
872/* description of parameters struct (params). */
873 typedef struct {
874 int struct_size; /* sizeof(params) */
875 xine_post_api_parameter_t *parameter; /* list of parameters */
876} xine_post_api_descr_t;
877
878 typedef struct {
879 /*
880 * method to set all the read/write parameters.
881 * params is a struct * defined by xine_post_api_descr_t
882 */
883 int (*set_parameters) (xine_post_t *self, const void *params);
884
885 /*
886 * method to get all parameters.
887 */
888 int (*get_parameters) (xine_post_t *self, void *params);
889
890 /*
891 * method to get params struct definition
892 */
893 xine_post_api_descr_t * (*get_param_descr) (void);
894
895 /*
896 * method to get plugin and parameters help (UTF-8)
897 * the help string must be word wrapped by the frontend.
898 * it might contain \n to mark paragraph breaks.
899 */
900 char * (*get_help) (void);
901} xine_post_api_t;
902
903/* post parameter types */
904#define POST_PARAM_TYPE_LAST 0 /* terminator of parameter list */
905#define POST_PARAM_TYPE_INT 1 /* integer (or vector of integers) */
906#define POST_PARAM_TYPE_DOUBLE 2 /* double (or vector of doubles) */
907#define POST_PARAM_TYPE_CHAR 3 /* char (or vector of chars = string) */
908#define POST_PARAM_TYPE_STRING 4 /* (char *), ASCIIZ */
909#define POST_PARAM_TYPE_STRINGLIST 5 /* (char **) list, NULL terminated */
910#define POST_PARAM_TYPE_BOOL 6 /* integer (0 or 1) */
911
912
913/*********************************************************************
914 * information retrieval *
915 *********************************************************************/
916
917/*
918 * xine log functions
919 *
920 * frontends can display xine log output using these functions
921 */
922int xine_get_log_section_count(xine_t *self) XINE_PROTECTED;
923
924/* return a NULL terminated array of log sections names */
925const char *const *xine_get_log_names(xine_t *self) XINE_PROTECTED;
926
927/* print some log information to <buf> section */
928void xine_log (xine_t *self, int buf,
929 const char *format, ...) XINE_FORMAT_PRINTF(3, 4) XINE_PROTECTED;
930void xine_vlog(xine_t *self, int buf,
931 const char *format, va_list args) XINE_FORMAT_PRINTF(3, 0) XINE_PROTECTED;
932
933/* get log messages of specified section */
934char *const *xine_get_log (xine_t *self, int buf) XINE_PROTECTED;
935
936/* log callback will be called whenever something is logged */
937typedef void (*xine_log_cb_t) (void *user_data, int section);
938void xine_register_log_cb (xine_t *self, xine_log_cb_t cb,
939 void *user_data) XINE_PROTECTED;
940
941/*
942 * error handling / engine status
943 */
944
945/* return last error */
946int xine_get_error (xine_stream_t *stream) XINE_PROTECTED;
947
948/* get current xine engine status (constants see below) */
949int xine_get_status (xine_stream_t *stream) XINE_PROTECTED;
950
951/*
952 * engine status codes
953 */
954#define XINE_STATUS_IDLE 0 /* no mrl assigned */
955#define XINE_STATUS_STOP 1
956#define XINE_STATUS_PLAY 2
957#define XINE_STATUS_QUIT 3
958
959/*
960 * xine error codes
961 */
962#define XINE_ERROR_NONE 0
963#define XINE_ERROR_NO_INPUT_PLUGIN 1
964#define XINE_ERROR_NO_DEMUX_PLUGIN 2
965#define XINE_ERROR_DEMUX_FAILED 3
966#define XINE_ERROR_MALFORMED_MRL 4
967#define XINE_ERROR_INPUT_FAILED 5
968
969/*
970 * try to find out audio/spu language of given channel
971 * (use -1 for current channel)
972 *
973 * lang must point to a buffer of at least XINE_LANG_MAX bytes
974 *
975 * returns 1 on success, 0 on failure
976 */
977int xine_get_audio_lang (xine_stream_t *stream, int channel,
978 char *lang) XINE_PROTECTED;
979int xine_get_spu_lang (xine_stream_t *stream, int channel,
980 char *lang) XINE_PROTECTED;
981/*_x_ increasing this number means an incompatible ABI breakage! */
982#define XINE_LANG_MAX 32
983
984/*
985 * get position / length information
986 *
987 * depending of the nature and system layer of the stream,
988 * some or all of this information may be unavailable or incorrect
989 * (e.g. live network streams may not have a valid length)
990 *
991 * returns 1 on success, 0 on failure (data was not updated,
992 * probably because it's not known yet... try again later)
993 */
994int xine_get_pos_length (xine_stream_t *stream,
995 int *pos_stream, /* 0..65535 */
996 int *pos_time, /* milliseconds */
997 int *length_time) /* milliseconds */
998 XINE_PROTECTED;
999
1000/*
1001 * get information about the stream such as
1002 * video width/height, codecs, audio format, title, author...
1003 * strings are UTF-8 encoded.
1004 *
1005 * constants see below
1006 */
1007uint32_t xine_get_stream_info (xine_stream_t *stream, int info) XINE_PROTECTED;
1008const char *xine_get_meta_info (xine_stream_t *stream, int info) XINE_PROTECTED;
1009#define XINE_QUERY_STREAM_INFO 1
1019int xine_query_stream_info (xine_stream_t *stream, char *sbuf, size_t sblen, int *strings, int *ints) XINE_PROTECTED;
1020
1021/* xine_get_stream_info */
1022#define XINE_STREAM_INFO_BITRATE 0
1023#define XINE_STREAM_INFO_SEEKABLE 1
1024#define XINE_STREAM_INFO_VIDEO_WIDTH 2
1025#define XINE_STREAM_INFO_VIDEO_HEIGHT 3
1026#define XINE_STREAM_INFO_VIDEO_RATIO 4 /* *10000 */
1027#define XINE_STREAM_INFO_VIDEO_CHANNELS 5
1028#define XINE_STREAM_INFO_VIDEO_STREAMS 6
1029#define XINE_STREAM_INFO_VIDEO_BITRATE 7
1030#define XINE_STREAM_INFO_VIDEO_FOURCC 8
1031#define XINE_STREAM_INFO_VIDEO_HANDLED 9 /* codec available? */
1032#define XINE_STREAM_INFO_FRAME_DURATION 10 /* 1/90000 sec */
1033#define XINE_STREAM_INFO_AUDIO_CHANNELS 11
1034#define XINE_STREAM_INFO_AUDIO_BITS 12
1035#define XINE_STREAM_INFO_AUDIO_SAMPLERATE 13
1036#define XINE_STREAM_INFO_AUDIO_BITRATE 14
1037#define XINE_STREAM_INFO_AUDIO_FOURCC 15
1038#define XINE_STREAM_INFO_AUDIO_HANDLED 16 /* codec available? */
1039#define XINE_STREAM_INFO_HAS_CHAPTERS 17
1040#define XINE_STREAM_INFO_HAS_VIDEO 18
1041#define XINE_STREAM_INFO_HAS_AUDIO 19
1042#define XINE_STREAM_INFO_IGNORE_VIDEO 20
1043#define XINE_STREAM_INFO_IGNORE_AUDIO 21
1044#define XINE_STREAM_INFO_IGNORE_SPU 22
1045#define XINE_STREAM_INFO_VIDEO_HAS_STILL 23
1046#define XINE_STREAM_INFO_MAX_AUDIO_CHANNEL 24
1047#define XINE_STREAM_INFO_MAX_SPU_CHANNEL 25
1048#define XINE_STREAM_INFO_AUDIO_MODE 26
1049#define XINE_STREAM_INFO_SKIPPED_FRAMES 27 /* for 1000 frames delivered */
1050#define XINE_STREAM_INFO_DISCARDED_FRAMES 28 /* for 1000 frames delivered */
1051#define XINE_STREAM_INFO_VIDEO_AFD 29
1052#define XINE_STREAM_INFO_DVD_TITLE_NUMBER 30
1053#define XINE_STREAM_INFO_DVD_TITLE_COUNT 31
1054#define XINE_STREAM_INFO_DVD_CHAPTER_NUMBER 32
1055#define XINE_STREAM_INFO_DVD_CHAPTER_COUNT 33
1056#define XINE_STREAM_INFO_DVD_ANGLE_NUMBER 34
1057#define XINE_STREAM_INFO_DVD_ANGLE_COUNT 35
1058
1059/* possible values for XINE_STREAM_INFO_VIDEO_AFD */
1060#define XINE_VIDEO_AFD_NOT_PRESENT -1
1061#define XINE_VIDEO_AFD_RESERVED_0 0
1062#define XINE_VIDEO_AFD_RESERVED_1 1
1063#define XINE_VIDEO_AFD_BOX_16_9_TOP 2
1064#define XINE_VIDEO_AFD_BOX_14_9_TOP 3
1065#define XINE_VIDEO_AFD_BOX_GT_16_9_CENTRE 4
1066#define XINE_VIDEO_AFD_RESERVED_5 5
1067#define XINE_VIDEO_AFD_RESERVED_6 6
1068#define XINE_VIDEO_AFD_RESERVED_7 7
1069#define XINE_VIDEO_AFD_SAME_AS_FRAME 8
1070#define XINE_VIDEO_AFD_4_3_CENTRE 9
1071#define XINE_VIDEO_AFD_16_9_CENTRE 10
1072#define XINE_VIDEO_AFD_14_9_CENTRE 11
1073#define XINE_VIDEO_AFD_RESERVED_12 12
1074#define XINE_VIDEO_AFD_4_3_PROTECT_14_9 13
1075#define XINE_VIDEO_AFD_16_9_PROTECT_14_9 14
1076#define XINE_VIDEO_AFD_16_9_PROTECT_4_3 15
1077
1078/* xine_get_meta_info */
1079#define XINE_META_INFO_TITLE 0
1080#define XINE_META_INFO_COMMENT 1
1081#define XINE_META_INFO_ARTIST 2
1082#define XINE_META_INFO_GENRE 3
1083#define XINE_META_INFO_ALBUM 4
1084#define XINE_META_INFO_YEAR 5 /* may be full date */
1085#define XINE_META_INFO_VIDEOCODEC 6
1086#define XINE_META_INFO_AUDIOCODEC 7
1087#define XINE_META_INFO_SYSTEMLAYER 8
1088#define XINE_META_INFO_INPUT_PLUGIN 9
1089#define XINE_META_INFO_CDINDEX_DISCID 10
1090#define XINE_META_INFO_TRACK_NUMBER 11
1091#define XINE_META_INFO_COMPOSER 12
1092/* post-1.1.17; taken from the list at http://age.hobba.nl/audio/mirroredpages/ogg-tagging.html on 2009-12-11 */
1093#define XINE_META_INFO_PUBLISHER 13
1094#define XINE_META_INFO_COPYRIGHT 14
1095#define XINE_META_INFO_LICENSE 15
1096#define XINE_META_INFO_ARRANGER 16
1097#define XINE_META_INFO_LYRICIST 17
1098#define XINE_META_INFO_AUTHOR 18
1099#define XINE_META_INFO_CONDUCTOR 19
1100#define XINE_META_INFO_PERFORMER 20
1101#define XINE_META_INFO_ENSEMBLE 21
1102#define XINE_META_INFO_OPUS 22
1103#define XINE_META_INFO_PART 23
1104#define XINE_META_INFO_PARTNUMBER 24
1105#define XINE_META_INFO_LOCATION 25
1106/* post-1.1.18.1 */
1107#define XINE_META_INFO_DISCNUMBER 26
1108
1109
1110/*********************************************************************
1111 * plugin management / autoplay / mrl browsing *
1112 *********************************************************************/
1113
1114/*
1115 * note: the pointers to strings or string arrays returned
1116 * by some of these functions are pointers to statically
1117 * alloced internal xine memory chunks.
1118 * they're only valid between xine function calls
1119 * and should never be free()d.
1120 */
1121
1122 typedef struct xine_mrl_s xine_mrl_t;
1123
1124 struct xine_mrl_s {
1125 char *origin; /* file plugin: path */
1126 char *mrl; /* <type>://<location> */
1127 char *link;
1128 off_t size; /* size of this source, may be 0 */
1129 uint32_t type; /* see below */
1130};
1131
1132/* mrl types */
1133#define XINE_MRL_TYPE_unknown (0 << 0)
1134#define XINE_MRL_TYPE_dvd (1 << 0)
1135#define XINE_MRL_TYPE_vcd (1 << 1)
1136#define XINE_MRL_TYPE_net (1 << 2)
1137#define XINE_MRL_TYPE_rtp (1 << 3)
1138#define XINE_MRL_TYPE_stdin (1 << 4)
1139#define XINE_MRL_TYPE_cda (1 << 5)
1140#define XINE_MRL_TYPE_file (1 << 6)
1141#define XINE_MRL_TYPE_file_fifo (1 << 7)
1142#define XINE_MRL_TYPE_file_chardev (1 << 8)
1143#define XINE_MRL_TYPE_file_directory (1 << 9)
1144#define XINE_MRL_TYPE_file_blockdev (1 << 10)
1145#define XINE_MRL_TYPE_file_normal (1 << 11)
1146#define XINE_MRL_TYPE_file_symlink (1 << 12)
1147#define XINE_MRL_TYPE_file_sock (1 << 13)
1148#define XINE_MRL_TYPE_file_exec (1 << 14)
1149#define XINE_MRL_TYPE_file_backup (1 << 15)
1150#define XINE_MRL_TYPE_file_hidden (1 << 16)
1151
1152/* get a list of browsable input plugin ids */
1153const char *const *xine_get_browsable_input_plugin_ids (xine_t *self) XINE_PROTECTED;
1154
1155/*
1156 * ask input plugin named <plugin_id> to return
1157 * a list of available MRLs in domain/directory <start_mrl>.
1158 *
1159 * <start_mrl> may be NULL indicating the toplevel domain/dir
1160 * returns <start_mrl> if <start_mrl> is a valid MRL, not a directory
1161 * returns NULL if <start_mrl> is an invalid MRL, not even a directory.
1162 */
1163 xine_mrl_t **xine_get_browse_mrls (xine_t *self,
1164 const char *plugin_id,
1165 const char *start_mrl,
1166 int *num_mrls) XINE_PROTECTED;
1167
1168/* get a list of plugins that support the autoplay feature */
1169const char *const *xine_get_autoplay_input_plugin_ids (xine_t *self) XINE_PROTECTED;
1170
1171/* get autoplay MRL list from input plugin named <plugin_id> */
1172const char * const *xine_get_autoplay_mrls (xine_t *self,
1173 const char *plugin_id,
1174 int *num_mrls) XINE_PROTECTED;
1175
1176/* get a list of file extensions for file types supported by xine
1177 * the list is separated by spaces
1178 *
1179 * the pointer returned can be free()ed when no longer used */
1180char *xine_get_file_extensions (xine_t *self) XINE_PROTECTED;
1181
1182/* get a list of mime types supported by xine
1183 *
1184 * the pointer returned can be free()ed when no longer used */
1185char *xine_get_mime_types (xine_t *self) XINE_PROTECTED;
1186
1187/* get the demuxer identifier that handles a given mime type
1188 *
1189 * the pointer returned can be free()ed when no longer used
1190 * returns NULL if no demuxer is available to handle this. */
1191char *xine_get_demux_for_mime_type (xine_t *self, const char *mime_type) XINE_PROTECTED;
1192
1193/* get a description string for a plugin */
1194const char *xine_get_input_plugin_description (xine_t *self,
1195 const char *plugin_id) XINE_PROTECTED;
1196const char *xine_get_demux_plugin_description (xine_t *self,
1197 const char *plugin_id) XINE_PROTECTED;
1198const char *xine_get_spu_plugin_description (xine_t *self,
1199 const char *plugin_id) XINE_PROTECTED;
1200const char *xine_get_audio_plugin_description (xine_t *self,
1201 const char *plugin_id) XINE_PROTECTED;
1202const char *xine_get_video_plugin_description (xine_t *self,
1203 const char *plugin_id) XINE_PROTECTED;
1204const char *xine_get_audio_driver_plugin_description (xine_t *self,
1205 const char *plugin_id) XINE_PROTECTED;
1206const char *xine_get_video_driver_plugin_description (xine_t *self,
1207 const char *plugin_id) XINE_PROTECTED;
1208const char *xine_get_post_plugin_description (xine_t *self,
1209 const char *plugin_id) XINE_PROTECTED;
1210
1211/* get lists of available audio and video output plugins */
1212const char *const *xine_list_audio_output_plugins (xine_t *self) XINE_PROTECTED;
1213const char *const *xine_list_video_output_plugins (xine_t *self) XINE_PROTECTED;
1214/* typemask is (1ULL << XINE_VISUAL_TYPE_FOO) | ... */
1215const char *const *xine_list_video_output_plugins_typed (xine_t *self, uint64_t typemask) XINE_PROTECTED;
1216
1217/* get list of available demultiplexor plugins */
1218const char *const *xine_list_demuxer_plugins(xine_t *self) XINE_PROTECTED;
1219
1220/* get list of available input plugins */
1221const char *const *xine_list_input_plugins(xine_t *self) XINE_PROTECTED;
1222
1223/* get list of available subpicture plugins */
1224const char *const *xine_list_spu_plugins(xine_t *self) XINE_PROTECTED;
1225
1226/* get list of available audio and video decoder plugins */
1227const char *const *xine_list_audio_decoder_plugins(xine_t *self) XINE_PROTECTED;
1228const char *const *xine_list_video_decoder_plugins(xine_t *self) XINE_PROTECTED;
1229
1230/* unload unused plugins */
1231void xine_plugins_garbage_collector(xine_t *self) XINE_PROTECTED;
1232
1233
1234/*********************************************************************
1235 * visual specific gui <-> xine engine communication *
1236 *********************************************************************/
1237
1238/* new (preferred) method to talk to video driver. */
1239int xine_port_send_gui_data (xine_video_port_t *vo,
1240 int type, void *data) XINE_PROTECTED;
1241
1242 typedef struct {
1243
1244 /* area of that drawable to be used by video */
1245 int x,y,w,h;
1246
1247} x11_rectangle_t;
1248
1249/*
1250 * this is the visual data struct any x11 gui
1251 * must supply to the xine_open_video_driver call
1252 * ("data" parameter)
1253 */
1254 typedef struct {
1255
1256 /* some information about the display */
1257 void *display; /* Display* */
1258 int screen;
1259
1260 /* drawable to display the video in/on */
1261 unsigned long d; /* Drawable */
1262
1263 void *user_data;
1264
1265 /*
1266 * dest size callback
1267 *
1268 * this will be called by the video driver to find out
1269 * how big the video output area size will be for a
1270 * given video size. The ui should _not_ adjust its
1271 * video out area, just do some calculations and return
1272 * the size. This will be called for every frame, ui
1273 * implementation should be fast.
1274 * dest_pixel_aspect should be set to the used display pixel aspect.
1275 * NOTE: Semantics has changed: video_width and video_height
1276 * are no longer pixel aspect corrected. Get the old semantics
1277 * in the UI with
1278 * *dest_pixel_aspect = display_pixel_aspect;
1279 * if (video_pixel_aspect >= display_pixel_aspect)
1280 * video_width = video_width * video_pixel_aspect / display_pixel_aspect + .5;
1281 * else
1282 * video_height = video_height * display_pixel_aspect / video_pixel_aspect + .5;
1283 */
1284 void (*dest_size_cb) (void *user_data,
1285 int video_width, int video_height,
1286 double video_pixel_aspect,
1287 int *dest_width, int *dest_height,
1288 double *dest_pixel_aspect);
1289
1290 /*
1291 * frame output callback
1292 *
1293 * this will be called by the video driver for every frame
1294 * it's about to draw. ui can adapt its size if necessary
1295 * here.
1296 * note: the ui doesn't have to adjust itself to this
1297 * size, this is just to be taken as a hint.
1298 * ui must return the actual size of the video output
1299 * area and the video output driver will do its best
1300 * to adjust the video frames to that size (while
1301 * preserving aspect ratio and stuff).
1302 * dest_x, dest_y: offset inside window
1303 * dest_width, dest_height: available drawing space
1304 * dest_pixel_aspect: display pixel aspect
1305 * win_x, win_y: window absolute screen position
1306 * NOTE: Semantics has changed: video_width and video_height
1307 * are no longer pixel aspect corrected. Get the old semantics
1308 * in the UI with
1309 * *dest_pixel_aspect = display_pixel_aspect;
1310 * if (video_pixel_aspect >= display_pixel_aspect)
1311 * video_width = video_width * video_pixel_aspect / display_pixel_aspect + .5;
1312 * else
1313 * video_height = video_height * display_pixel_aspect / video_pixel_aspect + .5;
1314 */
1315 void (*frame_output_cb) (void *user_data,
1316 int video_width, int video_height,
1317 double video_pixel_aspect,
1318 int *dest_x, int *dest_y,
1319 int *dest_width, int *dest_height,
1320 double *dest_pixel_aspect,
1321 int *win_x, int *win_y);
1322
1323 /*
1324 * lock display callback
1325 *
1326 * this callback is called when the video driver
1327 * needs access to the x11 display connection
1328 *
1329 * note: to enable this you MUST use XINE_VISUAL_TYPE_X11_2
1330 * note: if display_lock is NULL, the fallback is used
1331 * note: fallback for this function is XLockDisplay(display)
1332 */
1333 void (*lock_display) (void *user_data);
1334
1335 /*
1336 * unlock display callback
1337 *
1338 * this callback is called when the video driver
1339 * doesn't need access to the x11 display connection anymore
1340 *
1341 * note: to enable this you MUST use XINE_VISUAL_TYPE_X11_2
1342 * note: if display_unlock is NULL, the fallback is used
1343 * note: fallback for this function is XUnlockDisplay(display)
1344 */
1345 void (*unlock_display) (void *user_data);
1346
1347} x11_visual_t;
1348
1349/*
1350 * this is the visual data struct any xcb gui
1351 * must supply to the xine_open_video_driver call
1352 * ("data" parameter)
1353 */
1354 typedef struct {
1355
1356 /* some information about the display */
1357 void *connection; /* xcb_connection_t */
1358 void *screen; /* xcb_screen_t */
1359
1360 /* window to display the video in / on */
1361 unsigned int window; /* xcb_window_t */
1362
1363 void *user_data;
1364
1365 /*
1366 * dest size callback
1367 *
1368 * this will be called by the video driver to find out
1369 * how big the video output area size will be for a
1370 * given video size. The ui should _not_ adjust its
1371 * video out area, just do some calculations and return
1372 * the size. This will be called for every frame, ui
1373 * implementation should be fast.
1374 * dest_pixel_aspect should be set to the used display pixel aspect.
1375 * NOTE: Semantics has changed: video_width and video_height
1376 * are no longer pixel aspect corrected. Get the old semantics
1377 * in the UI with
1378 * *dest_pixel_aspect = display_pixel_aspect;
1379 * if (video_pixel_aspect >= display_pixel_aspect)
1380 * video_width = video_width * video_pixel_aspect / display_pixel_aspect + .5;
1381 * else
1382 * video_height = video_height * display_pixel_aspect / video_pixel_aspect + .5;
1383 */
1384 void (*dest_size_cb) (void *user_data,
1385 int video_width, int video_height,
1386 double video_pixel_aspect,
1387 int *dest_width, int *dest_height,
1388 double *dest_pixel_aspect);
1389
1390 /*
1391 * frame output callback
1392 *
1393 * this will be called by the video driver for every frame
1394 * it's about to draw. ui can adapt its size if necessary
1395 * here.
1396 * note: the ui doesn't have to adjust itself to this
1397 * size, this is just to be taken as a hint.
1398 * ui must return the actual size of the video output
1399 * area and the video output driver will do its best
1400 * to adjust the video frames to that size (while
1401 * preserving aspect ratio and stuff).
1402 * dest_x, dest_y: offset inside window
1403 * dest_width, dest_height: available drawing space
1404 * dest_pixel_aspect: display pixel aspect
1405 * win_x, win_y: window absolute screen position
1406 * NOTE: Semantics has changed: video_width and video_height
1407 * are no longer pixel aspect corrected. Get the old semantics
1408 * in the UI with
1409 * *dest_pixel_aspect = display_pixel_aspect;
1410 * if (video_pixel_aspect >= display_pixel_aspect)
1411 * video_width = video_width * video_pixel_aspect / display_pixel_aspect + .5;
1412 * else
1413 * video_height = video_height * display_pixel_aspect / video_pixel_aspect + .5;
1414 */
1415 void (*frame_output_cb) (void *user_data,
1416 int video_width, int video_height,
1417 double video_pixel_aspect,
1418 int *dest_x, int *dest_y,
1419 int *dest_width, int *dest_height,
1420 double *dest_pixel_aspect,
1421 int *win_x, int *win_y);
1422
1423} xcb_visual_t;
1424
1425/*
1426 * this is the visual data struct any Wayland GUI
1427 * must supply to the xine_open_video_driver call
1428 * ("data" parameter)
1429 */
1430
1431struct wl_display;
1432struct wl_surface;
1433
1434 typedef struct {
1435
1436 struct wl_display *display;
1437 struct wl_surface *surface;
1438
1439 void *user_data;
1440 void (*frame_output_cb) (void *user_data,
1441 int video_width, int video_height,
1442 double video_pixel_aspect,
1443 int *dest_x, int *dest_y,
1444 int *dest_width, int *dest_height,
1445 double *dest_pixel_aspect,
1446 int *win_x, int *win_y);
1447
1448} xine_wayland_visual_t;
1449
1450/**************************************************
1451 * XINE_VO_RAW struct definitions
1452 *************************************************/
1453/* frame_format definitions */
1454#define XINE_VORAW_YV12 1
1455#define XINE_VORAW_YUY2 2
1456#define XINE_VORAW_RGB 4
1457
1458/* maximum number of overlays the raw driver can handle */
1459#define XINE_VORAW_MAX_OVL 16
1460
1461/* raw_overlay_t struct used in raw_overlay_cb callback */
1462 typedef struct {
1463 uint8_t *ovl_rgba;
1464 int ovl_w, ovl_h; /* overlay's width and height */
1465 int ovl_x, ovl_y; /* overlay's top-left display position */
1466} raw_overlay_t;
1467
1468/* this is the visual data struct any raw gui
1469 * must supply to the xine_open_video_driver call
1470 * ("data" parameter)
1471 */
1472 typedef struct {
1473 void *user_data;
1474
1475 /* OR'ed frame_format
1476 * Unsupported frame formats are converted to rgb.
1477 * XINE_VORAW_RGB is always assumed by the driver, even if not set.
1478 * So a frontend must at least support rgb.
1479 * Be aware that rgb requires more cpu than yuv,
1480 * so avoid its usage for video playback.
1481 * However, it's useful for single frame capture (e.g. thumbs)
1482 */
1483 int supported_formats;
1484
1485 /* raw output callback
1486 * this will be called by the video driver for every frame
1487 *
1488 * If frame_format==XINE_VORAW_YV12, data0 points to frame_width*frame_height Y values
1489 * data1 points to (frame_width/2)*(frame_height/2) U values
1490 * data2 points to (frame_width/2)*(frame_height/2) V values
1491 *
1492 * If frame_format==XINE_VORAW_YUY2, data0 points to frame_width*frame_height*2 YU/Y²V values
1493 * data1 is NULL
1494 * data2 is NULL
1495 *
1496 * If frame_format==XINE_VORAW_RGB, data0 points to frame_width*frame_height*3 RGB values
1497 * data1 is NULL
1498 * data2 is NULL
1499 */
1500 void (*raw_output_cb) (void *user_data, int frame_format,
1501 int frame_width, int frame_height,
1502 double frame_aspect,
1503 void *data0, void *data1, void *data2);
1504
1505 /* raw overlay callback
1506 * this will be called by the video driver for every new overlay state
1507 * overlays_array points to an array of num_ovl raw_overlay_t
1508 * Note that num_ovl can be 0, meaning "end of overlay display"
1509 * num_ovl is at most XINE_VORAW_MAX_OVL */
1510 void (*raw_overlay_cb) (void *user_data, int num_ovl,
1511 raw_overlay_t *overlays_array);
1512} raw_visual_t;
1513/**********************************************
1514 * end of vo_raw defs
1515 *********************************************/
1516
1517/*
1518 * this is the visual data struct any fb gui
1519 * may supply to the xine_open_video_driver call
1520 * ("data" parameter) to get frame_output_cd calls
1521 */
1522
1523 typedef struct {
1524
1525 void (*frame_output_cb) (void *user_data,
1526 int video_width, int video_height,
1527 double video_pixel_aspect,
1528 int *dest_x, int *dest_y,
1529 int *dest_width, int *dest_height,
1530 double *dest_pixel_aspect,
1531 int *win_x, int *win_y);
1532
1533 void *user_data;
1534
1535} fb_visual_t;
1536
1537#if defined(WIN32) && (!defined(XINE_COMPILE) || defined(XINE_NEED_WIN32_VISUAL))
1538/*
1539 * this is the visual data struct any win32 gui should supply
1540 * (pass this to init_video_out_plugin or the xine_load_video_output_plugin
1541 * utility function)
1542 */
1543
1544typedef struct {
1545
1546 HWND WndHnd; /* handle of window associated with primary surface */
1547 HINSTANCE HInst; /* handle of windows application instance */
1548 RECT WndRect; /* rect of window client points translated to screen
1549 * cooridnates */
1550 int FullScreen; /* is window fullscreen */
1551 HBRUSH Brush; /* window brush for background color */
1552 COLORREF ColorKey; /* window brush color key */
1553
1554} win32_visual_t;
1555
1556/*
1557 * constants for gui_data_exchange's data_type parameter
1558 */
1559
1560#define GUI_WIN32_MOVED_OR_RESIZED 0
1561
1562#endif /* WIN32 */
1563
1564/*
1565 * "type" constants for xine_port_send_gui_data(...)
1566 */
1567
1568#ifndef XINE_DISABLE_DEPRECATED_FEATURES
1569/* xevent *data */
1570#define XINE_GUI_SEND_COMPLETION_EVENT 1 /* DEPRECATED */
1571#endif
1572
1573/* Drawable data */
1574#define XINE_GUI_SEND_DRAWABLE_CHANGED 2
1575
1576/* xevent *data */
1577#define XINE_GUI_SEND_EXPOSE_EVENT 3
1578
1579/* x11_rectangle_t *data */
1580#define XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO 4
1581
1582/* int data */
1583#define XINE_GUI_SEND_VIDEOWIN_VISIBLE 5
1584
1585/* *data contains chosen visual, select a new one or change it to NULL
1586 * to indicate the visual to use or that no visual will work */
1587/* XVisualInfo **data */
1588#define XINE_GUI_SEND_SELECT_VISUAL 8
1589
1590/* Gui is about to destroy drawable */
1591#define XINE_GUI_SEND_WILL_DESTROY_DRAWABLE 9
1592
1593
1594/*********************************************************************
1595 * xine health check stuff *
1596 *********************************************************************/
1597
1598#define XINE_HEALTH_CHECK_OK 0
1599#define XINE_HEALTH_CHECK_FAIL 1
1600#define XINE_HEALTH_CHECK_UNSUPPORTED 2
1601#define XINE_HEALTH_CHECK_NO_SUCH_CHECK 3
1602
1603#define CHECK_KERNEL 0
1604#define CHECK_MTRR 1
1605#define CHECK_CDROM 2
1606#define CHECK_DVDROM 3
1607#define CHECK_DMA 4
1608#define CHECK_X 5
1609#define CHECK_XV 6
1610
1611 struct xine_health_check_s {
1612 const char* cdrom_dev;
1613 const char* dvd_dev;
1614 const char* msg;
1615 const char* title;
1616 const char* explanation;
1617 int status;
1618};
1619
1620 typedef struct xine_health_check_s xine_health_check_t;
1621 xine_health_check_t* xine_health_check(xine_health_check_t*, int check_num) XINE_PROTECTED;
1622
1623
1624/*********************************************************************
1625 * configuration system *
1626 *********************************************************************/
1627
1628/*
1629 * config entry data types
1630 */
1631
1632#define XINE_CONFIG_TYPE_UNKNOWN 0
1633#define XINE_CONFIG_TYPE_RANGE 1
1634#define XINE_CONFIG_TYPE_STRING 2
1635#define XINE_CONFIG_TYPE_ENUM 3
1636#define XINE_CONFIG_TYPE_NUM 4
1637#define XINE_CONFIG_TYPE_BOOL 5
1638
1639/* For the string type (1.1.4 and later). These are stored in num_value. */
1640#define XINE_CONFIG_STRING_IS_STRING 0
1641#define XINE_CONFIG_STRING_IS_FILENAME 1
1642#define XINE_CONFIG_STRING_IS_DEVICE_NAME 2
1643#define XINE_CONFIG_STRING_IS_DIRECTORY_NAME 3
1644
1645 typedef struct xine_cfg_entry_s xine_cfg_entry_t;
1646
1647 typedef void (*xine_config_cb_t) (void *user_data,
1648 xine_cfg_entry_t *entry);
1649 struct xine_cfg_entry_s {
1650 const char *key; /* unique id (example: gui.logo_mrl) */
1651
1652 int type;
1653
1654 /* user experience level */
1655 int exp_level; /* 0 => beginner,
1656 10 => advanced user,
1657 20 => expert */
1658
1659 /* type unknown */
1660 char *unknown_value;
1661
1662 /* type string */
1663 char *str_value;
1664 char *str_default;
1665
1666 /* common to range, enum, num, bool;
1667 * num_value is also used by string to indicate what's required:
1668 * plain string, file name, device name, directory name
1669 */
1670 int num_value;
1671 int num_default;
1672
1673 /* type range specific: */
1674 int range_min;
1675 int range_max;
1676
1677 /* type enum specific: */
1678 char **enum_values;
1679
1680 /* help info for the user (UTF-8)
1681 * the help string must be word wrapped by the frontend.
1682 * it might contain \n to mark paragraph breaks.
1683 */
1684 const char *description;
1685 const char *help;
1686
1687 /* callback function and data for live changeable values */
1688 /* some config entries will take effect immediately, although they
1689 * do not have a callback registered; such values will have some
1690 * non-NULL dummy value in callback_data; so if you want to check,
1691 * if a config change will require restarting xine, check for
1692 * callback_data == NULL */
1693 xine_config_cb_t callback;
1694 void *callback_data;
1695
1696};
1697
1698const char *xine_config_register_string (xine_t *self,
1699 const char *key,
1700 const char *def_value,
1701 const char *description,
1702 const char *help,
1703 int exp_level,
1704 xine_config_cb_t changed_cb,
1705 void *cb_data) XINE_PROTECTED;
1706
1707const char *xine_config_register_filename (xine_t *self,
1708 const char *key,
1709 const char *def_value,
1710 int req_type, /* XINE_CONFIG_STRING_IS_* */
1711 const char *description,
1712 const char *help,
1713 int exp_level,
1714 xine_config_cb_t changed_cb,
1715 void *cb_data) XINE_PROTECTED;
1716
1717int xine_config_register_range (xine_t *self,
1718 const char *key,
1719 int def_value,
1720 int min, int max,
1721 const char *description,
1722 const char *help,
1723 int exp_level,
1724 xine_config_cb_t changed_cb,
1725 void *cb_data) XINE_PROTECTED;
1726
1727int xine_config_register_enum (xine_t *self,
1728 const char *key,
1729 int def_value,
1730 char **values,
1731 const char *description,
1732 const char *help,
1733 int exp_level,
1734 xine_config_cb_t changed_cb,
1735 void *cb_data) XINE_PROTECTED;
1736
1737int xine_config_register_num (xine_t *self,
1738 const char *key,
1739 int def_value,
1740 const char *description,
1741 const char *help,
1742 int exp_level,
1743 xine_config_cb_t changed_cb,
1744 void *cb_data) XINE_PROTECTED;
1745
1746int xine_config_register_bool (xine_t *self,
1747 const char *key,
1748 int def_value,
1749 const char *description,
1750 const char *help,
1751 int exp_level,
1752 xine_config_cb_t changed_cb,
1753 void *cb_data) XINE_PROTECTED;
1754
1762#define HAVE_XINE_CONFIG_UNREGISTER_CALLBACKS 1
1763int xine_config_unregister_callbacks (xine_t *self,
1764 const char *key, xine_config_cb_t changed_cb, void *cb_data, size_t cb_data_size) XINE_PROTECTED;
1765
1766/*
1767 * the following functions will copy data from the internal xine_config
1768 * data database to the xine_cfg_entry_t *entry you provide
1769 *
1770 * they return 1 on success, 0 on failure
1771 */
1772
1773/* get first config item */
1774int xine_config_get_first_entry (xine_t *self, xine_cfg_entry_t *entry) XINE_PROTECTED;
1775
1776/* get next config item (iterate through the items) */
1777int xine_config_get_next_entry (xine_t *self, xine_cfg_entry_t *entry) XINE_PROTECTED;
1778
1779/* search for a config entry by key */
1780int xine_config_lookup_entry (xine_t *self, const char *key,
1781 xine_cfg_entry_t *entry) XINE_PROTECTED;
1782
1783/*
1784 * Helper function to get numeric value of config entry.
1785 * Return def_value if entry was not found (or is not correct type).
1786 */
1787int xine_config_lookup_num(xine_t *self, const char *key, int def_value) XINE_PROTECTED;
1788
1789/*
1790 * Thread-safe helper function to get string value of config entry.
1791 * Return copy of current value or NULL.
1792 * Returned string must be freed with xine_config_free_str().
1793 */
1794char *xine_config_lookup_string(xine_t *self, const char *key) XINE_PROTECTED;
1795void xine_config_free_string(xine_t *self, char **value) XINE_PROTECTED;
1796
1797/*
1798 * update a config entry (which was returned from lookup_entry() )
1799 *
1800 * xine will make a deep copy of the data in the entry into its internal
1801 * config database.
1802 */
1803void xine_config_update_entry (xine_t *self,
1804 const xine_cfg_entry_t *entry) XINE_PROTECTED;
1805
1806/*
1807 * translation of old configuration entry names
1808 */
1809 typedef struct {
1810 const char *old_name, *new_name;
1811} xine_config_entry_translation_t;
1812
1813void xine_config_set_translation_user (const xine_config_entry_translation_t *) XINE_PROTECTED;
1814
1815/*
1816 * load/save config data from/to afile (e.g. $HOME/.xine/config)
1817 */
1818void xine_config_load (xine_t *self, const char *cfg_filename) XINE_PROTECTED;
1819void xine_config_save (xine_t *self, const char *cfg_filename) XINE_PROTECTED;
1820void xine_config_reset (xine_t *self) XINE_PROTECTED;
1821
1822
1823/*********************************************************************
1824 * asynchroneous xine event mechanism *
1825 *********************************************************************/
1826
1827/*
1828 * to receive events you have to register an event queue with
1829 * the xine engine (xine_event_new_queue, see below).
1830 *
1831 * then you can either
1832 * 1) check for incoming events regularly (xine_event_get/wait),
1833 * process them and free them using xine_event_free
1834 * 2) use xine_event_create_listener_thread and specify a callback
1835 * which will then be called for each event
1836 *
1837 * to send events to every module listening you don't need
1838 * to register an event queue but simply call xine_event_send.
1839 *
1840 * front ends should listen for one of MRL_REFERENCE and MRL_REFERENCE_EXT
1841 * since both will be sent for compatibility reasons
1842 */
1843
1844/* event types */
1845#define XINE_EVENT_UI_PLAYBACK_FINISHED 1 /* frontend can e.g. move on to next playlist entry */
1846#define XINE_EVENT_UI_CHANNELS_CHANGED 2 /* inform ui that new channel info is available */
1847#define XINE_EVENT_UI_SET_TITLE 3 /* request title display change in ui */
1848#define XINE_EVENT_UI_MESSAGE 4 /* message (dialog) for the ui to display */
1849#define XINE_EVENT_FRAME_FORMAT_CHANGE 5 /* e.g. aspect ratio change during dvd playback */
1850#define XINE_EVENT_AUDIO_LEVEL 6 /* report current audio level (l/r/mute) */
1851#define XINE_EVENT_QUIT 7 /* last event sent when stream is disposed */
1852#define XINE_EVENT_PROGRESS 8 /* index creation/network connections */
1853#define XINE_EVENT_MRL_REFERENCE 9 /* (deprecated) demuxer->frontend: MRL reference(s) for the real stream */
1854#define XINE_EVENT_UI_NUM_BUTTONS 10 /* number of buttons for interactive menus */
1855#define XINE_EVENT_SPU_BUTTON 11 /* the mouse pointer enter/leave a button */
1856#define XINE_EVENT_DROPPED_FRAMES 12 /* number of dropped frames is too high */
1857#define XINE_EVENT_MRL_REFERENCE_EXT 13 /* demuxer->frontend: MRL reference(s) for the real stream */
1858#define XINE_EVENT_AUDIO_AMP_LEVEL 14 /* report current audio amp level (l/r/mute) */
1859#define XINE_EVENT_NBC_STATS 15 /* nbc buffer status */
1860
1861
1862/* input events coming from frontend */
1863#define XINE_EVENT_INPUT_MOUSE_BUTTON 101
1864#define XINE_EVENT_INPUT_MOUSE_MOVE 102
1865#define XINE_EVENT_INPUT_MENU1 103
1866#define XINE_EVENT_INPUT_MENU2 104
1867#define XINE_EVENT_INPUT_MENU3 105
1868#define XINE_EVENT_INPUT_MENU4 106
1869#define XINE_EVENT_INPUT_MENU5 107
1870#define XINE_EVENT_INPUT_MENU6 108
1871#define XINE_EVENT_INPUT_MENU7 109
1872#define XINE_EVENT_INPUT_UP 110
1873#define XINE_EVENT_INPUT_DOWN 111
1874#define XINE_EVENT_INPUT_LEFT 112
1875#define XINE_EVENT_INPUT_RIGHT 113
1876#define XINE_EVENT_INPUT_SELECT 114
1877#define XINE_EVENT_INPUT_NEXT 115
1878#define XINE_EVENT_INPUT_PREVIOUS 116
1879#define XINE_EVENT_INPUT_ANGLE_NEXT 117
1880#define XINE_EVENT_INPUT_ANGLE_PREVIOUS 118
1881#define XINE_EVENT_INPUT_BUTTON_FORCE 119
1882#define XINE_EVENT_INPUT_NUMBER_0 120
1883#define XINE_EVENT_INPUT_NUMBER_1 121
1884#define XINE_EVENT_INPUT_NUMBER_2 122
1885#define XINE_EVENT_INPUT_NUMBER_3 123
1886#define XINE_EVENT_INPUT_NUMBER_4 124
1887#define XINE_EVENT_INPUT_NUMBER_5 125
1888#define XINE_EVENT_INPUT_NUMBER_6 126
1889#define XINE_EVENT_INPUT_NUMBER_7 127
1890#define XINE_EVENT_INPUT_NUMBER_8 128
1891#define XINE_EVENT_INPUT_NUMBER_9 129
1892#define XINE_EVENT_INPUT_NUMBER_10_ADD 130
1893
1894/* specific event types */
1895#define XINE_EVENT_SET_V4L2 200
1896#define XINE_EVENT_PVR_SAVE 201
1897#define XINE_EVENT_PVR_REPORT_NAME 202
1898#define XINE_EVENT_PVR_REALTIME 203
1899#define XINE_EVENT_PVR_PAUSE 204
1900#define XINE_EVENT_SET_MPEG_DATA 205
1901
1902/* VDR specific event types */
1903#define XINE_EVENT_VDR_RED 300
1904#define XINE_EVENT_VDR_GREEN 301
1905#define XINE_EVENT_VDR_YELLOW 302
1906#define XINE_EVENT_VDR_BLUE 303
1907#define XINE_EVENT_VDR_PLAY 304
1908#define XINE_EVENT_VDR_PAUSE 305
1909#define XINE_EVENT_VDR_STOP 306
1910#define XINE_EVENT_VDR_RECORD 307
1911#define XINE_EVENT_VDR_FASTFWD 308
1912#define XINE_EVENT_VDR_FASTREW 309
1913#define XINE_EVENT_VDR_POWER 310
1914#define XINE_EVENT_VDR_CHANNELPLUS 311
1915#define XINE_EVENT_VDR_CHANNELMINUS 312
1916#define XINE_EVENT_VDR_SCHEDULE 313
1917#define XINE_EVENT_VDR_CHANNELS 314
1918#define XINE_EVENT_VDR_TIMERS 315
1919#define XINE_EVENT_VDR_RECORDINGS 316
1920#define XINE_EVENT_VDR_SETUP 317
1921#define XINE_EVENT_VDR_COMMANDS 318
1922#define XINE_EVENT_VDR_BACK 319
1923#define XINE_EVENT_VDR_USER1 320
1924#define XINE_EVENT_VDR_USER2 321
1925#define XINE_EVENT_VDR_USER3 322
1926#define XINE_EVENT_VDR_USER4 323
1927#define XINE_EVENT_VDR_USER5 324
1928#define XINE_EVENT_VDR_USER6 325
1929#define XINE_EVENT_VDR_USER7 326
1930#define XINE_EVENT_VDR_USER8 327
1931#define XINE_EVENT_VDR_USER9 328
1932#define XINE_EVENT_VDR_VOLPLUS 329
1933#define XINE_EVENT_VDR_VOLMINUS 330
1934#define XINE_EVENT_VDR_MUTE 331
1935#define XINE_EVENT_VDR_AUDIO 332
1936#define XINE_EVENT_VDR_INFO 333
1937#define XINE_EVENT_VDR_CHANNELPREVIOUS 334
1938#define XINE_EVENT_VDR_SUBTITLES 335
1939#define XINE_EVENT_VDR_USER0 336
1940/* some space for further keys */
1941#define XINE_EVENT_VDR_SETVIDEOWINDOW 350
1942#define XINE_EVENT_VDR_FRAMESIZECHANGED 351
1943#define XINE_EVENT_VDR_SELECTAUDIO 352
1944#define XINE_EVENT_VDR_TRICKSPEEDMODE 353
1945#define XINE_EVENT_VDR_PLUGINSTARTED 354
1946#define XINE_EVENT_VDR_DISCONTINUITY 355
1947
1948/* events generated from post plugins */
1949#define XINE_EVENT_POST_TVTIME_FILMMODE_CHANGE 400
1950
1951/*
1952 * xine event struct
1953 */
1954 typedef struct {
1955 xine_stream_t *stream; /* stream this event belongs to */
1956
1957 void *data; /* contents depending on type */
1958 int data_length;
1959
1960 int type; /* event type (constants see above) */
1961
1962 /* you do not have to provide this, it will be filled in by xine_event_send() */
1963 struct timeval tv; /* timestamp of event creation */
1964} xine_event_t;
1965
1966/*
1967 * input event dynamic data
1968 */
1969 typedef struct {
1970 xine_event_t event;
1971 uint8_t button; /* Generally 1 = left, 2 = mid, 3 = right */
1972 uint16_t x,y; /* In Image space */
1973} xine_input_data_t;
1974
1975/*
1976 * UI event dynamic data - send information to/from UI.
1977 */
1978 typedef struct {
1979 int num_buttons;
1980 int str_len;
1981 char str[256]; /* might be longer */
1982} xine_ui_data_t;
1983
1984/*
1985 * Send messages to UI. used mostly to report errors.
1986 */
1987 typedef struct {
1988 /*
1989 * old xine-ui versions expect xine_ui_data_t type.
1990 * this struct is added for compatibility.
1991 */
1992 xine_ui_data_t compatibility;
1993
1994 /* See XINE_MSG_xxx for defined types. */
1995 int type;
1996
1997 /* defined types are provided with a standard explanation.
1998 * note: zero means no explanation.
1999 */
2000 int explanation; /* add to struct address to get a valid (char *) */
2001
2002 /* parameters are zero terminated strings */
2003 int num_parameters;
2004 int parameters; /* add to struct address to get a valid (char *) */
2005
2006 /* where messages are stored, will be longer
2007 *
2008 * this field begins with the message text itself (\0-terminated),
2009 * followed by (optional) \0-terminated parameter strings
2010 * the end marker is \0 \0
2011 */
2012 char messages[1];
2013} xine_ui_message_data_t;
2014
2015
2016/*
2017 * notify frame format change
2018 */
2019 typedef struct {
2020 int width;
2021 int height;
2022 /* these are aspect codes as defined in MPEG2, because this
2023 * is only used for DVD playback, pan_scan is a boolean flag */
2024 int aspect;
2025 int pan_scan;
2026} xine_format_change_data_t;
2027
2028/*
2029 * audio level for left/right channel
2030 */
2031 typedef struct {
2032 int left;
2033 int right; /* 0..100 % */
2034 int mute;
2035} xine_audio_level_data_t;
2036
2037/*
2038 * index generation / buffering
2039 */
2040 typedef struct {
2041 const char *description; /* e.g. "connecting..." */
2042 int percent;
2043} xine_progress_data_t;
2044
2045/*
2046 * nbc buffer status
2047 */
2048 typedef struct {
2049 int v_percent; /* fill of video buffer */
2050 int64_t v_remaining; /* remaining time in ms till underrun */
2051 int64_t v_bitrate; /* current bitrate */
2052 int v_in_disc; /* in discontinuity */
2053 int a_percent; /* like video, but for audio */
2054 int64_t a_remaining;
2055 int64_t a_bitrate;
2056 int a_in_disc;
2057 int buffering; /* currently filling buffer */
2058 int enabled; /* buffer disabled by engine */
2059 int type; /* 0=buffer put, 1=buffer get */
2060} xine_nbc_stats_data_t;
2061
2062/*
2063 * mrl reference data is sent by demuxers when a reference stream is found.
2064 * this stream just contains pointers (urls) to the real data, which are
2065 * passed to frontend using this event type. (examples: .asx, .mov and .ram)
2066 *
2067 * ideally, frontends should add these mrls to a "hierarchical playlist".
2068 * that is, instead of the original file, the ones provided here should be
2069 * played instead. on pratice, just using a simple playlist should work.
2070 *
2071 * mrl references should be played in the same order they are received, just
2072 * after the current stream finishes.
2073 * alternative entries may be provided and should be used in case of
2074 * failure of the primary stream (the one with alternative=0).
2075 *
2076 * sample playlist:
2077 * 1) http://something/something.ram
2078 * 1a) rtsp://something/realsomething1.rm (alternative=0)
2079 * 1b) pnm://something/realsomething1.rm (alternative=1)
2080 * 2) http://another/another.avi
2081 *
2082 * 1 and 2 are the original items on this playlist. 1a and 1b were received
2083 * by events (they are the mrl references enclosed in 1). 1a is played after
2084 * receiving the finished event from 1. note: 1b is usually ignored, it should
2085 * only be used in case 1a fails to open.
2086 *
2087 * An event listener which accepts XINE_EVENT_MRL_REFERENCE_EXT events
2088 * *must* ignore XINE_EVENT_MRL_REFERENCE events.
2089 */
2090 typedef struct {
2091 int alternative; /* alternative playlist number, usually 0 */
2092 char mrl[1]; /* might (will) be longer */
2093} xine_mrl_reference_data_t XINE_DEPRECATED;
2094
2095 typedef struct {
2096 int alternative; /* as above */
2097 uint32_t start_time, duration; /* milliseconds */
2098 uint32_t spare[20]; /* for future expansion */
2099 const char mrl[1]; /* might (will) be longer */
2100/*const char title[]; ** immediately follows MRL's terminating NUL */
2101} xine_mrl_reference_data_ext_t;
2102
2103/*
2104 * configuration options for video4linux-like input plugins
2105 */
2106 typedef struct {
2107 /* input selection */
2108 int input; /* select active input from card */
2109 int channel; /* channel number */
2110 int radio; /* ask for a radio channel */
2111 uint32_t frequency; /* frequency divided by 62.5KHz or 62.5 Hz */
2112 uint32_t transmission; /* The transmission standard. */
2113
2114 /* video parameters */
2115 uint32_t framerate_numerator; /* framerate as numerator/denominator */
2116 uint32_t framerate_denominator;
2117 uint32_t framelines; /* Total lines per frame including blanking */
2118 uint64_t standard_id; /* One of the V4L2_STD_* values */
2119 uint32_t colorstandard; /* One of the V4L2_COLOR_STD_* values */
2120 uint32_t colorsubcarrier; /* The color subcarrier frequency */
2121 int frame_width; /* scaled frame width */
2122 int frame_height; /* scaled frame height */
2123
2124 /* let some spare space so we can add new fields without breaking
2125 * binary api compatibility.
2126 */
2127 uint32_t spare[20];
2128
2129 /* used by pvr plugin */
2130 int32_t session_id; /* -1 stops pvr recording */
2131
2132} xine_set_v4l2_data_t;
2133
2134/*
2135 * configuration options for plugins that can do a kind of mpeg encoding
2136 * note: highly experimental api :)
2137 */
2138 typedef struct {
2139
2140 /* mpeg2 parameters */
2141 int bitrate_vbr; /* 1 = vbr, 0 = cbr */
2142 int bitrate_mean; /* mean (target) bitrate in kbps*/
2143 int bitrate_peak; /* peak (max) bitrate in kbps */
2144 int gop_size; /* GOP size in frames */
2145 int gop_closure; /* open/closed GOP */
2146 int b_frames; /* number of B frames to use */
2147 int aspect_ratio; /* XINE_VO_ASPECT_xxx */
2148
2149 /* let some spare space so we can add new fields without breaking
2150 * binary api compatibility.
2151 */
2152 uint32_t spare[20];
2153
2154} xine_set_mpeg_data_t;
2155
2156 typedef struct {
2157 int direction; /* 0 leave, 1 enter */
2158 int32_t button; /* button number */
2159} xine_spu_button_t;
2160
2161#ifdef XINE_ENABLE_EXPERIMENTAL_FEATURES
2162
2163/*
2164 * ask pvr to save (ie. do not discard) the current session
2165 * see comments on input_pvr.c to understand how it works.
2166 */
2167typedef struct {
2168 /* mode values:
2169 * -1 = do nothing, just set the name
2170 * 0 = truncate current session and save from now on
2171 * 1 = save from last sync point
2172 * 2 = save everything on current session
2173 */
2174 int mode;
2175 int id;
2176 char name[256]; /* name for saving, might be longer */
2177} xine_pvr_save_data_t;
2178
2179typedef struct {
2180 /* mode values:
2181 * 0 = non realtime
2182 * 1 = realtime
2183 */
2184 int mode;
2185} xine_pvr_realtime_t;
2186
2187typedef struct {
2188 /* mode values:
2189 * 0 = playing
2190 * 1 = paused
2191 */
2192 int mode;
2193} xine_pvr_pause_t;
2194
2195#endif
2196
2197/* event XINE_EVENT_DROPPED_FRAMES is generated if libxine detects a
2198 * high number of dropped frames (above configured thresholds). it can
2199 * be used by the front end to warn about performance problems.
2200 */
2201 typedef struct {
2202 /* these values are given for 1000 frames delivered */
2203 /* (that is, divide by 10 to get percentages) */
2204 int skipped_frames;
2205 int skipped_threshold;
2206 int discarded_frames;
2207 int discarded_threshold;
2208} xine_dropped_frames_t;
2209
2210
2211/*
2212 * Defined message types for XINE_EVENT_UI_MESSAGE
2213 * This is the mechanism to report async errors from engine.
2214 *
2215 * If frontend knows about the XINE_MSG_xxx type it may safely
2216 * ignore the 'explanation' field and provide its own custom
2217 * dialogue to the 'parameters'.
2218 *
2219 * right column specifies the usual parameters.
2220 */
2221
2222#define XINE_MSG_NO_ERROR 0 /* (messages to UI) */
2223#define XINE_MSG_GENERAL_WARNING 1 /* (warning message) */
2224#define XINE_MSG_UNKNOWN_HOST 2 /* (host name) */
2225#define XINE_MSG_UNKNOWN_DEVICE 3 /* (device name) */
2226#define XINE_MSG_NETWORK_UNREACHABLE 4 /* none */
2227#define XINE_MSG_CONNECTION_REFUSED 5 /* (host name) */
2228#define XINE_MSG_FILE_NOT_FOUND 6 /* (file name or mrl) */
2229#define XINE_MSG_READ_ERROR 7 /* (device/file/mrl) */
2230#define XINE_MSG_LIBRARY_LOAD_ERROR 8 /* (library/decoder) */
2231#define XINE_MSG_ENCRYPTED_SOURCE 9 /* none */
2232#define XINE_MSG_SECURITY 10 /* (security message) */
2233#define XINE_MSG_AUDIO_OUT_UNAVAILABLE 11 /* none */
2234#define XINE_MSG_PERMISSION_ERROR 12 /* (file name or mrl) */
2235#define XINE_MSG_FILE_EMPTY 13 /* file is empty */
2236#define XINE_MSG_AUTHENTICATION_NEEDED 14 /* (mrl, likely http) */
2237#define XINE_MSG_RECORDING_DONE 15 /* just what it says */
2238
2239/* opaque xine_event_queue_t */
2240 typedef struct xine_event_queue_s xine_event_queue_t;
2241
2242/*
2243 * register a new event queue
2244 *
2245 * you have to receive messages from this queue regularly
2246 *
2247 * use xine_event_dispose_queue to unregister and free the queue
2248 */
2249 xine_event_queue_t *xine_event_new_queue (xine_stream_t *stream) XINE_PROTECTED;
2250void xine_event_dispose_queue (xine_event_queue_t *queue) XINE_PROTECTED;
2251
2255void xine_event_select (xine_event_queue_t *queue, const int *types) XINE_PROTECTED;
2256
2257/*
2258 * receive events (poll)
2259 *
2260 * use xine_event_free on the events received from these calls
2261 * when they're no longer needed
2262 */
2263/* get first event or NULL when queue is empty. */
2264 xine_event_t *xine_event_get (xine_event_queue_t *queue) XINE_PROTECTED;
2265/* free prev_event if not NULL, then same as xine_event_get (). */
2266 xine_event_t *xine_event_next (xine_event_queue_t *queue, xine_event_t *prev_event) XINE_PROTECTED;
2267/* get first event, wait for it if needed. */
2268 xine_event_t *xine_event_wait (xine_event_queue_t *queue) XINE_PROTECTED;
2269/* free or reuse event. may be NULL. */
2270void xine_event_free (xine_event_t *event) XINE_PROTECTED;
2271
2272/*
2273 * receive events (callback)
2274 *
2275 * a thread is created which will receive all events from
2276 * the specified queue, call your callback on each of them
2277 * and will then free the event when your callback returns
2278 *
2279 * Note: only one listener thread / event queue !
2280 *
2281 * @return 0 on error
2282 */
2283 typedef void (*xine_event_listener_cb_t) (void *user_data,
2284 const xine_event_t *event);
2285int xine_event_create_listener_thread (xine_event_queue_t *queue,
2286 xine_event_listener_cb_t callback,
2287 void *user_data) XINE_PROTECTED;
2288
2289/*
2290 * send an event to all queues
2291 *
2292 * the event will be copied so you can free or reuse
2293 * *event as soon as xine_event_send returns.
2294 */
2295void xine_event_send (xine_stream_t *stream, const xine_event_t *event) XINE_PROTECTED;
2296
2297
2298
2299/*********************************************************************
2300 * OSD (on screen display) *
2301 *********************************************************************/
2302
2303#define XINE_TEXT_PALETTE_SIZE 11
2304
2305#define XINE_OSD_TEXT1 (0 * XINE_TEXT_PALETTE_SIZE)
2306#define XINE_OSD_TEXT2 (1 * XINE_TEXT_PALETTE_SIZE)
2307#define XINE_OSD_TEXT3 (2 * XINE_TEXT_PALETTE_SIZE)
2308#define XINE_OSD_TEXT4 (3 * XINE_TEXT_PALETTE_SIZE)
2309#define XINE_OSD_TEXT5 (4 * XINE_TEXT_PALETTE_SIZE)
2310#define XINE_OSD_TEXT6 (5 * XINE_TEXT_PALETTE_SIZE)
2311#define XINE_OSD_TEXT7 (6 * XINE_TEXT_PALETTE_SIZE)
2312#define XINE_OSD_TEXT8 (7 * XINE_TEXT_PALETTE_SIZE)
2313#define XINE_OSD_TEXT9 (8 * XINE_TEXT_PALETTE_SIZE)
2314#define XINE_OSD_TEXT10 (9 * XINE_TEXT_PALETTE_SIZE)
2315
2316/* white text, black border, transparent background */
2317#define XINE_TEXTPALETTE_WHITE_BLACK_TRANSPARENT 0
2318/* white text, noborder, transparent background */
2319#define XINE_TEXTPALETTE_WHITE_NONE_TRANSPARENT 1
2320/* white text, no border, translucid background */
2321#define XINE_TEXTPALETTE_WHITE_NONE_TRANSLUCID 2
2322/* yellow text, black border, transparent background */
2323#define XINE_TEXTPALETTE_YELLOW_BLACK_TRANSPARENT 3
2324
2325#define XINE_OSD_CAP_FREETYPE2 0x0001 /* freetype2 support compiled in */
2326#define XINE_OSD_CAP_UNSCALED 0x0002 /* unscaled overlays supp. by vo drv */
2327#define XINE_OSD_CAP_CUSTOM_EXTENT 0x0004 /* hardware scaled to match video output window */
2328#define XINE_OSD_CAP_ARGB_LAYER 0x0008 /* supports ARGB true color pixmaps */
2329#define XINE_OSD_CAP_VIDEO_WINDOW 0x0010 /* can scale video to an area within osd extent */
2330
2331 typedef struct xine_osd_s xine_osd_t;
2332
2333 xine_osd_t *xine_osd_new (xine_stream_t *self, int x, int y,
2334 int width, int height) XINE_PROTECTED;
2335uint32_t xine_osd_get_capabilities (xine_osd_t *self) XINE_PROTECTED;
2336void xine_osd_draw_point (xine_osd_t *self, int x, int y, int color) XINE_PROTECTED;
2337
2338void xine_osd_draw_line (xine_osd_t *self, int x1, int y1,
2339 int x2, int y2, int color) XINE_PROTECTED;
2340void xine_osd_draw_rect (xine_osd_t *self, int x1, int y1,
2341 int x2, int y2,
2342 int color, int filled ) XINE_PROTECTED;
2343/* x1 and y1 specifies the upper left corner of the text to be rendered */
2344void xine_osd_draw_text (xine_osd_t *self, int x1, int y1,
2345 const char *text, int color_base) XINE_PROTECTED;
2346void xine_osd_draw_bitmap (xine_osd_t *self, uint8_t *bitmap,
2347 int x1, int y1, int width, int height,
2348 uint8_t *palette_map) XINE_PROTECTED;
2349/* for freetype2 fonts the height is the maximum height for the whole font and not
2350 * only for the specified text */
2351void xine_osd_get_text_size (xine_osd_t *self, const char *text,
2352 int *width, int *height) XINE_PROTECTED;
2353/* with freetype2 support compiled in, you can also specify a font file
2354 as 'fontname' here */
2355int xine_osd_set_font (xine_osd_t *self, const char *fontname,
2356 int size) XINE_PROTECTED;
2357/*
2358 * specifying encoding of texts
2359 * "" ... means current locale encoding (default)
2360 * NULL ... means latin1
2361 */
2362void xine_osd_set_encoding(xine_osd_t *self, const char *encoding) XINE_PROTECTED;
2363/* set position were overlay will be blended */
2364void xine_osd_set_position (xine_osd_t *self, int x, int y) XINE_PROTECTED;
2365void xine_osd_show (xine_osd_t *self, int64_t vpts) XINE_PROTECTED;
2366void xine_osd_show_unscaled (xine_osd_t *self, int64_t vpts) XINE_PROTECTED;
2367void xine_osd_hide (xine_osd_t *self, int64_t vpts) XINE_PROTECTED;
2368/* empty drawing area */
2369void xine_osd_clear (xine_osd_t *self) XINE_PROTECTED;
2370/*
2371 * set on existing text palette
2372 * (-1 to set used specified palette)
2373 *
2374 * color_base specifies the first color index to use for this text
2375 * palette. The OSD palette is then modified starting at this
2376 * color index, up to the size of the text palette.
2377 *
2378 * Use OSD_TEXT1, OSD_TEXT2, ... for some preassigned color indices.
2379 *
2380 * These palettes are not working well with the true type fonts.
2381 * First thing is that these fonts cannot have a border. So you get
2382 * the best results by loading a linearly blending palette from the
2383 * background (at index 0) to the forground color (at index 10).
2384 */
2385void xine_osd_set_text_palette (xine_osd_t *self,
2386 int palette_number,
2387 int color_base ) XINE_PROTECTED;
2388/* get palette (color and transparency) */
2389void xine_osd_get_palette (xine_osd_t *self, uint32_t *color,
2390 uint8_t *trans) XINE_PROTECTED;
2391void xine_osd_set_palette (xine_osd_t *self,
2392 const uint32_t *const color,
2393 const uint8_t *const trans ) XINE_PROTECTED;
2394
2395/*
2396 * Set an ARGB buffer to be blended into video.
2397 * The buffer must stay valid while the OSD is on screen.
2398 * Pass a NULL pointer to safely remove the buffer from
2399 * the OSD layer. Only the dirty area will be
2400 * updated on screen. For convenience the whole
2401 * OSD object will be considered dirty when setting
2402 * a different buffer pointer.
2403 * see also XINE_OSD_CAP_ARGB_LAYER
2404 */
2405void xine_osd_set_argb_buffer(xine_osd_t *self, uint32_t *argb_buffer,
2406 int dirty_x, int dirty_y, int dirty_width, int dirty_height) XINE_PROTECTED;
2407
2408/*
2409 * define extent of reference coordinate system
2410 * for video resolution independent osds.
2411 * see also XINE_OSD_CAP_CUSTOM_EXTENT
2412 */
2413void xine_osd_set_extent(xine_osd_t *self, int extent_width, int extent_height) XINE_PROTECTED;
2414
2415/*
2416 * define area within osd extent to output
2417 * video to while osd is on screen
2418 * see also XINE_OSD_CAP_VIDEO_WINDOW
2419 */
2420void xine_osd_set_video_window(xine_osd_t *self, int window_x, int window_y, int window_width, int window_height) XINE_PROTECTED;
2421
2422/*
2423 * close osd rendering engine
2424 * loaded fonts are unloaded
2425 * osd objects are closed
2426 */
2427void xine_osd_free (xine_osd_t *self) XINE_PROTECTED;
2428
2429#ifdef __cplusplus
2430}
2431#endif
2432
2433#endif
xine_get_next_audio_frame
int xine_get_next_audio_frame(xine_audio_port_t *this_gen, xine_audio_frame_t *frame)
Definition audio_out.c:2361
xine_free_audio_frame
void xine_free_audio_frame(xine_audio_port_t *this_gen, xine_audio_frame_t *frame)
Definition audio_out.c:2437
height
unsigned int height
Definition gfontrle.c:5
width
unsigned int width
Definition gfontrle.c:4
attributes.h
XINE_DEPRECATED
#define XINE_DEPRECATED
Definition attributes.h:87
XINE_PROTECTED
#define XINE_PROTECTED
Definition attributes.h:75
XINE_FORMAT_PRINTF
#define XINE_FORMAT_PRINTF(fmt, var)
Definition attributes.h:129
XINE_WEAK
#define XINE_WEAK
Definition attributes.h:101
xine_new_framegrab_audio_port
xine_audio_port_t * xine_new_framegrab_audio_port(xine_t *this)
Definition load_plugins.c:2761
xine_new_framegrab_video_port
xine_video_port_t * xine_new_framegrab_video_port(xine_t *this)
Definition load_plugins.c:2609
os_types.h
set_parameters
static int set_parameters(xine_post_t *this_gen, const void *param_gen)
Definition stretch.c:235
get_parameters
static int get_parameters(xine_post_t *this_gen, void *param_gen)
Definition stretch.c:246
fb_visual_t
Definition xine.h:1523
fb_visual_t::user_data
void * user_data
Definition xine.h:1533
raw_overlay_t
Definition xine.h:1462
raw_overlay_t::ovl_x
int ovl_x
Definition xine.h:1465
raw_overlay_t::ovl_rgba
uint8_t * ovl_rgba
Definition xine.h:1463
raw_overlay_t::ovl_h
int ovl_h
Definition xine.h:1464
raw_visual_t
Definition xine.h:1472
raw_visual_t::user_data
void * user_data
Definition xine.h:1473
raw_visual_t::supported_formats
int supported_formats
Definition xine.h:1483
x11_rectangle_t
Definition xine.h:1242
x11_rectangle_t::h
int h
Definition xine.h:1245
x11_visual_t
Definition xine.h:1254
x11_visual_t::user_data
void * user_data
Definition xine.h:1263
x11_visual_t::screen
int screen
Definition xine.h:1258
x11_visual_t::d
unsigned long d
Definition xine.h:1261
x11_visual_t::display
void * display
Definition xine.h:1257
xcb_visual_t
Definition xine.h:1354
xcb_visual_t::user_data
void * user_data
Definition xine.h:1363
xcb_visual_t::connection
void * connection
Definition xine.h:1357
xcb_visual_t::window
unsigned int window
Definition xine.h:1361
xcb_visual_t::screen
void * screen
Definition xine.h:1358
xine_audio_level_data_t
Definition xine.h:2031
xine_audio_level_data_t::right
int right
Definition xine.h:2033
xine_audio_level_data_t::mute
int mute
Definition xine.h:2034
xine_audio_level_data_t::left
int left
Definition xine.h:2032
xine_audio_port_s
Definition audio_out.h:172
xine_cfg_entry_s
Definition xine.h:1649
xine_cfg_entry_s::str_default
char * str_default
Definition xine.h:1664
xine_cfg_entry_s::str_value
char * str_value
Definition xine.h:1663
xine_cfg_entry_s::range_min
int range_min
Definition xine.h:1674
xine_cfg_entry_s::help
const char * help
Definition xine.h:1685
xine_cfg_entry_s::enum_values
char ** enum_values
Definition xine.h:1678
xine_cfg_entry_s::exp_level
int exp_level
Definition xine.h:1655
xine_cfg_entry_s::callback
xine_config_cb_t callback
Definition xine.h:1693
xine_cfg_entry_s::type
int type
Definition xine.h:1652
xine_cfg_entry_s::description
const char * description
Definition xine.h:1684
xine_cfg_entry_s::key
const char * key
Definition xine.h:1650
xine_cfg_entry_s::range_max
int range_max
Definition xine.h:1675
xine_cfg_entry_s::unknown_value
char * unknown_value
Definition xine.h:1660
xine_cfg_entry_s::num_default
int num_default
Definition xine.h:1671
xine_cfg_entry_s::num_value
int num_value
Definition xine.h:1670
xine_cfg_entry_s::callback_data
void * callback_data
Definition xine.h:1694
xine_config_entry_translation_t
Definition xine.h:1809
xine_config_entry_translation_t::new_name
const char * new_name
Definition xine.h:1810
xine_current_frame_data_s
Definition xine.h:477
xine_current_frame_data_s::ratio_code
int ratio_code
Definition xine.h:484
xine_current_frame_data_s::img_size
int img_size
Definition xine.h:487
xine_current_frame_data_s::img
uint8_t * img
Definition xine.h:488
xine_current_frame_data_s::width
int width
Definition xine.h:478
xine_current_frame_data_s::crop_top
int crop_top
Definition xine.h:482
xine_current_frame_data_s::format
int format
Definition xine.h:486
xine_current_frame_data_s::crop_right
int crop_right
Definition xine.h:481
xine_current_frame_data_s::crop_left
int crop_left
Definition xine.h:480
xine_current_frame_data_s::height
int height
Definition xine.h:479
xine_current_frame_data_s::crop_bottom
int crop_bottom
Definition xine.h:483
xine_current_frame_data_s::interlaced
int interlaced
Definition xine.h:485
xine_dropped_frames_t
Definition xine.h:2201
xine_dropped_frames_t::skipped_threshold
int skipped_threshold
Definition xine.h:2205
xine_dropped_frames_t::discarded_frames
int discarded_frames
Definition xine.h:2206
xine_dropped_frames_t::discarded_threshold
int discarded_threshold
Definition xine.h:2207
xine_dropped_frames_t::skipped_frames
int skipped_frames
Definition xine.h:2204
xine_event_queue_s
Definition xine_internal.h:107
xine_event_queue_s::stream
xine_stream_t * stream
Definition xine_internal.h:112
xine_event_queue_s::callback
xine_event_listener_cb_t callback
Definition xine_internal.h:115
xine_event_t
Definition xine.h:1954
xine_event_t::data_length
int data_length
Definition xine.h:1958
xine_event_t::stream
xine_stream_t * stream
Definition xine.h:1955
xine_event_t::type
int type
Definition xine.h:1960
xine_event_t::data
void * data
Definition xine.h:1957
xine_format_change_data_t
Definition xine.h:2019
xine_format_change_data_t::aspect
int aspect
Definition xine.h:2024
xine_format_change_data_t::height
int height
Definition xine.h:2021
xine_format_change_data_t::width
int width
Definition xine.h:2020
xine_format_change_data_t::pan_scan
int pan_scan
Definition xine.h:2025
xine_grab_video_frame_s
Definition xine.h:545
xine_grab_video_frame_s::crop_bottom
int crop_bottom
Definition xine.h:563
xine_grab_video_frame_s::width
int width
Definition xine.h:572
xine_grab_video_frame_s::crop_top
int crop_top
Definition xine.h:562
xine_grab_video_frame_s::height
int height
Definition xine.h:572
xine_grab_video_frame_s::dispose
void(* dispose)(xine_grab_video_frame_t *self)
Definition xine.h:555
xine_grab_video_frame_s::img
uint8_t * img
Definition xine.h:573
xine_grab_video_frame_s::vpts
int64_t vpts
Definition xine.h:574
xine_grab_video_frame_s::crop_right
int crop_right
Definition xine.h:561
xine_grab_video_frame_s::grab
int(* grab)(xine_grab_video_frame_t *self)
Definition xine.h:550
xine_grab_video_frame_s::timeout
int timeout
Definition xine.h:576
xine_grab_video_frame_s::crop_left
int crop_left
Definition xine.h:560
xine_grab_video_frame_s::flags
int flags
Definition xine.h:577
xine_health_check_s
Definition xine.h:1611
xine_health_check_s::cdrom_dev
const char * cdrom_dev
Definition xine.h:1612
xine_health_check_s::msg
const char * msg
Definition xine.h:1614
xine_health_check_s::title
const char * title
Definition xine.h:1615
xine_health_check_s::dvd_dev
const char * dvd_dev
Definition xine.h:1613
xine_health_check_s::status
int status
Definition xine.h:1617
xine_health_check_s::explanation
const char * explanation
Definition xine.h:1616
xine_input_data_t
Definition xine.h:1969
xine_input_data_t::button
uint8_t button
Definition xine.h:1971
xine_input_data_t::x
uint16_t x
Definition xine.h:1972
xine_input_data_t::event
xine_event_t event
Definition xine.h:1970
xine_keyframes_entry_t
Definition xine.h:244
xine_keyframes_entry_t::normpos
int normpos
Definition xine.h:246
xine_keyframes_entry_t::msecs
int msecs
Definition xine.h:245
xine_mrl_reference_data_ext_t
Definition xine.h:2095
xine_mrl_reference_data_ext_t::duration
uint32_t duration
Definition xine.h:2097
xine_mrl_reference_data_ext_t::alternative
int alternative
Definition xine.h:2096
xine_mrl_reference_data_t
Definition xine.h:2090
xine_mrl_reference_data_t::alternative
int alternative
Definition xine.h:2091
xine_mrl_s
Definition xine.h:1124
xine_mrl_s::size
off_t size
Definition xine.h:1128
xine_mrl_s::origin
char * origin
Definition xine.h:1125
xine_mrl_s::mrl
char * mrl
Definition xine.h:1126
xine_mrl_s::type
uint32_t type
Definition xine.h:1129
xine_mrl_s::link
char * link
Definition xine.h:1127
xine_nbc_stats_data_t
Definition xine.h:2048
xine_nbc_stats_data_t::v_remaining
int64_t v_remaining
Definition xine.h:2050
xine_nbc_stats_data_t::a_remaining
int64_t a_remaining
Definition xine.h:2054
xine_nbc_stats_data_t::enabled
int enabled
Definition xine.h:2058
xine_nbc_stats_data_t::v_percent
int v_percent
Definition xine.h:2049
xine_nbc_stats_data_t::v_bitrate
int64_t v_bitrate
Definition xine.h:2051
xine_nbc_stats_data_t::buffering
int buffering
Definition xine.h:2057
xine_nbc_stats_data_t::v_in_disc
int v_in_disc
Definition xine.h:2052
xine_nbc_stats_data_t::a_bitrate
int64_t a_bitrate
Definition xine.h:2055
xine_nbc_stats_data_t::a_percent
int a_percent
Definition xine.h:2053
xine_nbc_stats_data_t::a_in_disc
int a_in_disc
Definition xine.h:2056
xine_nbc_stats_data_t::type
int type
Definition xine.h:2059
xine_osd_s
Definition osd.h:78
xine_post_api_descr_t
Definition xine.h:873
xine_post_api_descr_t::parameter
xine_post_api_parameter_t * parameter
Definition xine.h:875
xine_post_api_descr_t::struct_size
int struct_size
Definition xine.h:874
xine_post_api_parameter_t
Definition xine.h:860
xine_post_api_parameter_t::range_max
double range_max
Definition xine.h:867
xine_post_api_parameter_t::readonly
int readonly
Definition xine.h:868
xine_post_api_parameter_t::description
const char * description
Definition xine.h:869
xine_post_api_parameter_t::name
const char * name
Definition xine.h:862
xine_post_api_parameter_t::type
int type
Definition xine.h:861
xine_post_api_parameter_t::range_min
double range_min
Definition xine.h:866
xine_post_api_parameter_t::size
int size
Definition xine.h:863
xine_post_api_parameter_t::offset
int offset
Definition xine.h:864
xine_post_api_parameter_t::enum_values
char ** enum_values
Definition xine.h:865
xine_post_api_t
Definition xine.h:878
xine_post_in_s
Definition xine.h:727
xine_post_in_s::data
void * data
Definition xine.h:734
xine_post_in_s::type
int type
Definition xine.h:737
xine_post_in_s::name
const char * name
Definition xine.h:730
xine_post_out_s
Definition xine.h:741
xine_post_out_s::data
void * data
Definition xine.h:748
xine_post_out_s::name
const char * name
Definition xine.h:744
xine_post_out_s::type
int type
Definition xine.h:762
xine_post_out_s::rewire
int(* rewire)(xine_post_out_t *self, void *data)
Definition xine.h:759
xine_post_s
Definition xine.h:673
xine_post_s::audio_input
xine_audio_port_t ** audio_input
Definition xine.h:679
xine_post_s::type
int type
Definition xine.h:690
xine_post_s::video_input
xine_video_port_t ** video_input
Definition xine.h:685
xine_progress_data_t
Definition xine.h:2040
xine_progress_data_t::percent
int percent
Definition xine.h:2042
xine_progress_data_t::description
const char * description
Definition xine.h:2041
xine_s
Definition xine_internal.h:80
xine_set_mpeg_data_t
Definition xine.h:2138
xine_set_mpeg_data_t::b_frames
int b_frames
Definition xine.h:2146
xine_set_mpeg_data_t::gop_closure
int gop_closure
Definition xine.h:2145
xine_set_mpeg_data_t::gop_size
int gop_size
Definition xine.h:2144
xine_set_mpeg_data_t::bitrate_peak
int bitrate_peak
Definition xine.h:2143
xine_set_mpeg_data_t::bitrate_mean
int bitrate_mean
Definition xine.h:2142
xine_set_mpeg_data_t::bitrate_vbr
int bitrate_vbr
Definition xine.h:2141
xine_set_mpeg_data_t::aspect_ratio
int aspect_ratio
Definition xine.h:2147
xine_set_v4l2_data_t
Definition xine.h:2106
xine_set_v4l2_data_t::colorsubcarrier
uint32_t colorsubcarrier
Definition xine.h:2120
xine_set_v4l2_data_t::framelines
uint32_t framelines
Definition xine.h:2117
xine_set_v4l2_data_t::transmission
uint32_t transmission
Definition xine.h:2112
xine_set_v4l2_data_t::input
int input
Definition xine.h:2108
xine_set_v4l2_data_t::framerate_numerator
uint32_t framerate_numerator
Definition xine.h:2115
xine_set_v4l2_data_t::frame_width
int frame_width
Definition xine.h:2121
xine_set_v4l2_data_t::frame_height
int frame_height
Definition xine.h:2122
xine_set_v4l2_data_t::standard_id
uint64_t standard_id
Definition xine.h:2118
xine_set_v4l2_data_t::framerate_denominator
uint32_t framerate_denominator
Definition xine.h:2116
xine_set_v4l2_data_t::radio
int radio
Definition xine.h:2110
xine_set_v4l2_data_t::channel
int channel
Definition xine.h:2109
xine_set_v4l2_data_t::frequency
uint32_t frequency
Definition xine.h:2111
xine_set_v4l2_data_t::colorstandard
uint32_t colorstandard
Definition xine.h:2119
xine_set_v4l2_data_t::session_id
int32_t session_id
Definition xine.h:2130
xine_spu_button_t
Definition xine.h:2156
xine_spu_button_t::direction
int direction
Definition xine.h:2157
xine_spu_button_t::button
int32_t button
Definition xine.h:2158
xine_stream_s
Definition xine_internal.h:123
xine_ui_data_t
Definition xine.h:1978
xine_ui_data_t::num_buttons
int num_buttons
Definition xine.h:1979
xine_ui_data_t::str_len
int str_len
Definition xine.h:1980
xine_ui_message_data_t
Definition xine.h:1987
xine_ui_message_data_t::explanation
int explanation
Definition xine.h:2000
xine_ui_message_data_t::compatibility
xine_ui_data_t compatibility
Definition xine.h:1992
xine_ui_message_data_t::num_parameters
int num_parameters
Definition xine.h:2003
xine_ui_message_data_t::parameters
int parameters
Definition xine.h:2004
xine_ui_message_data_t::type
int type
Definition xine.h:1995
xine_video_port_s
Definition video_out.h:187
xine_video_port_s::driver
vo_driver_t * driver
Definition video_out.h:247
xine_wayland_visual_t
Definition xine.h:1434
xine_wayland_visual_t::surface
struct wl_surface * surface
Definition xine.h:1437
xine_wayland_visual_t::user_data
void * user_data
Definition xine.h:1439
xine_wayland_visual_t::display
struct wl_display * display
Definition xine.h:1436
aspect_ratio
aspect_ratio
Definition vdpau_h264.c:102
user_data
static void user_data(vdpau_mpeg4_decoder_t *this_gen, uint8_t *buffer, int len)
Definition vdpau_mpeg4.c:695
version.h
xine_get_next_video_frame
int xine_get_next_video_frame(xine_video_port_t *this_gen, xine_video_frame_t *frame)
Definition video_out.c:2685
xine_free_video_frame
void xine_free_video_frame(xine_video_port_t *port, xine_video_frame_t *frame)
Definition video_out.c:2740
name
const char * name
Definition xine.c:1575
type
_xine_arg_type_t type
Definition xine.c:1574
xine_config_get_next_entry
int xine_config_get_next_entry(xine_t *self, xine_cfg_entry_t *entry)
Definition xine_interface.c:257
xine_get_audio_source
xine_post_out_t * xine_get_audio_source(xine_stream_t *stream)
Definition xine_interface.c:1083
xine_get_autoplay_input_plugin_ids
const char *const * xine_get_autoplay_input_plugin_ids(xine_t *self)
Definition load_plugins.c:2423
xine_init
void xine_init(xine_t *self)
Definition xine.c:2894
xine_get_log
char *const * xine_get_log(xine_t *self, int buf)
Definition xine.c:3661
xine_config_register_string
const char * xine_config_register_string(xine_t *self, const char *key, const char *def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data)
Definition xine_interface.c:79
xine_get_video_driver_plugin_description
const char * xine_get_video_driver_plugin_description(xine_t *self, const char *plugin_id)
Definition load_plugins.c:3296
xine_get_current_frame_alloc
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)
Definition xine.c:3423
xine_log_cb_t
void(* xine_log_cb_t)(void *user_data, int section)
Definition xine.h:937
xine_list_spu_plugins
const char *const * xine_list_spu_plugins(xine_t *self)
Definition load_plugins.c:3226
xine_get_side_stream
xine_stream_t * xine_get_side_stream(xine_stream_t *master, int index)
Definition xine.c:1292
xine_event_listener_cb_t
void(* xine_event_listener_cb_t)(void *user_data, const xine_event_t *event)
Definition xine.h:2283
xine_osd_set_encoding
void xine_osd_set_encoding(xine_osd_t *self, const char *encoding)
Definition xine_interface.c:945
xine_get_status
int xine_get_status(xine_stream_t *stream)
Definition xine.c:3101
xine_osd_show_unscaled
void xine_osd_show_unscaled(xine_osd_t *self, int64_t vpts)
Definition xine_interface.c:957
xine_osd_set_argb_buffer
void xine_osd_set_argb_buffer(xine_osd_t *self, uint32_t *argb_buffer, int dirty_x, int dirty_y, int dirty_width, int dirty_height)
Definition xine_interface.c:991
xine_get_audio_lang
int xine_get_audio_lang(xine_stream_t *stream, int channel, char *lang)
Definition xine.c:3572
xine_event_get
xine_event_t * xine_event_get(xine_event_queue_t *queue)
Definition events.c:70
xine_dispose
void xine_dispose(xine_stream_t *stream)
Definition xine.c:2596
xine_osd_set_text_palette
void xine_osd_set_text_palette(xine_osd_t *self, int palette_number, int color_base)
Definition xine_interface.c:977
xine_stream_new
xine_stream_t * xine_stream_new(xine_t *self, xine_audio_port_t *ao, xine_video_port_t *vo)
Definition xine.c:1050
xine_config_register_filename
const char * xine_config_register_filename(xine_t *self, const char *key, const char *def_value, int req_type, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data)
Definition xine_interface.c:99
xine_event_send
void xine_event_send(xine_stream_t *stream, const xine_event_t *event)
Definition events.c:238
xine_get_demux_for_mime_type
char * xine_get_demux_for_mime_type(xine_t *self, const char *mime_type)
Definition load_plugins.c:3475
xine_get_file_extensions
char * xine_get_file_extensions(xine_t *self)
Definition load_plugins.c:3459
xine_config_lookup_num
int xine_config_lookup_num(xine_t *self, const char *key, int def_value)
Definition xine_interface.c:188
xine_osd_draw_text
void xine_osd_draw_text(xine_osd_t *self, int x1, int y1, const char *text, int color_base)
Definition xine_interface.c:933
xine_osd_hide
void xine_osd_hide(xine_osd_t *self, int64_t vpts)
Definition xine_interface.c:961
xine_set_flags
void xine_set_flags(xine_t *, int)
Definition xine.c:2866
xine_open
int xine_open(xine_stream_t *stream, const char *mrl)
Definition xine.c:2129
xine_get_log_names
const char *const * xine_get_log_names(xine_t *self)
Definition xine.c:3602
xine_config_register_bool
int xine_config_register_bool(xine_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data)
Definition xine_interface.c:162
xine_osd_draw_line
void xine_osd_draw_line(xine_osd_t *self, int x1, int y1, int x2, int y2, int color)
Definition xine_interface.c:918
xine_list_demuxer_plugins
const char *const * xine_list_demuxer_plugins(xine_t *self)
Definition load_plugins.c:3218
xine_health_check
xine_health_check_t * xine_health_check(xine_health_check_t *, int check_num)
Definition xine_check.c:504
xine_get_post_plugin_description
const char * xine_get_post_plugin_description(xine_t *self, const char *plugin_id)
Definition load_plugins.c:3297
xine_close
void xine_close(xine_stream_t *stream)
Definition xine.c:941
xine_osd_set_position
void xine_osd_set_position(xine_osd_t *self, int x, int y)
Definition xine_interface.c:949
xine_list_audio_decoder_plugins
const char *const * xine_list_audio_decoder_plugins(xine_t *self)
Definition load_plugins.c:3230
xine_osd_free
void xine_osd_free(xine_osd_t *self)
Definition xine_interface.c:969
xine_event_select
void xine_event_select(xine_event_queue_t *queue, const int *types)
Filter events by type.
Definition events.c:488
xine_get_pos_length
int xine_get_pos_length(xine_stream_t *stream, int *pos_stream, int *pos_time, int *length_time)
Definition xine.c:3216
xine_config_lookup_entry
int xine_config_lookup_entry(xine_t *self, const char *key, xine_cfg_entry_t *entry)
Definition xine_interface.c:283
xine_post_output
xine_post_out_t * xine_post_output(xine_post_t *self, const char *name)
Definition xine_interface.c:1027
xine_get_browsable_input_plugin_ids
const char *const * xine_get_browsable_input_plugin_ids(xine_t *self)
Definition load_plugins.c:2472
xine_post_init
xine_post_t * xine_post_init(xine_t *xine, const char *name, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target)
Definition load_plugins.c:3299
xine_post_wire
int xine_post_wire(xine_post_out_t *source, xine_post_in_t *target)
Definition xine_interface.c:1039
xine_get_current_frame
int xine_get_current_frame(xine_stream_t *stream, int *width, int *height, int *ratio_code, int *format, uint8_t *img)
Definition xine.c:3462
xine_post_list_inputs
const char *const * xine_post_list_inputs(xine_post_t *self)
Definition xine_interface.c:1005
xine_osd_draw_point
void xine_osd_draw_point(xine_osd_t *self, int x, int y, int color)
Definition xine_interface.c:914
xine_get_spu_lang
int xine_get_spu_lang(xine_stream_t *stream, int channel, char *lang)
Definition xine.c:3534
xine_get_audio_plugin_description
const char * xine_get_audio_plugin_description(xine_t *self, const char *plugin_id)
Definition load_plugins.c:3293
xine_new
xine_t * xine_new(void)
Definition xine.c:2738
xine_engine_set_param
void xine_engine_set_param(xine_t *self, int param, int value)
Definition xine.c:2801
xine_osd_clear
void xine_osd_clear(xine_osd_t *self)
Definition xine_interface.c:965
xine_get_param
int xine_get_param(xine_stream_t *stream, int param)
Definition xine_interface.c:579
xine_event_dispose_queue
void xine_event_dispose_queue(xine_event_queue_t *queue)
Definition events.c:526
xine_list_video_output_plugins
const char *const * xine_list_video_output_plugins(xine_t *self)
Definition load_plugins.c:2654
xine_config_register_enum
int xine_config_register_enum(xine_t *self, const char *key, int def_value, char **values, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data)
Definition xine_interface.c:131
xine_config_lookup_string
char * xine_config_lookup_string(xine_t *self, const char *key)
Definition xine_interface.c:192
xine_close_audio_driver
void xine_close_audio_driver(xine_t *self, xine_audio_port_t *driver)
Definition load_plugins.c:2804
xine_event_new_queue
xine_event_queue_t * xine_event_new_queue(xine_stream_t *stream)
Definition events.c:426
xine_config_reset
void xine_config_reset(xine_t *self)
Definition xine_interface.c:327
xine_plugins_garbage_collector
void xine_plugins_garbage_collector(xine_t *self)
Definition load_plugins.c:3116
xine_close_video_driver
void xine_close_video_driver(xine_t *self, xine_video_port_t *driver)
Definition load_plugins.c:2812
xine_get_video_plugin_description
const char * xine_get_video_plugin_description(xine_t *self, const char *plugin_id)
Definition load_plugins.c:3294
xine_config_register_range
int xine_config_register_range(xine_t *self, const char *key, int def_value, int min, int max, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data)
Definition xine_interface.c:115
xine_check_version
int xine_check_version(int major, int minor, int sub)
Definition xine_interface.c:65
xine_keyframes_get
xine_keyframes_entry_t * xine_keyframes_get(xine_stream_t *stream, int *size)
Get a private stream keyframe seek index copy, free () it when done.
Definition xine.c:4005
xine_osd_get_text_size
void xine_osd_get_text_size(xine_osd_t *self, const char *text, int *width, int *height)
Definition xine_interface.c:937
xine_get_input_plugin_description
const char * xine_get_input_plugin_description(xine_t *self, const char *plugin_id)
Definition load_plugins.c:3290
xine_post_wire_video_port
int xine_post_wire_video_port(xine_post_out_t *source, xine_video_port_t *vo)
Definition xine_interface.c:1052
xine_query_stream_info
int xine_query_stream_info(xine_stream_t *stream, char *sbuf, size_t sblen, int *strings, int *ints)
query multiple stream props, thread safe and consistently.
Definition xine_interface.c:825
xine_engine_get_param
int xine_engine_get_param(xine_t *self, int param)
Definition xine.c:2817
xine_osd_get_capabilities
uint32_t xine_osd_get_capabilities(xine_osd_t *self)
Definition xine_interface.c:910
xine_config_register_num
int xine_config_register_num(xine_t *self, const char *key, int def_value, const char *description, const char *help, int exp_level, xine_config_cb_t changed_cb, void *cb_data)
Definition xine_interface.c:147
xine_post_wire_audio_port
int xine_post_wire_audio_port(xine_post_out_t *source, xine_audio_port_t *ao)
Definition xine_interface.c:1065
xine_keyframes_find
int xine_keyframes_find(xine_stream_t *stream, xine_keyframes_entry_t *pos, int offs)
Query stream keyframe seek index.
Definition xine.c:3877
xine_get_error
int xine_get_error(xine_stream_t *stream)
Definition xine.c:3678
xine_osd_set_extent
void xine_osd_set_extent(xine_osd_t *self, int extent_width, int extent_height)
Definition xine_interface.c:996
xine_osd_get_palette
void xine_osd_get_palette(xine_osd_t *self, uint32_t *color, uint8_t *trans)
Definition xine_interface.c:981
xine_get_autoplay_mrls
const char *const * xine_get_autoplay_mrls(xine_t *self, const char *plugin_id, int *num_mrls)
Definition load_plugins.c:2847
xine_list_video_output_plugins_typed
const char *const * xine_list_video_output_plugins_typed(xine_t *self, uint64_t typemask)
Definition load_plugins.c:2658
xine_config_update_entry
void xine_config_update_entry(xine_t *self, const xine_cfg_entry_t *entry)
Definition xine_interface.c:305
xine_config_free_string
void xine_config_free_string(xine_t *self, char **value)
Definition xine_interface.c:196
xine_vlog
void xine_vlog(xine_t *self, int buf, const char *format, va_list args)
Definition xine.c:3649
xine_register_log_cb
void xine_register_log_cb(xine_t *self, xine_log_cb_t cb, void *user_data)
Definition xine.c:3672
xine_list_post_plugins_typed
const char *const * xine_list_post_plugins_typed(xine_t *xine, uint32_t type)
Definition load_plugins.c:3242
xine_list_video_decoder_plugins
const char *const * xine_list_video_decoder_plugins(xine_t *self)
Definition load_plugins.c:3234
xine_osd_set_font
int xine_osd_set_font(xine_osd_t *self, const char *fontname, int size)
Definition xine_interface.c:941
xine_config_save
void xine_config_save(xine_t *self, const char *cfg_filename)
Definition configfile.c:1692
xine_get_mime_types
char * xine_get_mime_types(xine_t *self)
Definition load_plugins.c:3466
xine_get_stream_info
uint32_t xine_get_stream_info(xine_stream_t *stream, int info)
Definition xine_interface.c:755
xine_event_free
void xine_event_free(xine_event_t *event)
Definition events.c:219
xine_exit
void xine_exit(xine_t *self)
Definition xine.c:2653
xine_set_param
void xine_set_param(xine_stream_t *stream, int param, int value)
Definition xine_interface.c:372
xine_eject
int xine_eject(xine_stream_t *stream)
Definition xine.c:2528
xine_log
void xine_log(xine_t *self, int buf, const char *format,...)
Definition xine.c:3627
xine_get_video_source
xine_post_out_t * xine_get_video_source(xine_stream_t *stream)
Definition xine_interface.c:1078
xine_config_unregister_callbacks
int xine_config_unregister_callbacks(xine_t *self, const char *key, xine_config_cb_t changed_cb, void *cb_data, size_t cb_data_size)
Definition xine_interface.c:176
xine_post_input
xine_post_in_t * xine_post_input(xine_post_t *self, const char *name)
Definition xine_interface.c:1015
xine_osd_draw_bitmap
void xine_osd_draw_bitmap(xine_osd_t *self, uint8_t *bitmap, int x1, int y1, int width, int height, uint8_t *palette_map)
Definition xine_interface.c:985
xine_get_current_frame_s
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)
Definition xine.c:3442
xine_get_version
void xine_get_version(int *major, int *minor, int *sub)
Definition xine_interface.c:59
xine_open_video_driver
xine_video_port_t * xine_open_video_driver(xine_t *self, const char *id, int visual, const void *data)
Definition load_plugins.c:2589
xine_get_browse_mrls
xine_mrl_t ** xine_get_browse_mrls(xine_t *self, const char *plugin_id, const char *start_mrl, int *num_mrls)
Definition load_plugins.c:2871
xine_get_audio_driver_plugin_description
const char * xine_get_audio_driver_plugin_description(xine_t *self, const char *plugin_id)
Definition load_plugins.c:3295
xine_open_audio_driver
xine_audio_port_t * xine_open_audio_driver(xine_t *self, const char *id, const void *data)
Definition load_plugins.c:2709
xine_config_cb_t
void(* xine_config_cb_t)(void *user_data, xine_cfg_entry_t *entry)
Definition xine.h:1647
xine_list_audio_output_plugins
const char *const * xine_list_audio_output_plugins(xine_t *self)
Definition load_plugins.c:2650
xine_event_wait
xine_event_t * xine_event_wait(xine_event_queue_t *queue)
Definition events.c:185
xine_get_current_frame_data
int xine_get_current_frame_data(xine_stream_t *stream, xine_current_frame_data_t *data, int flags)
Definition xine.c:3416
xine_get_version_string
const char * xine_get_version_string(void)
Definition xine_interface.c:51
xine_post_list_outputs
const char *const * xine_post_list_outputs(xine_post_t *self)
Definition xine_interface.c:1010
xine_get_demux_plugin_description
const char * xine_get_demux_plugin_description(xine_t *self, const char *plugin_id)
Definition load_plugins.c:3291
xine_stream_master_slave
int xine_stream_master_slave(xine_stream_t *master, xine_stream_t *slave, int affection)
Definition xine.c:3684
xine_osd_new
xine_osd_t * xine_osd_new(xine_stream_t *self, int x, int y, int width, int height)
Definition xine_interface.c:903
xine_new_grab_video_frame
xine_grab_video_frame_t * xine_new_grab_video_frame(xine_stream_t *stream)
Definition xine.c:3479
xine_list_post_plugins
const char *const * xine_list_post_plugins(xine_t *xine)
Definition load_plugins.c:3238
xine_get_spu_plugin_description
const char * xine_get_spu_plugin_description(xine_t *self, const char *plugin_id)
Definition load_plugins.c:3292
xine_port_send_gui_data
int xine_port_send_gui_data(xine_video_port_t *vo, int type, void *data)
Definition xine_interface.c:348
xine_osd_set_video_window
void xine_osd_set_video_window(xine_osd_t *self, int window_x, int window_y, int window_width, int window_height)
Definition xine_interface.c:1000
xine_event_next
xine_event_t * xine_event_next(xine_event_queue_t *queue, xine_event_t *prev_event)
Definition events.c:96
xine_get_meta_info
const char * xine_get_meta_info(xine_stream_t *stream, int info)
Definition xine_interface.c:821
xine_config_get_first_entry
int xine_config_get_first_entry(xine_t *self, xine_cfg_entry_t *entry)
Definition xine_interface.c:236
xine_get_log_section_count
int xine_get_log_section_count(xine_t *self)
Definition xine.c:3597
xine_config_load
void xine_config_load(xine_t *self, const char *cfg_filename)
Definition configfile.c:1549
xine_event_create_listener_thread
int xine_event_create_listener_thread(xine_event_queue_t *queue, xine_event_listener_cb_t callback, void *user_data)
Definition events.c:667
xine_config_set_translation_user
void xine_config_set_translation_user(const xine_config_entry_translation_t *)
Definition configfile.c:1541
xine_osd_set_palette
void xine_osd_set_palette(xine_osd_t *self, const uint32_t *const color, const uint8_t *const trans)
Definition xine_interface.c:973
xine_post_dispose
void xine_post_dispose(xine_t *xine, xine_post_t *self)
Definition load_plugins.c:3376
xine_osd_show
void xine_osd_show(xine_osd_t *self, int64_t vpts)
Definition xine_interface.c:953
xine_get_current_vpts
int64_t xine_get_current_vpts(xine_stream_t *stream)
Definition xine_interface.c:1181
xine_stop
void xine_stop(xine_stream_t *stream)
Definition xine.c:806
xine_list_input_plugins
const char *const * xine_list_input_plugins(xine_t *self)
Definition load_plugins.c:3222
xine_osd_draw_rect
void xine_osd_draw_rect(xine_osd_t *self, int x1, int y1, int x2, int y2, int color, int filled)
Definition xine_interface.c:922
xine_play
int xine_play(xine_stream_t *stream, int start_pos, int start_time)
Definition xine.c:2503
mode
enable disable number of frames of telecine pattern sync required before mode change make frames evenly spaced for film mode(24 fps)" ) PARAM_ITEM( POST_PARAM_TYPE_BOOL
key
char key[16]
Definition xine_speex_decoder.c:94