2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * Copyright (C) <2011> Tim-Philipp Müller <tim centricular net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
22 #ifndef __GST_FLAC_DEC_H__
23 #define __GST_FLAC_DEC_H__
26 #include <gst/audio/audio.h>
27 #include <gst/audio/gstaudiodecoder.h>
33 #define GST_TYPE_FLAC_DEC gst_flac_dec_get_type()
34 #define GST_FLAC_DEC(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, GST_TYPE_FLAC_DEC, GstFlacDec)
35 #define GST_FLAC_DEC_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, GST_TYPE_FLAC_DEC, GstFlacDecClass)
36 #define GST_IS_FLAC_DEC(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, GST_TYPE_FLAC_DEC)
37 #define GST_IS_FLAC_DEC_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE(klass, GST_TYPE_FLAC_DEC)
39 typedef struct _GstFlacDec GstFlacDec;
40 typedef struct _GstFlacDecClass GstFlacDecClass;
43 GstAudioDecoder audiodecoder;
46 FLAC__StreamDecoder *decoder;
49 gboolean got_headers; /* have we received all the header buffers yet? */
51 GstFlowReturn last_flow; /* to marshal flow return from finis_frame to
52 * handle_frame via flac callbacks */
55 gint channel_reorder_map[8];
58 /* from the stream info, needed for scanning */
59 guint16 min_blocksize;
60 guint16 max_blocksize;
66 struct _GstFlacDecClass {
67 GstAudioDecoderClass audiodecoder;
70 GType gst_flac_dec_get_type (void);
74 #endif /* __GST_FLAC_DEC_H__ */