1d20332a4c105648bca178d1faf82b73bf3c3962
[platform/upstream/gst-plugins-base.git] / gst / videotestsrc / videotestsrc.h
1 /* GStreamer
2  * Copyright (C) <2003> David A. Schleef <ds@schleef.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 #ifndef __VIDEO_TEST_SRC_H__
21 #define __VIDEO_TEST_SRC_H__
22
23 #include <glib.h>
24
25 struct vts_color_struct {
26   guint8 Y, U, V, A;
27   guint8 R, G, B;
28   guint16 gray;
29 };
30
31
32 typedef struct paintinfo_struct paintinfo;
33
34 struct paintinfo_struct
35 {
36   const struct vts_color_struct *colors;
37   const struct vts_color_struct *color;
38
39   void (*paint_tmpline) (paintinfo * p, int x, int w);
40   void (*convert_tmpline) (paintinfo * p, GstVideoFrame *frame, int y);
41   void (*convert_hline) (paintinfo * p, GstVideoFrame *frame, int y);
42   GstVideoChromaResample *subsample;
43   int x_offset;
44
45   int x_invert;
46   int y_invert;
47
48   guint8 *tmpline;
49   guint8 *tmpline2;
50   guint8 *tmpline_u8;
51   guint16 *tmpline_u16;
52
53   guint n_lines;
54   gint offset;
55   gpointer *lines;
56
57   struct vts_color_struct foreground_color;
58   struct vts_color_struct background_color;
59 };
60 #define PAINT_INFO_INIT {0, }
61
62 void    gst_video_test_src_smpte        (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
63 void    gst_video_test_src_smpte75      (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
64 void    gst_video_test_src_snow         (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
65 void    gst_video_test_src_black        (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
66 void    gst_video_test_src_white        (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
67 void    gst_video_test_src_red          (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
68 void    gst_video_test_src_green        (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
69 void    gst_video_test_src_blue         (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
70 void    gst_video_test_src_solid        (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
71 void    gst_video_test_src_blink        (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
72 void    gst_video_test_src_checkers1    (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
73 void    gst_video_test_src_checkers2    (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
74 void    gst_video_test_src_checkers4    (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
75 void    gst_video_test_src_checkers8    (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
76 void    gst_video_test_src_circular     (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
77 void    gst_video_test_src_zoneplate    (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
78 void    gst_video_test_src_gamut        (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
79 void    gst_video_test_src_chromazoneplate (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
80 void    gst_video_test_src_ball         (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
81 void    gst_video_test_src_smpte100     (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
82 void    gst_video_test_src_bar          (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame *frame);
83 void    gst_video_test_src_pinwheel     (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame * frame);
84 void    gst_video_test_src_spokes       (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame * frame);
85 void    gst_video_test_src_gradient     (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame * frame);
86 void    gst_video_test_src_colors       (GstVideoTestSrc * v, GstClockTime pts, GstVideoFrame * frame);
87
88 #endif