1 /* vim: set filetype=c: */
12 #include <gst/base/gstbaseparse.h>
14 static gboolean gst_replace_start (GstBaseParse * parse);
15 static gboolean gst_replace_stop (GstBaseParse * parse);
16 static gboolean gst_replace_set_sink_caps (GstBaseParse * parse,
18 static GstFlowReturn gst_replace_handle_frame (GstBaseParse * parse,
19 GstBaseParseFrame * frame, gint * skipsize);
20 static GstFlowReturn gst_replace_pre_push_frame (GstBaseParse * parse,
21 GstBaseParseFrame * frame);
22 static gboolean gst_replace_convert (GstBaseParse * parse, GstFormat src_format,
23 gint64 src_value, GstFormat dest_format, gint64 * dest_value);
24 static gboolean gst_replace_sink_event (GstBaseParse * parse, GstEvent * event);
25 static gboolean gst_replace_src_event (GstBaseParse * parse, GstEvent * event);
26 static GstCaps *gst_replace_get_sink_caps (GstBaseParse * parse,
28 static GstFlowReturn gst_replace_detect (GstBaseParse * parse,
31 GstBaseParseClass *base_parse_class = GST_BASE_PARSE_CLASS (klass);
33 base_parse_class->start = GST_DEBUG_FUNCPTR (gst_replace_start);
34 base_parse_class->stop = GST_DEBUG_FUNCPTR (gst_replace_stop);
35 base_parse_class->set_sink_caps = GST_DEBUG_FUNCPTR (gst_replace_set_sink_caps);
36 base_parse_class->handle_frame = GST_DEBUG_FUNCPTR (gst_replace_handle_frame);
37 base_parse_class->pre_push_frame = GST_DEBUG_FUNCPTR (gst_replace_pre_push_frame);
38 base_parse_class->convert = GST_DEBUG_FUNCPTR (gst_replace_convert);
39 base_parse_class->sink_event = GST_DEBUG_FUNCPTR (gst_replace_sink_event);
40 base_parse_class->src_event = GST_DEBUG_FUNCPTR (gst_replace_src_event);
41 base_parse_class->get_sink_caps = GST_DEBUG_FUNCPTR (gst_replace_get_sink_caps);
42 base_parse_class->detect = GST_DEBUG_FUNCPTR (gst_replace_detect);
45 gst_replace_start (GstBaseParse * parse)
47 GstReplace *replace = GST_REPLACE (parse);
49 GST_DEBUG_OBJECT (replace, "start");
55 gst_replace_stop (GstBaseParse * parse)
57 GstReplace *replace = GST_REPLACE (parse);
59 GST_DEBUG_OBJECT (replace, "stop");
65 gst_replace_set_sink_caps (GstBaseParse * parse, GstCaps * caps)
67 GstReplace *replace = GST_REPLACE (parse);
69 GST_DEBUG_OBJECT (replace, "set_sink_caps");
75 gst_replace_handle_frame (GstBaseParse * parse, GstBaseParseFrame * frame,
78 GstReplace *replace = GST_REPLACE (parse);
80 GST_DEBUG_OBJECT (replace, "handle_frame");
86 gst_replace_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
88 GstReplace *replace = GST_REPLACE (parse);
90 GST_DEBUG_OBJECT (replace, "pre_push_frame");
96 gst_replace_convert (GstBaseParse * parse, GstFormat src_format,
97 gint64 src_value, GstFormat dest_format, gint64 * dest_value)
99 GstReplace *replace = GST_REPLACE (parse);
101 GST_DEBUG_OBJECT (replace, "convert");
107 gst_replace_sink_event (GstBaseParse * parse, GstEvent * event)
109 GstReplace *replace = GST_REPLACE (parse);
111 GST_DEBUG_OBJECT (replace, "sink_event");
117 gst_replace_src_event (GstBaseParse * parse, GstEvent * event)
119 GstReplace *replace = GST_REPLACE (parse);
121 GST_DEBUG_OBJECT (replace, "src_event");
127 gst_replace_get_sink_caps (GstBaseParse * parse, GstCaps * filter)
129 GstReplace *replace = GST_REPLACE (parse);
131 GST_DEBUG_OBJECT (replace, "get_sink_caps");
137 gst_replace_detect (GstBaseParse * parse, GstBuffer * buffer)
139 GstReplace *replace = GST_REPLACE (parse);
141 GST_DEBUG_OBJECT (replace, "detect");