Debian Codegraph @

gstreamer/src/audiobasesrc.hg

raw
1 /* gstreamermm - a C++ wrapper for gstreamer
2 *
3 * Copyright 2008-2016 The gstreamermm Development Team
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
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 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #include <gst/audio/gstaudiobasesrc.h>
21 #include <gstreamermm/pushsrc.h>
22
23 _PINCLUDE(gstreamermm/private/pushsrc_p.h)
24
25 _DEFS(gstreamermm,gst)
26
27 namespace Gst
28 {
29
30 class AudioRingBuffer;
31
32 _WRAP_ENUM(AudioBaseSrcSlaveMethod, GstAudioBaseSrcSlaveMethod)
33
34 /** The base class for audio sources.
35 * This is the base class for audio sources. Subclasses need to implement the
36 * create_ringbuffer_vfunc vmethod. This base class will then take care of
37 * reading samples from the audioringbuffer, synchronisation and flushing.
38 *
39 * Last reviewed on 2016-04-23 (1.8.0).
40 *
41 * @ingroup GstBaseClasses
42 */
43 class AudioBaseSrc : public Gst::PushSrc
44 {
45 _CLASS_GOBJECT(AudioBaseSrc, GstAudioBaseSrc, GST_AUDIO_BASE_SRC, Gst::PushSrc, GstPushSrc)
46
47 public:
48 /** Get the Gst::Clock of the Gst::AudioSrc.
49 */
50 _MEMBER_GET_GOBJECT(clock, clock, Gst::Clock, GstClock*)
51
52 _WRAP_METHOD(Glib::RefPtr<Gst::AudioRingBuffer> create_ring_buffer(), gst_audio_base_src_create_ringbuffer)
53
54 _WRAP_METHOD(void set_provide_clock(bool provide), gst_audio_base_src_set_provide_clock)
55 _WRAP_METHOD(bool get_provide_clock() const, gst_audio_base_src_get_provide_clock)
56 _WRAP_METHOD(void set_slave_method(Gst::AudioBaseSrcSlaveMethod method), gst_audio_base_src_set_slave_method)
57 _WRAP_METHOD(Gst::AudioBaseSrcSlaveMethod get_slave_method() const, gst_audio_base_src_get_slave_method)
58
59 _WRAP_PROPERTY("actual-buffer-time", gint64)
60 _WRAP_PROPERTY("actual-latency-time", gint64)
61 _WRAP_PROPERTY("buffer-time", gint64)
62 _WRAP_PROPERTY("latency-time", gint64)
63 _WRAP_PROPERTY("provide-clock", bool)
64
65 _WRAP_PROPERTY("slave-method", AudioBaseSrcSlaveMethod)
66
67 /** vfunc to create and return a Gst::AudioRingBuffer to read from.
68 */
69 _WRAP_VFUNC(Glib::RefPtr<Gst::AudioRingBuffer> create_ring_buffer(), "create_ringbuffer")
70 };
71
72 } // namespace Gst