[opus] exposing APIs needed by Chromium/WebRTC
jmvalin at jmvalin.ca
Thu Sep 4 08:52:00 PDT 2014
So my understanding is that in addition to normal encoding and decoding
Chromium reuses the "new" audio classification code that was added in
1.1. The issue is that the audio classifier isn't in any way part of the
API. It's only used to make better encoder side decisions (e.g.
selecting the best mode). At this point, there are no plans to expose it
in the public API because the interface is likely to change in the future.
As far as I can tell, this is not the standard case of taking shortcuts
by using a private API when the public one would have been better.
Rather it's closer to a good example of code reuse where the alternative
would have been to copy-paste code from Opus (which would have been much
Another thing to consider is that not all Linux distros even ship a
version of Opus that has this classifier in it. Overall, I'm not quite
sure how to improve the situation. It may be that the status quo is the
best solution for now.
On 04/09/14 09:07 AM, Paweł Hajdan, Jr. wrote:
> Hello Opus community,
> I'd like to ask you for advice and recommendations.
> WebRTC uses Opus, and I
> noticed https://webrtc-codereview.appspot.com/5549004 started referring
> to currently internal Opus headers. This is possible because for
> Chromium the Opus sources are just checked in, so any header can be
> I detected this when trying to package Chromium for Linux distributions
> with using the system-provided Opus package. Obviously it's not possible
> to use the internal headers in that case. Please
> see https://code.google.com/p/webrtc/issues/detail?id=3077 for the
> webrtc bug I filed about that.
> (part of the above patch) refers to following internal headers:
> #include "third_party/opus/src/celt/celt.h"
> #include "third_party/opus/src/src/analysis.h"
> #include "third_party/opus/src/src/opus_private.h"
> I can see references to e.g. CELTMode in that webrtc file.
> Do you have recommendations how WebRTC project could use a public Opus
> API for this? Please let me know if you have any questions.
> This is my first thread I post to this ML so I apologize for any newbie
> mistakes. I've tried to read some docs on Opus homepage and have been
> reading this ML for a few days.
> By the way, it turns out I participated in an earlier
> thread http://lists.xiph.org/pipermail/opus/2012-October/001809.html and
> I'm very grateful for the result, so I'm looking forward to further
> collaboration between chromium/webrtc and opus communities.
> opus mailing list
> opus at xiph.org
More information about the opus