mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
openaptx: Support libfreeaptx
[libfreeaptx][1] is a fork of libopenapt 0.2.0, used by pipewire. [1]: https://github.com/iamthehorker/libfreeaptx Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1642 Closes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1589 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1721>
This commit is contained in:
parent
492fa162cf
commit
52ec2f0621
3 changed files with 21 additions and 2 deletions
|
@ -24,7 +24,11 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/audio/audio.h>
|
||||
|
||||
#ifdef USE_FREEAPTX
|
||||
#include <freeaptx.h>
|
||||
#else
|
||||
#include <openaptx.h>
|
||||
#endif
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
@ -24,7 +24,11 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gst/audio/audio.h>
|
||||
|
||||
#ifdef USE_FREEAPTX
|
||||
#include <freeaptx.h>
|
||||
#else
|
||||
#include <openaptx.h>
|
||||
#endif
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
|
|
@ -4,12 +4,23 @@ openaptx_sources = [
|
|||
'gstopenaptxenc.c',
|
||||
]
|
||||
|
||||
openaptx_dep = dependency('libopenaptx', version : '== 0.2.0', required : get_option('openaptx'))
|
||||
if not get_option('openaptx').allowed()
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
openaptx_defines = []
|
||||
|
||||
openaptx_dep = dependency('libfreeaptx', version : '>= 0.1.1', required : false)
|
||||
if openaptx_dep.found()
|
||||
openaptx_defines += ['-DUSE_FREEAPTX']
|
||||
else
|
||||
openaptx_dep = dependency('libopenaptx', version : '== 0.2.0', required : get_option('openaptx'))
|
||||
endif
|
||||
|
||||
if openaptx_dep.found()
|
||||
gstopenaptx = library('gstopenaptx',
|
||||
openaptx_sources,
|
||||
c_args : gst_plugins_bad_args,
|
||||
c_args : gst_plugins_bad_args + openaptx_defines,
|
||||
include_directories : [configinc],
|
||||
dependencies : [gstaudio_dep, openaptx_dep],
|
||||
install : true,
|
||||
|
|
Loading…
Reference in a new issue