-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add Opus SoundSource to Mixxx #151
Conversation
…es with libopusfile 0.4 but needs some tuning.
# More info http://http://www.opus-codec.org/ | ||
if build.platform_is_linux or build.platform_is_osx \ | ||
or build.platform_is_bsd: | ||
# Check for libavcodec, libavformat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy and paste left over?
Hi @illuusio thank you for your work. I have tried to compile it with Ubuntu Sourcy, after changing the minimum libopusfile version to 0.2. But it fails with: src/soundsourceopus.cpp:18:29: fatal error: taglib/opusfile.h: File not found What was your test OS? I think Yes, we need to make it an optional feature, since Ubuntu Precise, the oldest supported Ubuntu has no Kind regards, Daniel |
Yes Opus support is added 7 months ago in Taglib so gotta do little bit reorganization in reading tags (use libopus if taglib is not available. One needs Taglib 1.9.1 at least and https://launchpad.net/ubuntu/+source/taglib only provides 1.8 for Saucy).
I tested this on openSUSE 13.1 and I think I'll compile it on Mac OS X on evening with macports to see if it's good.
I have investigate how to pump this to optional. |
…r from libopus to support tag reading below Taglib 1.9.1
There is still move this one as feature. I'll do that later after I get this working on Ubuntu 12.04. |
…b use libopusfile tag parser (__OPUSFILETAGS__). Also moved Opus as feature (enable with opus=1)
…ng tags without Taglib 1.9.1 (that supports Opus). Bitrate is also corretly calculated.
Ok now this can be compiled on Saucy Salamander (13.10) with libopusfile version 0.2 and opus version 1.0.2 but there is no libopusfile on 12.04 LTS so no luck on that.
This should be ok to merge. |
int SoundSourceOpus::parseHeader() { | ||
int error = 0; | ||
|
||
#ifdef __WINDOWS__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We got rid of this for all other soundsources -- now we just use toLocal8Bit.
Hello which way it doesn't work for you? Can you paste your error? With VirtualBox out box Ubuntu 13.10. It compiles just fine and with above fix it also compiles without opus. |
Just tried the latest version, but it is still failing scons: Reading SConscript files ... |
I just can't get this happen. Can you debug which row is affected.. or what reads in config.log in that part? |
@rryan comments fixed and merged upstream test merging |
Hi @illuusio, I have tested the latest version, but it is still failing with the error above. |
Okay because this is scons problem mainly and I more than rookie with it I come up with this kind of stuff: What is you scons version (with ubuntu 13.10 it should be 2.3.0) and you have libopus 1.0.3 and libopusfile 0.2 (pkg-config installed!)? scons: Configure: Checking for opusfile (0.2 or higher)... pkg-config --atleast-version=0.2 'opusfile' scons: Configure: yes If that is not enough I have very very small minded patch to determine what line scons hangs it self. copy and paste it to mixxx opus dir and apply with 'patch -p1 -i yourpatchname' or meld or what ever you like to use (kdiff3? anyone?). diff --git a/build/features.py b/build/features.py index 0665d29..659dadc 100644 --- a/build/features.py +++ b/build/features.py @@ -898,37 +898,47 @@ class Shoutcast(Feature): class Opus(Feature): def description(self): + print "description 1#" return "Opus (RFC 6716) support" def enabled(self, build): + print "enabled 1#" build.flags['opus'] = util.get_flags(build.env, 'opus', 0) if int(build.flags['opus']): return True return False def add_options(self, build, vars): + print "add_options 1#" vars.Add('opus', 'Set to 1 to enable Opus (RFC 6716) support \ (supported are Opus 1.0 and above and Opusfile 0.2 and above)', 0) def configure(self, build, conf): if not self.enabled(build): + print "0#" return + print "configure 1#" # Supported for Opus (RFC 6716) # More info http://http://www.opus-codec.org/ if build.platform_is_linux or build.platform_is_osx \ or build.platform_is_bsd: # Check for libopusfile # I just randomly picked version numbers lower than mine for this + + print "configure 2#" if not conf.CheckForPKG('opusfile', '0.2'): raise Exception('Missing libopusfile (needs at least 0.2)') + print "configure 3#" build.env.Append(CPPDEFINES='__OPUS__') + print "configure 4#" build.env.ParseConfig('pkg-config opusfile opus --silence-errors \ --cflags --libs') def sources(self, build): + print "sources 3#" return ['soundsourceopus.cpp'] After patch script shows you when error happens.. and this wasn't very clear but hopefully we can get down to the problem. |
@daschuer scons can be very tricky with these cache stuff. I always destroy cache and stuff when update different branch. It's slow but then I can be sure that scons doesn't fool me. |
@rryan: Any objections to merge this soon. Please note, it is a compile option. |
SGTM! Thanks @illuusio. |
As Mangatune is currently supporting Opus releases and it's standardized by the Internet Engineering Task Force (IETF) as RFC 6716 is natural that Mixxx support for Opus.
This is 90% made after Ogg/Vorbis SoundSource as libopusfile is nearly 100% compatible with libvorbisfile by API wise (of course there are name changes from ov_ space to op_ space).
Tested with setup:
There ain't much Opus audio available in internet so I tested these with converted FLAC files or if you have Mangatune subscription you can download Opus easily from there. Currently this is always compiling but It can be tuned as feature (I'm just not that good with scons..)