2
* Copyright (C) <2003> David A. Schleef <ds@schleef.org>
3
* <2004> Benjamin Otte <otte@gnome.org
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Library General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Library General Public License for more details.
15
* You should have received a copy of the GNU Library General Public
16
* License along with this library; if not, write to the
17
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
* Boston, MA 02111-1307, USA.
23
#ifndef __GST_VIDEO_IMAGE_H__
24
#define __GST_VIDEO_IMAGE_H__
29
typedef struct _GstVideoColor GstVideoColor;
30
typedef struct _GstVideoImage GstVideoImage;
31
typedef struct _GstVideoFormat GstVideoFormat;
33
struct _GstVideoColor {
37
extern const GstVideoColor GST_VIDEO_COLOR_WHITE;
38
extern const GstVideoColor GST_VIDEO_COLOR_YELLOW;
39
extern const GstVideoColor GST_VIDEO_COLOR_CYAN;
40
extern const GstVideoColor GST_VIDEO_COLOR_GREEN;
41
extern const GstVideoColor GST_VIDEO_COLOR_MAGENTA;
42
extern const GstVideoColor GST_VIDEO_COLOR_RED;
43
extern const GstVideoColor GST_VIDEO_COLOR_BLUE;
44
extern const GstVideoColor GST_VIDEO_COLOR_BLACK;
45
extern const GstVideoColor GST_VIDEO_COLOR_NEG_I;
46
extern const GstVideoColor GST_VIDEO_COLOR_POS_Q;
47
extern const GstVideoColor GST_VIDEO_COLOR_SUPER_BLACK;
48
extern const GstVideoColor GST_VIDEO_COLOR_DARK_GREY;
53
guint8 * dest; /* pointer to first byte of video data */
54
guint8 * yp, *up, *vp; /* pointers to first byte of each component
55
* for both packed/planar YUV and RGB */
56
guint8 * endptr; /* pointer to byte beyond last video data */
62
const GstVideoFormat * format;
65
struct _GstVideoFormat
70
void (* paint_setup) (GstVideoImage * p, char *dest);
71
void (* paint_hline) (GstVideoImage * p, int x, int y, int w, const GstVideoColor *c);
72
void (* copy_hline) (GstVideoImage * dest, int destx, int desty,
73
GstVideoImage * src, int srcx, int srcy, int w);
81
const GstVideoFormat * gst_video_format_find_by_fourcc (int find_fourcc);
82
const GstVideoFormat * gst_video_format_find_by_name (const char *name);
83
const GstVideoFormat * gst_video_format_find_by_structure (const GstStructure *structure);
84
GstStructure * gst_video_format_get_structure (const GstVideoFormat *format);
85
guint gst_video_format_get_size (const GstVideoFormat *format,
88
extern const GstVideoFormat gst_video_format_list[];
89
extern const guint gst_video_format_count;
91
void gst_video_image_setup (GstVideoImage *image,
92
const GstVideoFormat *format,
93
guint8 *data, guint w, guint h);
95
/* drawing operations */
96
void gst_video_image_draw_hline (GstVideoImage *image,
97
gint x, gint y, gint w,
98
const GstVideoColor *c);
99
void gst_video_image_draw_rectangle (GstVideoImage *image,
100
gint x, gint y, gint w, gint h,
101
const GstVideoColor *c, gboolean filled);
102
void gst_video_image_copy_hline (GstVideoImage *dest,
103
gint xdest, gint ydest,
105
gint xsrc, gint ysrc, gint w);
106
void gst_video_image_copy_area (GstVideoImage *dest,
107
gint xdest, gint ydest,
109
gint xsrc, gint ysrc,
114
#endif /* __GST_VIDEO_IMAGE_H__ */