[vlc-devel] [PATCH] decoder: remove input thread and ES dependency
Rémi Denis-Courmont
remi at remlab.net
Thu Jun 20 16:10:23 CEST 2019
Le torstaina 20. kesäkuuta 2019, 14.55.59 EEST Romain Vimont a écrit :
> As suggested by Rémi:
> > the decoder should use opaque callbacks provided by the ES out rather
> > than "see" the input and the ES.
>
> <https://mailman.videolan.org/pipermail/vlc-devel/2019-May/125088.html>
> ---
> src/input/decoder.c | 118 ++++++++++++----------------------
> src/input/decoder.h | 28 +++++++-
> src/input/es_out.c | 152 ++++++++++++++++++++++++++++++++++++++++++--
> 3 files changed, 213 insertions(+), 85 deletions(-)
>
> diff --git a/src/input/decoder.c b/src/input/decoder.c
> index 3b19b51d66..e8b74cb84f 100644
> --- a/src/input/decoder.c
> +++ b/src/input/decoder.c
> @@ -45,10 +45,8 @@
>
> #include "audio_output/aout_internal.h"
> #include "stream_output/stream_output.h"
> -#include "input_internal.h"
> #include "../clock/clock.h"
> #include "decoder.h"
> -#include "event.h"
> #include "resource.h"
>
> #include "../video_output/vout_internal.h"
> @@ -66,11 +64,12 @@ enum reload
> struct decoder_owner
> {
> decoder_t dec;
> - input_thread_t *p_input;
> - vlc_es_id_t *id;
> input_resource_t*p_resource;
> vlc_clock_t *p_clock;
>
> + const struct decoder_callbacks *cbs;
> + void *cbs_userdata;
> +
> ssize_t i_spu_channel;
> int64_t i_spu_order;
>
> @@ -156,6 +155,11 @@ struct decoder_owner
> #define DECODER_SPU_VOUT_WAIT_DURATION VLC_TICK_FROM_MS(200)
> #define BLOCK_FLAG_CORE_PRIVATE_RELOADED (1 <<
> BLOCK_FLAG_CORE_PRIVATE_SHIFT)
>
> +#define decoder_Notify(decoder_priv, event, ...) \
> + if (decoder_priv->cbs && decoder_priv->cbs->event) \
> + decoder_priv->cbs->event(&decoder_priv->dec, ##__VA_ARGS__, \
> + decoder_priv->cbs_userdata);
I don't think that syntax is valid CPP.
--
Реми Дёни-Курмон
http://www.remlab.net/
More information about the vlc-devel
mailing list