diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/buffer.h | 21 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 24 |
2 files changed, 43 insertions, 2 deletions
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index cf59a9317..4dc34bd45 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.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: buffer.h,v 1.79 2002/11/18 03:03:09 guenter Exp $ + * $Id: buffer.h,v 1.80 2002/11/28 10:21:08 petli Exp $ * * * contents: @@ -182,6 +182,7 @@ extern "C" { #define BUF_SPU_DVD 0x04000000 #define BUF_SPU_TEXT 0x04010000 #define BUF_SPU_CC 0x04020000 +#define BUF_SPU_DVB 0x04030000 /* demuxer block types: */ @@ -324,6 +325,24 @@ struct buf_element_s { #define SPU_DVD_SUBTYPE_NAV 4 +/* In a BUF_SPECIAL_SPU_DVB_DESCRIPTOR + * decoder_info[1] = BUF_SPECIAL_SPU_DVB_DESCRIPTOR + * decoder_info[2] = pointer to spu_dvb_descriptor_t, or NULL + * decoder_info[3] = + * + * This buffer is used to tell a DVBSUB decoder when the stream + * changes. For more information on how to write a DVBSUB decoder, + * see the comment at the top of src/demuxers/demux_ts.c + **/ +#define BUF_SPECIAL_SPU_DVB_DESCRIPTOR 9 +typedef struct spu_dvb_descriptor_s spu_dvb_descriptor_t; +struct spu_dvb_descriptor_s +{ + char lang[4]; + long comp_page_id; + long aux_page_id; +} ; + typedef struct palette_entry_s palette_entry_t; struct palette_entry_s { diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index b753ce535..91c549aa2 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.196 2002/11/25 12:36:05 mroi Exp $ + * $Id: xine.c,v 1.197 2002/11/28 10:21:08 petli Exp $ * * top-level xine functions * @@ -1085,6 +1085,20 @@ int xine_get_video_frame (xine_stream_t *stream, int xine_get_spu_lang (xine_stream_t *stream, int channel, char *lang) { + /* Ask the demuxer first (e.g. TS extracts this information from + * the stream) + **/ + if (stream->demux_plugin) { + if (stream->demux_plugin->get_capabilities (stream->demux_plugin) & DEMUX_CAP_SPULANG) { + stream->demux_plugin->get_optional_data (stream->demux_plugin, lang, + DEMUX_OPTIONAL_DATA_SPULANG); + return 1; + } + } + + /* No match, check with input plugin instead (e.g. DVD gets this + * info from the IFO). + **/ if (stream->input_plugin) { if (stream->input_plugin->get_capabilities (stream->input_plugin) & INPUT_CAP_SPULANG) { stream->input_plugin->get_optional_data (stream->input_plugin, lang, @@ -1098,6 +1112,14 @@ int xine_get_spu_lang (xine_stream_t *stream, int channel, char *lang) { int xine_get_audio_lang (xine_stream_t *stream, int channel, char *lang) { + if (stream->demux_plugin) { + if (stream->demux_plugin->get_capabilities (stream->demux_plugin) & DEMUX_CAP_AUDIOLANG) { + stream->demux_plugin->get_optional_data (stream->demux_plugin, lang, + DEMUX_OPTIONAL_DATA_AUDIOLANG); + return 1; + } + } + if (stream->input_plugin) { if (stream->input_plugin->get_capabilities (stream->input_plugin) & INPUT_CAP_AUDIOLANG) { stream->input_plugin->get_optional_data (stream->input_plugin, lang, |