2 * Copyright (C) <2003> David A. Schleef <ds@schleef.org>
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.
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.
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., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __VIDEO_TEST_SRC_H__
21 #define __VIDEO_TEST_SRC_H__
39 struct vts_color_struct {
46 typedef struct paintinfo_struct paintinfo;
47 struct paintinfo_struct
49 unsigned char *p[4]; /* pointers to first byte of each component
50 * for both packed/planar YUV and RGB */
53 int size; /* size of a frame */
56 const struct vts_color_struct *colors;
57 const struct vts_color_struct *color;
58 /* const struct vts_color_struct *color; */
59 void (*paint_hline) (paintinfo * p, int x, int y, int w);
60 void (*paint_tmpline) (paintinfo * p, int x, int w);
61 void (*convert_tmpline) (paintinfo * p, int y);
71 struct vts_color_struct foreground_color;
72 struct vts_color_struct background_color;
74 #define PAINT_INFO_INIT { { NULL, }, }
76 struct format_list_struct
82 void (*paint_setup) (paintinfo * p, GstVideoFrame *frame);
83 void (*convert_hline) (paintinfo * p, int y);
85 unsigned int red_mask;
86 unsigned int green_mask;
87 unsigned int blue_mask;
88 unsigned int alpha_mask;
91 struct format_list_struct *
92 paintrect_find_format (const gchar *find_format);
93 struct format_list_struct *
94 paintrect_find_name (const char *name);
95 struct format_list_struct *
96 paintinfo_find_by_structure (const GstStructure *structure);
98 paint_get_structure (struct format_list_struct *format);
100 int gst_video_test_src_get_size (GstVideoTestSrc * v, int w, int h);
101 void gst_video_test_src_smpte (GstVideoTestSrc * v, GstVideoFrame *frame);
102 void gst_video_test_src_smpte75 (GstVideoTestSrc * v, GstVideoFrame *frame);
103 void gst_video_test_src_snow (GstVideoTestSrc * v, GstVideoFrame *frame);
104 void gst_video_test_src_black (GstVideoTestSrc * v, GstVideoFrame *frame);
105 void gst_video_test_src_white (GstVideoTestSrc * v, GstVideoFrame *frame);
106 void gst_video_test_src_red (GstVideoTestSrc * v, GstVideoFrame *frame);
107 void gst_video_test_src_green (GstVideoTestSrc * v, GstVideoFrame *frame);
108 void gst_video_test_src_blue (GstVideoTestSrc * v, GstVideoFrame *frame);
109 void gst_video_test_src_solid (GstVideoTestSrc * v, GstVideoFrame *frame);
110 void gst_video_test_src_blink (GstVideoTestSrc * v, GstVideoFrame *frame);
111 void gst_video_test_src_checkers1 (GstVideoTestSrc * v, GstVideoFrame *frame);
112 void gst_video_test_src_checkers2 (GstVideoTestSrc * v, GstVideoFrame *frame);
113 void gst_video_test_src_checkers4 (GstVideoTestSrc * v, GstVideoFrame *frame);
114 void gst_video_test_src_checkers8 (GstVideoTestSrc * v, GstVideoFrame *frame);
115 void gst_video_test_src_circular (GstVideoTestSrc * v, GstVideoFrame *frame);
116 void gst_video_test_src_zoneplate (GstVideoTestSrc * v, GstVideoFrame *frame);
117 void gst_video_test_src_gamut (GstVideoTestSrc * v, GstVideoFrame *frame);
118 void gst_video_test_src_chromazoneplate (GstVideoTestSrc * v, GstVideoFrame *frame);
119 void gst_video_test_src_ball (GstVideoTestSrc * v, GstVideoFrame *frame);
120 void gst_video_test_src_smpte100 (GstVideoTestSrc * v, GstVideoFrame *frame);
121 void gst_video_test_src_bar (GstVideoTestSrc * v, GstVideoFrame *frame);
123 extern struct format_list_struct format_list[];
124 extern int n_formats;