|
Packit |
8ff292 |
/*
|
|
Packit |
8ff292 |
* GStreamer
|
|
Packit |
8ff292 |
* Copyright (C) 2006 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
|
Packit |
8ff292 |
* Copyright (C) 2012 Fluendo S.A. <support@fluendo.com>
|
|
Packit |
8ff292 |
*
|
|
Packit |
8ff292 |
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
Packit |
8ff292 |
* copy of this software and associated documentation files (the "Software"),
|
|
Packit |
8ff292 |
* to deal in the Software without restriction, including without limitation
|
|
Packit |
8ff292 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
Packit |
8ff292 |
* and/or sell copies of the Software, and to permit persons to whom the
|
|
Packit |
8ff292 |
* Software is furnished to do so, subject to the following conditions:
|
|
Packit |
8ff292 |
*
|
|
Packit |
8ff292 |
* The above copyright notice and this permission notice shall be included in
|
|
Packit |
8ff292 |
* all copies or substantial portions of the Software.
|
|
Packit |
8ff292 |
*
|
|
Packit |
8ff292 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
Packit |
8ff292 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
Packit |
8ff292 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
Packit |
8ff292 |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
Packit |
8ff292 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
Packit |
8ff292 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
Packit |
8ff292 |
* DEALINGS IN THE SOFTWARE.
|
|
Packit |
8ff292 |
*
|
|
Packit |
8ff292 |
* Alternatively, the contents of this file may be used under the
|
|
Packit |
8ff292 |
* GNU Lesser General Public License Version 2.1 (the "LGPL"), in
|
|
Packit |
8ff292 |
* which case the following provisions apply instead of the ones
|
|
Packit |
8ff292 |
* mentioned above:
|
|
Packit |
8ff292 |
*
|
|
Packit |
8ff292 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
8ff292 |
* modify it under the terms of the GNU Library General Public
|
|
Packit |
8ff292 |
* License as published by the Free Software Foundation; either
|
|
Packit |
8ff292 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
8ff292 |
*
|
|
Packit |
8ff292 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
8ff292 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
8ff292 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
8ff292 |
* Library General Public License for more details.
|
|
Packit |
8ff292 |
*
|
|
Packit |
8ff292 |
* You should have received a copy of the GNU Library General Public
|
|
Packit |
8ff292 |
* License along with this library; if not, write to the
|
|
Packit |
8ff292 |
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
Packit |
8ff292 |
* Boston, MA 02110-1301, USA.
|
|
Packit |
8ff292 |
*/
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
#ifndef __GST_OSX_RING_BUFFER_H__
|
|
Packit |
8ff292 |
#define __GST_OSX_RING_BUFFER_H__
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
#ifdef HAVE_CONFIG_H
|
|
Packit |
8ff292 |
# include <config.h>
|
|
Packit |
8ff292 |
#endif
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
#include <gst/gst.h>
|
|
Packit |
8ff292 |
#include <gst/audio/audio.h>
|
|
Packit |
8ff292 |
#include <gst/audio/gstaudioringbuffer.h>
|
|
Packit |
8ff292 |
#include <gstosxcoreaudio.h>
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
G_BEGIN_DECLS
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
#define GST_TYPE_OSX_AUDIO_RING_BUFFER \
|
|
Packit |
8ff292 |
(gst_osx_audio_ring_buffer_get_type())
|
|
Packit |
8ff292 |
#define GST_OSX_AUDIO_RING_BUFFER(obj) \
|
|
Packit |
8ff292 |
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSX_AUDIO_RING_BUFFER,GstOsxAudioRingBuffer))
|
|
Packit |
8ff292 |
#define GST_OSX_AUDIO_RING_BUFFER_CLASS(klass) \
|
|
Packit |
8ff292 |
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSX_AUDIO_RING_BUFFER,GstOsxAudioRingBufferClass))
|
|
Packit |
8ff292 |
#define GST_OSX_AUDIO_RING_BUFFER_GET_CLASS(obj) \
|
|
Packit |
8ff292 |
(G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OSX_AUDIO_RING_BUFFER,GstOsxAudioRingBufferClass))
|
|
Packit |
8ff292 |
#define GST_IS_OSX_AUDIO_RING_BUFFER(obj) \
|
|
Packit |
8ff292 |
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSX_AUDIO_RING_BUFFER))
|
|
Packit |
8ff292 |
#define GST_IS_OSX_AUDIO_RING_BUFFER_CLASS(klass) \
|
|
Packit |
8ff292 |
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSX_AUDIO_RING_BUFFER))
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
#define RINGBUFFER_IS_SPDIF(t) ((t) == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_AC3 || (t) == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_DTS)
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
typedef struct _GstOsxAudioRingBuffer GstOsxAudioRingBuffer;
|
|
Packit |
8ff292 |
typedef struct _GstOsxAudioRingBufferClass GstOsxAudioRingBufferClass;
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
struct _GstOsxAudioRingBuffer
|
|
Packit |
8ff292 |
{
|
|
Packit |
8ff292 |
GstAudioRingBuffer object;
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
GstCoreAudio *core_audio;
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
guint buffer_len;
|
|
Packit |
8ff292 |
guint segoffset;
|
|
Packit |
8ff292 |
};
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
struct _GstOsxAudioRingBufferClass
|
|
Packit |
8ff292 |
{
|
|
Packit |
8ff292 |
GstAudioRingBufferClass parent_class;
|
|
Packit |
8ff292 |
};
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
GType gst_osx_audio_ring_buffer_get_type (void);
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
G_END_DECLS
|
|
Packit |
8ff292 |
|
|
Packit |
8ff292 |
#endif /* __GST_OSX_AUDIO_RING_BUFFER_H__ */
|
|
Packit |
8ff292 |
|