• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3  * Copyright (C) <2011> Tim-Philipp Müller <tim centricular net>
4  *
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.
9  *
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.
14  *
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.
19  */
20 
21 
22 #ifndef __GST_FLAC_DEC_H__
23 #define __GST_FLAC_DEC_H__
24 
25 #include <gst/gst.h>
26 #include <gst/audio/audio.h>
27 #include <gst/audio/gstaudiodecoder.h>
28 
29 #include <FLAC/all.h>
30 
31 G_BEGIN_DECLS
32 
33 #define GST_TYPE_FLAC_DEC gst_flac_dec_get_type()
34 G_DECLARE_FINAL_TYPE (GstFlacDec, gst_flac_dec, GST, FLAC_DEC, GstAudioDecoder)
35 
36 struct _GstFlacDec {
37   GstAudioDecoder  audiodecoder;
38 
39   /*< private >*/
40   FLAC__StreamDecoder         *decoder;
41   GstAdapter                  *adapter;
42 
43   gboolean       got_headers; /* have we received all the header buffers yet? */
44 
45   GstFlowReturn  last_flow;   /* to marshal flow return from finis_frame to
46                                * handle_frame via flac callbacks */
47 
48   GstAudioInfo   info;
49   gint           channel_reorder_map[8];
50   gint           depth;
51 
52   /* from the stream info, needed for scanning */
53   guint16        min_blocksize;
54   guint16        max_blocksize;
55 
56   gboolean       do_resync;
57   gint           error_count;
58 };
59 
60 G_END_DECLS
61 
62 #endif /* __GST_FLAC_DEC_H__ */
63