[MPlayer-dev-eng] [PATCH] demuxer-independent sub and audio track selection
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Sun Feb 24 16:12:39 CET 2008
Hi,
this series of patches moves selecting subtitle and audio tracks by -sid/-aid
and -slang/-alang out of individual demuxers.
Stream language is stored in sh_sub_t.lang and sh_audio_t.lang. When any
demuxer is opened, it is supposed to select any audio track (important,
because switching between an audio track and nosound mode is not supported),
and not select subtitle track. Real track selection happens in
mplayer.c/mencoder.c based on *_id and *_lang.
Many demuxers still select audio and subtitle tracks. It does not matter, they
are reselected later anyway. This code could now be removed. These patches
remove such code from demux_lavf, demux_mkv and (partially) demux_ogg,
reducing the total amount of code by 69 lines.
Patch 04 is unrelated to the rest, it removes some useless checks like "if(p)
free(p)" from demuxer.c and demux_mkv.c.
Aside from simplifying the code, some new functionality is added. Lavf demuxer
now displays audio track language in OSD (when switching tracks), and
subtitle track selection by language in the same demuxer now supports
multiple languages (like "-slang lang1,lang2,lang3").
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-sh-lang
Type: text/x-diff
Size: 1279 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 05-demuxer-track-by-lang
Type: text/x-diff
Size: 1803 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0001.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-audio-lang
Type: text/x-diff
Size: 3742 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0002.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04-stupid-free
Type: text/x-diff
Size: 3283 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0003.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 06-sub-select
Type: text/x-diff
Size: 1286 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0004.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 07-sub-select2
Type: text/x-diff
Size: 2711 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0005.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03-sub-lang
Type: text/x-diff
Size: 7261 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0006.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 09-audio-select2
Type: text/x-diff
Size: 2221 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0007.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10-reindent
Type: text/x-diff
Size: 1725 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0008.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 08-audio-select
Type: text/x-diff
Size: 2063 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0009.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 11-cleanup
Type: text/x-diff
Size: 996 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20080224/e5f16959/attachment-0010.diff>
More information about the MPlayer-dev-eng
mailing list