From: David Schleef Date: Tue, 22 Apr 2003 22:21:08 +0000 (+0000) Subject: Added a test pattern for black. Made it the default (temporarily) X-Git-Tag: BRANCH-ERROR-ROOT~196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35c9b8464414b19080ca0be202b586d3f002b47c;p=platform%2Fupstream%2Fgst-plugins-base.git Added a test pattern for black. Made it the default (temporarily) Original commit message from CVS: Added a test pattern for black. Made it the default (temporarily) --- diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index 4846cce..bd5422a 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -161,7 +161,7 @@ gst_videotestsrc_srcconnect (GstPad * pad, GstCaps * caps) gst_caps_get_int (caps, "height", &videotestsrc->height); videotestsrc->make_image = gst_videotestsrc_smpte; - videotestsrc->make_image = gst_videotestsrc_snow; + videotestsrc->make_image = gst_videotestsrc_black; videotestsrc->bpp = videotestsrc->fourcc->bitspp; GST_DEBUG (0, "size %d x %d", videotestsrc->width, videotestsrc->height); diff --git a/gst/videotestsrc/videotestsrc.c b/gst/videotestsrc/videotestsrc.c index b4fbc7c..4b3065b 100644 --- a/gst/videotestsrc/videotestsrc.c +++ b/gst/videotestsrc/videotestsrc.c @@ -586,6 +586,31 @@ gst_videotestsrc_snow (GstVideotestsrc * v, unsigned char *dest, int w, int h) } } +void +gst_videotestsrc_black (GstVideotestsrc * v, unsigned char *dest, int w, int h) +{ + int i; + paintinfo pi; + paintinfo *p = π + struct fourcc_list_struct *fourcc; + struct vts_color_struct color; + + p->width = w; + p->height = h; + fourcc = v->fourcc; + if (fourcc == NULL) + return; + + fourcc->paint_setup (p, dest); + p->paint_hline = fourcc->paint_hline; + + color = vts_colors[COLOR_BLACK]; + + for (i = 0; i < w; i++) { + p->paint_hline (p, i, 0, w); + } +} + static void paint_setup_I420 (paintinfo * p, char *dest) { diff --git a/gst/videotestsrc/videotestsrc.h b/gst/videotestsrc/videotestsrc.h index 5c30139..9f7b527 100644 --- a/gst/videotestsrc/videotestsrc.h +++ b/gst/videotestsrc/videotestsrc.h @@ -57,6 +57,7 @@ struct fourcc_list_struct *paintinfo_find_by_caps(GstCaps *caps); GstCaps *paint_get_caps(struct fourcc_list_struct *format); void gst_videotestsrc_smpte (GstVideotestsrc * v, unsigned char *dest, int w, int h); void gst_videotestsrc_snow (GstVideotestsrc * v, unsigned char *dest, int w, int h); +void gst_videotestsrc_black (GstVideotestsrc * v, unsigned char *dest, int w, int h); extern struct fourcc_list_struct fourcc_list[]; extern int n_fourccs;