[vlc-devel] [PATCH] synchro: privatize inside libmpeg2 plugin

Steve Lhomme robux4 at gmail.com
Mon May 29 08:43:38 CEST 2017


On Sun, May 28, 2017 at 1:46 PM, RĂ©mi Denis-Courmont <remi at remlab.net> wrote:
> This set of "helpers" is only used by the libmpeg2 plugin, and was not
> exposed to out-of-tree-plugins. There is apparently no point keeping it
> inside the core.

Sounds good to me.

> ---
>  modules/codec/Makefile.am                              |  3 ++-
>  modules/codec/libmpeg2.c                               |  5 ++---
>  src/input/decoder_synchro.c => modules/codec/synchro.c |  2 +-
>  include/vlc_codec_synchro.h => modules/codec/synchro.h | 18 +++++++++---------
>  po/POTFILES.in                                         |  2 --
>  src/Makefile.am                                        |  2 --
>  src/libvlccore.sym                                     |  9 ---------
>  7 files changed, 14 insertions(+), 27 deletions(-)
>  rename src/input/decoder_synchro.c => modules/codec/synchro.c (99%)
>  rename include/vlc_codec_synchro.h => modules/codec/synchro.h (75%)
>
> diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
> index 4bfaa80106..bc8ee821f2 100644
> --- a/modules/codec/Makefile.am
> +++ b/modules/codec/Makefile.am
> @@ -99,7 +99,8 @@ codec_LTLIBRARIES += $(LTLIBwma_fixed)
>  libcdg_plugin_la_SOURCES = codec/cdg.c
>  codec_LTLIBRARIES += libcdg_plugin.la
>
> -liblibmpeg2_plugin_la_SOURCES = codec/libmpeg2.c
> +liblibmpeg2_plugin_la_SOURCES = codec/libmpeg2.c \
> +       codec/synchro.c codec/synchro.h
>  liblibmpeg2_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_libmpeg2)
>  liblibmpeg2_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)'
>  liblibmpeg2_plugin_la_LIBADD = $(LIBS_libmpeg2)
> diff --git a/modules/codec/libmpeg2.c b/modules/codec/libmpeg2.c
> index 52972288c6..9e4269a7c5 100644
> --- a/modules/codec/libmpeg2.c
> +++ b/modules/codec/libmpeg2.c
> @@ -43,12 +43,11 @@
>  #include <vlc_codec.h>
>  #include <vlc_block_helper.h>
>  #include <vlc_cpu.h>
> -#include "../codec/cc.h"
> +#include "cc.h"
> +#include "synchro.h"
>
>  #include <mpeg2.h>
>
> -#include <vlc_codec_synchro.h>
> -
>  /*****************************************************************************
>   * decoder_sys_t : libmpeg2 decoder descriptor
>   *****************************************************************************/
> diff --git a/src/input/decoder_synchro.c b/modules/codec/synchro.c
> similarity index 99%
> rename from src/input/decoder_synchro.c
> rename to modules/codec/synchro.c
> index 00b3e0fd6d..1d4ee96a96 100644
> --- a/src/input/decoder_synchro.c
> +++ b/modules/codec/synchro.c
> @@ -101,7 +101,7 @@
>  #include <vlc_common.h>
>  #include <vlc_input.h>
>  #include <vlc_codec.h>
> -#include <vlc_codec_synchro.h>
> +#include "synchro.h"
>
>  /*
>   * Local prototypes
> diff --git a/include/vlc_codec_synchro.h b/modules/codec/synchro.h
> similarity index 75%
> rename from include/vlc_codec_synchro.h
> rename to modules/codec/synchro.h
> index ee6c86af8d..13180e6fea 100644
> --- a/include/vlc_codec_synchro.h
> +++ b/modules/codec/synchro.h
> @@ -37,13 +37,13 @@
>  /*****************************************************************************
>   * Prototypes
>   *****************************************************************************/
> -VLC_API decoder_synchro_t * decoder_SynchroInit( decoder_t *, int ) VLC_USED;
> -VLC_API void decoder_SynchroRelease( decoder_synchro_t * );
> -VLC_API void decoder_SynchroReset( decoder_synchro_t * );
> -VLC_API bool decoder_SynchroChoose( decoder_synchro_t *, int, int, bool );
> -VLC_API void decoder_SynchroTrash( decoder_synchro_t * );
> -VLC_API void decoder_SynchroDecode( decoder_synchro_t * );
> -VLC_API void decoder_SynchroEnd( decoder_synchro_t *, int, bool );
> -VLC_API mtime_t decoder_SynchroDate( decoder_synchro_t * ) VLC_USED;
> -VLC_API void decoder_SynchroNewPicture( decoder_synchro_t *, int, int, mtime_t, mtime_t, bool );
> +decoder_synchro_t * decoder_SynchroInit( decoder_t *, int ) VLC_USED;
> +void decoder_SynchroRelease( decoder_synchro_t * );
> +void decoder_SynchroReset( decoder_synchro_t * );
> +bool decoder_SynchroChoose( decoder_synchro_t *, int, int, bool );
> +void decoder_SynchroTrash( decoder_synchro_t * );
> +void decoder_SynchroDecode( decoder_synchro_t * );
> +void decoder_SynchroEnd( decoder_synchro_t *, int, bool );
> +mtime_t decoder_SynchroDate( decoder_synchro_t * ) VLC_USED;
> +void decoder_SynchroNewPicture( decoder_synchro_t *, int, int, mtime_t, mtime_t, bool );
>
> diff --git a/po/POTFILES.in b/po/POTFILES.in
> index a07b215bb1..379e281f01 100644
> --- a/po/POTFILES.in
> +++ b/po/POTFILES.in
> @@ -8,7 +8,6 @@ include/vlc_block_helper.h
>  include/vlc_charset.h
>  include/vlc_codec.h
>  include/vlc_codecs.h
> -include/vlc_codec_synchro.h
>  include/vlc_common.h
>  include/vlc_config_cat.h
>  include/vlc_config.h
> @@ -81,7 +80,6 @@ src/input/clock.h
>  src/input/control.c
>  src/input/decoder.c
>  src/input/decoder.h
> -src/input/decoder_synchro.c
>  src/input/demux.c
>  src/input/demux.h
>  src/input/es_out.c
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 954322b7f4..5f3726c3e6 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -107,7 +107,6 @@ pluginsinclude_HEADERS = \
>  nodist_pluginsinclude_HEADERS = ../include/vlc_about.h
>
>  noinst_HEADERS = \
> -       ../include/vlc_codec_synchro.h \
>         ../include/vlc_codecs.h \
>         ../include/vlc_extensions.h \
>         ../include/vlc_fixups.h \
> @@ -231,7 +230,6 @@ libvlccore_la_SOURCES = \
>         input/clock.c \
>         input/control.c \
>         input/decoder.c \
> -       input/decoder_synchro.c \
>         input/demux.c \
>         input/demux_chained.c \
>         input/es_out.c \
> diff --git a/src/libvlccore.sym b/src/libvlccore.sym
> index b282c3483c..aa957ff26d 100644
> --- a/src/libvlccore.sym
> +++ b/src/libvlccore.sym
> @@ -82,15 +82,6 @@ decoder_GetDisplayRate
>  decoder_GetInputAttachments
>  decoder_NewAudioBuffer
>  decoder_NewSubpicture
> -decoder_SynchroChoose
> -decoder_SynchroDate
> -decoder_SynchroDecode
> -decoder_SynchroEnd
> -decoder_SynchroInit
> -decoder_SynchroNewPicture
> -decoder_SynchroRelease
> -decoder_SynchroReset
> -decoder_SynchroTrash
>  demux_Delete
>  demux_PacketizerDestroy
>  demux_PacketizerNew
> --
> 2.11.0
>
> _______________________________________________
> 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