0013-build-rename-exported-symbols-by-module.patch 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. From 78de355e24edb893c6614bbde04d9ffb958260fc Mon Sep 17 00:00:00 2001
  2. From: Thomas Guillem <thomas@gllm.fr>
  3. Date: Tue, 11 Apr 2017 15:15:26 +0200
  4. Subject: [PATCH 13/15] build: rename exported symbols by module
  5. This is quite ugly and temporary. Ideally we should rename symbols in binaries like the Android script do.
  6. ---
  7. modules/codec/ttml/ttml.c | 2 +-
  8. modules/codec/ttml/ttml.h | 4 ++--
  9. modules/demux/avformat/avformat.c | 4 ++--
  10. modules/demux/avformat/avformat.h | 8 ++++----
  11. modules/demux/avformat/demux.c | 16 ++++++++--------
  12. modules/demux/avformat/mux.c | 4 ++--
  13. modules/demux/ttml.c | 6 +++---
  14. modules/video_filter/deinterlace/deinterlace.c | 10 +++++-----
  15. modules/video_filter/deinterlace/deinterlace.h | 18 +++++++++---------
  16. 9 files changed, 36 insertions(+), 36 deletions(-)
  17. diff --git a/modules/codec/ttml/ttml.c b/modules/codec/ttml/ttml.c
  18. index 24b1050d5a..9b0abbbf26 100644
  19. --- a/modules/codec/ttml/ttml.c
  20. +++ b/modules/codec/ttml/ttml.c
  21. @@ -54,7 +54,7 @@ vlc_module_begin ()
  22. set_capability( "demux", 3 )
  23. set_category( CAT_INPUT )
  24. set_subcategory( SUBCAT_INPUT_DEMUX )
  25. - set_callbacks( OpenDemux, CloseDemux )
  26. + set_callbacks( OpenDemux__ttml, CloseDemux__ttml )
  27. add_shortcut( "ttml" )
  28. vlc_module_end ()
  29. diff --git a/modules/codec/ttml/ttml.h b/modules/codec/ttml/ttml.h
  30. index 51f41126f9..5781a92a34 100644
  31. --- a/modules/codec/ttml/ttml.h
  32. +++ b/modules/codec/ttml/ttml.h
  33. @@ -18,8 +18,8 @@
  34. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  35. *****************************************************************************/
  36. -int OpenDemux( vlc_object_t* p_this );
  37. -void CloseDemux( demux_t* p_demux );
  38. +int OpenDemux__ttml( vlc_object_t* p_this );
  39. +void CloseDemux__ttml( demux_t* p_demux );
  40. int OpenDecoder ( vlc_object_t * );
  41. void CloseDecoder ( vlc_object_t * );
  42. diff --git a/modules/demux/avformat/avformat.c b/modules/demux/avformat/avformat.c
  43. index 28c5a7df76..29cd5b144f 100644
  44. --- a/modules/demux/avformat/avformat.c
  45. +++ b/modules/demux/avformat/avformat.c
  46. @@ -41,7 +41,7 @@ vlc_module_begin ()
  47. set_description( N_("Avformat demuxer" ) )
  48. set_shortname( N_("Avformat") )
  49. set_capability( "demux", 2 )
  50. - set_callbacks( OpenDemux, CloseDemux )
  51. + set_callbacks( OpenDemux__avformat, CloseDemux__avformat )
  52. set_section( N_("Demuxer"), NULL )
  53. add_string( "avformat-format", NULL, FORMAT_TEXT, FORMAT_LONGTEXT, true )
  54. add_obsolete_string("ffmpeg-format") /* removed since 2.1.0 */
  55. @@ -57,7 +57,7 @@ vlc_module_begin ()
  56. add_string( "sout-avformat-mux", NULL, MUX_TEXT, MUX_LONGTEXT, true )
  57. add_obsolete_string("ffmpeg-mux") /* removed since 2.1.0 */
  58. add_string( "sout-avformat-options", NULL, AV_OPTIONS_TEXT, AV_OPTIONS_LONGTEXT, true )
  59. - set_callbacks( OpenMux, CloseMux )
  60. + set_callbacks( OpenMux__avformat, CloseMux__avformat )
  61. #endif
  62. #ifndef MERGE_FFMPEG
  63. vlc_module_end ()
  64. diff --git a/modules/demux/avformat/avformat.h b/modules/demux/avformat/avformat.h
  65. index 5105dd1efd..7c97fc842a 100644
  66. --- a/modules/demux/avformat/avformat.h
  67. +++ b/modules/demux/avformat/avformat.h
  68. @@ -25,12 +25,12 @@ void LibavcodecCallback( void *p_opaque, int i_level,
  69. const char *psz_format, va_list va );
  70. /* Demux module */
  71. -int OpenDemux ( vlc_object_t * );
  72. -void CloseDemux( vlc_object_t * );
  73. +int OpenDemux__avformat ( vlc_object_t * );
  74. +void CloseDemux__avformat( vlc_object_t * );
  75. /* Mux module */
  76. -int OpenMux ( vlc_object_t * );
  77. -void CloseMux( vlc_object_t * );
  78. +int OpenMux__avformat ( vlc_object_t * );
  79. +void CloseMux__avformat( vlc_object_t * );
  80. #define MUX_TEXT N_("Avformat mux")
  81. #define MUX_LONGTEXT N_("Force use of a specific avformat muxer.")
  82. diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
  83. index 2f3b907410..7c1a1a5319 100644
  84. --- a/modules/demux/avformat/demux.c
  85. +++ b/modules/demux/avformat/demux.c
  86. @@ -148,7 +148,7 @@ static void get_rotation(es_format_t *fmt, AVStream *s)
  87. }
  88. }
  89. -int OpenDemux( vlc_object_t *p_this )
  90. +int OpenDemux__avformat( vlc_object_t *p_this )
  91. {
  92. demux_t *p_demux = (demux_t*)p_this;
  93. demux_sys_t *p_sys;
  94. @@ -288,7 +288,7 @@ int OpenDemux( vlc_object_t *p_this )
  95. if( !p_io_buffer )
  96. {
  97. free( psz_url );
  98. - CloseDemux( p_this );
  99. + CloseDemux__avformat( p_this );
  100. return VLC_ENOMEM;
  101. }
  102. @@ -297,7 +297,7 @@ int OpenDemux( vlc_object_t *p_this )
  103. {
  104. av_free( p_io_buffer );
  105. free( psz_url );
  106. - CloseDemux( p_this );
  107. + CloseDemux__avformat( p_this );
  108. return VLC_ENOMEM;
  109. }
  110. @@ -307,7 +307,7 @@ int OpenDemux( vlc_object_t *p_this )
  111. {
  112. av_free( p_io_buffer );
  113. free( psz_url );
  114. - CloseDemux( p_this );
  115. + CloseDemux__avformat( p_this );
  116. return VLC_ENOMEM;
  117. }
  118. @@ -322,7 +322,7 @@ int OpenDemux( vlc_object_t *p_this )
  119. av_free( pb );
  120. p_sys->ic = NULL;
  121. free( psz_url );
  122. - CloseDemux( p_this );
  123. + CloseDemux__avformat( p_this );
  124. return VLC_EGENERIC;
  125. }
  126. free( psz_url );
  127. @@ -357,13 +357,13 @@ int OpenDemux( vlc_object_t *p_this )
  128. if( !nb_streams )
  129. {
  130. msg_Err( p_demux, "No streams found");
  131. - CloseDemux( p_this );
  132. + CloseDemux__avformat( p_this );
  133. return VLC_EGENERIC;
  134. }
  135. p_sys->tracks = calloc( nb_streams, sizeof(*p_sys->tracks) );
  136. if( !p_sys->tracks )
  137. {
  138. - CloseDemux( p_this );
  139. + CloseDemux__avformat( p_this );
  140. return VLC_ENOMEM;
  141. }
  142. @@ -690,7 +690,7 @@ int OpenDemux( vlc_object_t *p_this )
  143. /*****************************************************************************
  144. * Close
  145. *****************************************************************************/
  146. -void CloseDemux( vlc_object_t *p_this )
  147. +void CloseDemux__avformat( vlc_object_t *p_this )
  148. {
  149. demux_t *p_demux = (demux_t*)p_this;
  150. demux_sys_t *p_sys = p_demux->p_sys;
  151. diff --git a/modules/demux/avformat/mux.c b/modules/demux/avformat/mux.c
  152. index 1c01253184..b256f3d2d5 100644
  153. --- a/modules/demux/avformat/mux.c
  154. +++ b/modules/demux/avformat/mux.c
  155. @@ -84,7 +84,7 @@ static int IOWriteTyped(void *opaque, uint8_t *buf, int buf_size,
  156. /*****************************************************************************
  157. * Open
  158. *****************************************************************************/
  159. -int OpenMux( vlc_object_t *p_this )
  160. +int OpenMux__avformat( vlc_object_t *p_this )
  161. {
  162. AVOutputFormat *file_oformat;
  163. sout_mux_t *p_mux = (sout_mux_t*)p_this;
  164. @@ -163,7 +163,7 @@ int OpenMux( vlc_object_t *p_this )
  165. /*****************************************************************************
  166. * Close
  167. *****************************************************************************/
  168. -void CloseMux( vlc_object_t *p_this )
  169. +void CloseMux__avformat( vlc_object_t *p_this )
  170. {
  171. sout_mux_t *p_mux = (sout_mux_t*)p_this;
  172. sout_mux_sys_t *p_sys = p_mux->p_sys;
  173. diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
  174. index a22cbb6a79..b4de0dd009 100644
  175. --- a/modules/demux/ttml.c
  176. +++ b/modules/demux/ttml.c
  177. @@ -391,7 +391,7 @@ static int Demux( demux_t* p_demux )
  178. return VLC_DEMUXER_SUCCESS;
  179. }
  180. -int OpenDemux( vlc_object_t* p_this )
  181. +int OpenDemux__ttml( vlc_object_t* p_this )
  182. {
  183. demux_t *p_demux = (demux_t*)p_this;
  184. demux_sys_t *p_sys;
  185. @@ -530,12 +530,12 @@ int OpenDemux( vlc_object_t* p_this )
  186. return VLC_SUCCESS;
  187. error:
  188. - CloseDemux( p_demux );
  189. + CloseDemux__ttml( p_demux );
  190. return VLC_EGENERIC;
  191. }
  192. -void CloseDemux( demux_t* p_demux )
  193. +void CloseDemux__ttml( demux_t* p_demux )
  194. {
  195. demux_sys_t* p_sys = p_demux->p_sys;
  196. diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c
  197. index 1397aed9b8..31103f3631 100644
  198. --- a/modules/video_filter/deinterlace/deinterlace.c
  199. +++ b/modules/video_filter/deinterlace/deinterlace.c
  200. @@ -113,7 +113,7 @@ vlc_module_begin ()
  201. change_integer_list( phosphor_dimmer_list, phosphor_dimmer_list_text )
  202. change_safe ()
  203. add_shortcut( "deinterlace" )
  204. - set_callbacks( Open, Close )
  205. + set_callbacks( Open__deinterlace, Close )
  206. vlc_module_end ()
  207. /*****************************************************************************
  208. @@ -124,7 +124,7 @@ vlc_module_end ()
  209. * Available config options for the deinterlacer module.
  210. *
  211. * Note that also algorithm-specific options must be listed here,
  212. - * and reading logic for them implemented in Open().
  213. + * and reading logic for them implemented in Open__deinterlace().
  214. */
  215. static const char *const ppsz_filter_options[] = {
  216. "mode", "phosphor-chroma", "phosphor-dimmer",
  217. @@ -239,7 +239,7 @@ static void GetOutputFormat( filter_t *p_filter,
  218. * video filter functions
  219. *****************************************************************************/
  220. -/* This is the filter function. See Open(). */
  221. +/* This is the filter function. See Open__deinterlace(). */
  222. picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic )
  223. {
  224. return DoDeinterlacing( p_filter, &p_filter->p_sys->context, p_pic );
  225. @@ -273,10 +273,10 @@ int Mouse( filter_t *p_filter,
  226. /*****************************************************************************
  227. - * Open
  228. + * Open__deinterlace
  229. *****************************************************************************/
  230. -int Open( vlc_object_t *p_this )
  231. +int Open__deinterlace( vlc_object_t *p_this )
  232. {
  233. filter_t *p_filter = (filter_t*)p_this;
  234. filter_sys_t *p_sys;
  235. diff --git a/modules/video_filter/deinterlace/deinterlace.h b/modules/video_filter/deinterlace/deinterlace.h
  236. index ecc26e0d60..0c71cda6d2 100644
  237. --- a/modules/video_filter/deinterlace/deinterlace.h
  238. +++ b/modules/video_filter/deinterlace/deinterlace.h
  239. @@ -92,7 +92,7 @@ struct filter_sys_t
  240. /**
  241. * Top-level filtering method.
  242. *
  243. - * Open() sets this up as the processing method (pf_video_filter)
  244. + * Open__deinterlace() sets this up as the processing method (pf_video_filter)
  245. * in the filter structure.
  246. *
  247. * Note that there is no guarantee that the returned picture directly
  248. @@ -126,7 +126,7 @@ struct filter_sys_t
  249. * @param p_filter The filter instance.
  250. * @param p_pic The latest input picture.
  251. * @return Deinterlaced picture(s). Linked list of picture_t's or NULL.
  252. - * @see Open()
  253. + * @see Open__deinterlace()
  254. * @see filter_t
  255. * @see filter_sys_t
  256. */
  257. @@ -142,7 +142,7 @@ picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic );
  258. * wants to convert the output to a format different
  259. * from the input. See SetFilterMethod().
  260. *
  261. - * Open() is atomic: if an error occurs, the state of p_this
  262. + * Open__deinterlace() is atomic: if an error occurs, the state of p_this
  263. * is left as it was before the call to this function.
  264. *
  265. * @param p_this The filter instance as vlc_object_t.
  266. @@ -153,17 +153,17 @@ picture_t *Deinterlace( filter_t *p_filter, picture_t *p_pic );
  267. * @see IsChromaSupported()
  268. * @see SetFilterMethod()
  269. */
  270. -int Open( vlc_object_t *p_this );
  271. +int Open__deinterlace( vlc_object_t *p_this );
  272. /**
  273. * Resets the filter state, including resetting all algorithm-specific state
  274. * and discarding all histories, but does not stop the filter.
  275. *
  276. - * Open() sets this up as the flush method (pf_flush)
  277. + * Open__deinterlace() sets this up as the flush method (pf_flush)
  278. * in the filter structure.
  279. *
  280. * @param p_filter The filter instance.
  281. - * @see Open()
  282. + * @see Open__deinterlace()
  283. * @see filter_t
  284. * @see filter_sys_t
  285. * @see metadata_history_t
  286. @@ -175,7 +175,7 @@ void Flush( filter_t *p_filter );
  287. /**
  288. * Mouse callback for the deinterlace filter.
  289. *
  290. - * Open() sets this up as the mouse callback method (pf_video_mouse)
  291. + * Open__deinterlace() sets this up as the mouse callback method (pf_video_mouse)
  292. * in the filter structure.
  293. *
  294. * Currently, this handles the scaling of the y coordinate for algorithms
  295. @@ -187,7 +187,7 @@ void Flush( filter_t *p_filter );
  296. * @param[in] p_new Latest mouse position data.
  297. * @return VLC error code; currently always VLC_SUCCESS.
  298. * @retval VLC_SUCCESS All ok.
  299. - * @see Open()
  300. + * @see Open__deinterlace()
  301. * @see filter_t
  302. * @see vlc_mouse_t
  303. */
  304. @@ -238,7 +238,7 @@ void Close( vlc_object_t *p_this );
  305. * but the new value will only take effect upon the next call to Deinterlace()
  306. * (i.e. at the next incoming frame).
  307. *
  308. - * The first-ever frame that arrives to the filter after Open() is always
  309. + * The first-ever frame that arrives to the filter after Open__deinterlace() is always
  310. * handled as having i_frame_offset = 0. For the second and all subsequent
  311. * frames, each algorithm is responsible for setting the offset correctly.
  312. * (The default is 0, so if that is correct, there's no need to do anything.)
  313. --
  314. 2.14.2