Debian Codegraph @

tools/element-templates/videofilter

raw
1 /* vim: set filetype=c: */
2 % ClassName
3 GstVideoFilter
4 % TYPE_CLASS_NAME
5 GST_TYPE_VIDEO_FILTER
6 % pads
7 srcpad-template-video
8 sinkpad-template-video
9 % pkg-config
10 gstreamer-video-1.0
11 % includes
12 #include <gst/video/video.h>
13 #include <gst/video/gstvideofilter.h>
14 % prototypes
15 static gboolean gst_replace_start (GstBaseTransform * trans);
16 static gboolean gst_replace_stop (GstBaseTransform * trans);
17 static gboolean gst_replace_set_info (GstVideoFilter * filter, GstCaps * incaps,
18 GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info);
19 static GstFlowReturn gst_replace_transform_frame (GstVideoFilter * filter,
20 GstVideoFrame * inframe, GstVideoFrame * outframe);
21 static GstFlowReturn gst_replace_transform_frame_ip (GstVideoFilter * filter,
22 GstVideoFrame * frame);
23 % declare-class
24 GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (klass);
25 GstVideoFilterClass *video_filter_class = GST_VIDEO_FILTER_CLASS (klass);
26 % set-methods
27 base_transform_class->start = GST_DEBUG_FUNCPTR (gst_replace_start);
28 base_transform_class->stop = GST_DEBUG_FUNCPTR (gst_replace_stop);
29 video_filter_class->set_info = GST_DEBUG_FUNCPTR (gst_replace_set_info);
30 video_filter_class->transform_frame = GST_DEBUG_FUNCPTR (gst_replace_transform_frame);
31 video_filter_class->transform_frame_ip = GST_DEBUG_FUNCPTR (gst_replace_transform_frame_ip);
32 % methods
33 static gboolean
34 gst_replace_start (GstBaseTransform * trans)
35 {
36 GstReplace *replace = GST_REPLACE (trans);
37
38 GST_DEBUG_OBJECT (replace, "start");
39
40 return TRUE;
41 }
42
43 static gboolean
44 gst_replace_stop (GstBaseTransform * trans)
45 {
46 GstReplace *replace = GST_REPLACE (trans);
47
48 GST_DEBUG_OBJECT (replace, "stop");
49
50 return TRUE;
51 }
52
53 static gboolean
54 gst_replace_set_info (GstVideoFilter * filter, GstCaps * incaps,
55 GstVideoInfo * in_info, GstCaps * outcaps, GstVideoInfo * out_info)
56 {
57 GstReplace *replace = GST_REPLACE (filter);
58
59 GST_DEBUG_OBJECT (replace, "set_info");
60
61 return TRUE;
62 }
63
64 /* transform */
65 static GstFlowReturn
66 gst_replace_transform_frame (GstVideoFilter * filter, GstVideoFrame * inframe,
67 GstVideoFrame * outframe)
68 {
69 GstReplace *replace = GST_REPLACE (filter);
70
71 GST_DEBUG_OBJECT (replace, "transform_frame");
72
73 return GST_FLOW_OK;
74 }
75
76 static GstFlowReturn
77 gst_replace_transform_frame_ip (GstVideoFilter * filter, GstVideoFrame * frame)
78 {
79 GstReplace *replace = GST_REPLACE (filter);
80
81 GST_DEBUG_OBJECT (replace, "transform_frame_ip");
82
83 return GST_FLOW_OK;
84 }
85 % end