mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
videotestsrc: make colors controlable
Also trim since markers.
This commit is contained in:
parent
f9c4abea1b
commit
c6c27b9926
1 changed files with 10 additions and 12 deletions
|
@ -247,27 +247,23 @@ gst_video_test_src_class_init (GstVideoTestSrcClass * klass)
|
|||
*
|
||||
* Color to use for solid-color pattern and foreground color of other
|
||||
* patterns. Default is white (0xffffffff).
|
||||
*
|
||||
* Since: 0.10.31
|
||||
**/
|
||||
*/
|
||||
g_object_class_install_property (gobject_class, PROP_FOREGROUND_COLOR,
|
||||
g_param_spec_uint ("foreground-color", "Foreground Color",
|
||||
"Foreground color to use (big-endian ARGB)", 0, G_MAXUINT32,
|
||||
DEFAULT_FOREGROUND_COLOR,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
/**
|
||||
* GstVideoTestSrc:background-color
|
||||
*
|
||||
* Color to use for background color of some patterns. Default is
|
||||
* black (0xff000000).
|
||||
*
|
||||
* Since: 0.10.31
|
||||
**/
|
||||
*/
|
||||
g_object_class_install_property (gobject_class, PROP_BACKGROUND_COLOR,
|
||||
g_param_spec_uint ("background-color", "Background Color",
|
||||
"Background color to use (big-endian ARGB)", 0, G_MAXUINT32,
|
||||
DEFAULT_BACKGROUND_COLOR,
|
||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
g_object_class_install_property (gobject_class, PROP_HORIZONTAL_SPEED,
|
||||
g_param_spec_int ("horizontal-speed", "Horizontal Speed",
|
||||
|
@ -836,6 +832,12 @@ gst_video_test_src_fill (GstPushSrc * psrc, GstBuffer * buffer)
|
|||
if (!gst_video_frame_map (&frame, &src->info, buffer, GST_MAP_WRITE))
|
||||
goto invalid_frame;
|
||||
|
||||
GST_BUFFER_DTS (buffer) =
|
||||
src->accum_rtime + src->timestamp_offset + src->running_time;
|
||||
GST_BUFFER_PTS (buffer) = GST_BUFFER_DTS (buffer);
|
||||
|
||||
gst_object_sync_values (GST_OBJECT (psrc), GST_BUFFER_DTS (buffer));
|
||||
|
||||
src->make_image (src, &frame);
|
||||
|
||||
if ((pal = gst_video_format_get_palette (GST_VIDEO_FRAME_FORMAT (&frame),
|
||||
|
@ -845,10 +847,6 @@ gst_video_test_src_fill (GstPushSrc * psrc, GstBuffer * buffer)
|
|||
|
||||
gst_video_frame_unmap (&frame);
|
||||
|
||||
GST_BUFFER_DTS (buffer) =
|
||||
src->accum_rtime + src->timestamp_offset + src->running_time;
|
||||
GST_BUFFER_PTS (buffer) = GST_BUFFER_DTS (buffer);
|
||||
|
||||
GST_DEBUG_OBJECT (src, "Timestamp: %" GST_TIME_FORMAT " = accumulated %"
|
||||
GST_TIME_FORMAT " + offset: %"
|
||||
GST_TIME_FORMAT " + running time: %" GST_TIME_FORMAT,
|
||||
|
|
Loading…
Reference in a new issue