Blame sys/osxaudio/gstosxaudiosink.h

Packit 1f69a5
/*
Packit 1f69a5
 * GStreamer
Packit 1f69a5
 * Copyright (C) 2005-2006 Zaheer Abbas Merali <zaheerabbas at merali dot org>
Packit 1f69a5
 * Copyright (C) 2007 Pioneers of the Inevitable <songbird@songbirdnest.com>
Packit 1f69a5
 * Copyright (C) 2012 Fluendo S.A. <support@fluendo.com>
Packit 1f69a5
 *
Packit 1f69a5
 * Permission is hereby granted, free of charge, to any person obtaining a
Packit 1f69a5
 * copy of this software and associated documentation files (the "Software"),
Packit 1f69a5
 * to deal in the Software without restriction, including without limitation
Packit 1f69a5
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
Packit 1f69a5
 * and/or sell copies of the Software, and to permit persons to whom the
Packit 1f69a5
 * Software is furnished to do so, subject to the following conditions:
Packit 1f69a5
 *
Packit 1f69a5
 * The above copyright notice and this permission notice shall be included in
Packit 1f69a5
 * all copies or substantial portions of the Software.
Packit 1f69a5
 *
Packit 1f69a5
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit 1f69a5
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit 1f69a5
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
Packit 1f69a5
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Packit 1f69a5
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
Packit 1f69a5
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
Packit 1f69a5
 * DEALINGS IN THE SOFTWARE.
Packit 1f69a5
 *
Packit 1f69a5
 * Alternatively, the contents of this file may be used under the
Packit 1f69a5
 * GNU Lesser General Public License Version 2.1 (the "LGPL"), in
Packit 1f69a5
 * which case the following provisions apply instead of the ones
Packit 1f69a5
 * mentioned above:
Packit 1f69a5
 *
Packit 1f69a5
 * This library is free software; you can redistribute it and/or
Packit 1f69a5
 * modify it under the terms of the GNU Library General Public
Packit 1f69a5
 * License as published by the Free Software Foundation; either
Packit 1f69a5
 * version 2 of the License, or (at your option) any later version.
Packit 1f69a5
 *
Packit 1f69a5
 * This library is distributed in the hope that it will be useful,
Packit 1f69a5
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1f69a5
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 1f69a5
 * Library General Public License for more details.
Packit 1f69a5
 *
Packit 1f69a5
 * You should have received a copy of the GNU Library General Public
Packit 1f69a5
 * License along with this library; if not, write to the
Packit 1f69a5
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit 1f69a5
 * Boston, MA 02110-1301, USA.
Packit 1f69a5
 *
Packit 1f69a5
 * The development of this code was made possible due to the involvement of
Packit 1f69a5
 * Pioneers of the Inevitable, the creators of the Songbird Music player
Packit 1f69a5
 *
Packit 1f69a5
 */
Packit 1f69a5
Packit 1f69a5
#ifndef __GST_OSXAUDIOSINK_H__
Packit 1f69a5
#define __GST_OSXAUDIOSINK_H__
Packit 1f69a5
Packit 1f69a5
#include <gst/gst.h>
Packit 1f69a5
#include <gst/audio/audio.h>
Packit 1f69a5
#include <gst/audio/gstaudiobasesink.h>
Packit 1f69a5
#include "gstosxaudioringbuffer.h"
Packit 1f69a5
Packit 1f69a5
G_BEGIN_DECLS
Packit 1f69a5
Packit 1f69a5
#define GST_OSX_AUDIO_SINK_CAPS "audio/x-raw, " \
Packit 1f69a5
        "format = (string) " GST_AUDIO_FORMATS_ALL ", " \
Packit 1f69a5
        "layout = (string) interleaved, " \
Packit 1f69a5
        "rate = (int) [1, MAX], " \
Packit 1f69a5
        "channels = (int) [1, 9];" \
Packit 1f69a5
        "audio/x-ac3, framed = (boolean) true;" \
Packit 1f69a5
        "audio/x-dts, framed = (boolean) true"
Packit 1f69a5
Packit 1f69a5
#define GST_TYPE_OSX_AUDIO_SINK \
Packit 1f69a5
  (gst_osx_audio_sink_get_type())
Packit 1f69a5
#define GST_OSX_AUDIO_SINK(obj) \
Packit 1f69a5
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSX_AUDIO_SINK,GstOsxAudioSink))
Packit 1f69a5
#define GST_OSX_AUDIO_SINK_CLASS(klass) \
Packit 1f69a5
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSX_AUDIO_SINK,GstOsxAudioSinkClass))
Packit 1f69a5
#define GST_IS_OSX_AUDIO_SINK(obj) \
Packit 1f69a5
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSX_AUDIO_SINK))
Packit 1f69a5
Packit 1f69a5
typedef struct _GstOsxAudioSink GstOsxAudioSink;
Packit 1f69a5
typedef struct _GstOsxAudioSinkClass GstOsxAudioSinkClass;
Packit 1f69a5
Packit 1f69a5
struct _GstOsxAudioSink
Packit 1f69a5
{
Packit 1f69a5
  GstAudioBaseSink sink;
Packit 1f69a5
Packit 1f69a5
  AudioDeviceID device_id;
Packit 1f69a5
Packit 1f69a5
  AudioUnit audiounit;
Packit 1f69a5
  double volume;
Packit 1f69a5
Packit 1f69a5
  guint channels;
Packit 1f69a5
};
Packit 1f69a5
Packit 1f69a5
struct _GstOsxAudioSinkClass
Packit 1f69a5
{
Packit 1f69a5
  GstAudioBaseSinkClass parent_class;
Packit 1f69a5
};
Packit 1f69a5
Packit 1f69a5
GType gst_osx_audio_sink_get_type (void);
Packit 1f69a5
Packit 1f69a5
G_END_DECLS
Packit 1f69a5
Packit 1f69a5
#endif /* __GST_OSXAUDIOSINK_H__ */
Packit 1f69a5