diff options
author | mplayer-svn <svn@mplayerhq.hu> | 2012-02-19 13:15:41 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 01:59:15 +0200 |
commit | 804bf91570a24b949a6c68530daaf9162df9a234 (patch) | |
tree | 479bb687f73be7d82f0a7ea43a7baa6b42cccb5f /stream/cache2.c | |
parent | 14a67dd301bfd68712440a65b0acbafc2121910e (diff) | |
download | mpv-804bf91570a24b949a6c68530daaf9162df9a234.tar.bz2 mpv-804bf91570a24b949a6c68530daaf9162df9a234.tar.xz |
commands, dvd, dvdnav, bluray: cleanup sub/audio track language display
Code cleanup: Use a stream_control instead of global functions to
get the language associate with a audio or subtitle stream from
the streaming layer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34736 b3059339-0415-0410-9bf9-f77b7e298cf2
Support showing the stream language with br:// playback.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34737 b3059339-0415-0410-9bf9-f77b7e298cf2
Fix DVDs showing the subtitle language as "unknown"
for a long time.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34777 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Note: heavily modified by wm4 for this fork of mplayer.
Diffstat (limited to 'stream/cache2.c')
-rw-r--r-- | stream/cache2.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/stream/cache2.c b/stream/cache2.c index b6bdd10b25..488e453dc6 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -88,6 +88,7 @@ typedef struct { volatile int control; volatile unsigned control_uint_arg; volatile double control_double_arg; + volatile struct stream_lang_req control_lang_arg; volatile int control_res; volatile double stream_time_length; volatile double stream_time_pos; @@ -310,6 +311,9 @@ static int cache_execute_control(cache_vars_t *s) { s->control_res = s->stream->control(s->stream, s->control, &uint_res); s->control_uint_arg = uint_res; break; + case STREAM_CTRL_GET_LANG: + s->control_res = s->stream->control(s->stream, s->control, (void *)&s->control_lang_arg); + break; default: s->control_res = STREAM_UNSUPPORTED; break; @@ -620,6 +624,8 @@ int cache_do_control(stream_t *stream, int cmd, void *arg) { case STREAM_CTRL_GET_CURRENT_TIME: *(double *)arg = s->stream_time_pos; return s->stream_time_pos != MP_NOPTS_VALUE ? STREAM_OK : STREAM_UNSUPPORTED; + case STREAM_CTRL_GET_LANG: + s->control_lang_arg = *(struct stream_lang_req *)arg; case STREAM_CTRL_GET_NUM_CHAPTERS: case STREAM_CTRL_GET_CURRENT_CHAPTER: case STREAM_CTRL_GET_ASPECT_RATIO: @@ -665,6 +671,9 @@ int cache_do_control(stream_t *stream, int cmd, void *arg) { case STREAM_CTRL_GET_ANGLE: *(unsigned *)arg = s->control_uint_arg; break; + case STREAM_CTRL_GET_LANG: + *(struct stream_lang_req *)arg = s->control_lang_arg; + break; } return s->control_res; } |