1/* vim: set filetype=c: */ 2% ClassName 3GstBaseParse 4% TYPE_CLASS_NAME 5GST_TYPE_BASE_PARSE 6% pads 7srcpad-simple 8sinkpad-simple 9% pkg-config 10gstreamer-base-1.0 11% includes 12#include <gst/base/gstbaseparse.h> 13% prototypes 14static gboolean gst_replace_start (GstBaseParse * parse); 15static gboolean gst_replace_stop (GstBaseParse * parse); 16static gboolean gst_replace_set_sink_caps (GstBaseParse * parse, 17 GstCaps * caps); 18static GstFlowReturn gst_replace_handle_frame (GstBaseParse * parse, 19 GstBaseParseFrame * frame, gint * skipsize); 20static GstFlowReturn gst_replace_pre_push_frame (GstBaseParse * parse, 21 GstBaseParseFrame * frame); 22static gboolean gst_replace_convert (GstBaseParse * parse, GstFormat src_format, 23 gint64 src_value, GstFormat dest_format, gint64 * dest_value); 24static gboolean gst_replace_sink_event (GstBaseParse * parse, GstEvent * event); 25static gboolean gst_replace_src_event (GstBaseParse * parse, GstEvent * event); 26static GstCaps *gst_replace_get_sink_caps (GstBaseParse * parse, 27 GstCaps * filter); 28static GstFlowReturn gst_replace_detect (GstBaseParse * parse, 29 GstBuffer * buffer); 30% declare-class 31 GstBaseParseClass *base_parse_class = GST_BASE_PARSE_CLASS (klass); 32% set-methods 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); 43% methods 44static gboolean 45gst_replace_start (GstBaseParse * parse) 46{ 47 GstReplace *replace = GST_REPLACE (parse); 48 49 GST_DEBUG_OBJECT (replace, "start"); 50 51 return TRUE; 52} 53 54static gboolean 55gst_replace_stop (GstBaseParse * parse) 56{ 57 GstReplace *replace = GST_REPLACE (parse); 58 59 GST_DEBUG_OBJECT (replace, "stop"); 60 61 return TRUE; 62} 63 64static gboolean 65gst_replace_set_sink_caps (GstBaseParse * parse, GstCaps * caps) 66{ 67 GstReplace *replace = GST_REPLACE (parse); 68 69 GST_DEBUG_OBJECT (replace, "set_sink_caps"); 70 71 return TRUE; 72} 73 74static GstFlowReturn 75gst_replace_handle_frame (GstBaseParse * parse, GstBaseParseFrame * frame, 76 gint * skipsize) 77{ 78 GstReplace *replace = GST_REPLACE (parse); 79 80 GST_DEBUG_OBJECT (replace, "handle_frame"); 81 82 return GST_FLOW_OK; 83} 84 85static GstFlowReturn 86gst_replace_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) 87{ 88 GstReplace *replace = GST_REPLACE (parse); 89 90 GST_DEBUG_OBJECT (replace, "pre_push_frame"); 91 92 return GST_FLOW_OK; 93} 94 95static gboolean 96gst_replace_convert (GstBaseParse * parse, GstFormat src_format, 97 gint64 src_value, GstFormat dest_format, gint64 * dest_value) 98{ 99 GstReplace *replace = GST_REPLACE (parse); 100 101 GST_DEBUG_OBJECT (replace, "convert"); 102 103 return TRUE; 104} 105 106static gboolean 107gst_replace_sink_event (GstBaseParse * parse, GstEvent * event) 108{ 109 GstReplace *replace = GST_REPLACE (parse); 110 111 GST_DEBUG_OBJECT (replace, "sink_event"); 112 113 return TRUE; 114} 115 116static gboolean 117gst_replace_src_event (GstBaseParse * parse, GstEvent * event) 118{ 119 GstReplace *replace = GST_REPLACE (parse); 120 121 GST_DEBUG_OBJECT (replace, "src_event"); 122 123 return TRUE; 124} 125 126static GstCaps * 127gst_replace_get_sink_caps (GstBaseParse * parse, GstCaps * filter) 128{ 129 GstReplace *replace = GST_REPLACE (parse); 130 131 GST_DEBUG_OBJECT (replace, "get_sink_caps"); 132 133 return NULL; 134} 135 136static GstFlowReturn 137gst_replace_detect (GstBaseParse * parse, GstBuffer * buffer) 138{ 139 GstReplace *replace = GST_REPLACE (parse); 140 141 GST_DEBUG_OBJECT (replace, "detect"); 142 143 return GST_FLOW_OK; 144} 145% end 146