diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/audio_decoder.c | 141 | ||||
-rw-r--r-- | src/xine-engine/events.c | 17 | ||||
-rw-r--r-- | src/xine-engine/events.h | 115 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 4 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 28 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 117 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 49 |
7 files changed, 236 insertions, 235 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index e829ec463..5862ce597 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_decoder.c,v 1.47 2001/10/18 18:50:53 guenter Exp $ + * $Id: audio_decoder.c,v 1.48 2001/10/20 02:01:51 guenter Exp $ * * * functions that implement audio decoding @@ -73,6 +73,7 @@ void *audio_decoder_loop (void *this_gen) { if (this->cur_audio_decoder_plugin) { this->cur_audio_decoder_plugin->close (this->cur_audio_decoder_plugin); this->cur_audio_decoder_plugin = NULL; + this->audio_type = 0; } pthread_mutex_lock (&this->finished_lock); @@ -90,6 +91,7 @@ void *audio_decoder_loop (void *this_gen) { if (this->cur_audio_decoder_plugin) { this->cur_audio_decoder_plugin->close (this->cur_audio_decoder_plugin); this->cur_audio_decoder_plugin = NULL; + this->audio_type = 0; } pthread_mutex_lock (&this->finished_lock); @@ -104,6 +106,8 @@ void *audio_decoder_loop (void *this_gen) { pthread_mutex_unlock (&this->finished_lock); + this->audio_channel_suggested = -1; + /* future magic - coming soon lrb_flush (this->audio_temp); */ @@ -114,6 +118,7 @@ void *audio_decoder_loop (void *this_gen) { if (this->cur_audio_decoder_plugin) { this->cur_audio_decoder_plugin->close (this->cur_audio_decoder_plugin); this->cur_audio_decoder_plugin = NULL; + this->audio_type = 0; } running = 0; break; @@ -130,22 +135,18 @@ void *audio_decoder_loop (void *this_gen) { break; case BUF_CONTROL_AUDIO_CHANNEL: + { + xine_event_t event; - printf ("audio_decoder: switching to streamtype %08x\n", - buf->decoder_info[0]); - if (this->audio_channel != (buf->decoder_info[0] & 0xff) ) { - /* close old audio decoder */ - if (this->cur_audio_decoder_plugin) { - this->cur_audio_decoder_plugin->close (this->cur_audio_decoder_plugin); - this->cur_audio_decoder_plugin = NULL; - } - } - this->audio_channel = buf->decoder_info[0] & 0xff; + printf ("audio_decoder: suggested switching to streamtype %08x\n", + buf->decoder_info[0]); + + this->audio_channel_suggested = buf->decoder_info[0] & 0xff; - /* future magic - coming soon - lrb_feedback (this->audio_temp, this->audio_fifo); - */ + event.type = XINE_EVENT_UI_CHANNELS_CHANGED; + xine_send_event(this, &event); + } break; default: @@ -154,42 +155,83 @@ void *audio_decoder_loop (void *this_gen) { xine_usec_sleep (50000); } - if (this->audio_mute) + if (this->audio_mute) { + /* + lrb_add (this->audio_temp, buf); + continue; + */ break; + } profiler_start_count (prof_audio_decode); if ( (buf->type & 0xFF000000) == BUF_AUDIO_BASE ) { - /* now, decode this buffer if it's the right track */ - - if (this->audio_channel == (buf->type & 0xFF) ) { + uint32_t audio_type = 0; + int i,j; + + /* update track map */ + + i = 0; + while ( (i<this->audio_track_map_entries) && (this->audio_track_map[i]<buf->type) ) + i++; + + if ( (i==this->audio_track_map_entries) || (this->audio_track_map[i] != buf->type) ) { + + j = this->audio_track_map_entries; + while (j>i) { + this->audio_track_map[j] = this->audio_track_map[j-1]; + j--; + } + this->audio_track_map[i] = buf->type; + this->audio_track_map_entries++; + } + + /* find out which audio type to decode */ + + if (this->audio_channel == -1) { + + if ((this->audio_channel_suggested>=0) && + ((buf->type & 0xFF) == this->audio_channel_suggested) ) + audio_type = buf->type; + else + audio_type = this->audio_track_map[0]; + + } else + audio_type = this->audio_track_map[this->audio_channel]; + + /* now, decode this buffer if it's the right audio type */ + + if (buf->type == audio_type) { int streamtype = (buf->type>>16) & 0xFF; + decoder = this->audio_decoder_plugins [streamtype]; - if (decoder) { - if (this->cur_audio_decoder_plugin != decoder) { - if (this->cur_audio_decoder_plugin) - this->cur_audio_decoder_plugin->close (this->cur_audio_decoder_plugin); - this->cur_audio_decoder_plugin = decoder; - this->cur_audio_decoder_plugin->init (this->cur_audio_decoder_plugin, this->audio_out); + /* close old decoder of audio type has changed */ + + if (audio_type != this->audio_type) { + if (this->cur_audio_decoder_plugin) { + this->cur_audio_decoder_plugin->close (this->cur_audio_decoder_plugin); + this->cur_audio_decoder_plugin = NULL; + } + + if (decoder) { printf ("audio_loop: using decoder >%s< \n", decoder->get_identifier()); - + this->cur_audio_decoder_plugin = decoder; + this->cur_audio_decoder_plugin->init (this->cur_audio_decoder_plugin, this->audio_out); + + this->audio_type = audio_type; } - /* printf ("audio_loop: sending data to decoder\n"); */ - decoder->decode_data (decoder, buf); - /* printf ("audio_loop: decoding is done\n"); */ } - } else { - /* - printf ("audio_decoder: wrong channel\n"); - lrb_add (this->audio_temp, buf); - continue; - */ - } + + /* finally - decode data */ + + if (decoder) + decoder->decode_data (decoder, buf); + } } else printf ("audio_loop: unknown buffer type: %08x\n", buf->type); @@ -215,6 +257,9 @@ void audio_decoder_init (xine_t *this) { } this->audio_fifo = fifo_buffer_new (1500, 8192); + this->audio_channel = -1; + this->audio_channel_suggested = -1; + this->audio_type = 0; /* future magic - coming soon this->audio_temp = lrb_new (100, this->audio_fifo); @@ -254,3 +299,29 @@ void audio_decoder_shutdown (xine_t *this) { } +int xine_get_audio_channel (xine_t *this) { + + printf ("audio type : %d\n", this->audio_type); + + return 0; + + /* return this->audio_type & 0xFFFF; */ +} + +void xine_select_audio_channel (xine_t *this, int channel) { + + pthread_mutex_lock (&this->xine_lock); + + if (channel < -1) + channel = -1; + + this->audio_channel = channel; + + pthread_mutex_unlock (&this->xine_lock); +} + +int xine_get_audio_selection (xine_t *this) { + + + return this->audio_channel; +} diff --git a/src/xine-engine/events.c b/src/xine-engine/events.c index 43768c631..5db72b59c 100644 --- a/src/xine-engine/events.c +++ b/src/xine-engine/events.c @@ -29,7 +29,8 @@ #include "xine_internal.h" -int xine_register_event_listener(xine_t *this, event_listener_t listener) { +int xine_register_event_listener(xine_t *this, xine_event_listener_t listener, + void *user_data) { /* Ensure the listener is non-NULL */ if(listener == NULL) { return 0; @@ -37,23 +38,28 @@ int xine_register_event_listener(xine_t *this, event_listener_t listener) { /* Check we hava a slot free */ if(this->num_event_listeners < XINE_MAX_EVENT_LISTENERS) { - this->event_listeners[this->num_event_listeners++] = listener; + + this->event_listeners[this->num_event_listeners] = listener; + this->event_listener_user_data[this->num_event_listeners] = user_data; + + this->num_event_listeners++; + return 1; } return 0; } -void xine_send_event(xine_t *this, event_t *event, void *data) { +void xine_send_event(xine_t *this, xine_event_t *event) { uint16_t i; /* Itterate through all event handlers */ for(i=0; i < this->num_event_listeners; i++) { - (this->event_listeners[i]) (this, event, data); + (this->event_listeners[i]) (this->event_listener_user_data[i], event); } } -int xine_remove_event_listener(xine_t *this, event_listener_t listener) { +int xine_remove_event_listener(xine_t *this, xine_event_listener_t listener) { uint16_t i, found; found = 1; i = 0; @@ -69,6 +75,7 @@ int xine_remove_event_listener(xine_t *this, event_listener_t listener) { /* If possible, move the last listener to the hole thats left */ if(this->num_event_listeners > 1) { this->event_listeners[i] = this->event_listeners[this->num_event_listeners - 1]; + this->event_listener_user_data[i] = this->event_listener_user_data[this->num_event_listeners - 1]; this->event_listeners[this->num_event_listeners - 1] = NULL; } diff --git a/src/xine-engine/events.h b/src/xine-engine/events.h index 305351647..57031724f 100644 --- a/src/xine-engine/events.h +++ b/src/xine-engine/events.h @@ -30,85 +30,76 @@ extern "C" { #include <inttypes.h> -/** - * This file defines types for many events which can be sent in Xine. +/* + * This file defines types for many events which can be sent in xine. */ -/** - * Generic Event type. +/* event types */ + +#define XINE_EVENT_MOUSE_BUTTON 1 +#define XINE_EVENT_MOUSE_MOVE 2 +#define XINE_EVENT_SPU_BUTTON 3 +#define XINE_EVENT_SPU_CLUT 4 +#define XINE_EVENT_UI_CHANNELS_CHANGED 5 /* inform ui that new channel info is available */ +#define XINE_EVENT_UI_SET_TITLE 6 /* request title display change in ui */ +#define XINE_EVENT_INPUT_MENU1 7 +#define XINE_EVENT_INPUT_MENU2 8 +#define XINE_EVENT_INPUT_MENU3 9 +#define XINE_EVENT_INPUT_UP 10 +#define XINE_EVENT_INPUT_DOWN 11 +#define XINE_EVENT_INPUT_LEFT 12 +#define XINE_EVENT_INPUT_RIGHT 13 +#define XINE_EVENT_INPUT_SELECT 14 +#define XINE_EVENT_PLAYBACK_FINISHED 15 +#define XINE_EVENT_BRANCHED 16 +#define XINE_EVENT_NEED_NEXT_MRL 17 + +/* + * generic event type. */ typedef struct { uint32_t type; /* The event type (determines remainder of struct) */ /* Event dependent data goes after this. */ -} event_t; +} xine_event_t; -/** - * Mouse event. +/* + * input events */ -#define XINE_MOUSE_EVENT 0x0001 typedef struct { - event_t event; - uint8_t button; /* Generally 1 = left, 2 = mid, 3 = right */ - uint16_t x,y; /* In Image space */ -} mouse_event_t; - -/** - * Overlay event - used for plugins/UIs to request that a specific overlay be - * displayed. - */ -#define XINE_OVERLAY_EVENT 0x0002 -typedef struct overlay_event_s { - event_t event; - vo_overlay_t overlay; -} overlay_event_t; + xine_event_t event; + uint8_t button; /* Generally 1 = left, 2 = mid, 3 = right */ + uint16_t x,y; /* In Image space */ +} xine_input_event_t; -/** +/* * SPU event - send control events to the spu decoder */ -#define XINE_SPU_EVENT 0x0003 -typedef struct spu_event_s { - event_t event; - int sub_type; - void *data; -} spu_event_t; - -/** +typedef struct { + xine_event_t event; + void *data; +} xine_spu_event_t; + +/* * UI event - send information to/from UI. */ -#define XINE_UI_EVENT 0x0004 -typedef struct ui_event_s { - event_t event; - int sub_type; - void *data; - uint32_t data_len; - int handled; -} ui_event_t; - -/* UI sub-types */ - -/* Warn Xine UI that spu/audio stream has changed and to - * update accordingly, data is unused. */ -#define XINE_UI_UPDATE_CHANNEL 0x0001 -/* UI asks for conversion of spu stream number into language. - * if the listener can do it, it sets handled to 1 and writes - * the string into data. data_len is how big this buffer is*/ -#define XINE_UI_GET_SPU_LANG 0x0002 -/* As above but for audio streams */ -#define XINE_UI_GET_AUDIO_LANG 0x0003 -/* Change the title label to the contents of the NULL-terminated - * array of chars pointed to by data. - */ -#define XINE_UI_SET_TITLE 0x0004 -/* EOF UI sub-types */ - -/** - * MENU events +typedef struct { + xine_event_t event; + void *data; + uint32_t data_len; + int handled; +} xine_ui_event_t; + +/* + * next_mrl */ -#define XINE_MENU1_EVENT 0x0005 -#define XINE_MENU2_EVENT 0x0006 -#define XINE_MENU3_EVENT 0x0007 +typedef struct { + xine_event_t event; + char *mrl; + int handled; +} xine_next_mrl_event_t; + #ifdef __cplusplus } diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index ec5908416..d533bd01d 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: load_plugins.c,v 1.44 2001/10/17 20:33:09 guenter Exp $ + * $Id: load_plugins.c,v 1.45 2001/10/20 02:01:51 guenter Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -374,7 +374,7 @@ void load_decoder_plugins (xine_t *this, spu_decoder_t *sdp; int streamtype; - sdp = (spu_decoder_t *) initplug(3, config); + sdp = (spu_decoder_t *) initplug(4, this); if (sdp) { sdp->metronom = this->metronom; diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 3e214bba1..182594930 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.56 2001/10/18 18:50:53 guenter Exp $ + * $Id: video_decoder.c,v 1.57 2001/10/20 02:01:51 guenter Exp $ * */ @@ -226,26 +226,6 @@ void *video_decoder_loop (void *this_gen) { pthread_exit(NULL); } -static void spu_event_handler(xine_t *this, event_t *event, void *data) { - /* Check Xine handle is not NULL */ - if (this == NULL) { - return; - } - - switch(event->type) { - case XINE_SPU_EVENT: - /* -- This can cause a segfault! - if (!this->cur_spu_decoder_plugin) - update_spu_decoder(this, BUF_SPU_CLUT); - */ - - if (this->cur_spu_decoder_plugin) - this->cur_spu_decoder_plugin->event(this->cur_spu_decoder_plugin, - (spu_event_t*) event); - break; - } -} - void video_decoder_init (xine_t *this) { pthread_attr_t pth_attrs; @@ -254,10 +234,6 @@ void video_decoder_init (xine_t *this) { this->video_fifo = fifo_buffer_new (500, 4096); - if((xine_register_event_listener(this, spu_event_handler)) < 1) { - fprintf(stderr, "xine_register_event_listener() failed.\n"); - } - pthread_attr_init(&pth_attrs); pthread_attr_getschedparam(&pth_attrs, &pth_params); pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER); @@ -277,8 +253,6 @@ void video_decoder_shutdown (xine_t *this) { buf_element_t *buf; void *p; - xine_remove_event_listener(this, spu_event_handler); - /* this->video_fifo->clear(this->video_fifo); */ buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index d7fb4f34c..12452aaee 100644 --- a/src/xine-engine/xine.c +++ b/src/xine-engine/xine.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.c,v 1.69 2001/10/18 23:46:40 guenter Exp $ + * $Id: xine.c,v 1.70 2001/10/20 02:01:51 guenter Exp $ * * top-level xine functions * @@ -62,11 +62,13 @@ uint32_t xine_debug; void * xine_notify_stream_finished_thread (void * this_gen) { xine_t *this = this_gen; + xine_event_t event; xine_stop (this); - if (this->stream_end_cb) - this->stream_end_cb (this->status); + event.type = XINE_EVENT_PLAYBACK_FINISHED; + + xine_send_event (this, &event); return NULL; } @@ -291,9 +293,7 @@ void xine_play (xine_t *this, char *mrl, this->cur_demuxer_plugin->start (this->cur_demuxer_plugin, this->video_fifo, this->audio_fifo, - pos, start_time, - this->get_next_mrl_cb, - this->branched_cb); + pos, start_time); if (this->cur_demuxer_plugin->get_status(this->cur_demuxer_plugin) != DEMUX_OK) { printf("xine_play: demuxer failed to start\n"); @@ -381,69 +381,13 @@ void xine_exit (xine_t *this) { } -static void event_handler(xine_t *xine, event_t *event, void *data) { - /* Check Xine handle/current input plugin is not NULL */ - if((xine == NULL) || (xine->cur_input_plugin == NULL)) { - return; - } - - switch(event->type) { - case XINE_MOUSE_EVENT: - { - mouse_event_t *mevent = (mouse_event_t*)event; - - /* Send event to imput plugin if appropriate. */ - if(xine->cur_input_plugin->handle_input_event != NULL) { - if(mevent->button != 0) { - /* Click event. */ - xine->cur_input_plugin->handle_input_event(xine->cur_input_plugin, - INPUT_EVENT_MOUSEBUTTON, - 0, mevent->x, mevent->y); - } else { - /* Motion event */ - xine->cur_input_plugin->handle_input_event(xine->cur_input_plugin, - INPUT_EVENT_MOUSEMOVE, - 0, mevent->x, mevent->y); - } - } - } - break; - case XINE_MENU1_EVENT: - xine->cur_input_plugin->handle_input_event(xine->cur_input_plugin, - INPUT_EVENT_MENU1, - 0, 0, 0); - break; - case XINE_MENU2_EVENT: - xine->cur_input_plugin->handle_input_event(xine->cur_input_plugin, - INPUT_EVENT_MENU2, - 0, 0, 0); - break; - case XINE_MENU3_EVENT: - xine->cur_input_plugin->handle_input_event(xine->cur_input_plugin, - INPUT_EVENT_MENU3, - 0, 0, 0); - break; - case XINE_SPU_EVENT: - if (xine->cur_spu_decoder_plugin) - xine->cur_spu_decoder_plugin->event(xine->cur_spu_decoder_plugin, - (spu_event_t*) event); - break; - } -} - xine_t *xine_init (vo_driver_t *vo, ao_driver_t *ao, - config_values_t *config, - gui_stream_end_cb_t stream_end_cb, - gui_get_next_mrl_cb_t get_next_mrl_cb, - gui_branched_cb_t branched_cb) { + config_values_t *config) { xine_t *this = xmalloc (sizeof (xine_t)); printf("xine_init entered\n"); - this->stream_end_cb = stream_end_cb; - this->get_next_mrl_cb = get_next_mrl_cb; - this->branched_cb = branched_cb; this->config = config; xine_debug = config->lookup_int (config, "xine_debug", 0); @@ -498,29 +442,9 @@ xine_t *xine_init (vo_driver_t *vo, audio_decoder_init (this); printf("xine_init returning\n"); - /* Add an event listener */ - - if((xine_register_event_listener(this, event_handler)) < 1) { - fprintf(stderr, "xine_register_event_listener() failed.\n"); - } - return this; } -int xine_get_audio_channel (xine_t *this) { - - return this->audio_channel; -} - -void xine_select_audio_channel (xine_t *this, int channel) { - - pthread_mutex_lock (&this->xine_lock); - - this->audio_channel = channel; - - pthread_mutex_unlock (&this->xine_lock); -} - int xine_get_spu_channel (xine_t *this) { return this->spu_channel; @@ -716,3 +640,30 @@ int xine_get_current_frame (xine_t *this, int *width, int *height, return 1; } +void xine_get_spu_lang (xine_t *this, char *str) { + + if (this->cur_input_plugin) { + if (this->cur_input_plugin->get_capabilities (this->cur_input_plugin) & INPUT_CAP_SPULANG) { + this->cur_input_plugin->get_optional_data (this->cur_input_plugin, str, + INPUT_OPTIONAL_DATA_SPULANG); + return; + } + } + + sprintf (str, "%3d", this->spu_channel); +} + +void xine_get_audio_lang (xine_t *this, char *str) { + + if (this->cur_input_plugin) { + if (this->cur_input_plugin->get_capabilities (this->cur_input_plugin) & INPUT_CAP_AUDIOLANG) { + this->cur_input_plugin->get_optional_data (this->cur_input_plugin, str, + INPUT_OPTIONAL_DATA_AUDIOLANG); + return; + } + } + + sprintf (str, "%3d", this->audio_channel); +} + + diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 70e7e5d2e..8582793b1 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_internal.h,v 1.50 2001/10/18 18:50:53 guenter Exp $ + * $Id: xine_internal.h,v 1.51 2001/10/20 02:01:51 guenter Exp $ * */ @@ -120,9 +120,6 @@ struct audio_decoder_s { * */ -/* called when xine has finished a stream (_not_ if xine was stopped/paused) */ -typedef void (*gui_stream_end_cb_t)(int nStatus); - /* * player status constants: */ @@ -133,7 +130,7 @@ typedef void (*gui_stream_end_cb_t)(int nStatus); typedef struct xine_s xine_t; -typedef void (*event_listener_t) (xine_t *, event_t *, void *); +typedef void (*xine_event_listener_t) (void *user_data, xine_event_t *); struct xine_s { @@ -166,6 +163,7 @@ struct xine_s { int spu_finished; int audio_channel; + int audio_channel_suggested; int spu_channel; vo_instance_t *video_out; @@ -186,10 +184,7 @@ struct xine_s { int audio_track_map_entries; int audio_finished; int audio_mute; - - gui_stream_end_cb_t stream_end_cb; - gui_get_next_mrl_cb_t get_next_mrl_cb; - gui_branched_cb_t branched_cb; + uint32_t audio_type; /* Lock for xine player functions */ pthread_mutex_t xine_lock; @@ -198,9 +193,9 @@ struct xine_s { pthread_mutex_t finished_lock; /* Array of event handlers. */ - event_listener_t event_listeners[XINE_MAX_EVENT_LISTENERS]; + xine_event_listener_t event_listeners[XINE_MAX_EVENT_LISTENERS]; + void *event_listener_user_data[XINE_MAX_EVENT_LISTENERS]; uint16_t num_event_listeners; - }; /* @@ -211,15 +206,11 @@ config_values_t *config_file_init (char *filename); /* * init xine - call once at startup - * */ xine_t *xine_init (vo_driver_t *vo, ao_driver_t *ao, - config_values_t *config, - gui_stream_end_cb_t stream_end_cb, - gui_get_next_mrl_cb_t get_next_mrl_cb, - gui_branched_cb_t branched_cb); + config_values_t *config); /* * open a stream sekk to a given position and play it @@ -292,12 +283,22 @@ int xine_get_current_time (xine_t *this); int xine_get_stream_length (xine_t *this); /* - * return the current audio channel + * return the current physical audio channel */ int xine_get_audio_channel (xine_t *this); /* - * set desired audio channel + * return the current logical audio channel + */ +int xine_get_audio_selection (xine_t *this); + +/* + * try to find out current audio language + */ +void xine_get_audio_lang (xine_t *this, char *str); + +/* + * set desired logical audio channel (-1 => auto) */ void xine_select_audio_channel (xine_t *this, int channel); @@ -312,6 +313,11 @@ int xine_get_spu_channel (xine_t *this); void xine_select_spu_channel (xine_t *this, int channel); /* + * try to find out current spu language + */ +void xine_get_spu_lang (xine_t *this, char *str); + +/* * exit xine */ void xine_exit (xine_t *this); @@ -495,20 +501,21 @@ ao_driver_t *xine_load_audio_output_plugin(config_values_t *config, char *id); * returns 0 if the listener was registerd, non-zero if it could not. */ -int xine_register_event_listener(xine_t *this, event_listener_t listener); +int xine_register_event_listener(xine_t *this, xine_event_listener_t listener, + void *user_data); /* * attempt to remove a registered event listener. * returns 0 if the listener was removed, non-zero if not (e.g. not found). */ -int xine_remove_event_listener(xine_t *this, event_listener_t listener); +int xine_remove_event_listener(xine_t *this, xine_event_listener_t listener); /* * send an event to all listeners. */ -void xine_send_event(xine_t *this, event_t *event, void *data); +void xine_send_event(xine_t *this, xine_event_t *event); /* * snapshot function |