1 /* vim: set filetype=c: */
13 static GstPad *gst_replace_request_new_pad (GstElement * element,
14 GstPadTemplate * templ, const gchar * name);
15 static void gst_replace_release_pad (GstElement * element, GstPad * pad);
16 static GstStateChangeReturn
17 gst_replace_change_state (GstElement * element, GstStateChange transition);
18 static GstClock *gst_replace_provide_clock (GstElement * element);
19 static gboolean gst_replace_set_clock (GstElement * element, GstClock * clock);
20 static GstIndex *gst_replace_get_index (GstElement * element);
21 static void gst_replace_set_index (GstElement * element, GstIndex * index);
22 static gboolean gst_replace_send_event (GstElement * element, GstEvent * event);
23 static gboolean gst_replace_query (GstElement * element, GstQuery * query);
25 GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
27 element_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_replace_request_new_pad);
28 element_class->release_pad = GST_DEBUG_FUNCPTR (gst_replace_release_pad);
29 element_class->change_state = GST_DEBUG_FUNCPTR (gst_replace_change_state);
30 element_class->provide_clock = GST_DEBUG_FUNCPTR (gst_replace_provide_clock);
31 element_class->set_clock = GST_DEBUG_FUNCPTR (gst_replace_set_clock);
32 element_class->get_index = GST_DEBUG_FUNCPTR (gst_replace_get_index);
33 element_class->set_index = GST_DEBUG_FUNCPTR (gst_replace_set_index);
34 element_class->send_event = GST_DEBUG_FUNCPTR (gst_replace_send_event);
35 element_class->query = GST_DEBUG_FUNCPTR (gst_replace_query);
40 gst_replace_request_new_pad (GstElement * element, GstPadTemplate * templ,
48 gst_replace_release_pad (GstElement * element, GstPad * pad)
53 static GstStateChangeReturn
54 gst_replace_change_state (GstElement * element, GstStateChange transition)
57 GstStateChangeReturn ret;
59 g_return_val_if_fail (GST_IS_REPLACE (element), GST_STATE_CHANGE_FAILURE);
60 replace = GST_REPLACE (element);
63 case GST_STATE_CHANGE_NULL_TO_READY:
65 case GST_STATE_CHANGE_READY_TO_PAUSED:
67 case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
73 ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
76 case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
78 case GST_STATE_CHANGE_PAUSED_TO_READY:
80 case GST_STATE_CHANGE_READY_TO_NULL:
90 gst_replace_provide_clock (GstElement * element)
97 gst_replace_set_clock (GstElement * element, GstClock * clock)
100 return GST_ELEMENT_CLASS (parent_class)->set_clock (element, clock);
104 gst_replace_get_index (GstElement * element)
111 gst_replace_set_index (GstElement * element, GstIndex * index)
117 gst_replace_send_event (GstElement * element, GstEvent * event)
124 gst_replace_query (GstElement * element, GstQuery * query)
126 GstReplace *replace = GST_REPLACE (element);
129 GST_DEBUG_OBJECT (replace, "query");
131 switch (GST_QUERY_TYPE (query)) {
133 ret = GST_ELEMENT_CLASS (parent_class)->query (element, query);