[vlc-devel] [PATCH 01/16] vlc_sout: copy mux options into a separate table
Alexandre Janniaux
ajanni at videolabs.io
Mon Mar 15 17:43:21 UTC 2021
Hi,
On Mon, Mar 15, 2021 at 07:18:58PM +0200, Rémi Denis-Courmont wrote:
> 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.
Thank you for reviewing this. :)
I'm currently (litterally) adding set_pcr() from some of François's
and Denis's work which is the reason why I wrote this patchset at
first.
However, I'm not familiar with what's needed for the mux() change.
Is somebody working on this? Are there more notes on that? I just
saw that the workshop notes are sort-of mentioning this through
> Part 5: align mux on "stream out
but that's a bit scarce to understand what is needed. If you want
to mimic the stream API, I guess that we should mux on send then?
> 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.
What about using the same structure while keeping the mux function
in sout_mux_t, while keeping the sout_Mux* wrappers which can check
if the code rely on calling Mux() (pf_mux != NULL) or not, so as to
remove the mux() callback iteratively? Would it be ok?
Regards,
--
Alexandre Janniaux
Videolabs
> > /** 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/
>
>
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list