mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
gst/videotestsrc/: Add more uni-colour patterns ("white", "red", "green", and "blue").
Original commit message from CVS: * gst/videotestsrc/gstvideotestsrc.c: (gst_video_test_src_pattern_get_type), (gst_video_test_src_set_pattern): * gst/videotestsrc/gstvideotestsrc.h: * gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor), (gst_video_test_src_black), (gst_video_test_src_white), (gst_video_test_src_red), (gst_video_test_src_green), (gst_video_test_src_blue): * gst/videotestsrc/videotestsrc.h: Add more uni-colour patterns ("white", "red", "green", and "blue").
This commit is contained in:
parent
5185b97c8a
commit
650d9ae594
5 changed files with 82 additions and 7 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2006-09-01 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/videotestsrc/gstvideotestsrc.c:
|
||||
(gst_video_test_src_pattern_get_type),
|
||||
(gst_video_test_src_set_pattern):
|
||||
* gst/videotestsrc/gstvideotestsrc.h:
|
||||
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor),
|
||||
(gst_video_test_src_black), (gst_video_test_src_white),
|
||||
(gst_video_test_src_red), (gst_video_test_src_green),
|
||||
(gst_video_test_src_blue):
|
||||
* gst/videotestsrc/videotestsrc.h:
|
||||
Add more uni-colour patterns ("white", "red", "green", and "blue").
|
||||
|
||||
2006-09-01 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* gst/videotestsrc/videotestsrc.c: (paint_setup_YVYU):
|
||||
|
|
|
@ -105,7 +105,11 @@ gst_video_test_src_pattern_get_type (void)
|
|||
{GST_VIDEO_TEST_SRC_SMPTE, "SMPTE 100% color bars", "smpte"},
|
||||
{GST_VIDEO_TEST_SRC_SNOW, "Random (television snow)", "snow"},
|
||||
{GST_VIDEO_TEST_SRC_BLACK, "100% Black", "black"},
|
||||
{0, NULL, NULL},
|
||||
{GST_VIDEO_TEST_SRC_WHITE, "100% White", "white"},
|
||||
{GST_VIDEO_TEST_SRC_RED, "Red", "red"},
|
||||
{GST_VIDEO_TEST_SRC_GREEN, "Green", "green"},
|
||||
{GST_VIDEO_TEST_SRC_BLUE, "Blue", "blue"},
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
if (!video_test_src_pattern_type) {
|
||||
|
@ -211,6 +215,18 @@ gst_video_test_src_set_pattern (GstVideoTestSrc * videotestsrc,
|
|||
case GST_VIDEO_TEST_SRC_BLACK:
|
||||
videotestsrc->make_image = gst_video_test_src_black;
|
||||
break;
|
||||
case GST_VIDEO_TEST_SRC_WHITE:
|
||||
videotestsrc->make_image = gst_video_test_src_white;
|
||||
break;
|
||||
case GST_VIDEO_TEST_SRC_RED:
|
||||
videotestsrc->make_image = gst_video_test_src_red;
|
||||
break;
|
||||
case GST_VIDEO_TEST_SRC_GREEN:
|
||||
videotestsrc->make_image = gst_video_test_src_green;
|
||||
break;
|
||||
case GST_VIDEO_TEST_SRC_BLUE:
|
||||
videotestsrc->make_image = gst_video_test_src_blue;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
|
|
@ -42,6 +42,10 @@ G_BEGIN_DECLS
|
|||
* @GST_VIDEO_TEST_SRC_SMPTE: A standard SMPTE test pattern
|
||||
* @GST_VIDEO_TEST_SRC_SNOW: Random noise
|
||||
* @GST_VIDEO_TEST_SRC_BLACK: A black image
|
||||
* @GST_VIDEO_TEST_SRC_WHITE: A white image
|
||||
* @GST_VIDEO_TEST_SRC_RED: A red image
|
||||
* @GST_VIDEO_TEST_SRC_GREEN: A green image
|
||||
* @GST_VIDEO_TEST_SRC_BLUE: A blue image
|
||||
*
|
||||
* The test pattern to produce.
|
||||
*/
|
||||
|
@ -49,6 +53,10 @@ typedef enum {
|
|||
GST_VIDEO_TEST_SRC_SMPTE,
|
||||
GST_VIDEO_TEST_SRC_SNOW,
|
||||
GST_VIDEO_TEST_SRC_BLACK,
|
||||
GST_VIDEO_TEST_SRC_WHITE,
|
||||
GST_VIDEO_TEST_SRC_RED,
|
||||
GST_VIDEO_TEST_SRC_GREEN,
|
||||
GST_VIDEO_TEST_SRC_BLUE
|
||||
} GstVideoTestSrcPattern;
|
||||
|
||||
typedef struct _GstVideoTestSrc GstVideoTestSrc;
|
||||
|
|
|
@ -656,9 +656,9 @@ gst_video_test_src_snow (GstVideoTestSrc * v, unsigned char *dest, int w, int h)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
gst_video_test_src_black (GstVideoTestSrc * v, unsigned char *dest, int w,
|
||||
int h)
|
||||
static void
|
||||
gst_video_test_src_unicolor (GstVideoTestSrc * v, unsigned char *dest, int w,
|
||||
int h, struct vts_color_struct *color)
|
||||
{
|
||||
int i;
|
||||
paintinfo pi;
|
||||
|
@ -674,13 +674,43 @@ gst_video_test_src_black (GstVideoTestSrc * v, unsigned char *dest, int w,
|
|||
fourcc->paint_setup (p, dest);
|
||||
p->paint_hline = fourcc->paint_hline;
|
||||
|
||||
p->color = vts_colors + COLOR_BLACK;
|
||||
p->color = color;
|
||||
|
||||
for (i = 0; i < h; i++) {
|
||||
p->paint_hline (p, 0, i, w);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gst_video_test_src_black (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
||||
{
|
||||
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_BLACK);
|
||||
}
|
||||
|
||||
void
|
||||
gst_video_test_src_white (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
||||
{
|
||||
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_WHITE);
|
||||
}
|
||||
|
||||
void
|
||||
gst_video_test_src_red (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
||||
{
|
||||
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_RED);
|
||||
}
|
||||
|
||||
void
|
||||
gst_video_test_src_green (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
||||
{
|
||||
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_GREEN);
|
||||
}
|
||||
|
||||
void
|
||||
gst_video_test_src_blue (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
||||
{
|
||||
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_BLUE);
|
||||
}
|
||||
|
||||
static void
|
||||
paint_setup_I420 (paintinfo * p, unsigned char *dest)
|
||||
{
|
||||
|
|
|
@ -67,11 +67,19 @@ struct fourcc_list_struct *
|
|||
GstStructure *
|
||||
paint_get_structure (struct fourcc_list_struct *format);
|
||||
int gst_video_test_src_get_size (GstVideoTestSrc * v, int w, int h);
|
||||
void gst_video_test_src_smpte (GstVideoTestSrc * v,
|
||||
void gst_video_test_src_smpte (GstVideoTestSrc * v,
|
||||
unsigned char *dest, int w, int h);
|
||||
void gst_video_test_src_snow (GstVideoTestSrc * v,
|
||||
unsigned char *dest, int w, int h);
|
||||
void gst_video_test_src_black (GstVideoTestSrc * v,
|
||||
void gst_video_test_src_black (GstVideoTestSrc * v,
|
||||
unsigned char *dest, int w, int h);
|
||||
void gst_video_test_src_white (GstVideoTestSrc * v,
|
||||
unsigned char *dest, int w, int h);
|
||||
void gst_video_test_src_red (GstVideoTestSrc * v,
|
||||
unsigned char *dest, int w, int h);
|
||||
void gst_video_test_src_green (GstVideoTestSrc * v,
|
||||
unsigned char *dest, int w, int h);
|
||||
void gst_video_test_src_blue (GstVideoTestSrc * v,
|
||||
unsigned char *dest, int w, int h);
|
||||
|
||||
extern struct fourcc_list_struct fourcc_list[];
|
||||
|
|
Loading…
Reference in a new issue