3 * Copyright (C) 2008 Sebastian Dröge <sebastian.droege@collabora.co.uk>.
4 * Copyright (C) 2009 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
5 * Copyright (C) 2009 Nokia Corporation. All rights reserved.
6 * Contact: Stefan Kost <stefan.kost@nokia.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GST_FLAC_PARSE_H__
25 #define __GST_FLAC_PARSE_H__
28 #include <gst/base/gstbaseparse.h>
32 #define GST_TYPE_FLAC_PARSE (gst_flac_parse_get_type())
33 #define GST_FLAC_PARSE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_FLAC_PARSE,GstFlacParse))
34 #define GST_FLAC_PARSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_FLAC_PARSE,GstFlacParseClass))
35 #define GST_FLAC_PARSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_FLAC_PARSE,GstFlacParseClass))
36 #define GST_IS_FLAC_PARSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FLAC_PARSE))
37 #define GST_IS_FLAC_PARSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FLAC_PARSE))
38 #define GST_FLAC_PARSE_CAST(obj) ((GstFlacParse *)(obj))
40 typedef struct _GstFlacParse GstFlacParse;
41 typedef struct _GstFlacParseClass GstFlacParseClass;
44 GST_FLAC_PARSE_STATE_INIT,
45 GST_FLAC_PARSE_STATE_HEADERS,
46 GST_FLAC_PARSE_STATE_GENERATE_HEADERS,
47 GST_FLAC_PARSE_STATE_DATA
52 } GstFlacParseSubFrame;
54 struct _GstFlacParse {
58 gboolean check_frame_checksums;
60 GstFlacParseState state;
62 gint64 upstream_length;
64 /* STREAMINFO content */
65 guint16 min_blocksize, max_blocksize;
66 guint32 min_framesize, max_framesize;
70 guint64 total_samples;
74 guint8 blocking_strategy;
76 guint64 sample_number;
77 guint64 first_sample_number;
78 gboolean strategy_checked;
80 gboolean sent_codec_tag;
88 gboolean force_variable_block_size;
91 struct _GstFlacParseClass {
92 GstBaseParseClass parent_class;
95 GType gst_flac_parse_get_type (void);
99 #endif /* __GST_FLAC_PARSE_H__ */