2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
19 #ifndef __GST_FFMPEGAUDDEC_H__
20 #define __GST_FFMPEGAUDDEC_H__
27 #include <gst/audio/audio.h>
28 #include <libavcodec/avcodec.h>
30 typedef struct _GstFFMpegAudDec GstFFMpegAudDec;
31 struct _GstFFMpegAudDec
33 GstAudioDecoder parent;
36 AVCodecContext *context;
44 /* prevent reopening the decoder on GST_EVENT_CAPS when caps are same as last time. */
47 /* current output format */
49 GstAudioChannelPosition ffmpeg_layout[64];
50 gboolean needs_reorder;
53 typedef struct _GstFFMpegAudDecClass GstFFMpegAudDecClass;
55 struct _GstFFMpegAudDecClass
57 GstAudioDecoderClass parent_class;
60 GstPadTemplate *srctempl, *sinktempl;
63 #define GST_TYPE_FFMPEGDEC \
64 (gst_ffmpegauddec_get_type())
65 #define GST_FFMPEGDEC(obj) \
66 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FFMPEGDEC,GstFFMpegAudDec))
67 #define GST_FFMPEGAUDDEC_CLASS(klass) \
68 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FFMPEGDEC,GstFFMpegAudDecClass))
69 #define GST_IS_FFMPEGDEC(obj) \
70 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FFMPEGDEC))
71 #define GST_IS_FFMPEGAUDDEC_CLASS(klass) \
72 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGDEC))