• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * GStreamer
3  * Copyright (C) 2012-2013 Fluendo S.A. <support@fluendo.com>
4  *   Authors: Josep Torra Vallès <josep@fluendo.com>
5  *            Andoni Morales Alastruey <amorales@fluendo.com>
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 #include "gstosxcoreaudio.h"
25 #include <gst/audio/audio-channels.h>
26 
27 typedef struct
28 {
29   GMutex lock;
30   GCond cond;
31 } PropertyMutex;
32 
33 gboolean gst_core_audio_bind_device                       (GstCoreAudio *core_audio);
34 
35 void gst_core_audio_dump_channel_layout                   (AudioChannelLayout * channel_layout);
36 
37 void gst_core_audio_remove_render_callback                (GstCoreAudio * core_audio);
38 
39 gboolean gst_core_audio_io_proc_start                     (GstCoreAudio * core_audio);
40 
41 gboolean gst_core_audio_io_proc_stop                      (GstCoreAudio * core_audio);
42 
43 AudioBufferList * buffer_list_alloc                       (UInt32 channels, UInt32 size, gboolean interleaved);
44 
45 void buffer_list_free                                     (AudioBufferList * list);
46 
47 gboolean gst_core_audio_set_format                        (GstCoreAudio * core_audio,
48                                                            AudioStreamBasicDescription format);
49 
50 gboolean gst_core_audio_set_channel_layout                (GstCoreAudio * core_audio,
51                                                            gint channels, GstCaps * caps);
52 
53 gboolean gst_core_audio_open_device                       (GstCoreAudio *core_audio,
54                                                            OSType sub_type,
55                                                            const gchar *adesc);
56 
57 OSStatus gst_core_audio_render_notify                     (GstCoreAudio * core_audio,
58                                                            AudioUnitRenderActionFlags * ioActionFlags,
59                                                            const AudioTimeStamp * inTimeStamp,
60                                                            unsigned int inBusNumber,
61                                                            unsigned int inNumberFrames,
62                                                            AudioBufferList * ioData);
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, int channel, gboolean warn);
67