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