[vlc-devel] [PATCH 01/16] vlc_sout: copy mux options into a separate table
Rémi Denis-Courmont
remi at remlab.net
Mon Mar 15 17:18:58 UTC 2021
Le maanantaina 15. maaliskuuta 2021, 19.02.54 EET Alexandre Janniaux a écrit :
> ---
> include/vlc_sout.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/include/vlc_sout.h b/include/vlc_sout.h
> index 23a7b90d36..a5622eb131 100644
> --- a/include/vlc_sout.h
> +++ b/include/vlc_sout.h
> @@ -96,6 +96,14 @@ static inline bool sout_AccessOutCanControlPace(
> sout_access_out_t *p_ao ) * @{
> */
>
> +struct sout_mux_operations
> +{
> + int (*add_stream)( sout_mux_t *, sout_input_t * );
> + void (*del_stream)( sout_mux_t *, sout_input_t * );
> + int (*mux)( sout_mux_t * );
> + int (*control)( sout_mux_t *, int, va_list );
> +};
> +
I'm all for switching to the ops pattern... but...
mux() should die and send() and control(SET_PCR) (or set_pcr()) be added
otherwise we will never have working buffering here. The end result is that the
operations would be the same as sout_stream, so not sure a separate structure
type is a good idea.
> /** Muxer structure */
> struct sout_mux_t
> {
> @@ -126,6 +134,8 @@ struct sout_mux_t
> bool b_waiting_stream;
> /* we wait 1.5 second after first stream added */
> vlc_tick_t i_add_stream_start;
> +
> + const struct sout_mux_operations *ops;
> };
>
> enum sout_mux_query_e
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list