Tizen 2.0 Release
[framework/multimedia/gst-plugins-bad0.10.git] / gst / real / gstrealvideodec.h
1 /* GStreamer
2  *
3  * Copyright (C) 2006 Lutz Mueller <lutz@topfrose.de>
4  * Copyright (C) 2006 Edward Hervey <bilboed@bilbod.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __GST_REAL_VIDEO_DEC_H__
23 #define __GST_REAL_VIDEO_DEC_H__
24
25 #include <gst/gst.h>
26 #include <gst/base/gstadapter.h>
27
28 G_BEGIN_DECLS
29
30 #define GST_TYPE_REAL_VIDEO_DEC (gst_real_video_dec_get_type())
31 #define GST_REAL_VIDEO_DEC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_REAL_VIDEO_DEC,GstRealVideoDec))
32 #define GST_REAL_VIDEO_DEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_REAL_VIDEO_DEC,GstRealVideoDecClass))
33
34 typedef struct _GstRealVideoDec GstRealVideoDec;
35 typedef struct _GstRealVideoDecClass GstRealVideoDecClass;
36 typedef enum _GstRealVideoDecVersion GstRealVideoDecVersion;
37
38 enum _GstRealVideoDecVersion
39 {
40   GST_REAL_VIDEO_DEC_VERSION_2 = 2,
41   GST_REAL_VIDEO_DEC_VERSION_3 = 3,
42   GST_REAL_VIDEO_DEC_VERSION_4 = 4
43 };
44
45 typedef struct {
46   GModule *module;
47
48   gpointer context;
49
50   guint32 (*Init) (gpointer, gpointer);
51   guint32 (*Free) (gpointer);
52   guint32 (*Transform) (gchar *, gchar *, gpointer, gpointer, gpointer);
53   guint32 (*Message) (gpointer, gpointer);
54
55   /*
56   GstRealVideoDecMessageFunc custom_message;
57   GstRealVideoDecFreeFunc free;
58   GstRealVideoDecInitFunc init;
59   GstRealVideoDecTransformFunc transform;
60   */
61
62 } GstRVDecLibrary;
63
64 struct _GstRealVideoDec
65 {
66   GstElement parent;
67
68   GstPad *src, *snk;
69
70   /* Caps */
71   GstRealVideoDecVersion version;
72   guint width, height;
73   gint format, subformat;
74   gint framerate_num, framerate_denom;
75
76   gint error_count;
77
78   /* Library functions */
79   GstRVDecLibrary lib;
80
81   /* Properties */
82   gchar *real_codecs_path;
83   gboolean checked_modules;
84   gchar *rv20_names;
85   gboolean valid_rv20;
86   gchar *rv30_names;
87   gboolean valid_rv30;
88   gchar *rv40_names;
89   gboolean valid_rv40;
90   gint max_errors;
91 };
92
93 struct _GstRealVideoDecClass
94 {
95   GstElementClass parent_class;
96 };
97
98 GType gst_real_video_dec_get_type (void);
99
100 G_END_DECLS
101
102 #endif /* __GST_REAL_VIDEO_DEC_H__ */
103
104