[vlc-devel] Seeking opinions

tony hugh1234 at mail.ustc.edu.cn
Tue Sep 8 04:37:00 CEST 2015


I have successfully modified vlc to make it display 2 subtitle
elementary stream at the same time.

However, I'm not satisfied because the code is not clean enough.
The file src/input/es_out.c contains this:

struct es_out_id_t
{

...

decoder_t *p_dec;
decoder_t *p_dec_record;

...

};

As we can see, one es_out_id_t can have only one decoder.
But sometimes, there is a need to send one es to multiple decoders,
and be decoded in different ways.
My idea is, if we use a linked list like that instead:

typedef struct
 {
    decoder_t   *p_dec;
    decoder_t   *p_dec_record;
    dec_list_t  *next;
} dec_list_t;

When next is null, the overhead is low,
but this enables one es_out_id_t to have multiple decoders.

This is important because that if we allow users to choose a
2nd subtitle, the user may choose the same one as the first.
In this situation, it is preferred that one es be decoded
in two different ways and sent to vout.

What do you guys think?




More information about the vlc-devel mailing list