Bug 22803 - Make header conform to implementation
[swfdec.git] / swfdec / swfdec_flv_decoder.h
blobab1b1dd367cdeac0bd88d643ff94995ca6d01326
1 /* Swfdec
2 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
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 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef __SWFDEC_FLV_DECODER_H__
21 #define __SWFDEC_FLV_DECODER_H__
23 #include <swfdec/swfdec_audio_internal.h>
24 #include <swfdec/swfdec_decoder.h>
26 G_BEGIN_DECLS
29 typedef struct _SwfdecFlvDecoder SwfdecFlvDecoder;
30 typedef struct _SwfdecFlvDecoderClass SwfdecFlvDecoderClass;
32 #define SWFDEC_TYPE_FLV_DECODER (swfdec_flv_decoder_get_type())
33 #define SWFDEC_IS_FLV_DECODER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_FLV_DECODER))
34 #define SWFDEC_IS_FLV_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_FLV_DECODER))
35 #define SWFDEC_FLV_DECODER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_FLV_DECODER, SwfdecFlvDecoder))
36 #define SWFDEC_FLV_DECODER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_FLV_DECODER, SwfdecFlvDecoderClass))
37 #define SWFDEC_FLV_DECODER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_FLV_DECODER, SwfdecFlvDecoderClass))
39 struct _SwfdecFlvDecoder
41 SwfdecDecoder decoder;
43 int version; /* only version 1 is known for now */
44 int state; /* parsing state we're in */
45 GArray * audio; /* audio tags */
46 GArray * video; /* video tags */
47 GArray * data; /* data tags (if any) */
48 SwfdecBufferQueue * queue; /* queue for parsing */
51 struct _SwfdecFlvDecoderClass {
52 SwfdecDecoderClass decoder_class;
55 GType swfdec_flv_decoder_get_type (void);
57 gboolean swfdec_flv_decoder_is_eof (SwfdecFlvDecoder * flv);
59 SwfdecBuffer * swfdec_flv_decoder_get_video (SwfdecFlvDecoder * flv,
60 guint timestamp,
61 gboolean keyframe,
62 guint * format,
63 guint * real_timestamp,
64 guint * next_timestamp);
65 gboolean swfdec_flv_decoder_get_video_info (SwfdecFlvDecoder * flv,
66 guint * first_timestamp,
67 guint * last_timestamp);
68 SwfdecBuffer * swfdec_flv_decoder_get_audio (SwfdecFlvDecoder * flv,
69 guint timestamp,
70 guint * codec,
71 SwfdecAudioFormat * format,
72 guint * real_timestamp,
73 guint * next_timestamp);
74 SwfdecBuffer * swfdec_flv_decoder_get_data (SwfdecFlvDecoder * flv,
75 guint timestamp,
76 guint * real_timestamp);
79 G_END_DECLS
81 #endif