Adding GStreamer plugins

Kirill Kirichenko kirill.kirichenko at
Tue Mar 25 13:32:01 UTC 2014

On 25.03.2014 17:21, Michael Berry wrote:
> It seems the issue that I was having was indeed to do with the step you
> outlined; I was getting unresolved external linker issues because it
> couldn't find the functions I hadn't added. However, while the linker
> errors associated with all the glib functions have now been resolved
> through adding the methods (to both glib-lite.def and glib-liteD.def),
> adding the relevant functions to gstreamer-lite.def complains about an
> unresolved external symbol in the def file:
> gstreamer-lite.def : error LNK2001: unresolved external symbol
> gst_byte_writer_free
> gstreamer-lite.def : error LNK2001: unresolved external symbol
> gst_byte_writer_free_and_get_buffer
> gstreamer-lite.def : error LNK2001: unresolved external symbol
> gst_byte_writer_new_with_size
> When they're not in the def file, I get the following linker errors instead:
> libgstplugins.lib(ebml-write.obj) : error LNK2019: unresolved external
> symbol _gst_byte_writer_free referenced in function _gst_ebml_write_finalize
> libgstplugins.lib(ebml-write.obj) : error LNK2019: unresolved external
> symbol _gst_byte_writer_new_with_size referenced in function
> _gst_ebml_start_streamheader
> libgstplugins.lib(ebml-write.obj) : error LNK2019: unresolved external
> symbol _gst_byte_writer_free_and_get_bufferreferenced in function
> _gst_ebml_stop_streamheader
> I've added these to the gstreamer-lite.def file in exactly the same way
> as I added the glib functions to the glib files - any idea what I might
> have missed?
> gst_byte_writer_free_and_get_buffer at 184NONAME
> gst_byte_writer_free at 185NONAME
> gst_byte_writer_new_with_size at 186NONAME
This is not necessary that you should add all methods to the def file. 
Here first you should look for where the symbols are implemented and you 
possibly miss this file from from makefile. Take all symbols that linker 
shows to you, strip leading underscore character, and find them in the 
vanilla glib. It's possible that we did not include the file where they 
are implemented to the sources.
In short: look where gst_byte_writer_free, gst_byte_writer_new_with_size 
and gst_byte_writer_free_and_get_bufferreferenced are implemented and 
make sure this file is compiled.
> (I'm assuming NONAME is always there, and the number is sequential.) The
> functions are in gstbytewriter.h which is there, though perhaps I need
> to make the linker aware of that file specifically if it's not used
> anywhere else? (I'm just guessing here though.)
NONAME is always there and the number is sequential. Also make sure use 
TABS between the columns. As far as I remember TABS are used, but do 
double check it.

> Happy to look at upgrading gstreamer to the latest version as a next
> task, so I'd be more than willing to give that a go. Though I would
> quite like to get the matroska plugin working first - just so I've got
> some experience at building in a working plugin, and have some end
> result from what I'm trying to achieve here!

> Many thanks,
> Michael
> On 25 March 2014 11:00, Kirill Kirichenko <kirill.kirichenko at
> <mailto:kirill.kirichenko at>> wrote:
>     Hi Michael.
>     See my comments inline.
>     On 24.03.2014 04:31, Michael Berry wrote:
>         I'm now a bit further along with this, though struggling to get the
>         matroska plugin to compile (getting a bunch of unresolved
>         external symbol
>         errors for functions it uses in glib - not entirely sure why at
>         the moment,
>         as I said C is not my strong point.) I've also noticed the plugins
>         currently bundled have quite a few changes to the gstreamer
>         version, and I
>         can't quite work out the logic behind why things have been
>         changed the way
>         they have - so even after the compilation issue is resolved I'm
>         now less
>         confident that it will just drop in and work! Again, if someone
>         knowledgeable in this area that's lurking in the shadows could
>         shed any
>         light on any of this, it would be hugely appreciated.
>     We did some changes in existing GStreamer code because it had errors
>     and because we needed to expand some functionality. The changes are
>     not very extensive.
>         However, putting the current problems aside for a bit, the snags
>         I hit up
>         until this point could I think be relatively easily addressed in the
>         documentation. With that in mind could I suggest a few
>         additional points
>         for the wiki? These may be obvious to the majority reading here,
>         but as
>         someone completely new to building JFX they had me stumped for a
>         while!
>     I can give you some directions. There is no wiki. I'd appreciate if
>     you created one.
>            - It turns out that the Gstreamer stuff doesn't compile at
>         all by default,
>         which is why I wasn't seeing any changes on the native level. To
>         ensure
>         GStreamer is actually compiled, you need to copy the
> file to, and
>         uncomment the
>         "#COMPILE_MEDIA = true" line. (A similar scenario would appear
>         to exist for
>         any webkit alterations as per the line above.)
>     You don't need to comment/uncomment anything. Just add
>     -PCOMPILE_MEDIA=true to the gradle command line. You can however
>     change the properties file too.
>            - As well as the requirements listed, I needed the Windows SDK (
>         <>)
>         installed for
>         GStreamer to compile successfully under Windows (7) - without it
>         cygpath
>         just threw a rather confusing error.
>     You need windows 7.1a SDK and speaking precisely you need only
>     samples from it because samples have BaseClasses at
>     Samples/multimedia/directshow/__baseclasses. BaseClasses are used
>     for Oracle direchshowwrapper plugin.
>            - The developer workflow page (
>         <>)
>         refers
>         to  "-Djavafx.ext.dirs" - I think this should be
>         "-Djava.ext.dirs" instead?
>     What are you gonna use it for ?
>         I'm happy to make the above changes myself but unsure of if /
>         where you can
>         sign up for an account, so I'm just throwing them here for now -
>         if anyone
>         could point me to the right place then that'd be great!
>     Steve. Can you give an advice ?
>         If I do ever manage to get this working (ha-ha) I'd also like to
>         throw up a
>         wiki page just detailing how to grab a gstreamer plugin and make the
>         necessary changes to it to compile it into openjfx as a stop gap
>         to then
>         perhaps working on one or both of the above JIRA issues and
>         seeing where I
>         get - does this sound reasonable?
>     It does.
>                 On Mar 22, 2014, at 9:26 PM, Michael Berry
>                 <berry120 at <mailto:berry120 at>> wrote:
>                     However, I'm not sure if I'm going about including
>                     the matroska plugin
>                 in
>                     the right way - I've currently done the following:
>                     - Downloaded the latest version of the plugins from
>                     here (
>                     http://gstreamer.freedesktop.__org/src/gst-plugins-good/
>                     <>),
>                     then added the
>                     matroska one to the
>                     modules/media/src/main/native/__gstreamer/plugins/
>                     folder, as well as the
>                 modules/media/src/main/native/__gstreamer/gstreamer-lite/gst-__plugins-good/gst/
>                     folder (I'm unsure of this - should I add it to both
>                     these folders?).
>     Well you see. If you download the latest matroska plugin it
>     potentially can have dependencies on the latest GStreamer platform.
>     We don't have/use the latest gstreamer. The version we use is
>     0.10.35. And the latest available is 1.x. They are incompatible in
>     some methods.
>                     - Added all the C files from the first folder
>                     mentioned above to the
>                     plugins.vcxproj file
>                     - Added the relevant files and directory to
>                     Makefile.gstplugins
>                     - Called the additional relevant plugin_init()
>                     function in
>                     gstplugins-lite.c
>     There is one more thing you need to do here for Windows only apart
>     from running gradle with -PCOMPILE_MEDIA=true. Windows build system
>     has files that export symbols
>     1) from glib-lite.dll
>     ${jfxroot}/rt/modules/media/__src/main/native/gstreamer/3rd___party/glib/glib-2.28.8/build/__win32/vs100/{glib-lite.def|__glib-liteD.def}
>     Here the version with "D" is used for debug build and may contain
>     more symbols for export.
>     2) from gstreamer-lite.dll
>     ${jfxroot}/rt/modules/media/__src/main/native/gstreamer/__projects/win/gstreamer-lite.__def
>     - used for both Release and Debug.
>     If your plugin uses some methods of gstreamer/glib libraries not
>     mentioned in the files you should add the methods to the files.
>     Syntax is pretty simple. If you don't add depending methods to these
>     files you will get linker errors. C/C++ compiler will not generate
>     errors.
>     Actually I think the best way to start developing/improving the
>     Media component is to upgrade GStreamer to 1.x from 0.10.35. It
>     would be a very good starting point and you would get less or no
>     problems using the latest available plugins. If someone wanna take
>     over this I can explain in details how to do it.
>     K

More information about the openjfx-dev mailing list