Commit f23814b8 authored by Iain Holmes's avatar Iain Holmes

Snapshot compiles

Original commit message from CVS:
Snapshot compiles
parent 81a861de
......@@ -32,11 +32,8 @@
static GstElementDetails snapshot_details = {
"snapshot",
"Filter/Video",
"LGPL",
"Dump a frame to a png file",
VERSION,
"Jeremy SIMON <jsimon13@yahoo.fr>",
"(C) 2002",
};
GST_PAD_TEMPLATE_FACTORY (snapshot_src_factory,
......@@ -84,6 +81,7 @@ enum {
};
static GType gst_snapshot_get_type (void);
static void gst_snapshot_base_init (gpointer g_class);
static void gst_snapshot_class_init (GstSnapshotClass *klass);
static void gst_snapshot_init (GstSnapshot *snapshot);
......@@ -115,7 +113,10 @@ gst_snapshot_get_type (void)
if (!snapshot_type) {
static const GTypeInfo snapshot_info = {
sizeof(GstSnapshotClass), NULL, NULL, (GClassInitFunc)gst_snapshot_class_init,
sizeof(GstSnapshotClass),
gst_snapshot_base_init,
NULL,
(GClassInitFunc)gst_snapshot_class_init,
NULL,
NULL,
sizeof(GstSnapshot),
......@@ -127,6 +128,17 @@ gst_snapshot_get_type (void)
return snapshot_type;
}
static void
gst_snapshot_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (snapshot_sink_factory));
gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (snapshot_src_factory));
gst_element_class_set_details (element_class, &snapshot_details);
}
static void
gst_snapshot_class_init (GstSnapshotClass *klass)
{
......@@ -377,27 +389,22 @@ gst_snapshot_get_property (GObject *object, guint prop_id, GValue *value, GParam
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
GstElementFactory *factory;
factory = gst_element_factory_new("snapshot",GST_TYPE_SNAPSHOT,
&snapshot_details);
g_return_val_if_fail(factory != NULL, FALSE);
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (snapshot_sink_factory));
gst_element_factory_add_pad_template (factory, GST_PAD_TEMPLATE_GET (snapshot_src_factory));
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
if (!gst_element_register (plugin, "snapshot", GST_RANK_NONE, GST_TYPE_SNAPSHOT))
return FALSE;
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"snapshot",
plugin_init
};
"Dump a frame to a png file",
plugin_init,
VERSION,
"LGPL",
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment