mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
fix for new plugin system
Original commit message from CVS: fix for new plugin system
This commit is contained in:
parent
281738cef9
commit
71e2ed4a1c
4 changed files with 54 additions and 52 deletions
|
@ -21,32 +21,27 @@
|
|||
#include "gsttcpsrc.h"
|
||||
#include "gsttcpsink.h"
|
||||
|
||||
/* elementfactory information */
|
||||
extern GstElementDetails gst_tcpsrc_details;
|
||||
extern GstElementDetails gst_tcpsink_details;
|
||||
|
||||
static gboolean
|
||||
plugin_init (GModule *module, GstPlugin *plugin)
|
||||
plugin_init (GstPlugin *plugin)
|
||||
{
|
||||
GstElementFactory *src, *sink;
|
||||
if (!gst_element_register (plugin, "tcpsink", GST_RANK_NONE, GST_TYPE_TCPSINK))
|
||||
return FALSE;
|
||||
|
||||
/* create an elementfactory for the tcpsrc element */
|
||||
sink = gst_element_factory_new ("tcpsink",GST_TYPE_TCPSINK,
|
||||
&gst_tcpsink_details);
|
||||
g_return_val_if_fail (sink != NULL, FALSE);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (sink));
|
||||
|
||||
src = gst_element_factory_new ("tcpsrc",GST_TYPE_TCPSRC,
|
||||
&gst_tcpsrc_details);
|
||||
g_return_val_if_fail (src != NULL, FALSE);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (src));
|
||||
if (!gst_element_register (plugin, "tcpsrc", GST_RANK_NONE, GST_TYPE_TCPSRC))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstPluginDesc plugin_desc = {
|
||||
GST_PLUGIN_DEFINE (
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"tcp",
|
||||
plugin_init
|
||||
};
|
||||
"transfer data over the network via TCP",
|
||||
plugin_init,
|
||||
VERSION,
|
||||
GST_LICENSE,
|
||||
GST_COPYRIGHT,
|
||||
GST_PACKAGE,
|
||||
GST_ORIGIN
|
||||
)
|
||||
|
|
|
@ -21,32 +21,27 @@
|
|||
#include "gsttcpsrc.h"
|
||||
#include "gsttcpsink.h"
|
||||
|
||||
/* elementfactory information */
|
||||
extern GstElementDetails gst_tcpsrc_details;
|
||||
extern GstElementDetails gst_tcpsink_details;
|
||||
|
||||
static gboolean
|
||||
plugin_init (GModule *module, GstPlugin *plugin)
|
||||
plugin_init (GstPlugin *plugin)
|
||||
{
|
||||
GstElementFactory *src, *sink;
|
||||
if (!gst_element_register (plugin, "tcpsink", GST_RANK_NONE, GST_TYPE_TCPSINK))
|
||||
return FALSE;
|
||||
|
||||
/* create an elementfactory for the tcpsrc element */
|
||||
sink = gst_element_factory_new ("tcpsink",GST_TYPE_TCPSINK,
|
||||
&gst_tcpsink_details);
|
||||
g_return_val_if_fail (sink != NULL, FALSE);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (sink));
|
||||
|
||||
src = gst_element_factory_new ("tcpsrc",GST_TYPE_TCPSRC,
|
||||
&gst_tcpsrc_details);
|
||||
g_return_val_if_fail (src != NULL, FALSE);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (src));
|
||||
if (!gst_element_register (plugin, "tcpsrc", GST_RANK_NONE, GST_TYPE_TCPSRC))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstPluginDesc plugin_desc = {
|
||||
GST_PLUGIN_DEFINE (
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"tcp",
|
||||
plugin_init
|
||||
};
|
||||
"transfer data over the network via TCP",
|
||||
plugin_init,
|
||||
VERSION,
|
||||
GST_LICENSE,
|
||||
GST_COPYRIGHT,
|
||||
GST_PACKAGE,
|
||||
GST_ORIGIN
|
||||
)
|
||||
|
|
|
@ -26,15 +26,12 @@
|
|||
#define TCP_DEFAULT_PORT 4953
|
||||
|
||||
/* elementfactory information */
|
||||
GstElementDetails gst_tcpsink_details = {
|
||||
static GstElementDetails gst_tcpsink_details = GST_ELEMENT_DETAILS (
|
||||
"TCP packet sender",
|
||||
"Sink/Network",
|
||||
"LGPL",
|
||||
"Send data over the network via TCP",
|
||||
VERSION,
|
||||
"Zeeshan Ali <zak147@yahoo.com>",
|
||||
"(C) 2003",
|
||||
};
|
||||
"Zeeshan Ali <zak147@yahoo.com>"
|
||||
);
|
||||
|
||||
/* TCPSink signals and args */
|
||||
enum {
|
||||
|
@ -67,6 +64,7 @@ gst_tcpsink_control_get_type(void) {
|
|||
return tcpsink_control_type;
|
||||
}
|
||||
|
||||
static void gst_tcpsink_base_init (gpointer g_class);
|
||||
static void gst_tcpsink_class_init (GstTCPSink *klass);
|
||||
static void gst_tcpsink_init (GstTCPSink *tcpsink);
|
||||
|
||||
|
@ -93,7 +91,7 @@ gst_tcpsink_get_type (void)
|
|||
if (!tcpsink_type) {
|
||||
static const GTypeInfo tcpsink_info = {
|
||||
sizeof(GstTCPSinkClass),
|
||||
NULL,
|
||||
gst_tcpsink_base_init,
|
||||
NULL,
|
||||
(GClassInitFunc)gst_tcpsink_class_init,
|
||||
NULL,
|
||||
|
@ -108,6 +106,14 @@ gst_tcpsink_get_type (void)
|
|||
return tcpsink_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_tcpsink_base_init (gpointer g_class)
|
||||
{
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_set_details (element_class, &gst_tcpsink_details);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_tcpsink_class_init (GstTCPSink *klass)
|
||||
{
|
||||
|
|
|
@ -28,15 +28,12 @@
|
|||
#define TCP_DEFAULT_PORT 4953
|
||||
|
||||
/* elementfactory information */
|
||||
GstElementDetails gst_tcpsrc_details = {
|
||||
GstElementDetails gst_tcpsrc_details = GST_ELEMENT_DETAILS (
|
||||
"TCP packet receiver",
|
||||
"Source/Network",
|
||||
"LGPL",
|
||||
"Receive data over the network via TCP",
|
||||
VERSION,
|
||||
"Zeeshan Ali <zak147@yahoo.com>",
|
||||
"(C) 2003",
|
||||
};
|
||||
"Zeeshan Ali <zak147@yahoo.com>"
|
||||
);
|
||||
|
||||
/* TCPSrc signals and args */
|
||||
enum {
|
||||
|
@ -67,6 +64,7 @@ gst_tcpsrc_control_get_type(void) {
|
|||
return tcpsrc_control_type;
|
||||
}
|
||||
|
||||
static void gst_tcpsrc_base_init (gpointer g_class);
|
||||
static void gst_tcpsrc_class_init (GstTCPSrc *klass);
|
||||
static void gst_tcpsrc_init (GstTCPSrc *tcpsrc);
|
||||
|
||||
|
@ -92,7 +90,7 @@ gst_tcpsrc_get_type (void)
|
|||
if (!tcpsrc_type) {
|
||||
static const GTypeInfo tcpsrc_info = {
|
||||
sizeof(GstTCPSrcClass),
|
||||
NULL,
|
||||
gst_tcpsrc_base_init,
|
||||
NULL,
|
||||
(GClassInitFunc)gst_tcpsrc_class_init,
|
||||
NULL,
|
||||
|
@ -107,6 +105,14 @@ gst_tcpsrc_get_type (void)
|
|||
return tcpsrc_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_tcpsrc_base_init (gpointer g_class)
|
||||
{
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_set_details (element_class, &gst_tcpsrc_details);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_tcpsrc_class_init (GstTCPSrc *klass)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue