Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure the osx build include all the gstreamer modules we need (and only those) #289

Closed
totaam opened this issue Mar 10, 2013 · 8 comments
Closed

Comments

@totaam
Copy link
Collaborator

totaam commented Mar 10, 2013

Issue migrated from trac ticket # 289

component: platforms | priority: major | resolution: fixed | keywords: packaging

2013-03-10 12:54:36: antoine created the issue


And as a result, sound does not work unless the GStreamer framework is installed locally, and the option is now shown in the menu.

@totaam
Copy link
Collaborator Author

totaam commented Mar 10, 2013

2013-03-10 13:26:57: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Mar 10, 2013

2013-03-10 13:26:57: antoine changed title from osx build does not include all gstreamer components to osx build does not include all / too many gstreamer components

@totaam
Copy link
Collaborator Author

totaam commented Mar 10, 2013

2013-03-10 13:26:57: antoine commented


r2930 sets up the correct paths, which means we can now see the plugins from wherever the application is installed (here on a clean/minimal 10.6.8 system):

$ Xpra.app/Contents/Helpers/Python -c "from xpra.sound import gstreamer_util;gstreamer_util.main()"
2013-03-10 13:16:58,570 GStreamer plugins found: 3gppmux, aacparse, ac3iec958, \
    ac3parse, adder, adpcmdec .......

And the configuration class also sees them:

$ Xpra.app/Contents/Helpers/Python -c \
    "from xpra.scripts.config import get_codecs;print('codecs=%s' % get_codecs(True,False))"
codecs=['mp3', 'wav']
$ Xpra.app/Contents/Helpers/Python -c \
    "from xpra.scripts.config import get_codecs;print('codecs=%s' % get_codecs(False,False))"
codecs=['mp3', 'wav']

Problem is that somehow the xpra attach command somehow does not!?:

WARNING: some of the specified speaker codecs are not available: mp3
WARNING: some of the specified microphone codecs are not available: mp3

So, still left to do:

  • fix "xpra attach"
  • ensure we ship all the required dylibs to support aac, opus, etc..
  • trim down the list of plugins we ship (similar to r2776 for win32)

@totaam
Copy link
Collaborator Author

totaam commented Mar 11, 2013

2013-03-11 05:59:31: antoine changed title from osx build does not include all / too many gstreamer components to ensure the osx build include all the gstreamer modules we need (and only those)

@totaam
Copy link
Collaborator Author

totaam commented Mar 11, 2013

2013-03-11 05:59:31: antoine commented


First, the osx build instructions needed updating to include all the audio codecs we want to support. Then re-build all the gstreamer modules... (long)


Then we need to figure out which dylibs we want to include, since py2app and gtk-mac-bundler fail to do this automagically for us.

Here is how to get the list of dylibs for a plugin :

otool -L Xpra.app/Contents/Resources/lib/gstreamer-0.10/libgstfaac.so 
Xpra.app/Contents/Resources/lib/gstreamer-0.10/libgstfaac.so:
	@executable_path/../Resources/lib/libfaac.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	@executable_path/../Resources/lib/libgstbase-0.10.0.dylib (compatibility version 30.0.0, current version 30.0.0)
	@executable_path/../Resources/lib/libgstreamer-0.10.0.dylib (compatibility version 30.0.0, current version 30.0.0)
	@executable_path/../Resources/lib/libgobject-2.0.0.dylib (compatibility version 3401.0.0, current version 3401.1.0)
	@executable_path/../Resources/lib/libgmodule-2.0.0.dylib (compatibility version 3401.0.0, current version 3401.1.0)
	@executable_path/../Resources/lib/libgthread-2.0.0.dylib (compatibility version 3401.0.0, current version 3401.1.0)
	@executable_path/../Resources/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.0.0)
	@executable_path/../Resources/lib/libglib-2.0.0.dylib (compatibility version 3401.0.0, current version 3401.1.0)
	@executable_path/../Resources/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.1.0)
	@executable_path/../Resources/lib/libgstaudio-0.10.0.dylib (compatibility version 25.0.0, current version 25.0.0)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)

The lib directory already contains the base plugins (which need a little bit of trimming):

libgst*0.10.dylib
libgstapp-0.10.dylib
libgstaudio-0.10.dylib
libgstbase-0.10.dylib
libgstbasevideo-0.10.dylib
libgstcdda-0.10.dylib
libgstcheck-0.10.dylib
libgstcontroller-0.10.dylib
libgstdataprotocol-0.10.dylib
libgstfft-0.10.dylib
libgstinterfaces-0.10.dylib
libgstnet-0.10.dylib
libgstnetbuffer-0.10.dylib
libgstpbutils-0.10.dylib
libgstphotography-0.10.dylib
libgstreamer-0.10.dylib
libgstriff-0.10.dylib
libgstrtp-0.10.dylib
libgstrtsp-0.10.dylib
libgstsdp-0.10.dylib
libgstsignalprocessor-0.10.dylib
libgsttag-0.10.dylib
libgstvideo-0.10.dylib

And the following generic dylibs which are also used/included by gtk:

libgobject-2.0.0.dylib
libgmodule-2.0.0.dylib
libgthread-2.0.0.dylib
libxml2.2.dylib
libglib-2.0.0.dylib
libintl.8.dylib

And now the list of extras we need:

  • libfaac.0.dylib:
libfaac.0.dylib
  • libfaad.0.dylib:
libfaad.2.dylib
  • libgstvorbis.so:
libvorbisenc.2.dylib
libvorbis.0.dylib
  • libgstmad.so:
libmad.0.dylib
  • libgstlame.so:
libmp3lame.0.dylib
  • libgstflac.so:
libFLAC.8.dylib
  • libgstmpegaudioparse.so: none
  • libgstspeex.so:
libspeex.1.dylib
  • libgstwavpack.so:
libwavpack.1.dylib
  • libgstwavparse.so: none

That is now what is included in the OSX builds as of r2931.


Notes:

  • a number of codecs are sub-optimal on OSX (flac lacks assembler optimizations, opus build moans about the lack of "fast float approximations").
  • opus support is not included since it is not supported in the gstreamer 0.10.x versions that build properly on OSX

@totaam
Copy link
Collaborator Author

totaam commented Mar 11, 2013

2013-03-11 06:37:42: antoine changed status from assigned to closed

@totaam
Copy link
Collaborator Author

totaam commented Mar 11, 2013

2013-03-11 06:37:42: antoine changed resolution from ** to fixed

@totaam
Copy link
Collaborator Author

totaam commented Mar 11, 2013

2013-03-11 06:37:42: antoine commented


The missing plugins error is fixed in r2933

Closing - this works OK-ish for now on OSX, just be aware of #249

@totaam totaam closed this as completed Mar 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant