struct timeval { long int tv_sec; long int tv_usec; }; typedef struct { long int fds_bits[1024 / (8 * sizeof(long int))]; } fd_set; struct __sched_param { int __sched_priority; }; typedef struct __pthread_attr_s { int __detachstate; int __schedpolicy; struct __sched_param __schedparam; int __inheritsched; int __scope; unsigned int __guardsize; int __stackaddr_set; void *__stackaddr; unsigned int __stacksize; } pthread_attr_t; typedef struct { union { unsigned int __wch; char __wchb[4]; } __value; } __mbstate_t; typedef struct { } _G_fpos_t; typedef struct xine_s xine_t; typedef struct xine_stream_s xine_stream_t; typedef struct xine_audio_port_s xine_audio_port_t; typedef struct xine_video_port_s xine_video_port_t; typedef xine_audio_port_t xine_ao_driver_t; typedef xine_video_port_t xine_vo_driver_t; const char *xine_get_version_string(void); void xine_get_version(int *major, int *minor, int *sub); int xine_check_version(int major, int minor, int sub); xine_t *xine_new(void); void xine_init(xine_t * self); xine_audio_port_t *xine_open_audio_driver(xine_t * self, const char *id, void *data); xine_video_port_t *xine_open_video_driver(xine_t * self, const char *id, int visual, void *data); void xine_close_audio_driver(xine_t * self, xine_audio_port_t * driver); void xine_close_video_driver(xine_t * self, xine_video_port_t * driver); void xine_exit(xine_t * self); xine_stream_t *xine_stream_new(xine_t * self, xine_audio_port_t * ao, xine_video_port_t * vo); int xine_stream_master_slave(xine_stream_t * master, xine_stream_t * slave, int affection); int xine_open(xine_stream_t * stream, const char *mrl); int xine_play(xine_stream_t * stream, int start_pos, int start_time); int xine_trick_mode(xine_stream_t * stream, int mode, int value); void xine_stop(xine_stream_t * stream); void xine_close(xine_stream_t * stream); int xine_eject(xine_stream_t * stream); void xine_dispose(xine_stream_t * stream); void xine_engine_set_param(xine_t * self, int param, int value); int xine_engine_get_param(xine_t * self, int param); void xine_set_param(xine_stream_t * stream, int param, int value); int xine_get_param(xine_stream_t * stream, int param); int xine_get_current_frame(xine_stream_t * stream, int *width, int *height, int *ratio_code, int *format, unsigned char * img); long long xine_get_current_vpts(xine_stream_t * stream); typedef struct xine_post_s xine_post_t; struct xine_post_s { xine_audio_port_t **audio_input; xine_video_port_t **video_input; int type; }; 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); const char *const *xine_list_post_plugins(xine_t * xine); const char *const *xine_list_post_plugins_typed(xine_t * xine, int type); typedef struct xine_post_in_s xine_post_in_t; typedef struct xine_post_out_s xine_post_out_t; struct xine_post_in_s { const char *name; int type; void *data; }; struct xine_post_out_s { const char *name; int type; void *data; int (*rewire) (xine_post_out_t * self, void *data); }; const char *const *xine_post_list_inputs(xine_post_t * self); const char *const *xine_post_list_outputs(xine_post_t * self); xine_post_in_t *xine_post_input(xine_post_t * self, const char *name); xine_post_out_t *xine_post_output(xine_post_t * self, const char *name); int xine_post_wire(xine_post_out_t * source, xine_post_in_t * target); int xine_post_wire_video_port(xine_post_out_t * source, xine_video_port_t * vo); int xine_post_wire_audio_port(xine_post_out_t * source, xine_audio_port_t * ao); xine_post_out_t *xine_get_video_source(xine_stream_t * stream); xine_post_out_t *xine_get_audio_source(xine_stream_t * stream); void xine_post_dispose(xine_t * xine, xine_post_t * self); typedef struct { int type; char *name; int size; int offset; char **enum_values; double range_min; double range_max; int readonly; char *description; } xine_post_api_parameter_t; typedef struct { int struct_size; xine_post_api_parameter_t *parameter; } xine_post_api_descr_t; typedef struct { int (*set_parameters) (xine_post_t * self, void *params); int (*get_parameters) (xine_post_t * self, void *params); xine_post_api_descr_t *(*get_param_descr) (void); char *(*get_help) (void); } xine_post_api_t; int xine_get_log_section_count(xine_t * self); const char *const *xine_get_log_names(xine_t * self); void xine_log(xine_t * self, int buf, const char *format, ...) __attribute__ ((__format__(printf, 3, 4))); const char *const *xine_get_log(xine_t * self, int buf); typedef void (*xine_log_cb_t) (void *user_data, int section); void xine_register_log_cb(xine_t * self, xine_log_cb_t cb, void *user_data); int xine_get_error(xine_stream_t * stream); int xine_get_status(xine_stream_t * stream); int xine_get_audio_lang(xine_stream_t * stream, int channel, char *lang); int xine_get_spu_lang(xine_stream_t * stream, int channel, char *lang); int xine_get_pos_length(xine_stream_t * stream, int *pos_stream, int *pos_time, int *length_time); unsigned int xine_get_stream_info(xine_stream_t * stream, int info); const char *xine_get_meta_info(xine_stream_t * stream, int info); typedef struct { char *origin; char *mrl; char *link; unsigned int type; long int size; } xine_mrl_t; const char *const *xine_get_browsable_input_plugin_ids(xine_t * self); xine_mrl_t **xine_get_browse_mrls(xine_t * self, const char *plugin_id, const char *start_mrl, int *num_mrls); const char *const *xine_get_autoplay_input_plugin_ids(xine_t * self); char **xine_get_autoplay_mrls(xine_t * self, const char *plugin_id, int *num_mrls); char *xine_get_file_extensions(xine_t * self); char *xine_get_mime_types(xine_t * self); char *xine_get_demux_for_mime_type(xine_t * self, const char *mime_type); const char *xine_get_input_plugin_description(xine_t * self, const char *plugin_id); const char *xine_get_demux_plugin_description(xine_t * self, const char *plugin_id); const char *xine_get_spu_plugin_description(xine_t * self, const char *plugin_id); const char *xine_get_audio_plugin_description(xine_t * self, const char *plugin_id); const char *xine_get_video_plugin_description(xine_t * self, const char *plugin_id); const char *xine_get_audio_driver_plugin_description(xine_t * self, const char *plugin_id); const char *xine_get_video_driver_plugin_description(xine_t * self, const char *plugin_id); const char *xine_get_post_plugin_description(xine_t * self, const char *plugin_id); const char *const *xine_list_audio_output_plugins(xine_t * self); const char *const *xine_list_video_output_plugins(xine_t * self); const char *const *xine_list_demuxer_plugins(xine_t * self); const char *const *xine_list_input_plugins(xine_t * self); const char *const *xine_list_spu_plugins(xine_t * self); const char *const *xine_list_audio_decoder_plugins(xine_t * self); const char *const *xine_list_video_decoder_plugins(xine_t * self); void xine_plugins_garbage_collector(xine_t * self); int xine_gui_send_vo_data(xine_stream_t * self, int type, void *data); int xine_port_send_gui_data(xine_video_port_t * vo, int type, void *data); typedef struct { int x, y, w, h; } x11_rectangle_t; typedef struct { void *display; int screen; unsigned long d; void *user_data; void (*dest_size_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_width, int *dest_height, double *dest_pixel_aspect); void (*frame_output_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_x, int *dest_y, int *dest_width, int *dest_height, double *dest_pixel_aspect, int *win_x, int *win_y); } x11_visual_t; typedef struct { void (*frame_output_cb) (void *user_data, int video_width, int video_height, double video_pixel_aspect, int *dest_x, int *dest_y, int *dest_width, int *dest_height, double *dest_pixel_aspect, int *win_x, int *win_y); void *user_data; } fb_visual_t; struct xine_health_check_s { int status; const char *cdrom_dev; const char *dvd_dev; char *msg; char *title; char *explanation; }; typedef struct xine_health_check_s xine_health_check_t; xine_health_check_t *xine_health_check(xine_health_check_t *, int check_num); typedef struct xine_cfg_entry_s xine_cfg_entry_t; typedef void (*xine_config_cb_t) (void *user_data, xine_cfg_entry_t * entry); struct xine_cfg_entry_s { const char *key; int type; char *unknown_value; char *str_value; char *str_default; char *str_sticky; int num_value; int num_default; int range_min; int range_max; char **enum_values; const char *description; const char *help; int exp_level; xine_config_cb_t callback; void *callback_data; }; 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); 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); 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); 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); 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); int xine_config_get_first_entry(xine_t * self, xine_cfg_entry_t * entry); int xine_config_get_next_entry(xine_t * self, xine_cfg_entry_t * entry); int xine_config_lookup_entry(xine_t * self, const char *key, xine_cfg_entry_t * entry); void xine_config_update_entry(xine_t * self, const xine_cfg_entry_t * entry); void xine_config_load(xine_t * self, const char *cfg_filename); void xine_config_save(xine_t * self, const char *cfg_filename); void xine_config_reset(xine_t * self); typedef struct { int type; xine_stream_t *stream; void *data; int data_length; struct timeval tv; } xine_event_t; typedef struct { xine_event_t event; unsigned char button; unsigned short int x, y; } xine_input_data_t; typedef struct { int num_buttons; int str_len; char str[256]; } xine_ui_data_t; typedef struct { xine_ui_data_t compatibility; int type; int explanation; int num_parameters; int parameters; char messages[1]; } xine_ui_message_data_t; typedef struct { int width; int height; int aspect; int pan_scan; } xine_format_change_data_t; typedef struct { int left; int right; int mute; } xine_audio_level_data_t; typedef struct { const char *description; int percent; } xine_progress_data_t; typedef struct { int alternative; char mrl[1]; } xine_mrl_reference_data_t; typedef struct { int alternative; unsigned int start_time, duration; unsigned int spare[20]; const char mrl[1]; } xine_mrl_reference_data_ext_t; typedef struct { int input; int channel; int radio; unsigned int frequency; unsigned int transmission; unsigned int framerate_numerator; unsigned int framerate_denominator; unsigned int framelines; unsigned long long standard_id; unsigned int colorstandard; unsigned int colorsubcarrier; int frame_width; int frame_height; unsigned int spare[20]; unsigned int session_id; } xine_set_v4l2_data_t; typedef struct { int bitrate_vbr; int bitrate_mean; int bitrate_peak; int gop_size; int gop_closure; int b_frames; int aspect_ratio; unsigned int spare[20]; } xine_set_mpeg_data_t; typedef struct { int direction; unsigned int button; } xine_spu_button_t; typedef struct { int skipped_frames; int skipped_threshold; int discarded_frames; int discarded_threshold; } xine_dropped_frames_t; typedef struct xine_event_queue_s xine_event_queue_t; xine_event_queue_t *xine_event_new_queue(xine_stream_t * stream); void xine_event_dispose_queue(xine_event_queue_t * queue); xine_event_t *xine_event_get(xine_event_queue_t * queue); xine_event_t *xine_event_wait(xine_event_queue_t * queue); void xine_event_free(xine_event_t * event); typedef void (*xine_event_listener_cb_t) (void *user_data, const xine_event_t * event); void xine_event_create_listener_thread (xine_event_queue_t * queue, xine_event_listener_cb_t callback, void *user_data); void xine_event_send(xine_stream_t * stream, const xine_event_t * event); typedef struct xine_osd_s xine_osd_t; xine_osd_t *xine_osd_new(xine_stream_t * self, int x, int y, int width, int height); unsigned int xine_osd_get_capabilities(xine_osd_t * self); void xine_osd_draw_point(xine_osd_t * self, int x, int y, int color); void xine_osd_draw_line(xine_osd_t * self, int x1, int y1, int x2, int y2, int color); void xine_osd_draw_rect(xine_osd_t * self, int x1, int y1, int x2, int y2, int color, int filled); void xine_osd_draw_text(xine_osd_t * self, int x1, int y1, const char *text, int color_base); void xine_osd_draw_bitmap(xine_osd_t * self, unsigned char * bitmap, int x1, int y1, int width, int height, unsigned char * palette_map); void xine_osd_get_text_size(xine_osd_t * self, const char *text, int *width, int *height); int xine_osd_set_font(xine_osd_t * self, const char *fontname, int size); void xine_osd_set_encoding(xine_osd_t * self, const char *encoding); void xine_osd_set_position(xine_osd_t * self, int x, int y); void xine_osd_show(xine_osd_t * self, long long vpts); void xine_osd_show_unscaled(xine_osd_t * self, long long vpts); void xine_osd_hide(xine_osd_t * self, long long vpts); void xine_osd_clear(xine_osd_t * self); void xine_osd_set_text_palette(xine_osd_t * self, int palette_number, int color_base); void xine_osd_get_palette(xine_osd_t * self, unsigned int * color, unsigned char * trans); void xine_osd_set_palette(xine_osd_t * self, const unsigned int * const color, const unsigned char * const trans); void xine_osd_free(xine_osd_t * self); typedef enum { XINE_TVSYSTEM_PAL = 0, XINE_TVSYSTEM_NTSC } xine_tvsystem; int xine_tvmode_init(xine_t * self); int xine_tvmode_use(xine_t * self, int use_tvmode); void xine_tvmode_set_tvsystem(xine_t * self, xine_tvsystem system); int xine_tvmode_switch(xine_t * self, int type, int width, int height, double fps); void xine_tvmode_size(xine_t * self, int *width, int *height, double *pixelratio, double *fps); void xine_tvmode_exit(xine_t * self); class QTime { public: QTime addMSecs(); unsigned int ds; }; class KXineWidget { QTime getLengthInfo(); QTime msToTime(); xine_stream_t *m_xineStream; }; QTime KXineWidget::getLengthInfo() { int pos, time, length; bool ok = xine_get_pos_length(m_xineStream, &pos, &time, &length); if ((ok) && (length > 0)) { return msToTime(); } } QTime KXineWidget::msToTime() { QTime t; t = t.addMSecs(); return t; }