2 * Copyright (C) 2018 Centricular Ltd.
3 * Author: Nirbheek Chauhan <nirbheek@centricular.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_AUDIOLATENCY_H__
22 #define __GST_AUDIOLATENCY_H__
27 #define GST_TYPE_AUDIOLATENCY \
28 (gst_audiolatency_get_type ())
29 #define GST_AUDIOLATENCY(obj) \
30 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_AUDIOLATENCY, GstAudioLatency))
31 #define GST_AUDIOLATENCY_CLASS(klass) \
32 (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_AUDIOLATENCY, GstAudioLatencyClass))
33 #define GST_IS_AUDIOLATENCY(obj) \
34 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_AUDIOLATENCY))
35 #define GST_IS_AUDIOLATENCY_CLASS(klass) \
36 (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_AUDIOLATENCY))
37 typedef struct _GstAudioLatency GstAudioLatency;
38 typedef struct _GstAudioLatencyClass GstAudioLatencyClass;
40 #define GST_AUDIOLATENCY_NUM_LATENCIES 5
42 struct _GstAudioLatency
54 gint next_latency_idx;
55 gint latencies[GST_AUDIOLATENCY_NUM_LATENCIES];
58 gboolean print_latency;
59 gint samples_per_buffer;
62 struct _GstAudioLatencyClass
64 GstBinClass parent_class;
67 GType gst_audiolatency_get_type (void);
69 GST_ELEMENT_REGISTER_DECLARE (audiolatency);
72 #endif /* __GST_AUDIOLATENCY_H__ */