initial import
[ICEs.git] / 137376 / ice.ii.4
1 struct timeval {
2 long int tv_sec;
3 long int tv_usec;
4 };
5 typedef struct {
6 long int fds_bits[1024 / (8 * sizeof(long int))];
7 } fd_set;
8 struct __sched_param {
9 int __sched_priority;
10 };
11 typedef struct __pthread_attr_s {
12 int __detachstate;
13 int __schedpolicy;
14 struct __sched_param __schedparam;
15 int __inheritsched;
16 int __scope;
17 unsigned int __guardsize;
18 int __stackaddr_set;
19 void *__stackaddr;
20 unsigned int __stacksize;
21 } pthread_attr_t;
22 typedef struct {
23 union {
24 unsigned int __wch;
25 char __wchb[4];
26 } __value;
27 } __mbstate_t;
28 typedef struct {
29 } _G_fpos_t;
30 typedef struct xine_s xine_t;
31 typedef struct xine_stream_s xine_stream_t;
32 typedef struct xine_audio_port_s xine_audio_port_t;
33 typedef struct xine_video_port_s xine_video_port_t;
34 typedef xine_audio_port_t xine_ao_driver_t;
35 typedef xine_video_port_t xine_vo_driver_t;
36 const char *xine_get_version_string(void);
37 void xine_get_version(int *major, int *minor, int *sub);
38 int xine_check_version(int major, int minor, int sub);
39 xine_t *xine_new(void);
40 void xine_init(xine_t * self);
41 xine_audio_port_t *xine_open_audio_driver(xine_t * self,
42 const char
43 *id,
44 void *data);
45 xine_video_port_t *xine_open_video_driver(xine_t * self,
46 const char
47 *id,
48 int visual,
49 void *data);
50 void xine_close_audio_driver(xine_t * self,
51 xine_audio_port_t *
52 driver);
53 void xine_close_video_driver(xine_t * self,
54 xine_video_port_t *
55 driver);
56 void xine_exit(xine_t * self);
57 xine_stream_t *xine_stream_new(xine_t * self,
58 xine_audio_port_t * ao,
59 xine_video_port_t * vo);
60 int xine_stream_master_slave(xine_stream_t * master,
61 xine_stream_t * slave,
62 int affection);
63 int xine_open(xine_stream_t * stream, const char *mrl);
64 int xine_play(xine_stream_t * stream, int start_pos,
65 int start_time);
66 int xine_trick_mode(xine_stream_t * stream, int mode,
67 int value);
68 void xine_stop(xine_stream_t * stream);
69 void xine_close(xine_stream_t * stream);
70 int xine_eject(xine_stream_t * stream);
71 void xine_dispose(xine_stream_t * stream);
72 void xine_engine_set_param(xine_t * self, int param,
73 int value);
74 int xine_engine_get_param(xine_t * self, int param);
75 void xine_set_param(xine_stream_t * stream, int param,
76 int value);
77 int xine_get_param(xine_stream_t * stream, int param);
78 int xine_get_current_frame(xine_stream_t * stream,
79 int *width, int *height,
80 int *ratio_code, int *format,
81 unsigned char * img);
82 long long xine_get_current_vpts(xine_stream_t * stream);
83 typedef struct xine_post_s xine_post_t;
84 struct xine_post_s {
85 xine_audio_port_t **audio_input;
86 xine_video_port_t **video_input;
87 int type;
88 };
89 xine_post_t *xine_post_init(xine_t * xine,
90 const char *name,
91 int inputs,
92 xine_audio_port_t **
93 audio_target,
94 xine_video_port_t **
95 video_target);
96 const char *const *xine_list_post_plugins(xine_t *
97 xine);
98 const char *const *xine_list_post_plugins_typed(xine_t *
99 xine,
100 int
101 type);
102 typedef struct xine_post_in_s xine_post_in_t;
103 typedef struct xine_post_out_s xine_post_out_t;
104 struct xine_post_in_s {
105 const char *name;
106 int type;
107 void *data;
108 };
109 struct xine_post_out_s {
110 const char *name;
111 int type;
112 void *data;
113 int (*rewire) (xine_post_out_t * self,
114 void *data);
115 };
116 const char *const *xine_post_list_inputs(xine_post_t *
117 self);
118 const char *const *xine_post_list_outputs(xine_post_t *
119 self);
120 xine_post_in_t *xine_post_input(xine_post_t * self,
121 const char *name);
122 xine_post_out_t *xine_post_output(xine_post_t * self,
123 const char *name);
124 int xine_post_wire(xine_post_out_t * source,
125 xine_post_in_t * target);
126 int xine_post_wire_video_port(xine_post_out_t * source,
127 xine_video_port_t * vo);
128 int xine_post_wire_audio_port(xine_post_out_t * source,
129 xine_audio_port_t * ao);
130 xine_post_out_t *xine_get_video_source(xine_stream_t *
131 stream);
132 xine_post_out_t *xine_get_audio_source(xine_stream_t *
133 stream);
134 void xine_post_dispose(xine_t * xine,
135 xine_post_t * self);
136 typedef struct {
137 int type;
138 char *name;
139 int size;
140 int offset;
141 char **enum_values;
142 double range_min;
143 double range_max;
144 int readonly;
145 char *description;
146 } xine_post_api_parameter_t;
147 typedef struct {
148 int struct_size;
149 xine_post_api_parameter_t *parameter;
150 } xine_post_api_descr_t;
151 typedef struct {
152 int (*set_parameters) (xine_post_t * self,
153 void *params);
154 int (*get_parameters) (xine_post_t * self,
155 void *params);
156 xine_post_api_descr_t
157 *(*get_param_descr) (void);
158 char *(*get_help) (void);
159 } xine_post_api_t;
160 int xine_get_log_section_count(xine_t * self);
161 const char *const *xine_get_log_names(xine_t * self);
162 void xine_log(xine_t * self, int buf,
163 const char *format, ...)
164 __attribute__ ((__format__(printf, 3, 4)));
165 const char *const *xine_get_log(xine_t * self, int buf);
166 typedef void (*xine_log_cb_t) (void *user_data,
167 int section);
168 void xine_register_log_cb(xine_t * self,
169 xine_log_cb_t cb,
170 void *user_data);
171 int xine_get_error(xine_stream_t * stream);
172 int xine_get_status(xine_stream_t * stream);
173 int xine_get_audio_lang(xine_stream_t * stream,
174 int channel, char *lang);
175 int xine_get_spu_lang(xine_stream_t * stream,
176 int channel, char *lang);
177 int xine_get_pos_length(xine_stream_t * stream,
178 int *pos_stream, int *pos_time,
179 int *length_time);
180 unsigned int xine_get_stream_info(xine_stream_t * stream,
181 int info);
182 const char *xine_get_meta_info(xine_stream_t * stream,
183 int info);
184 typedef struct {
185 char *origin;
186 char *mrl;
187 char *link;
188 unsigned int type;
189 long int size;
190 } xine_mrl_t;
191 const char *const
192 *xine_get_browsable_input_plugin_ids(xine_t * self);
193 xine_mrl_t **xine_get_browse_mrls(xine_t * self,
194 const char *plugin_id,
195 const char *start_mrl,
196 int *num_mrls);
197 const char *const
198 *xine_get_autoplay_input_plugin_ids(xine_t * self);
199 char **xine_get_autoplay_mrls(xine_t * self,
200 const char *plugin_id,
201 int *num_mrls);
202 char *xine_get_file_extensions(xine_t * self);
203 char *xine_get_mime_types(xine_t * self);
204 char *xine_get_demux_for_mime_type(xine_t * self,
205 const char
206 *mime_type);
207 const char *xine_get_input_plugin_description(xine_t *
208 self,
209 const char
210 *plugin_id);
211 const char *xine_get_demux_plugin_description(xine_t *
212 self,
213 const char
214 *plugin_id);
215 const char *xine_get_spu_plugin_description(xine_t *
216 self,
217 const char
218 *plugin_id);
219 const char *xine_get_audio_plugin_description(xine_t *
220 self,
221 const char
222 *plugin_id);
223 const char *xine_get_video_plugin_description(xine_t *
224 self,
225 const char
226 *plugin_id);
227 const char
228 *xine_get_audio_driver_plugin_description(xine_t *
229 self,
230 const char
231 *plugin_id);
232 const char
233 *xine_get_video_driver_plugin_description(xine_t *
234 self,
235 const char
236 *plugin_id);
237 const char *xine_get_post_plugin_description(xine_t *
238 self,
239 const char
240 *plugin_id);
241 const char *const *xine_list_audio_output_plugins(xine_t
242 *
243 self);
244 const char *const *xine_list_video_output_plugins(xine_t
245 *
246 self);
247 const char *const *xine_list_demuxer_plugins(xine_t *
248 self);
249 const char *const *xine_list_input_plugins(xine_t *
250 self);
251 const char *const *xine_list_spu_plugins(xine_t * self);
252 const char *const
253 *xine_list_audio_decoder_plugins(xine_t * self);
254 const char *const
255 *xine_list_video_decoder_plugins(xine_t * self);
256 void xine_plugins_garbage_collector(xine_t * self);
257 int xine_gui_send_vo_data(xine_stream_t * self,
258 int type, void *data);
259 int xine_port_send_gui_data(xine_video_port_t * vo,
260 int type, void *data);
261 typedef struct {
262 int x, y, w, h;
263 } x11_rectangle_t;
264 typedef struct {
265 void *display;
266 int screen;
267 unsigned long d;
268 void *user_data;
269 void (*dest_size_cb) (void *user_data,
270 int video_width,
271 int video_height,
272 double video_pixel_aspect,
273 int *dest_width,
274 int *dest_height,
275 double
276 *dest_pixel_aspect);
277 void (*frame_output_cb) (void *user_data,
278 int video_width,
279 int video_height,
280 double
281 video_pixel_aspect,
282 int *dest_x,
283 int *dest_y,
284 int *dest_width,
285 int *dest_height,
286 double
287 *dest_pixel_aspect,
288 int *win_x,
289 int *win_y);
290 } x11_visual_t;
291 typedef struct {
292 void (*frame_output_cb) (void *user_data,
293 int video_width,
294 int video_height,
295 double
296 video_pixel_aspect,
297 int *dest_x,
298 int *dest_y,
299 int *dest_width,
300 int *dest_height,
301 double
302 *dest_pixel_aspect,
303 int *win_x,
304 int *win_y);
305 void *user_data;
306 } fb_visual_t;
307 struct xine_health_check_s {
308 int status;
309 const char *cdrom_dev;
310 const char *dvd_dev;
311 char *msg;
312 char *title;
313 char *explanation;
314 };
315 typedef struct xine_health_check_s xine_health_check_t;
316 xine_health_check_t
317 *xine_health_check(xine_health_check_t *,
318 int check_num);
319 typedef struct xine_cfg_entry_s xine_cfg_entry_t;
320 typedef void (*xine_config_cb_t) (void *user_data,
321 xine_cfg_entry_t *
322 entry);
323 struct xine_cfg_entry_s {
324 const char *key;
325 int type;
326 char *unknown_value;
327 char *str_value;
328 char *str_default;
329 char *str_sticky;
330 int num_value;
331 int num_default;
332 int range_min;
333 int range_max;
334 char **enum_values;
335 const char *description;
336 const char *help;
337 int exp_level;
338 xine_config_cb_t callback;
339 void *callback_data;
340 };
341 const char *xine_config_register_string(xine_t * self,
342 const char *key,
343 const char
344 *def_value,
345 const char
346 *description,
347 const char
348 *help,
349 int exp_level,
350 xine_config_cb_t
351 changed_cb,
352 void *cb_data);
353 int xine_config_register_range(xine_t * self,
354 const char *key,
355 int def_value, int min,
356 int max,
357 const char *description,
358 const char *help,
359 int exp_level,
360 xine_config_cb_t
361 changed_cb,
362 void *cb_data);
363 int xine_config_register_enum(xine_t * self,
364 const char *key,
365 int def_value,
366 char **values,
367 const char *description,
368 const char *help,
369 int exp_level,
370 xine_config_cb_t
371 changed_cb,
372 void *cb_data);
373 int xine_config_register_num(xine_t * self,
374 const char *key,
375 int def_value,
376 const char *description,
377 const char *help,
378 int exp_level,
379 xine_config_cb_t
380 changed_cb, void *cb_data);
381 int xine_config_register_bool(xine_t * self,
382 const char *key,
383 int def_value,
384 const char *description,
385 const char *help,
386 int exp_level,
387 xine_config_cb_t
388 changed_cb,
389 void *cb_data);
390 int xine_config_get_first_entry(xine_t * self,
391 xine_cfg_entry_t *
392 entry);
393 int xine_config_get_next_entry(xine_t * self,
394 xine_cfg_entry_t *
395 entry);
396 int xine_config_lookup_entry(xine_t * self,
397 const char *key,
398 xine_cfg_entry_t * entry);
399 void xine_config_update_entry(xine_t * self,
400 const xine_cfg_entry_t *
401 entry);
402 void xine_config_load(xine_t * self,
403 const char *cfg_filename);
404 void xine_config_save(xine_t * self,
405 const char *cfg_filename);
406 void xine_config_reset(xine_t * self);
407 typedef struct {
408 int type;
409 xine_stream_t *stream;
410 void *data;
411 int data_length;
412 struct timeval tv;
413 } xine_event_t;
414 typedef struct {
415 xine_event_t event;
416 unsigned char button;
417 unsigned short int x, y;
418 } xine_input_data_t;
419 typedef struct {
420 int num_buttons;
421 int str_len;
422 char str[256];
423 } xine_ui_data_t;
424 typedef struct {
425 xine_ui_data_t compatibility;
426 int type;
427 int explanation;
428 int num_parameters;
429 int parameters;
430 char messages[1];
431 } xine_ui_message_data_t;
432 typedef struct {
433 int width;
434 int height;
435 int aspect;
436 int pan_scan;
437 } xine_format_change_data_t;
438 typedef struct {
439 int left;
440 int right;
441 int mute;
442 } xine_audio_level_data_t;
443 typedef struct {
444 const char *description;
445 int percent;
446 } xine_progress_data_t;
447 typedef struct {
448 int alternative;
449 char mrl[1];
450 } xine_mrl_reference_data_t;
451 typedef struct {
452 int alternative;
453 unsigned int start_time, duration;
454 unsigned int spare[20];
455 const char mrl[1];
456 } xine_mrl_reference_data_ext_t;
457 typedef struct {
458 int input;
459 int channel;
460 int radio;
461 unsigned int frequency;
462 unsigned int transmission;
463 unsigned int framerate_numerator;
464 unsigned int framerate_denominator;
465 unsigned int framelines;
466 unsigned long long standard_id;
467 unsigned int colorstandard;
468 unsigned int colorsubcarrier;
469 int frame_width;
470 int frame_height;
471 unsigned int spare[20];
472 unsigned int session_id;
473 } xine_set_v4l2_data_t;
474 typedef struct {
475 int bitrate_vbr;
476 int bitrate_mean;
477 int bitrate_peak;
478 int gop_size;
479 int gop_closure;
480 int b_frames;
481 int aspect_ratio;
482 unsigned int spare[20];
483 } xine_set_mpeg_data_t;
484 typedef struct {
485 int direction;
486 unsigned int button;
487 } xine_spu_button_t;
488 typedef struct {
489 int skipped_frames;
490 int skipped_threshold;
491 int discarded_frames;
492 int discarded_threshold;
493 } xine_dropped_frames_t;
494 typedef struct xine_event_queue_s xine_event_queue_t;
495 xine_event_queue_t *xine_event_new_queue(xine_stream_t *
496 stream);
497 void xine_event_dispose_queue(xine_event_queue_t *
498 queue);
499 xine_event_t *xine_event_get(xine_event_queue_t *
500 queue);
501 xine_event_t *xine_event_wait(xine_event_queue_t *
502 queue);
503 void xine_event_free(xine_event_t * event);
504 typedef void (*xine_event_listener_cb_t) (void
505 *user_data,
506 const
507 xine_event_t *
508 event);
509 void xine_event_create_listener_thread
510 (xine_event_queue_t * queue,
511 xine_event_listener_cb_t callback,
512 void *user_data);
513 void xine_event_send(xine_stream_t * stream,
514 const xine_event_t * event);
515 typedef struct xine_osd_s xine_osd_t;
516 xine_osd_t *xine_osd_new(xine_stream_t * self, int x,
517 int y, int width, int height);
518 unsigned int xine_osd_get_capabilities(xine_osd_t * self);
519 void xine_osd_draw_point(xine_osd_t * self, int x,
520 int y, int color);
521 void xine_osd_draw_line(xine_osd_t * self, int x1,
522 int y1, int x2, int y2,
523 int color);
524 void xine_osd_draw_rect(xine_osd_t * self, int x1,
525 int y1, int x2, int y2,
526 int color, int filled);
527 void xine_osd_draw_text(xine_osd_t * self, int x1,
528 int y1, const char *text,
529 int color_base);
530 void xine_osd_draw_bitmap(xine_osd_t * self,
531 unsigned char * bitmap, int x1,
532 int y1, int width, int height,
533 unsigned char * palette_map);
534 void xine_osd_get_text_size(xine_osd_t * self,
535 const char *text,
536 int *width, int *height);
537 int xine_osd_set_font(xine_osd_t * self,
538 const char *fontname, int size);
539 void xine_osd_set_encoding(xine_osd_t * self,
540 const char *encoding);
541 void xine_osd_set_position(xine_osd_t * self, int x,
542 int y);
543 void xine_osd_show(xine_osd_t * self, long long vpts);
544 void xine_osd_show_unscaled(xine_osd_t * self,
545 long long vpts);
546 void xine_osd_hide(xine_osd_t * self, long long vpts);
547 void xine_osd_clear(xine_osd_t * self);
548 void xine_osd_set_text_palette(xine_osd_t * self,
549 int palette_number,
550 int color_base);
551 void xine_osd_get_palette(xine_osd_t * self,
552 unsigned int * color,
553 unsigned char * trans);
554 void xine_osd_set_palette(xine_osd_t * self,
555 const unsigned int * const color,
556 const unsigned char * const trans);
557 void xine_osd_free(xine_osd_t * self);
558 typedef enum { XINE_TVSYSTEM_PAL =
559 0, XINE_TVSYSTEM_NTSC } xine_tvsystem;
560 int xine_tvmode_init(xine_t * self);
561 int xine_tvmode_use(xine_t * self, int use_tvmode);
562 void xine_tvmode_set_tvsystem(xine_t * self,
563 xine_tvsystem system);
564 int xine_tvmode_switch(xine_t * self, int type,
565 int width, int height,
566 double fps);
567 void xine_tvmode_size(xine_t * self, int *width,
568 int *height, double *pixelratio,
569 double *fps);
570 void xine_tvmode_exit(xine_t * self);
571 class QTime {
572 public:
573 QTime addMSecs();
574 unsigned int ds;
575 };
576 class KXineWidget {
577 QTime getLengthInfo();
578 QTime msToTime();
579 xine_stream_t *m_xineStream;
580 };
581 QTime KXineWidget::getLengthInfo()
582 {
583 int pos, time, length;
584 bool ok = xine_get_pos_length(m_xineStream, &pos, &time, &length);
585 if ((ok) && (length > 0)) {
586 return msToTime();
587 }
588 }
589 QTime KXineWidget::msToTime()
590 {
591 QTime t;
592 t = t.addMSecs();
593 return t;
594 }