videotestsrc->make_image = gst_video_test_src_circular;
break;
case GST_VIDEO_TEST_SRC_BLINK:
- videotestsrc->make_image = gst_video_test_src_black;
+ videotestsrc->make_image = gst_video_test_src_blink;
break;
case GST_VIDEO_TEST_SRC_SMPTE75:
videotestsrc->make_image = gst_video_test_src_smpte75;
memset (GST_BUFFER_DATA (outbuf), 0, GST_BUFFER_SIZE (outbuf));
src->tmpline = g_malloc (src->width * 4);
- if (src->pattern_type == GST_VIDEO_TEST_SRC_BLINK) {
- if (src->n_frames & 0x1) {
- gst_video_test_src_white (src, (void *) GST_BUFFER_DATA (outbuf),
- src->width, src->height);
- } else {
- gst_video_test_src_black (src, (void *) GST_BUFFER_DATA (outbuf),
- src->width, src->height);
- }
- } else {
- src->make_image (src, (void *) GST_BUFFER_DATA (outbuf),
- src->width, src->height);
- }
+ src->make_image (src, (void *) GST_BUFFER_DATA (outbuf),
+ src->width, src->height);
+
g_free (src->tmpline);
GST_BUFFER_TIMESTAMP (outbuf) = src->timestamp_offset + src->running_time;
}
void
+gst_video_test_src_blink (GstVideoTestSrc * v, unsigned char *dest, int w,
+ int h)
+{
+ int i;
+ paintinfo pi = { NULL, };
+ paintinfo *p = π
+ struct fourcc_list_struct *fourcc;
+
+ videotestsrc_setup_paintinfo (v, p, w, h);
+
+ fourcc = v->fourcc;
+ if (fourcc == NULL)
+ return;
+
+ fourcc->paint_setup (p, dest);
+
+ if (v->n_frames & 1) {
+ p->color = &p->foreground_color;
+ } else {
+ p->color = &p->background_color;
+ }
+
+ for (i = 0; i < h; i++) {
+ p->paint_tmpline (p, 0, w);
+ p->convert_tmpline (p, i);
+ }
+}
+
+void
gst_video_test_src_solid (GstVideoTestSrc * v, unsigned char *dest, int w,
int h)
{
unsigned char *dest, int w, int h);
void gst_video_test_src_solid (GstVideoTestSrc * v,
unsigned char *dest, int w, int h);
+void gst_video_test_src_blink (GstVideoTestSrc * v,
+ unsigned char *dest, int w, int h);
void gst_video_test_src_checkers1 (GstVideoTestSrc * v,
unsigned char *dest, int w, int h);
void gst_video_test_src_checkers2 (GstVideoTestSrc * v,