summaryrefslogtreecommitdiffstats
path: root/ext/tarkin/gsttarkindec.c
diff options
context:
space:
mode:
authorIain Holmes <iain@prettypeople.org>2003-11-02 02:09:11 +0000
committerIain Holmes <iain@prettypeople.org>2003-11-02 02:09:11 +0000
commit61c073c5d81ebc2a05d4a1457d09110519c9332e (patch)
treedd3eb771f0a4f65a7c2744a14f19e8fab2fd6fa9 /ext/tarkin/gsttarkindec.c
parent9f4177857c6c4f776dc8870aef8faf1b18b94e04 (diff)
downloadgst-plugins-bad-61c073c5d81ebc2a05d4a1457d09110519c9332e.tar.gz
gst-plugins-bad-61c073c5d81ebc2a05d4a1457d09110519c9332e.tar.bz2
gst-plugins-bad-61c073c5d81ebc2a05d4a1457d09110519c9332e.zip
Tarkin compiles again
Original commit message from CVS: Tarkin compiles again
Diffstat (limited to 'ext/tarkin/gsttarkindec.c')
-rw-r--r--ext/tarkin/gsttarkindec.c62
1 files changed, 57 insertions, 5 deletions
diff --git a/ext/tarkin/gsttarkindec.c b/ext/tarkin/gsttarkindec.c
index c8936b63..a87bb9a3 100644
--- a/ext/tarkin/gsttarkindec.c
+++ b/ext/tarkin/gsttarkindec.c
@@ -26,18 +26,15 @@
#include "gsttarkindec.h"
-extern GstPadTemplate *dec_src_template, *dec_sink_template;
+static GstPadTemplate *dec_src_template, *dec_sink_template;
/* elementfactory information */
GstElementDetails tarkindec_details = {
"Ogg Tarkin decoder",
"Filter/Video/Decoder",
- "LGPL",
"Decodes video in OGG Tarkin format",
- VERSION,
"Monty <monty@xiph.org>, "
"Wim Taymans <wim.taymans@chello.be>",
- "(C) 2002",
};
/* TarkinDec signals and args */
@@ -53,6 +50,7 @@ enum
ARG_BITRATE,
};
+static void gst_tarkindec_base_init (gpointer g_class);
static void gst_tarkindec_class_init (TarkinDecClass *klass);
static void gst_tarkindec_init (TarkinDec *arkindec);
@@ -77,7 +75,7 @@ tarkindec_get_type (void)
if (!tarkindec_type) {
static const GTypeInfo tarkindec_info = {
sizeof (TarkinDecClass),
- NULL,
+ gst_tarkindec_base_init,
NULL,
(GClassInitFunc) gst_tarkindec_class_init,
NULL,
@@ -92,6 +90,60 @@ tarkindec_get_type (void)
return tarkindec_type;
}
+static GstCaps*
+tarkin_caps_factory (void)
+{
+ return
+ gst_caps_new (
+ "tarkin_tarkin",
+ "application/ogg",
+ NULL);
+}
+
+static GstCaps*
+raw_caps_factory (void)
+{
+ return
+ GST_CAPS_NEW (
+ "tarkin_raw",
+ "video/x-raw-rgb",
+ "bpp", GST_PROPS_INT (24),
+ "depth", GST_PROPS_INT (24),
+ "endianness", GST_PROPS_INT (G_BYTE_ORDER),
+ "red_mask", GST_PROPS_INT (0xff0000),
+ "green_mask", GST_PROPS_INT (0xff00),
+ "blue_mask", GST_PROPS_INT (0xff),
+ "width", GST_PROPS_INT_RANGE (0, G_MAXINT),
+ "height", GST_PROPS_INT_RANGE (0, G_MAXINT),
+ "framerate", GST_PROPS_FLOAT_RANGE (0, G_MAXFLOAT)
+ );
+}
+
+static void
+gst_tarkindec_base_init (gpointer g_class)
+{
+ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
+ GstCaps *raw_caps, *tarkin_caps;
+
+ raw_caps = raw_caps_factory ();
+ tarkin_caps = tarkin_caps_factory ();
+
+ dec_sink_template = gst_pad_template_new ("sink",
+ GST_PAD_SINK,
+ GST_PAD_ALWAYS,
+ tarkin_caps,
+ NULL);
+ dec_src_template = gst_pad_template_new ("src",
+ GST_PAD_SRC,
+ GST_PAD_ALWAYS,
+ raw_caps,
+ NULL);
+ gst_element_class_add_pad_template (element_class, dec_sink_template);
+ gst_element_class_add_pad_template (element_class, dec_src_template);
+
+ gst_element_class_set_details (element_class, &tarkindec_details);
+}
+
static void
gst_tarkindec_class_init (TarkinDecClass *klass)
{