mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
gst/: s/gst_pad_new/&_from_template/ register pad templates in the base_init function add static pad template definit...
Original commit message from CVS: * gst/autoplug/gstspideridentity.c: (gst_spider_identity_request_new_pad): * gst/elements/gstaggregator.c: (gst_aggregator_base_init), (gst_aggregator_init): * gst/elements/gstfakesink.c: (gst_fakesink_base_init), (gst_fakesink_init): * gst/elements/gstfakesrc.c: (gst_fakesrc_base_init), (gst_fakesrc_init): * gst/elements/gstfdsink.c: (gst_fdsink_base_init), (gst_fdsink_init): * gst/elements/gstfdsrc.c: (gst_fdsrc_base_init), (gst_fdsrc_init): * gst/elements/gstfilesink.c: (gst_filesink_base_init), (gst_filesink_init): * gst/elements/gstfilesrc.c: (gst_filesrc_base_init), (gst_filesrc_init): * gst/elements/gstidentity.c: (gst_identity_base_init), (gst_identity_init): * gst/elements/gstmultifilesrc.c: (gst_multifilesrc_base_init), (gst_multifilesrc_init): * gst/elements/gstpipefilter.c: (gst_pipefilter_base_init), (gst_pipefilter_init): * gst/elements/gststatistics.c: (gst_statistics_base_init), (gst_statistics_init): * gst/elements/gsttee.c: (gst_tee_base_init), (gst_tee_init): * gst/gstqueue.c: (gst_queue_base_init), (gst_queue_init): s/gst_pad_new/&_from_template/ register pad templates in the base_init function add static pad template definitions
This commit is contained in:
parent
e1ef5586cd
commit
7fb1f1901f
28 changed files with 377 additions and 36 deletions
31
ChangeLog
31
ChangeLog
|
@ -1,3 +1,34 @@
|
|||
2004-08-17 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* gst/autoplug/gstspideridentity.c:
|
||||
(gst_spider_identity_request_new_pad):
|
||||
* gst/elements/gstaggregator.c: (gst_aggregator_base_init),
|
||||
(gst_aggregator_init):
|
||||
* gst/elements/gstfakesink.c: (gst_fakesink_base_init),
|
||||
(gst_fakesink_init):
|
||||
* gst/elements/gstfakesrc.c: (gst_fakesrc_base_init),
|
||||
(gst_fakesrc_init):
|
||||
* gst/elements/gstfdsink.c: (gst_fdsink_base_init),
|
||||
(gst_fdsink_init):
|
||||
* gst/elements/gstfdsrc.c: (gst_fdsrc_base_init), (gst_fdsrc_init):
|
||||
* gst/elements/gstfilesink.c: (gst_filesink_base_init),
|
||||
(gst_filesink_init):
|
||||
* gst/elements/gstfilesrc.c: (gst_filesrc_base_init),
|
||||
(gst_filesrc_init):
|
||||
* gst/elements/gstidentity.c: (gst_identity_base_init),
|
||||
(gst_identity_init):
|
||||
* gst/elements/gstmultifilesrc.c: (gst_multifilesrc_base_init),
|
||||
(gst_multifilesrc_init):
|
||||
* gst/elements/gstpipefilter.c: (gst_pipefilter_base_init),
|
||||
(gst_pipefilter_init):
|
||||
* gst/elements/gststatistics.c: (gst_statistics_base_init),
|
||||
(gst_statistics_init):
|
||||
* gst/elements/gsttee.c: (gst_tee_base_init), (gst_tee_init):
|
||||
* gst/gstqueue.c: (gst_queue_base_init), (gst_queue_init):
|
||||
s/gst_pad_new/&_from_template/
|
||||
register pad templates in the base_init function
|
||||
add static pad template definitions
|
||||
|
||||
2004-08-17 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* testsuite/bytestream/gstbstest.c: (gst_bstest_init):
|
||||
|
|
|
@ -319,7 +319,9 @@ gst_spider_identity_request_new_pad (GstElement * element,
|
|||
break;
|
||||
/* sink */
|
||||
GST_DEBUG ("element %s requests new sink pad", GST_ELEMENT_NAME (ident));
|
||||
ident->sink = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
ident->sink =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get
|
||||
(&spider_sink_factory), "sink");
|
||||
gst_element_add_pad (GST_ELEMENT (ident), ident->sink);
|
||||
gst_pad_set_link_function (ident->sink,
|
||||
GST_DEBUG_FUNCPTR (gst_spider_identity_link));
|
||||
|
@ -331,7 +333,9 @@ gst_spider_identity_request_new_pad (GstElement * element,
|
|||
if (ident->src != NULL)
|
||||
break;
|
||||
GST_DEBUG ("element %s requests new src pad", GST_ELEMENT_NAME (ident));
|
||||
ident->src = gst_pad_new ("src", GST_PAD_SRC);
|
||||
ident->src =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get
|
||||
(&spider_src_factory), "src");
|
||||
gst_element_add_pad (GST_ELEMENT (ident), ident->src);
|
||||
gst_pad_set_link_function (ident->src,
|
||||
GST_DEBUG_FUNCPTR (gst_spider_identity_link));
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
|
||||
#include "gstaggregator.h"
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_aggregator_debug);
|
||||
#define GST_CAT_DEFAULT gst_aggregator_debug
|
||||
|
||||
|
@ -105,6 +110,8 @@ gst_aggregator_base_init (gpointer g_class)
|
|||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&aggregator_src_template));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_aggregator_details);
|
||||
}
|
||||
|
||||
|
@ -155,7 +162,9 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
|
|||
static void
|
||||
gst_aggregator_init (GstAggregator * aggregator)
|
||||
{
|
||||
aggregator->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
aggregator->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_pad_set_getcaps_function (aggregator->srcpad, gst_pad_proxy_getcaps);
|
||||
gst_element_add_pad (GST_ELEMENT (aggregator), aggregator->srcpad);
|
||||
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
#include "gstfakesink.h"
|
||||
#include <gst/gstmarshal.h>
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_fakesink_debug);
|
||||
#define GST_CAT_DEFAULT gst_fakesink_debug
|
||||
|
||||
|
@ -117,6 +122,8 @@ gst_fakesink_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_fakesink_details);
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&fakesink_sink_template));
|
||||
|
@ -177,7 +184,9 @@ gst_fakesink_init (GstFakeSink * fakesink)
|
|||
{
|
||||
GstPad *pad;
|
||||
|
||||
pad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
pad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (fakesink), pad);
|
||||
gst_pad_set_chain_function (pad, GST_DEBUG_FUNCPTR (gst_fakesink_chain));
|
||||
|
||||
|
|
|
@ -35,6 +35,11 @@
|
|||
#define DEFAULT_SIZEMAX 4096
|
||||
#define DEFAULT_PARENTSIZE 4096*10
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_fakesrc_debug);
|
||||
#define GST_CAT_DEFAULT gst_fakesrc_debug
|
||||
|
||||
|
@ -188,6 +193,8 @@ gst_fakesrc_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_fakesrc_details);
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&fakesrc_src_template));
|
||||
|
@ -276,7 +283,9 @@ gst_fakesrc_init (GstFakeSrc * fakesrc)
|
|||
GstPad *pad;
|
||||
|
||||
/* create our first output pad */
|
||||
pad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
pad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_element_add_pad (GST_ELEMENT (fakesrc), pad);
|
||||
|
||||
fakesrc->loop_based = FALSE;
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
|
||||
#define GST_CAT_DEFAULT gst_fdsink_debug
|
||||
|
||||
|
@ -72,6 +77,8 @@ gst_fdsink_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_fdsink_details);
|
||||
}
|
||||
static void
|
||||
|
@ -93,7 +100,9 @@ gst_fdsink_class_init (GstFdSinkClass * klass)
|
|||
static void
|
||||
gst_fdsink_init (GstFdSink * fdsink)
|
||||
{
|
||||
fdsink->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
fdsink->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (fdsink), fdsink->sinkpad);
|
||||
gst_pad_set_chain_function (fdsink->sinkpad, gst_fdsink_chain);
|
||||
|
||||
|
|
|
@ -39,6 +39,11 @@
|
|||
|
||||
#define DEFAULT_BLOCKSIZE 4096
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_fdsrc_debug);
|
||||
#define GST_CAT_DEFAULT gst_fdsrc_debug
|
||||
|
||||
|
@ -86,6 +91,8 @@ gst_fdsrc_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_fdsrc_details);
|
||||
}
|
||||
static void
|
||||
|
@ -121,7 +128,9 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
|
|||
static void
|
||||
gst_fdsrc_init (GstFdSrc * fdsrc)
|
||||
{
|
||||
fdsrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
fdsrc->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
|
||||
gst_pad_set_get_function (fdsrc->srcpad, gst_fdsrc_get);
|
||||
gst_element_add_pad (GST_ELEMENT (fdsrc), fdsrc->srcpad);
|
||||
|
|
|
@ -38,6 +38,11 @@
|
|||
#endif
|
||||
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_filesink_debug);
|
||||
#define GST_CAT_DEFAULT gst_filesink_debug
|
||||
|
||||
|
@ -131,6 +136,8 @@ gst_filesink_base_init (gpointer g_class)
|
|||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gstelement_class->change_state = gst_filesink_change_state;
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_filesink_details);
|
||||
}
|
||||
static void
|
||||
|
@ -157,7 +164,9 @@ gst_filesink_init (GstFileSink * filesink)
|
|||
{
|
||||
GstPad *pad;
|
||||
|
||||
pad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
pad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (filesink), pad);
|
||||
gst_pad_set_chain_function (pad, gst_filesink_chain);
|
||||
|
||||
|
|
|
@ -41,6 +41,11 @@
|
|||
|
||||
#include "../gst-i18n-lib.h"
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
/* FIXME we should be using glib for this */
|
||||
#ifndef S_ISREG
|
||||
#define S_ISREG(mode) ((mode)&_S_IFREG)
|
||||
|
@ -197,6 +202,8 @@ gst_filesrc_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_filesrc_details);
|
||||
}
|
||||
static void
|
||||
|
@ -237,7 +244,9 @@ gst_filesrc_class_init (GstFileSrcClass * klass)
|
|||
static void
|
||||
gst_filesrc_init (GstFileSrc * src)
|
||||
{
|
||||
src->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
src->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_pad_set_get_function (src->srcpad, gst_filesrc_get);
|
||||
gst_pad_set_event_function (src->srcpad, gst_filesrc_srcpad_event);
|
||||
gst_pad_set_event_mask_function (src->srcpad, gst_filesrc_get_event_mask);
|
||||
|
|
|
@ -31,6 +31,16 @@
|
|||
#include "gstidentity.h"
|
||||
#include <gst/gstmarshal.h>
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_identity_debug);
|
||||
#define GST_CAT_DEFAULT gst_identity_debug
|
||||
|
||||
|
@ -87,6 +97,10 @@ gst_identity_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_identity_details);
|
||||
}
|
||||
|
||||
|
@ -162,14 +176,18 @@ gst_identity_class_init (GstIdentityClass * klass)
|
|||
static void
|
||||
gst_identity_init (GstIdentity * identity)
|
||||
{
|
||||
identity->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
identity->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (identity), identity->sinkpad);
|
||||
gst_pad_set_chain_function (identity->sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_identity_chain));
|
||||
gst_pad_set_link_function (identity->sinkpad, gst_pad_proxy_pad_link);
|
||||
gst_pad_set_getcaps_function (identity->sinkpad, gst_pad_proxy_getcaps);
|
||||
|
||||
identity->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
identity->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad);
|
||||
gst_pad_set_link_function (identity->srcpad, gst_pad_proxy_pad_link);
|
||||
gst_pad_set_getcaps_function (identity->srcpad, gst_pad_proxy_getcaps);
|
||||
|
|
|
@ -37,6 +37,11 @@
|
|||
|
||||
#include "gstmultifilesrc.h"
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_multifilesrc_debug);
|
||||
#define GST_CAT_DEFAULT gst_multifilesrc_debug
|
||||
|
||||
|
@ -89,6 +94,8 @@ gst_multifilesrc_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_multifilesrc_details);
|
||||
}
|
||||
static void
|
||||
|
@ -125,7 +132,9 @@ gst_multifilesrc_init (GstMultiFileSrc * multifilesrc)
|
|||
{
|
||||
/* GST_FLAG_SET (filesrc, GST_SRC_); */
|
||||
|
||||
multifilesrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
multifilesrc->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_pad_set_get_function (multifilesrc->srcpad, gst_multifilesrc_get);
|
||||
/* gst_pad_set_getregion_function (multifilesrc->srcpad,gst_multifilesrc_get_region); */
|
||||
gst_element_add_pad (GST_ELEMENT (multifilesrc), multifilesrc->srcpad);
|
||||
|
|
|
@ -37,6 +37,16 @@
|
|||
#include "../gst-i18n-lib.h"
|
||||
#include "gstpipefilter.h"
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_pipefilter_debug);
|
||||
#define GST_CAT_DEFAULT gst_pipefilter_debug
|
||||
|
||||
|
@ -83,6 +93,10 @@ gst_pipefilter_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_pipefilter_details);
|
||||
}
|
||||
static void
|
||||
|
@ -108,11 +122,15 @@ gst_pipefilter_init (GstPipefilter * pipefilter)
|
|||
{
|
||||
GST_FLAG_SET (pipefilter, GST_ELEMENT_DECOUPLED);
|
||||
|
||||
pipefilter->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
pipefilter->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (pipefilter), pipefilter->sinkpad);
|
||||
gst_pad_set_chain_function (pipefilter->sinkpad, gst_pipefilter_chain);
|
||||
|
||||
pipefilter->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
pipefilter->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_element_add_pad (GST_ELEMENT (pipefilter), pipefilter->srcpad);
|
||||
gst_pad_set_get_function (pipefilter->srcpad, gst_pipefilter_get);
|
||||
|
||||
|
|
|
@ -27,6 +27,16 @@
|
|||
|
||||
#include "gststatistics.h"
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_statistics_debug);
|
||||
#define GST_CAT_DEFAULT gst_statistics_debug
|
||||
|
||||
|
@ -84,6 +94,10 @@ gst_statistics_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_statistics_details);
|
||||
}
|
||||
|
||||
|
@ -155,12 +169,16 @@ gst_statistics_class_init (GstStatisticsClass * klass)
|
|||
static void
|
||||
gst_statistics_init (GstStatistics * statistics)
|
||||
{
|
||||
statistics->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
statistics->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (statistics), statistics->sinkpad);
|
||||
gst_pad_set_chain_function (statistics->sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_statistics_chain));
|
||||
|
||||
statistics->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
statistics->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_element_add_pad (GST_ELEMENT (statistics), statistics->srcpad);
|
||||
|
||||
statistics->timer = NULL;
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_tee_debug);
|
||||
#define GST_CAT_DEFAULT gst_tee_debug
|
||||
|
||||
|
@ -80,6 +85,8 @@ gst_tee_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_tee_details);
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&tee_src_template));
|
||||
|
@ -129,7 +136,9 @@ gst_tee_class_init (GstTeeClass * klass)
|
|||
static void
|
||||
gst_tee_init (GstTee * tee)
|
||||
{
|
||||
tee->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
tee->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (tee), tee->sinkpad);
|
||||
gst_pad_set_chain_function (tee->sinkpad, GST_DEBUG_FUNCPTR (gst_tee_chain));
|
||||
gst_pad_set_link_function (tee->sinkpad,
|
||||
|
|
|
@ -30,6 +30,16 @@
|
|||
#include "gstinfo.h"
|
||||
#include "gsterror.h"
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (queue_dataflow);
|
||||
|
||||
static GstElementDetails gst_queue_details = GST_ELEMENT_DETAILS ("Queue",
|
||||
|
@ -170,6 +180,10 @@ gst_queue_base_init (GstQueueClass * klass)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_queue_details);
|
||||
}
|
||||
|
||||
|
@ -265,7 +279,9 @@ gst_queue_init (GstQueue * queue)
|
|||
GST_FLAG_SET (queue, GST_ELEMENT_DECOUPLED);
|
||||
GST_FLAG_SET (queue, GST_ELEMENT_EVENT_AWARE);
|
||||
|
||||
queue->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
queue->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_pad_set_chain_function (queue->sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_queue_chain));
|
||||
gst_element_add_pad (GST_ELEMENT (queue), queue->sinkpad);
|
||||
|
@ -275,7 +291,9 @@ gst_queue_init (GstQueue * queue)
|
|||
GST_DEBUG_FUNCPTR (gst_queue_getcaps));
|
||||
gst_pad_set_active (queue->sinkpad, TRUE);
|
||||
|
||||
queue->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
queue->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_pad_set_get_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_get));
|
||||
gst_element_add_pad (GST_ELEMENT (queue), queue->srcpad);
|
||||
gst_pad_set_link_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_link));
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
|
||||
#include "gstaggregator.h"
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_aggregator_debug);
|
||||
#define GST_CAT_DEFAULT gst_aggregator_debug
|
||||
|
||||
|
@ -105,6 +110,8 @@ gst_aggregator_base_init (gpointer g_class)
|
|||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&aggregator_src_template));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_aggregator_details);
|
||||
}
|
||||
|
||||
|
@ -155,7 +162,9 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
|
|||
static void
|
||||
gst_aggregator_init (GstAggregator * aggregator)
|
||||
{
|
||||
aggregator->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
aggregator->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_pad_set_getcaps_function (aggregator->srcpad, gst_pad_proxy_getcaps);
|
||||
gst_element_add_pad (GST_ELEMENT (aggregator), aggregator->srcpad);
|
||||
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
#include "gstfakesink.h"
|
||||
#include <gst/gstmarshal.h>
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_fakesink_debug);
|
||||
#define GST_CAT_DEFAULT gst_fakesink_debug
|
||||
|
||||
|
@ -117,6 +122,8 @@ gst_fakesink_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_fakesink_details);
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&fakesink_sink_template));
|
||||
|
@ -177,7 +184,9 @@ gst_fakesink_init (GstFakeSink * fakesink)
|
|||
{
|
||||
GstPad *pad;
|
||||
|
||||
pad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
pad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (fakesink), pad);
|
||||
gst_pad_set_chain_function (pad, GST_DEBUG_FUNCPTR (gst_fakesink_chain));
|
||||
|
||||
|
|
|
@ -35,6 +35,11 @@
|
|||
#define DEFAULT_SIZEMAX 4096
|
||||
#define DEFAULT_PARENTSIZE 4096*10
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_fakesrc_debug);
|
||||
#define GST_CAT_DEFAULT gst_fakesrc_debug
|
||||
|
||||
|
@ -188,6 +193,8 @@ gst_fakesrc_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_fakesrc_details);
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&fakesrc_src_template));
|
||||
|
@ -276,7 +283,9 @@ gst_fakesrc_init (GstFakeSrc * fakesrc)
|
|||
GstPad *pad;
|
||||
|
||||
/* create our first output pad */
|
||||
pad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
pad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_element_add_pad (GST_ELEMENT (fakesrc), pad);
|
||||
|
||||
fakesrc->loop_based = FALSE;
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
|
||||
#define GST_CAT_DEFAULT gst_fdsink_debug
|
||||
|
||||
|
@ -72,6 +77,8 @@ gst_fdsink_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_fdsink_details);
|
||||
}
|
||||
static void
|
||||
|
@ -93,7 +100,9 @@ gst_fdsink_class_init (GstFdSinkClass * klass)
|
|||
static void
|
||||
gst_fdsink_init (GstFdSink * fdsink)
|
||||
{
|
||||
fdsink->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
fdsink->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (fdsink), fdsink->sinkpad);
|
||||
gst_pad_set_chain_function (fdsink->sinkpad, gst_fdsink_chain);
|
||||
|
||||
|
|
|
@ -39,6 +39,11 @@
|
|||
|
||||
#define DEFAULT_BLOCKSIZE 4096
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_fdsrc_debug);
|
||||
#define GST_CAT_DEFAULT gst_fdsrc_debug
|
||||
|
||||
|
@ -86,6 +91,8 @@ gst_fdsrc_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_fdsrc_details);
|
||||
}
|
||||
static void
|
||||
|
@ -121,7 +128,9 @@ gst_fdsrc_class_init (GstFdSrcClass * klass)
|
|||
static void
|
||||
gst_fdsrc_init (GstFdSrc * fdsrc)
|
||||
{
|
||||
fdsrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
fdsrc->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
|
||||
gst_pad_set_get_function (fdsrc->srcpad, gst_fdsrc_get);
|
||||
gst_element_add_pad (GST_ELEMENT (fdsrc), fdsrc->srcpad);
|
||||
|
|
|
@ -38,6 +38,11 @@
|
|||
#endif
|
||||
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_filesink_debug);
|
||||
#define GST_CAT_DEFAULT gst_filesink_debug
|
||||
|
||||
|
@ -131,6 +136,8 @@ gst_filesink_base_init (gpointer g_class)
|
|||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gstelement_class->change_state = gst_filesink_change_state;
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_filesink_details);
|
||||
}
|
||||
static void
|
||||
|
@ -157,7 +164,9 @@ gst_filesink_init (GstFileSink * filesink)
|
|||
{
|
||||
GstPad *pad;
|
||||
|
||||
pad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
pad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (filesink), pad);
|
||||
gst_pad_set_chain_function (pad, gst_filesink_chain);
|
||||
|
||||
|
|
|
@ -41,6 +41,11 @@
|
|||
|
||||
#include "../gst-i18n-lib.h"
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
/* FIXME we should be using glib for this */
|
||||
#ifndef S_ISREG
|
||||
#define S_ISREG(mode) ((mode)&_S_IFREG)
|
||||
|
@ -197,6 +202,8 @@ gst_filesrc_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_filesrc_details);
|
||||
}
|
||||
static void
|
||||
|
@ -237,7 +244,9 @@ gst_filesrc_class_init (GstFileSrcClass * klass)
|
|||
static void
|
||||
gst_filesrc_init (GstFileSrc * src)
|
||||
{
|
||||
src->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
src->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_pad_set_get_function (src->srcpad, gst_filesrc_get);
|
||||
gst_pad_set_event_function (src->srcpad, gst_filesrc_srcpad_event);
|
||||
gst_pad_set_event_mask_function (src->srcpad, gst_filesrc_get_event_mask);
|
||||
|
|
|
@ -31,6 +31,16 @@
|
|||
#include "gstidentity.h"
|
||||
#include <gst/gstmarshal.h>
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_identity_debug);
|
||||
#define GST_CAT_DEFAULT gst_identity_debug
|
||||
|
||||
|
@ -87,6 +97,10 @@ gst_identity_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_identity_details);
|
||||
}
|
||||
|
||||
|
@ -162,14 +176,18 @@ gst_identity_class_init (GstIdentityClass * klass)
|
|||
static void
|
||||
gst_identity_init (GstIdentity * identity)
|
||||
{
|
||||
identity->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
identity->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (identity), identity->sinkpad);
|
||||
gst_pad_set_chain_function (identity->sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_identity_chain));
|
||||
gst_pad_set_link_function (identity->sinkpad, gst_pad_proxy_pad_link);
|
||||
gst_pad_set_getcaps_function (identity->sinkpad, gst_pad_proxy_getcaps);
|
||||
|
||||
identity->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
identity->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad);
|
||||
gst_pad_set_link_function (identity->srcpad, gst_pad_proxy_pad_link);
|
||||
gst_pad_set_getcaps_function (identity->srcpad, gst_pad_proxy_getcaps);
|
||||
|
|
|
@ -37,6 +37,11 @@
|
|||
|
||||
#include "gstmultifilesrc.h"
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_multifilesrc_debug);
|
||||
#define GST_CAT_DEFAULT gst_multifilesrc_debug
|
||||
|
||||
|
@ -89,6 +94,8 @@ gst_multifilesrc_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_multifilesrc_details);
|
||||
}
|
||||
static void
|
||||
|
@ -125,7 +132,9 @@ gst_multifilesrc_init (GstMultiFileSrc * multifilesrc)
|
|||
{
|
||||
/* GST_FLAG_SET (filesrc, GST_SRC_); */
|
||||
|
||||
multifilesrc->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
multifilesrc->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_pad_set_get_function (multifilesrc->srcpad, gst_multifilesrc_get);
|
||||
/* gst_pad_set_getregion_function (multifilesrc->srcpad,gst_multifilesrc_get_region); */
|
||||
gst_element_add_pad (GST_ELEMENT (multifilesrc), multifilesrc->srcpad);
|
||||
|
|
|
@ -37,6 +37,16 @@
|
|||
#include "../gst-i18n-lib.h"
|
||||
#include "gstpipefilter.h"
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_pipefilter_debug);
|
||||
#define GST_CAT_DEFAULT gst_pipefilter_debug
|
||||
|
||||
|
@ -83,6 +93,10 @@ gst_pipefilter_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_pipefilter_details);
|
||||
}
|
||||
static void
|
||||
|
@ -108,11 +122,15 @@ gst_pipefilter_init (GstPipefilter * pipefilter)
|
|||
{
|
||||
GST_FLAG_SET (pipefilter, GST_ELEMENT_DECOUPLED);
|
||||
|
||||
pipefilter->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
pipefilter->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (pipefilter), pipefilter->sinkpad);
|
||||
gst_pad_set_chain_function (pipefilter->sinkpad, gst_pipefilter_chain);
|
||||
|
||||
pipefilter->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
pipefilter->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_element_add_pad (GST_ELEMENT (pipefilter), pipefilter->srcpad);
|
||||
gst_pad_set_get_function (pipefilter->srcpad, gst_pipefilter_get);
|
||||
|
||||
|
|
|
@ -30,6 +30,16 @@
|
|||
#include "gstinfo.h"
|
||||
#include "gsterror.h"
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (queue_dataflow);
|
||||
|
||||
static GstElementDetails gst_queue_details = GST_ELEMENT_DETAILS ("Queue",
|
||||
|
@ -170,6 +180,10 @@ gst_queue_base_init (GstQueueClass * klass)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_queue_details);
|
||||
}
|
||||
|
||||
|
@ -265,7 +279,9 @@ gst_queue_init (GstQueue * queue)
|
|||
GST_FLAG_SET (queue, GST_ELEMENT_DECOUPLED);
|
||||
GST_FLAG_SET (queue, GST_ELEMENT_EVENT_AWARE);
|
||||
|
||||
queue->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
queue->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_pad_set_chain_function (queue->sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_queue_chain));
|
||||
gst_element_add_pad (GST_ELEMENT (queue), queue->sinkpad);
|
||||
|
@ -275,7 +291,9 @@ gst_queue_init (GstQueue * queue)
|
|||
GST_DEBUG_FUNCPTR (gst_queue_getcaps));
|
||||
gst_pad_set_active (queue->sinkpad, TRUE);
|
||||
|
||||
queue->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
queue->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_pad_set_get_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_get));
|
||||
gst_element_add_pad (GST_ELEMENT (queue), queue->srcpad);
|
||||
gst_pad_set_link_function (queue->srcpad, GST_DEBUG_FUNCPTR (gst_queue_link));
|
||||
|
|
|
@ -27,6 +27,16 @@
|
|||
|
||||
#include "gststatistics.h"
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_statistics_debug);
|
||||
#define GST_CAT_DEFAULT gst_statistics_debug
|
||||
|
||||
|
@ -84,6 +94,10 @@ gst_statistics_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&srctemplate));
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_statistics_details);
|
||||
}
|
||||
|
||||
|
@ -155,12 +169,16 @@ gst_statistics_class_init (GstStatisticsClass * klass)
|
|||
static void
|
||||
gst_statistics_init (GstStatistics * statistics)
|
||||
{
|
||||
statistics->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
statistics->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (statistics), statistics->sinkpad);
|
||||
gst_pad_set_chain_function (statistics->sinkpad,
|
||||
GST_DEBUG_FUNCPTR (gst_statistics_chain));
|
||||
|
||||
statistics->srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
statistics->srcpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
|
||||
"src");
|
||||
gst_element_add_pad (GST_ELEMENT (statistics), statistics->srcpad);
|
||||
|
||||
statistics->timer = NULL;
|
||||
|
|
|
@ -28,6 +28,11 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS_ANY);
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_tee_debug);
|
||||
#define GST_CAT_DEFAULT gst_tee_debug
|
||||
|
||||
|
@ -80,6 +85,8 @@ gst_tee_base_init (gpointer g_class)
|
|||
{
|
||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&sinktemplate));
|
||||
gst_element_class_set_details (gstelement_class, &gst_tee_details);
|
||||
gst_element_class_add_pad_template (gstelement_class,
|
||||
gst_static_pad_template_get (&tee_src_template));
|
||||
|
@ -129,7 +136,9 @@ gst_tee_class_init (GstTeeClass * klass)
|
|||
static void
|
||||
gst_tee_init (GstTee * tee)
|
||||
{
|
||||
tee->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
|
||||
tee->sinkpad =
|
||||
gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
|
||||
"sink");
|
||||
gst_element_add_pad (GST_ELEMENT (tee), tee->sinkpad);
|
||||
gst_pad_set_chain_function (tee->sinkpad, GST_DEBUG_FUNCPTR (gst_tee_chain));
|
||||
gst_pad_set_link_function (tee->sinkpad,
|
||||
|
|
Loading…
Reference in a new issue