summaryrefslogtreecommitdiff
path: root/ext/webrtcdsp/gstwebrtcechoprobe.h
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2018-02-19 18:30:13 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2018-08-03 13:20:12 +0300
commitd299c27892b9eff24df7107f979e93856c06672a (patch)
treea1695dbe9acdb0da03a18106221a84ea2a061e4f /ext/webrtcdsp/gstwebrtcechoprobe.h
parent0591bc934a227d1c269b406c365178f77a8434f0 (diff)
downloadgstreamer-plugins-bad-d299c27892b9eff24df7107f979e93856c06672a.tar.gz
webrtcdsp: add support for using F32/non-interleaved buffers
This is the native format that is in use by the webrtc audio processing library internally, so this avoids internal {de,}interleaving and format conversion (S16->F32 and back) https://bugzilla.gnome.org/show_bug.cgi?id=793605
Diffstat (limited to 'ext/webrtcdsp/gstwebrtcechoprobe.h')
-rw-r--r--ext/webrtcdsp/gstwebrtcechoprobe.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/webrtcdsp/gstwebrtcechoprobe.h b/ext/webrtcdsp/gstwebrtcechoprobe.h
index 7c8a24022..a8a889907 100644
--- a/ext/webrtcdsp/gstwebrtcechoprobe.h
+++ b/ext/webrtcdsp/gstwebrtcechoprobe.h
@@ -28,6 +28,9 @@
#include <gst/base/gstbasetransform.h>
#include <gst/audio/audio.h>
+#define GST_USE_UNSTABLE_API
+#include <gst/audio/gstplanaraudioadapter.h>
+
G_BEGIN_DECLS
#define GST_TYPE_WEBRTC_ECHO_PROBE (gst_webrtc_echo_probe_get_type())
@@ -62,11 +65,14 @@ struct _GstWebrtcEchoProbe
/* Protected by the lock */
GstAudioInfo info;
guint period_size;
+ guint period_samples;
GstClockTime latency;
gint delay;
+ gboolean interleaved;
GstSegment segment;
GstAdapter *adapter;
+ GstPlanarAudioAdapter *padapter;
/* Private */
gboolean acquired;
@@ -82,7 +88,7 @@ GType gst_webrtc_echo_probe_get_type (void);
GstWebrtcEchoProbe *gst_webrtc_acquire_echo_probe (const gchar * name);
void gst_webrtc_release_echo_probe (GstWebrtcEchoProbe * probe);
gint gst_webrtc_echo_probe_read (GstWebrtcEchoProbe * self,
- GstClockTime rec_time, gpointer frame);
+ GstClockTime rec_time, gpointer frame, GstBuffer ** buf);
G_END_DECLS
#endif /* __GST_WEBRTC_ECHO_PROBE_H__ */