expand tabs
[platform/upstream/gstreamer.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., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __VIDEO_TEST_SRC_H__
21 #define __VIDEO_TEST_SRC_H__
22
23 #include "_stdint.h"
24
25
26 struct vts_color_struct {
27         uint8_t Y, U, V;
28         uint8_t R, G, B;
29 };
30
31 typedef struct paintinfo_struct paintinfo;
32 struct paintinfo_struct
33 {
34   unsigned char *dest;          /* pointer to first byte of video data */
35   unsigned char *yp, *up, *vp;  /* pointers to first byte of each component
36                                  * for both packed/planar YUV and RGB */
37   unsigned char *endptr;        /* pointer to byte beyond last video data */
38   int ystride;
39   int ustride;
40   int vstride;
41   int width;
42   int height;
43   struct vts_color_struct *color;
44   void (*paint_hline) (paintinfo * p, int x, int y, int w);
45 };
46
47 struct fourcc_list_struct
48 {
49   char *fourcc;
50   char *name;
51   int bitspp;
52   void (*paint_setup) (paintinfo * p, unsigned char *dest);
53   void (*paint_hline) (paintinfo * p, int x, int y, int w);
54   int ext_caps;
55   int depth;
56   unsigned int red_mask;
57   unsigned int green_mask;
58   unsigned int blue_mask;
59 };
60
61 struct fourcc_list_struct *
62         paintrect_find_fourcc           (int find_fourcc);
63 struct fourcc_list_struct *
64         paintrect_find_name             (const char *name);
65 struct fourcc_list_struct *
66         paintinfo_find_by_structure     (const GstStructure *structure);
67 GstStructure *
68         paint_get_structure             (struct fourcc_list_struct *format);
69 int     gst_video_test_src_get_size     (GstVideoTestSrc * v, int w, int h);
70 void    gst_video_test_src_smpte                (GstVideoTestSrc * v,
71                                          unsigned char *dest, int w, int h);
72 void    gst_video_test_src_snow         (GstVideoTestSrc * v,
73                                          unsigned char *dest, int w, int h);
74 void    gst_video_test_src_black                (GstVideoTestSrc * v,
75                                          unsigned char *dest, int w, int h);
76
77 extern struct fourcc_list_struct fourcc_list[];
78 extern int n_fourccs;
79
80 #endif