element-maker: Fix up GstElement
This commit is contained in:
parent
05992323b6
commit
8b3450882a
@ -1,14 +1,14 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
class=basetransform
|
class=element
|
||||||
|
|
||||||
GST_IS_REPLACE=MY_IS_EXAMPLE
|
GST_IS_REPLACE=GST_IS_CAPS_DEBUG
|
||||||
GST_REPLACE=MY_EXAMPLE
|
GST_REPLACE=GST_CAPS_DEBUG
|
||||||
GST_TYPE_REPLACE=MY_TYPE_EXAMPLE
|
GST_TYPE_REPLACE=GST_TYPE_CAPS_DEBUG
|
||||||
GstReplace=MyExample
|
GstReplace=GstCapsDebug
|
||||||
gst_replace=my_example
|
gst_replace=gst_caps_debug
|
||||||
gstreplace=myexample
|
gstreplace=gstcapsdebug
|
||||||
replace=example
|
replace=capsdebug
|
||||||
|
|
||||||
source=gst$class.c
|
source=gst$class.c
|
||||||
pkg=`grep -A 10000 '^% pkg-config' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1`
|
pkg=`grep -A 10000 '^% pkg-config' $source | tail -n +2|grep -m 1 -B 10000 '^%'|head -n -1`
|
||||||
|
@ -26,9 +26,21 @@ static gboolean gst_replace_send_event (GstElement * element, GstEvent * event);
|
|||||||
static const GstQueryType *gst_replace_get_query_types (GstElement * element);
|
static const GstQueryType *gst_replace_get_query_types (GstElement * element);
|
||||||
static gboolean gst_replace_query (GstElement * element, GstQuery * query);
|
static gboolean gst_replace_query (GstElement * element, GstQuery * query);
|
||||||
% declare-class
|
% declare-class
|
||||||
GstElement *element_class = GST_ELEMENT (klass);
|
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
||||||
% set-methods
|
% set-methods
|
||||||
element_class-> = GST_DEBUG_FUNCPTR (gst_replace_);
|
element_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_replace_request_new_pad);
|
||||||
|
element_class->release_pad = GST_DEBUG_FUNCPTR (gst_replace_release_pad);
|
||||||
|
element_class->get_state = GST_DEBUG_FUNCPTR (gst_replace_get_state);
|
||||||
|
element_class->set_state = GST_DEBUG_FUNCPTR (gst_replace_set_state);
|
||||||
|
element_class->change_state = GST_DEBUG_FUNCPTR (gst_replace_change_state);
|
||||||
|
element_class->set_bus = GST_DEBUG_FUNCPTR (gst_replace_set_bus);
|
||||||
|
element_class->provide_clock = GST_DEBUG_FUNCPTR (gst_replace_provide_clock);
|
||||||
|
element_class->set_clock = GST_DEBUG_FUNCPTR (gst_replace_set_clock);
|
||||||
|
element_class->get_index = GST_DEBUG_FUNCPTR (gst_replace_get_index);
|
||||||
|
element_class->set_index = GST_DEBUG_FUNCPTR (gst_replace_set_index);
|
||||||
|
element_class->send_event = GST_DEBUG_FUNCPTR (gst_replace_send_event);
|
||||||
|
element_class->get_query_types = GST_DEBUG_FUNCPTR (gst_replace_get_query_types);
|
||||||
|
element_class->query = GST_DEBUG_FUNCPTR (gst_replace_query);
|
||||||
% methods
|
% methods
|
||||||
|
|
||||||
|
|
||||||
@ -51,21 +63,21 @@ gst_replace_get_state (GstElement * element, GstState * state,
|
|||||||
GstState * pending, GstClockTime timeout)
|
GstState * pending, GstClockTime timeout)
|
||||||
{
|
{
|
||||||
|
|
||||||
return GST_STATE_CHANGE_OK;
|
return GST_STATE_CHANGE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
gst_replace_set_state (GstElement * element, GstState state)
|
gst_replace_set_state (GstElement * element, GstState state)
|
||||||
{
|
{
|
||||||
|
|
||||||
return GST_STATE_CHANGE_OK;
|
return GST_STATE_CHANGE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
gst_replace_change_state (GstElement * element, GstStateChange transition)
|
gst_replace_change_state (GstElement * element, GstStateChange transition)
|
||||||
{
|
{
|
||||||
|
|
||||||
return GST_STATE_CHANGE_OK;
|
return GST_STATE_CHANGE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -78,18 +90,21 @@ static GstClock *
|
|||||||
gst_replace_provide_clock (GstElement * element)
|
gst_replace_provide_clock (GstElement * element)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_replace_set_clock (GstElement * element, GstClock * clock)
|
gst_replace_set_clock (GstElement * element, GstClock * clock)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstIndex *
|
static GstIndex *
|
||||||
gst_replace_get_index (GstElement * element)
|
gst_replace_get_index (GstElement * element)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -102,17 +117,20 @@ static gboolean
|
|||||||
gst_replace_send_event (GstElement * element, GstEvent * event)
|
gst_replace_send_event (GstElement * element, GstEvent * event)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const GstQueryType *
|
static const GstQueryType *
|
||||||
gst_replace_get_query_types (GstElement * element)
|
gst_replace_get_query_types (GstElement * element)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_replace_query (GstElement * element, GstQuery * query)
|
gst_replace_query (GstElement * element, GstQuery * query)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
% end
|
% end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user