Debian Codegraph @

sys/osxaudio/gstosxcoreaudiocommon.h

raw
1 /*
2 * GStreamer
3 * Copyright (C) 2012-2013 Fluendo S.A. <[email protected]>
4 * Authors: Josep Torra Vallès <[email protected]>
5 * Andoni Morales Alastruey <[email protected]>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 *
22 */
23
24 #pragma once
25
26 #include "gstosxcoreaudio.h"
27 #include <gst/audio/audio-channels.h>
28
29 G_BEGIN_DECLS
30
31 /* Master was renamed to Main in Xcode 13, and Master was deprecated */
32 #define kAudioObjectPropertyElementMain 0
33
34 typedef struct
35 {
36 GMutex lock;
37 GCond cond;
38 } PropertyMutex;
39
40 gboolean gst_core_audio_bind_device (GstCoreAudio *core_audio);
41
42 void gst_core_audio_dump_channel_layout (AudioChannelLayout * channel_layout);
43
44 void gst_core_audio_remove_render_callback (GstCoreAudio * core_audio);
45
46 gboolean gst_core_audio_io_proc_start (GstCoreAudio * core_audio);
47
48 gboolean gst_core_audio_io_proc_stop (GstCoreAudio * core_audio);
49
50 AudioBufferList * buffer_list_alloc (UInt32 channels, UInt32 size, gboolean interleaved);
51
52 void buffer_list_free (AudioBufferList * list);
53
54 gboolean gst_core_audio_set_format (GstCoreAudio * core_audio,
55 AudioStreamBasicDescription format);
56
57 gboolean gst_core_audio_set_channel_layout (GstCoreAudio * core_audio,
58 gint channels, GstCaps * caps);
59
60 gboolean gst_core_audio_open_device (GstCoreAudio *core_audio,
61 OSType sub_type,
62 const gchar *adesc);
63
64 AudioChannelLabel gst_audio_channel_position_to_core_audio (GstAudioChannelPosition position, int channel);
65
66 GstAudioChannelPosition gst_core_audio_channel_label_to_gst (AudioChannelLabel label,
67 int channel,
68 gboolean warn,
69 AudioDeviceID device_id);
70
71 #if TARGET_OS_OSX
72 char * gst_core_audio_device_get_prop_str (AudioDeviceID device_id,
73 AudioObjectPropertyElement prop_id);
74
75 UInt32 gst_core_audio_device_get_prop_uint32 (AudioDeviceID device_id,
76 AudioObjectPropertyElement prop_id);
77 #endif
78
79 G_END_DECLS