{GST_VIDEO_TEST_SRC_SOLID, "Solid color", "solid-color"},
{GST_VIDEO_TEST_SRC_BALL, "Moving ball", "ball"},
{GST_VIDEO_TEST_SRC_SMPTE100, "SMPTE 100% color bars", "smpte100"},
+ {GST_VIDEO_TEST_SRC_BAR, "Bar", "bar"},
{0, NULL, NULL}
};
case GST_VIDEO_TEST_SRC_SMPTE100:
videotestsrc->make_image = gst_video_test_src_smpte100;
break;
+ case GST_VIDEO_TEST_SRC_BAR:
+ videotestsrc->make_image = gst_video_test_src_bar;
+ break;
default:
g_assert_not_reached ();
}
* @GST_VIDEO_TEST_SRC_CHROMA_ZONE_PLATE: Chroma zone plate
* @GST_VIDEO_TEST_SRC_BALL: Moving ball
* @GST_VIDEO_TEST_SRC_SMPTE100: SMPTE test pattern (100% color bars)
+ * @GST_VIDEO_TEST_SRC_BAR: Bar with foreground color
*
* The test pattern to produce.
*
GST_VIDEO_TEST_SRC_CHROMA_ZONE_PLATE,
GST_VIDEO_TEST_SRC_SOLID,
GST_VIDEO_TEST_SRC_BALL,
- GST_VIDEO_TEST_SRC_SMPTE100
+ GST_VIDEO_TEST_SRC_SMPTE100,
+ GST_VIDEO_TEST_SRC_BAR
} GstVideoTestSrcPattern;
/**
}
void
+gst_video_test_src_bar (GstVideoTestSrc * v, unsigned char *dest, int w, int h)
+{
+ int j;
+ 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);
+
+ for (j = 0; j < h; j++) {
+ /* use fixed size for now */
+ int x2 = w / 7;
+
+ p->color = &p->foreground_color;
+ p->paint_tmpline (p, 0, x2);
+ p->color = &p->background_color;
+ p->paint_tmpline (p, x2, (w - x2));
+ videotestsrc_convert_tmpline (p, j);
+ }
+}
+
+void
gst_video_test_src_snow (GstVideoTestSrc * v, unsigned char *dest, int w, int h)
{
int i;
unsigned char *dest, int w, int h);
void gst_video_test_src_smpte100 (GstVideoTestSrc * v,
unsigned char *dest, int w, int h);
+void gst_video_test_src_bar (GstVideoTestSrc * v,
+ unsigned char *dest, int w, int h);
extern struct fourcc_list_struct fourcc_list[];
extern int n_fourccs;