Prechádzať zdrojové kódy

MVK: rename exported symbols by module

Thomas Guillem 8 rokov pred
rodič
commit
93b23d559d

+ 91 - 0
Resources/MobileVLCKit/patches/0016-temporary-add-missing-static.patch

@@ -0,0 +1,91 @@
+From fb5494ff9e0f528655fd712608c8927a71348866 Mon Sep 17 00:00:00 2001
+From: Thomas Guillem <thomas@gllm.fr>
+Date: Tue, 11 Apr 2017 15:13:51 +0200
+Subject: [PATCH 16/17] temporary: add missing static
+
+---
+ modules/codec/mft.c           | 4 ++--
+ modules/control/motion.c      | 4 ++--
+ modules/video_filter/puzzle.c | 8 ++++----
+ 3 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/modules/codec/mft.c b/modules/codec/mft.c
+index fbd85d4bdc..84cbb65829 100644
+--- a/modules/codec/mft.c
++++ b/modules/codec/mft.c
+@@ -1107,7 +1107,7 @@ static int LoadMFTLibrary(MFHandle *mf)
+     return VLC_SUCCESS;
+ }
+ 
+-int Open(vlc_object_t *p_this)
++static int Open(vlc_object_t *p_this)
+ {
+     decoder_t *p_dec = (decoder_t *)p_this;
+     decoder_sys_t *p_sys;
+@@ -1148,7 +1148,7 @@ error:
+     return VLC_EGENERIC;
+ }
+ 
+-void Close(vlc_object_t *p_this)
++static void Close(vlc_object_t *p_this)
+ {
+     decoder_t *p_dec = (decoder_t *)p_this;
+     decoder_sys_t *p_sys = p_dec->p_sys;
+diff --git a/modules/control/motion.c b/modules/control/motion.c
+index 6c2144b5c9..7491cadb9c 100644
+--- a/modules/control/motion.c
++++ b/modules/control/motion.c
+@@ -80,7 +80,7 @@ vlc_module_end ()
+ /*****************************************************************************
+  * OpenIntf: initialise interface
+  *****************************************************************************/
+-int Open ( vlc_object_t *p_this )
++static int Open ( vlc_object_t *p_this )
+ {
+     intf_thread_t *p_intf = (intf_thread_t *)p_this;
+     intf_sys_t *p_sys = malloc( sizeof( *p_sys ) );
+@@ -109,7 +109,7 @@ error:
+ /*****************************************************************************
+  * CloseIntf: destroy interface
+  *****************************************************************************/
+-void Close ( vlc_object_t *p_this )
++static void Close ( vlc_object_t *p_this )
+ {
+     intf_thread_t *p_intf = (intf_thread_t *)p_this;
+     intf_sys_t *p_sys = p_intf->p_sys;
+diff --git a/modules/video_filter/puzzle.c b/modules/video_filter/puzzle.c
+index c5cf98678a..2a041986b1 100644
+--- a/modules/video_filter/puzzle.c
++++ b/modules/video_filter/puzzle.c
+@@ -78,8 +78,8 @@ const char *const ppsz_rotation_descriptions[] = { N_("0"), N_("0/180"), N_("0/9
+ 
+ #define CFG_PREFIX "puzzle-"
+ 
+-int  Open ( vlc_object_t * );
+-void Close( vlc_object_t * );
++static int  Open ( vlc_object_t * );
++static void Close( vlc_object_t * );
+ 
+ vlc_module_begin()
+     set_description( N_("Puzzle interactive game video filter") )
+@@ -125,7 +125,7 @@ const char *const ppsz_filter_options[] = {
+ /**
+  * Open the filter
+  */
+-int Open( vlc_object_t *p_this )
++static int Open( vlc_object_t *p_this )
+ {
+     filter_t *p_filter = (filter_t *)p_this;
+     filter_sys_t *p_sys;
+@@ -212,7 +212,7 @@ int Open( vlc_object_t *p_this )
+ /**
+  * Close the filter
+  */
+-void Close( vlc_object_t *p_this ) {
++static void Close( vlc_object_t *p_this ) {
+     filter_t *p_filter = (filter_t *)p_this;
+     filter_sys_t *p_sys = p_filter->p_sys;
+ 
+-- 
+2.11.0
+

+ 324 - 0
Resources/MobileVLCKit/patches/0017-build-rename-exported-symbols-by-module.patch

@@ -0,0 +1,324 @@
+From a0e311ff1087e214c49368973ab8af104270e9c5 Mon Sep 17 00:00:00 2001
+From: Thomas Guillem <thomas@gllm.fr>
+Date: Tue, 11 Apr 2017 15:15:26 +0200
+Subject: [PATCH 17/17] build: rename exported symbols by module
+
+This is quite ugly and temporary. Ideally we should rename symbols in binaries
+like the Android script do.
+---
+ modules/codec/ttml/ttml.c                      |  2 +-
+ modules/codec/ttml/ttml.h                      |  4 ++--
+ modules/demux/avformat/avformat.c              |  4 ++--
+ modules/demux/avformat/avformat.h              |  8 ++++----
+ modules/demux/avformat/demux.c                 | 12 ++++++------
+ modules/demux/avformat/mux.c                   |  4 ++--
+ modules/demux/ttml.c                           |  6 +++---
+ modules/video_filter/deinterlace/deinterlace.c | 10 +++++-----
+ modules/video_filter/deinterlace/deinterlace.h | 18 +++++++++---------
+ 9 files changed, 34 insertions(+), 34 deletions(-)
+
+diff --git a/modules/codec/ttml/ttml.c b/modules/codec/ttml/ttml.c
+index cb9b4b6066..69b6ee9d2c 100644
+--- a/modules/codec/ttml/ttml.c
++++ b/modules/codec/ttml/ttml.c
+@@ -54,7 +54,7 @@ vlc_module_begin ()
+         set_capability( "demux", 2 )
+         set_category( CAT_INPUT )
+         set_subcategory( SUBCAT_INPUT_DEMUX )
+-        set_callbacks( OpenDemux, CloseDemux )
++        set_callbacks( OpenDemux__ttml, CloseDemux__ttml )
+         add_shortcut( "ttml", "subtitle" )
+ 
+ vlc_module_end ()
+diff --git a/modules/codec/ttml/ttml.h b/modules/codec/ttml/ttml.h
+index 94263eda2d..cac43528b6 100644
+--- a/modules/codec/ttml/ttml.h
++++ b/modules/codec/ttml/ttml.h
+@@ -18,8 +18,8 @@
+  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+  *****************************************************************************/
+ 
+-int OpenDemux( vlc_object_t* p_this );
+-void CloseDemux( demux_t* p_demux );
++int OpenDemux__ttml( vlc_object_t* p_this );
++void CloseDemux__ttml( demux_t* p_demux );
+ 
+ int  OpenDecoder   ( vlc_object_t * );
+ void CloseDecoder  ( vlc_object_t * );
+diff --git a/modules/demux/avformat/avformat.c b/modules/demux/avformat/avformat.c
+index 616c670ca8..a7822a4a61 100644
+--- a/modules/demux/avformat/avformat.c
++++ b/modules/demux/avformat/avformat.c
+@@ -41,7 +41,7 @@ vlc_module_begin ()
+     set_description( N_("Avformat demuxer" ) )
+     set_shortname( N_("Avformat") )
+     set_capability( "demux", 2 )
+-    set_callbacks( OpenDemux, CloseDemux )
++    set_callbacks( OpenDemux__avformat, CloseDemux__avformat )
+     set_section( N_("Demuxer"), NULL )
+     add_string( "avformat-format", NULL, FORMAT_TEXT, FORMAT_LONGTEXT, true )
+     add_obsolete_string("ffmpeg-format") /* removed since 2.1.0 */
+@@ -59,7 +59,7 @@ vlc_module_begin ()
+     add_string( "sout-avformat-mux", NULL, MUX_TEXT, MUX_LONGTEXT, true )
+     add_obsolete_string("ffmpeg-mux") /* removed since 2.1.0 */
+     add_string( "sout-avformat-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true )
+-    set_callbacks( OpenMux, CloseMux )
++    set_callbacks( OpenMux__avformat, CloseMux__avformat )
+ #endif
+ #ifndef MERGE_FFMPEG
+ vlc_module_end ()
+diff --git a/modules/demux/avformat/avformat.h b/modules/demux/avformat/avformat.h
+index 5105dd1efd..7c97fc842a 100644
+--- a/modules/demux/avformat/avformat.h
++++ b/modules/demux/avformat/avformat.h
+@@ -25,12 +25,12 @@ void LibavcodecCallback( void *p_opaque, int i_level,
+                              const char *psz_format, va_list va );
+ 
+ /* Demux module */
+-int  OpenDemux ( vlc_object_t * );
+-void CloseDemux( vlc_object_t * );
++int  OpenDemux__avformat ( vlc_object_t * );
++void CloseDemux__avformat( vlc_object_t * );
+ 
+ /* Mux module */
+-int  OpenMux ( vlc_object_t * );
+-void CloseMux( vlc_object_t * );
++int  OpenMux__avformat ( vlc_object_t * );
++void CloseMux__avformat( vlc_object_t * );
+ 
+ #define MUX_TEXT N_("Avformat mux")
+ #define MUX_LONGTEXT N_("Force use of a specific avformat muxer.")
+diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
+index 4824215c02..8b50528624 100644
+--- a/modules/demux/avformat/demux.c
++++ b/modules/demux/avformat/demux.c
+@@ -152,7 +152,7 @@ static void get_rotation(es_format_t *fmt, AVStream *s)
+ #endif
+ }
+ 
+-int OpenDemux( vlc_object_t *p_this )
++int OpenDemux__avformat( vlc_object_t *p_this )
+ {
+     demux_t       *p_demux = (demux_t*)p_this;
+     demux_sys_t   *p_sys;
+@@ -290,7 +290,7 @@ int OpenDemux( vlc_object_t *p_this )
+     if( !p_io_buffer )
+     {
+         free( psz_url );
+-        CloseDemux( p_this );
++        CloseDemux__avformat( p_this );
+         return VLC_ENOMEM;
+     }
+ 
+@@ -299,7 +299,7 @@ int OpenDemux( vlc_object_t *p_this )
+     {
+         av_free( p_io_buffer );
+         free( psz_url );
+-        CloseDemux( p_this );
++        CloseDemux__avformat( p_this );
+         return VLC_ENOMEM;
+     }
+ 
+@@ -309,7 +309,7 @@ int OpenDemux( vlc_object_t *p_this )
+     {
+         av_free( p_io_buffer );
+         free( psz_url );
+-        CloseDemux( p_this );
++        CloseDemux__avformat( p_this );
+         return VLC_ENOMEM;
+     }
+ 
+@@ -324,7 +324,7 @@ int OpenDemux( vlc_object_t *p_this )
+         av_free( pb );
+         p_sys->ic = NULL;
+         free( psz_url );
+-        CloseDemux( p_this );
++        CloseDemux__avformat( p_this );
+         return VLC_EGENERIC;
+     }
+     free( psz_url );
+@@ -688,7 +688,7 @@ int OpenDemux( vlc_object_t *p_this )
+ /*****************************************************************************
+  * Close
+  *****************************************************************************/
+-void CloseDemux( vlc_object_t *p_this )
++void CloseDemux__avformat( vlc_object_t *p_this )
+ {
+     demux_t     *p_demux = (demux_t*)p_this;
+     demux_sys_t *p_sys = p_demux->p_sys;
+diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
+index 9072c2f8e1..3045a35e32 100644
+--- a/modules/demux/avformat/mux.c
++++ b/modules/demux/avformat/mux.c
+@@ -84,7 +84,7 @@ static int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size,
+ /*****************************************************************************
+  * Open
+  *****************************************************************************/
+-int OpenMux( vlc_object_t *p_this )
++int OpenMux__avformat( vlc_object_t *p_this )
+ {
+     AVOutputFormat *file_oformat;
+     sout_mux_t *p_mux = (sout_mux_t*)p_this;
+@@ -161,7 +161,7 @@ int OpenMux( vlc_object_t *p_this )
+ /*****************************************************************************
+  * Close
+  *****************************************************************************/
+-void CloseMux( vlc_object_t *p_this )
++void CloseMux__avformat( vlc_object_t *p_this )
+ {
+     sout_mux_t *p_mux = (sout_mux_t*)p_this;
+     sout_mux_sys_t *p_sys = p_mux->p_sys;
+diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
+index f51569b7bb..f1bcbb0ac2 100644
+--- a/modules/demux/ttml.c
++++ b/modules/demux/ttml.c
+@@ -390,7 +390,7 @@ static int Demux( demux_t* p_demux )
+     return VLC_DEMUXER_SUCCESS;
+ }
+ 
+-int OpenDemux( vlc_object_t* p_this )
++int OpenDemux__ttml( vlc_object_t* p_this )
+ {
+     demux_t     *p_demux = (demux_t*)p_this;
+     demux_sys_t *p_sys;
+@@ -479,12 +479,12 @@ int OpenDemux( vlc_object_t* p_this )
+     return VLC_SUCCESS;
+ 
+ error:
+-    CloseDemux( p_demux );
++    CloseDemux__ttml( p_demux );
+ 
+     return VLC_EGENERIC;
+ }
+ 
+-void CloseDemux( demux_t* p_demux )
++void CloseDemux__ttml( demux_t* p_demux )
+ {
+     demux_sys_t* p_sys = p_demux->p_sys;
+ 
+diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c
+index 5e56eb88e0..2d76ced861 100644
+--- a/modules/video_filter/deinterlace/deinterlace.c
++++ b/modules/video_filter/deinterlace/deinterlace.c
+@@ -113,7 +113,7 @@ vlc_module_begin ()
+         change_integer_list( phosphor_dimmer_list, phosphor_dimmer_list_text )
+         change_safe ()
+     add_shortcut( "deinterlace" )
+-    set_callbacks( Open, Close )
++    set_callbacks( Open__deinterlace, Close )
+ vlc_module_end ()
+ 
+ /*****************************************************************************
+@@ -124,7 +124,7 @@ vlc_module_end ()
+  * Available config options for the deinterlacer module.
+  *
+  * Note that also algorithm-specific options must be listed here,
+- * and reading logic for them implemented in Open().
++ * and reading logic for them implemented in Open__deinterlace().
+  */
+ static const char *const ppsz_filter_options[] = {
+     "mode", "phosphor-chroma", "phosphor-dimmer",
+@@ -275,7 +275,7 @@ static void GetOutputFormat( filter_t *p_filter,
+ 
+ #define DEINTERLACE_DST_SIZE 3
+ 
+-/* This is the filter function. See Open(). */
++/* This is the filter function. See Open__deinterlace(). */
+ picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
+ {
+     filter_sys_t *p_sys = p_filter->p_sys;
+@@ -596,10 +596,10 @@ int Mouse( filter_t *p_filter,
+ 
+ 
+ /*****************************************************************************
+- * Open
++ * Open__deinterlace
+  *****************************************************************************/
+ 
+-int Open( vlc_object_t *p_this )
++int Open__deinterlace( vlc_object_t *p_this )
+ {
+     filter_t *p_filter = (filter_t*)p_this;
+     filter_sys_t *p_sys;
+diff --git a/modules/video_filter/deinterlace/deinterlace.h b/modules/video_filter/deinterlace/deinterlace.h
+index 618db45e7c..669f62ff34 100644
+--- a/modules/video_filter/deinterlace/deinterlace.h
++++ b/modules/video_filter/deinterlace/deinterlace.h
+@@ -130,7 +130,7 @@ struct filter_sys_t
+ /**
+  * Top-level filtering method.
+  *
+- * Open() sets this up as the processing method (pf_video_filter)
++ * Open__deinterlace() sets this up as the processing method (pf_video_filter)
+  * in the filter structure.
+  *
+  * Note that there is no guarantee that the returned picture directly
+@@ -164,7 +164,7 @@ struct filter_sys_t
+  * @param p_filter The filter instance.
+  * @param p_pic The latest input picture.
+  * @return Deinterlaced picture(s). Linked list of picture_t's or NULL.
+- * @see Open()
++ * @see Open__deinterlace()
+  * @see filter_t
+  * @see filter_sys_t
+  */
+@@ -180,7 +180,7 @@ picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic );
+  *    wants to convert the output to a format different
+  *    from the input. See SetFilterMethod().
+  *
+- * Open() is atomic: if an error occurs, the state of p_this
++ * Open__deinterlace() is atomic: if an error occurs, the state of p_this
+  * is left as it was before the call to this function.
+  *
+  * @param p_this The filter instance as vlc_object_t.
+@@ -191,17 +191,17 @@ picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic );
+  * @see IsChromaSupported()
+  * @see SetFilterMethod()
+  */
+-int Open( vlc_object_t *p_this );
++int Open__deinterlace( vlc_object_t *p_this );
+ 
+ /**
+  * Resets the filter state, including resetting all algorithm-specific state
+  * and discarding all histories, but does not stop the filter.
+  *
+- * Open() sets this up as the flush method (pf_flush)
++ * Open__deinterlace() sets this up as the flush method (pf_flush)
+  * in the filter structure.
+  *
+  * @param p_filter The filter instance.
+- * @see Open()
++ * @see Open__deinterlace()
+  * @see filter_t
+  * @see filter_sys_t
+  * @see metadata_history_t
+@@ -213,7 +213,7 @@ void Flush( filter_t *p_filter );
+ /**
+  * Mouse callback for the deinterlace filter.
+  *
+- * Open() sets this up as the mouse callback method (pf_video_mouse)
++ * Open__deinterlace() sets this up as the mouse callback method (pf_video_mouse)
+  * in the filter structure.
+  *
+  * Currently, this handles the scaling of the y coordinate for algorithms
+@@ -225,7 +225,7 @@ void Flush( filter_t *p_filter );
+  * @param[in] p_new Latest mouse position data.
+  * @return VLC error code; currently always VLC_SUCCESS.
+  * @retval VLC_SUCCESS All ok.
+- * @see Open()
++ * @see Open__deinterlace()
+  * @see filter_t
+  * @see vlc_mouse_t
+  */
+@@ -276,7 +276,7 @@ void Close( vlc_object_t *p_this );
+  * but the new value will only take effect upon the next call to Deinterlace()
+  * (i.e. at the next incoming frame).
+  *
+- * The first-ever frame that arrives to the filter after Open() is always
++ * The first-ever frame that arrives to the filter after Open__deinterlace() is always
+  * handled as having i_frame_offset = 0. For the second and all subsequent
+  * frames, each algorithm is responsible for setting the offset correctly.
+  * (The default is 0, so if that is correct, there's no need to do anything.)
+-- 
+2.11.0
+