Menu

#98 [patch] Ogg Opus support (read-only)

closed-accepted
nobody
None
5
2013-03-08
2013-03-07
John Stumpo
No

Here's a patch adding read-only support for Xiph's new Opus codec in an Ogg container (by convention, file extension .opus) using libopusfile. I based it on the existing Ogg Vorbis code; libopusfile and libvorbisfile have a lot in common about their APIs.

I was going to give it write support too, but there are numerous annoying things about doing this (for example, you must serialize the stream headers and packetize the audio yourself), and I didn't feel like doing that (or swiping opus-tools's code for it). All I really wanted to do was become able to play .opus files using play anyway, so I gave up on the write support. Maybe I might do it later (or someone else could).

Note that I had to add -Wno-long-long to CFLAGS to get it to build without warnings. The warnings without it are all due to the Opus header files, so there isn't really anything else I can do. They aren't treated as system headers since they're found using a -I option obtained from pkg-config.

My modifications to each file may be used under the same license as the respective original files. For opus.c, this is the same permissive license as vorbis.c.

Discussion

  • Ulrich Klauer

    Ulrich Klauer - 2013-03-08
    • status: open --> closed-accepted
     
  • Ulrich Klauer

    Ulrich Klauer - 2013-03-08

    Thank you for providing this patch! It is now in the main repo.

     

Log in to post a comment.