Blame ext/alsa/gstalsa.h

Packit 971217
/*
Packit 971217
 * Copyright (C) 2001 CodeFactory AB
Packit 971217
 * Copyright (C) 2001 Thomas Nyberg <thomas@codefactory.se>
Packit 971217
 * Copyright (C) 2001-2002 Andy Wingo <apwingo@eos.ncsu.edu>
Packit 971217
 * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
Packit 971217
 *
Packit 971217
 * This library is free software; you can redistribute it and/or
Packit 971217
 * modify it under the terms of the GNU Library General Public
Packit 971217
 * License as published by the Free Software Foundation; either
Packit 971217
 * version 2 of the License, or (at your option) any later version.
Packit 971217
 *
Packit 971217
 * This library is distributed in the hope that it will be useful,
Packit 971217
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 971217
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Packit 971217
 * Library General Public License for more details.
Packit 971217
 *
Packit 971217
 * You should have received a copy of the GNU Library General Public
Packit 971217
 * License along with this library; if not, write to the Free
Packit 971217
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
Packit 971217
 */
Packit 971217
Packit 971217
Packit 971217
#ifndef __GST_ALSA_H__
Packit 971217
#define __GST_ALSA_H__
Packit 971217
Packit 971217
Packit 971217
#define ALSA_PCM_NEW_HW_PARAMS_API
Packit 971217
#define ALSA_PCM_NEW_SW_PARAMS_API
Packit 971217
Packit 971217
#include <alsa/asoundlib.h>
Packit 971217
#include <alsa/control.h>
Packit 971217
#include <alsa/error.h>
Packit 971217
#include <gst/gst.h>
Packit 971217
#include <gst/audio/audio.h>
Packit 971217
Packit 971217
#define GST_CHECK_ALSA_VERSION(major,minor,micro) \
Packit 971217
    (SND_LIB_MAJOR > (major) || \
Packit 971217
     (SND_LIB_MAJOR == (major) && SND_LIB_MINOR > (minor)) || \
Packit 971217
     (SND_LIB_MAJOR == (major) && SND_LIB_MINOR == (minor) && \
Packit 971217
      SND_LIB_SUBMINOR >= (micro)))
Packit 971217
Packit 971217
#define PASSTHROUGH_CAPS \
Packit 971217
    "audio/x-ac3, framed = (boolean) true;" \
Packit 971217
    "audio/x-eac3, framed = (boolean) true; " \
Packit 971217
    "audio/x-dts, framed = (boolean) true, " \
Packit 971217
      "block-size = (int) { 512, 1024, 2048 }; " \
Packit 971217
    "audio/mpeg, mpegversion = (int) 1, " \
Packit 971217
      "mpegaudioversion = (int) [ 1, 3 ], parsed = (boolean) true;"
Packit 971217
Packit 971217
Packit 971217
GST_DEBUG_CATEGORY_EXTERN (alsa_debug);
Packit 971217
#define GST_CAT_DEFAULT alsa_debug
Packit 971217
Packit 971217
snd_pcm_t * gst_alsa_open_iec958_pcm (GstObject * obj, gchar *device);
Packit 971217
Packit 971217
GstCaps * gst_alsa_probe_supported_formats (GstObject      * obj,
Packit 971217
                                            gchar          * device,
Packit 971217
                                            snd_pcm_t      * handle,
Packit 971217
                                            const GstCaps  * template_caps);
Packit 971217
Packit 971217
gchar   * gst_alsa_find_device_name (GstObject        * obj,
Packit 971217
                                     const gchar      * device,
Packit 971217
                                     snd_pcm_t        * handle,
Packit 971217
                                     snd_pcm_stream_t   stream);
Packit 971217
Packit 971217
gchar *   gst_alsa_find_card_name   (GstObject        * obj,
Packit 971217
                                     const gchar      * devcard,
Packit 971217
                                     snd_pcm_stream_t   stream);
Packit 971217
Packit 971217
void      gst_alsa_add_channel_reorder_map (GstObject * obj,
Packit 971217
                                            GstCaps   * caps);
Packit 971217
Packit 971217
extern const GstAudioChannelPosition alsa_position[][8];
Packit 971217
#ifdef SND_CHMAP_API_VERSION
Packit 971217
gboolean alsa_chmap_to_channel_positions (const snd_pcm_chmap_t *chmap,
Packit 971217
                                          GstAudioChannelPosition *pos);
Packit 971217
Packit 971217
void alsa_detect_channels_mapping (GstObject * obj,
Packit 971217
                                   snd_pcm_t * handle,
Packit 971217
                                   GstAudioRingBufferSpec * spec,
Packit 971217
                                   guint channels,
Packit 971217
                                   GstAudioRingBuffer * buf);
Packit 971217
#endif
Packit 971217
Packit 971217
#endif /* __GST_ALSA_H__ */