Universal builds of gstreamer on macosx and osxvideosrc
Dan Kegel
dank at kegel.com
Mon Sep 30 09:54:43 PDT 2013
I'm working on an app that bundles a copy of gstreamer on the mac.
Everything is 64 bits.
This is all fine, except that now we'd like to get at the webcam, and
osxvideosrc is 32 bit only (because nobody has ported it to cocoa yet).
Until somebody does port osxvideosrc to cocoa, I could potentially
run a 32 bit version of gstreamer to read from the webcam, and
have it send data to the 64 bit app via a pipe or something.
I naively thought the way to do this was to do a universal build
of everything (gstreamer, my app, the works), and copy in
the osxvideosrc plugin from a 32 bit build. This fails; the command
arch -i386 gst-inspect osxvideosrc
fails to find the 32 bit plugin :-(
Digging into how this works a bit, I find
a) arch is not transitive; child processes of the 32 bit app happily
launch as 64 bit
b) gstreamer uses a lovely binary registry system in ~/.gstreamer-0.10,
and there's a separate registry for 32 and 64 bit apps
c) the registry is initialized on first run by spawning gst-plugin-scanner
d) you can set the path to gst-plugin-scanner by setting GST_PLUGIN_SCANNER
e) gst-plugin-scanner is very carefully run via arch so that it's the same
bitness as the parent process
f) because of a), I can't win
After two hours of tracing through all that, I'm starting to think
that I should give up on trying a universal build of gstreamer to do what
I want; there are too many moving pieces, and it's too fragile.
Instead, I should have a completely separate 32 bit gstreamer
environment just for the one process that needs osxvideosrc.
Or has anybody else had any luck with using osxvideosrc from
a universal build of gstreamer?
More information about the gstreamer-devel
mailing list