[FFmpeg-devel] WinCE port and api visibility
Sat May 9 01:13:42 CEST 2009
In the last couple of days I had to compile ffmpeg libs for WinCE and I
have some questions.
I used latest svn version of cegcc and to be able to compile I had to
make some minor changes in a couple of .s files and configure script.
After I built it all, I noticed that every function and every global
data object that was ever forward declared with extern gets exported
from the resulting dll.
That means that among exported symbols I see
Some tables that shouldn't be exported:
DCtab_chrom @1 DATA
DCtab_lum @2 DATA
wmv1_decoder @442 DATA
wmv1_encoder @443 DATA
Or some functions that should be used only internally:
I didn't check what gets exported in win32 or linux builds, but it just
doesn't make sense to me to have on wince 75% of exported functions that
are not public API!
So, I made some extensive modifications to make gcc export only public
api functions (http://gcc.gnu.org/wiki/Visibility) and in the end
resulting .dll's were smaller and in case of avcodec I have around 100
exported symbols instead of 433 (and I use some very moderate
configuration options with just a few codecs that I need enabled).
It's quite a big change, since for each exported api I had to prepend
FFMPEG_API in .h and corresponding .c file.
So,.. what symbols are exported at the end of win32 or linux build?
If it's the same bad as in wince build, are there any plans to add
support for controlling what should be exported and what should be used
only internally. If not all functions/data are exported compiler has
more room for some optimizations and in case of mscompiler it will
generate more optimal code in case if functions marked as dllimport
More information about the ffmpeg-devel