Snapshot compiles

Original commit message from CVS:
Snapshot compiles
This commit is contained in:
Iain Holmes 2003-11-02 01:38:01 +00:00
parent 81a861de05
commit f23814b897

View file

@ -32,11 +32,8 @@
static GstElementDetails snapshot_details = { static GstElementDetails snapshot_details = {
"snapshot", "snapshot",
"Filter/Video", "Filter/Video",
"LGPL",
"Dump a frame to a png file", "Dump a frame to a png file",
VERSION,
"Jeremy SIMON <jsimon13@yahoo.fr>", "Jeremy SIMON <jsimon13@yahoo.fr>",
"(C) 2002",
}; };
GST_PAD_TEMPLATE_FACTORY (snapshot_src_factory, GST_PAD_TEMPLATE_FACTORY (snapshot_src_factory,
@ -84,6 +81,7 @@ enum {
}; };
static GType gst_snapshot_get_type (void); 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_class_init (GstSnapshotClass *klass);
static void gst_snapshot_init (GstSnapshot *snapshot); static void gst_snapshot_init (GstSnapshot *snapshot);
@ -115,7 +113,10 @@ gst_snapshot_get_type (void)
if (!snapshot_type) { if (!snapshot_type) {
static const GTypeInfo snapshot_info = { 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,
NULL, NULL,
sizeof(GstSnapshot), sizeof(GstSnapshot),
@ -127,6 +128,17 @@ gst_snapshot_get_type (void)
return snapshot_type; 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 static void
gst_snapshot_class_init (GstSnapshotClass *klass) gst_snapshot_class_init (GstSnapshotClass *klass)
{ {
@ -377,27 +389,22 @@ gst_snapshot_get_property (GObject *object, guint prop_id, GValue *value, GParam
static gboolean static gboolean
plugin_init (GModule *module, GstPlugin *plugin) plugin_init (GstPlugin *plugin)
{ {
GstElementFactory *factory; if (!gst_element_register (plugin, "snapshot", GST_RANK_NONE, GST_TYPE_SNAPSHOT))
return FALSE;
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));
return TRUE; return TRUE;
} }
GstPluginDesc plugin_desc = { GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR, GST_VERSION_MAJOR,
GST_VERSION_MINOR, GST_VERSION_MINOR,
"snapshot", "snapshot",
plugin_init "Dump a frame to a png file",
}; plugin_init,
VERSION,
"LGPL",
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN)