[vlc-devel] [PATCH 0/5] A 2nd subtitle feature

Aaron Wang hughwung at gmail.com
Wed Sep 23 10:17:59 CEST 2015

A hotkey is used to allow cycle a 2nd subtitle,
which is display at the top, while the 1st one 
at the bottom. I use Ctrl+v by default right now,
but user can change it as they wish.

The decoder has to be modified to enable 
align top, otherwise they are all displayed at the 
bottom. I only modified the ones I've encountered.

The sync is the same for both subtitles.
But in future I think they should be separated.

This is my first ever contrib to open source,
so any opinions would be great.

About the place of i_ord, I haven't modified it yet.
Because I can't decide a good place. I don't really quite
understant how it could be undefined behavior.
Isn't a clause like " i_ord = 1" always a single instruction
excuted by the CPU? Thus that is an atomic hebavior. If that's
undefined, then using a mutex will be an undefiend behavior, too.

If I can't place it in the sub_format_t, how about inside block_t?
Would that be a good idea?

Aaron Wang (5):
  add a new hotkey
  add es call back
  enable select the 2nd subtitle
  change common decoders
  change mp4 subtitle decoder

 include/vlc_es.h           |   1 +
 include/vlc_keys.h         |   2 +
 lib/media_player.c         |   2 +
 modules/codec/subsdec.c    |   5 +-
 modules/codec/substx3g.c   |   6 +-
 modules/control/hotkeys.c  | 196 +++++++------
 src/config/keys.c          |   2 +
 src/input/es_out.c         | 717 +++++++++++++++++++++++++++++----------------
 src/input/event.c          |  11 +-
 src/input/event.h          |   2 +-
 src/input/input.c          |  20 +-
 src/input/input_internal.h |   2 +
 src/input/var.c            |  28 +-
 src/libvlc-module.c        |  13 +
 14 files changed, 655 insertions(+), 352 deletions(-)


More information about the vlc-devel mailing list