From: David Schleef Date: Tue, 30 Jul 2002 01:25:26 +0000 (+0000) Subject: Add timestamping X-Git-Tag: CAPS~240 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=463055e531a7f8595106b3e6dcc67438fff04b13;p=platform%2Fupstream%2Fgst-plugins-base.git Add timestamping Original commit message from CVS: Add timestamping --- diff --git a/gst/videotestsrc/gstvideotestsrc.c b/gst/videotestsrc/gstvideotestsrc.c index dee8e8a..9bc1393 100644 --- a/gst/videotestsrc/gstvideotestsrc.c +++ b/gst/videotestsrc/gstvideotestsrc.c @@ -186,6 +186,9 @@ gst_videotestsrc_init (GstVideotestsrc *videotestsrc) videotestsrc->width = 640; videotestsrc->height = 480; + + videotestsrc->timestamp = 0; + videotestsrc->interval = GST_SECOND/30; } @@ -214,7 +217,9 @@ gst_videotestsrc_get (GstPad *pad) GST_BUFFER_SIZE(buf) = newsize; GST_BUFFER_DATA(buf) = g_malloc (newsize); g_return_val_if_fail(GST_BUFFER_DATA(buf) != NULL, NULL); - //GST_BUFFER_TIMESTAMP(buf) = GST_BUFFER_TIMESTAMP(buf); + + videotestsrc->timestamp += videotestsrc->interval; + GST_BUFFER_TIMESTAMP(buf) = videotestsrc->timestamp; gst_videotestsrc_random_yuv(videotestsrc, (void *)GST_BUFFER_DATA(buf), videotestsrc->width, videotestsrc->height); @@ -345,7 +350,7 @@ paint_rect (unsigned char *dest, int stride, int x, int y, int w, int h, unsigne } /* wht yel cya grn mag red blu blk -I Q */ -static int y_colors[] = { 255, 226, 179, 150, 105, 76, 29, 0, 0, 0 }; +static int y_colors[] = { 255, 226, 179, 150, 105, 76, 29, 16, 16, 0 }; static int u_colors[] = { 128, 0, 170, 46, 212, 85, 255, 128, 0, 128 }; static int v_colors[] = { 128, 155, 0, 21, 235, 255, 107, 128, 128, 255 }; diff --git a/gst/videotestsrc/gstvideotestsrc.h b/gst/videotestsrc/gstvideotestsrc.h index 1d814be..132b5ba 100644 --- a/gst/videotestsrc/gstvideotestsrc.h +++ b/gst/videotestsrc/gstvideotestsrc.h @@ -65,6 +65,9 @@ struct _GstVideotestsrc { GstVideoTestSrcMethod method; /* private */ + gint64 timestamp; + gint64 interval; + guchar *temp; };