summaryrefslogtreecommitdiff
path: root/src/xine-engine/xine.c
diff options
context:
space:
mode:
authorPeter Liljenberg <petli@users.sourceforge.net>2002-11-28 10:21:05 +0000
committerPeter Liljenberg <petli@users.sourceforge.net>2002-11-28 10:21:05 +0000
commit910f1de9a0c764cb942d006e1385bc2569fe1883 (patch)
tree235eaddcba79d6902980c5ad2f5a67176e410805 /src/xine-engine/xine.c
parent87d6350fbba837a926a0f08a808e44c2b88fb66c (diff)
downloadxine-lib-910f1de9a0c764cb942d006e1385bc2569fe1883.tar.gz
xine-lib-910f1de9a0c764cb942d006e1385bc2569fe1883.tar.bz2
Extended demuxer API with the methods get_capabilities() and get_optional_data(). Bumped API version to 18. Added calls to these methods in xine_get_{spu,audio}_lang(). Added DVBSUB support in demux_ts.c
CVS patchset: 3386 CVS date: 2002/11/28 10:21:05
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r--src/xine-engine/xine.c24
1 files changed, 23 insertions, 1 deletions
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,