4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: JongHyuk Choi <jhchoi.choi@samsung.com>
8 * This library is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU Lesser General Public License as published by the
10 * Free Software Foundation; either version 2.1 of the License, or (at your option)
13 * This library is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 * License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this library; if not, write to the Free Software Foundation, Inc., 51
20 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #ifndef __GST_AVSYS_AUDIO_SRC_H__
25 #define __GST_AVSYS_AUDIO_SRC_H__
27 //#undef _MMCAMCORDER_MERGE_TEMP
29 #include <gst/audio/gstaudiosrc.h>
32 #include <avsys-audio.h>
36 #define GST_TYPE_AVSYS_AUDIO_SRC (gst_avsysaudiosrc_get_type())
37 #define GST_AVSYS_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AVSYS_AUDIO_SRC,GstAvsysAudioSrc))
38 #define GST_AVSYS_AUDIO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AVSYS_AUDIO_SRC,GstAvsysAudioSrcClass))
39 #define GST_IS_AVSYS_AUDIO_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AVSYS_AUDIO_SRC))
40 #define GST_IS_AVSYS_AUDIO_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AVSYS_AUDIO_SRC))
41 #define GST_AVSYS_AUDIO_SRC_CAST(obj) ((GstAvsysAudioSrc *)(obj))
43 #define GST_AVSYS_AUDIO_SRC_GET_LOCK(obj) (GST_AVSYS_AUDIO_SRC_CAST (obj)->avsysaudio_lock)
44 #define GST_AVSYS_AUDIO_SRC_LOCK(obj) (g_mutex_lock (GST_AVSYS_AUDIO_SRC_GET_LOCK (obj)))
45 #define GST_AVSYS_AUDIO_SRC_UNLOCK(obj) (g_mutex_unlock (GST_AVSYS_AUDIO_SRC_GET_LOCK (obj)))
47 typedef struct _GstAvsysAudioSrc GstAvsysAudioSrc;
48 typedef struct _GstAvsysAudioSrcClass GstAvsysAudioSrcClass;
51 AVSYSAUDIOSRC_LATENCY_LOW = 0,
52 AVSYSAUDIOSRC_LATENCY_MID,
53 AVSYSAUDIOSRC_LATENCY_HIGH,
54 }GstAvsysAudioSrcAudioLatency;
56 #define GST_AVSYS_AUDIO_SRC_LATENCY (gst_avsysaudiosrc_audio_latency_get_type())
63 * Opaque data structure
65 struct _GstAvsysAudioSrc {
68 avsys_handle_t audio_handle;
69 avsys_audio_param_t audio_param;
73 GMutex *avsysaudio_lock;
76 gint bytes_per_sample;
81 struct _GstAvsysAudioSrcClass {
82 GstAudioSrcClass parent_class;
86 GType gst_avsysaudiosrc_get_type (void);
87 GType gst_avsysaudiosrc_audio_latency_get_type(void);
91 #endif /* __GST_AVSYS_AUDIO_SRC_H__ */