10 #include <gst/base/gstbasesink.h>
12 static GstCaps *gst_replace_get_caps (GstBaseSink * sink);
13 static gboolean gst_replace_set_caps (GstBaseSink * sink, GstCaps * caps);
15 gst_replace_buffer_alloc (GstBaseSink * sink, guint64 offset, guint size,
16 GstCaps * caps, GstBuffer ** buf);
18 gst_replace_get_times (GstBaseSink * sink, GstBuffer * buffer,
19 GstClockTime * start, GstClockTime * end);
20 static gboolean gst_replace_start (GstBaseSink * sink);
21 static gboolean gst_replace_stop (GstBaseSink * sink);
22 static gboolean gst_replace_unlock (GstBaseSink * sink);
23 static gboolean gst_replace_event (GstBaseSink * sink, GstEvent * event);
25 gst_replace_preroll (GstBaseSink * sink, GstBuffer * buffer);
27 gst_replace_render (GstBaseSink * sink, GstBuffer * buffer);
28 static GstStateChangeReturn gst_replace_async_play (GstBaseSink * sink);
29 static gboolean gst_replace_activate_pull (GstBaseSink * sink, gboolean active);
30 static void gst_replace_fixate (GstBaseSink * sink, GstCaps * caps);
31 static gboolean gst_replace_unlock_stop (GstBaseSink * sink);
33 gst_replace_render_list (GstBaseSink * sink, GstBufferList * buffer_list);
35 GstBaseSinkClass *base_sink_class = GST_BASE_SINK_CLASS (klass);
37 base_sink_class->get_caps = GST_DEBUG_FUNCPTR (gst_replace_get_caps);
38 base_sink_class->set_caps = GST_DEBUG_FUNCPTR (gst_replace_set_caps);
39 base_sink_class->buffer_alloc = GST_DEBUG_FUNCPTR (gst_replace_buffer_alloc);
40 base_sink_class->get_times = GST_DEBUG_FUNCPTR (gst_replace_get_times);
41 base_sink_class->start = GST_DEBUG_FUNCPTR (gst_replace_start);
42 base_sink_class->stop = GST_DEBUG_FUNCPTR (gst_replace_stop);
43 base_sink_class->unlock = GST_DEBUG_FUNCPTR (gst_replace_unlock);
44 base_sink_class->event = GST_DEBUG_FUNCPTR (gst_replace_event);
45 base_sink_class->preroll = GST_DEBUG_FUNCPTR (gst_replace_preroll);
46 base_sink_class->render = GST_DEBUG_FUNCPTR (gst_replace_render);
47 base_sink_class->async_play = GST_DEBUG_FUNCPTR (gst_replace_async_play);
48 base_sink_class->activate_pull = GST_DEBUG_FUNCPTR (gst_replace_activate_pull);
49 base_sink_class->fixate = GST_DEBUG_FUNCPTR (gst_replace_fixate);
50 base_sink_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_replace_unlock_stop);
51 base_sink_class->render_list = GST_DEBUG_FUNCPTR (gst_replace_render_list);
56 gst_replace_get_caps (GstBaseSink * sink)
63 gst_replace_set_caps (GstBaseSink * sink, GstCaps * caps)
70 gst_replace_buffer_alloc (GstBaseSink * sink, guint64 offset, guint size,
71 GstCaps * caps, GstBuffer ** buf)
74 return GST_FLOW_ERROR;
78 gst_replace_get_times (GstBaseSink * sink, GstBuffer * buffer,
79 GstClockTime * start, GstClockTime * end)
85 gst_replace_start (GstBaseSink * sink)
92 gst_replace_stop (GstBaseSink * sink)
99 gst_replace_unlock (GstBaseSink * sink)
106 gst_replace_event (GstBaseSink * sink, GstEvent * event)
113 gst_replace_preroll (GstBaseSink * sink, GstBuffer * buffer)
120 gst_replace_render (GstBaseSink * sink, GstBuffer * buffer)
126 static GstStateChangeReturn
127 gst_replace_async_play (GstBaseSink * sink)
130 return GST_STATE_CHANGE_SUCCESS;
134 gst_replace_activate_pull (GstBaseSink * sink, gboolean active)
141 gst_replace_fixate (GstBaseSink * sink, GstCaps * caps)
147 gst_replace_unlock_stop (GstBaseSink * sink)
154 gst_replace_render_list (GstBaseSink * sink, GstBufferList * buffer_list)