GNOME Bugzilla – Bug 306233
Porting work on videotestsrc, using GstBaseSrc
Last modified: 2005-07-15 16:23:07 UTC
Please describe the problem: Change the data structure GstVideotestsrc, Make it inherit from GstBaseSrc add gstvideotestsrc_start(), gstvideotestsrc_stop(), gstvideotestsrc_create() interface. remove the _loop() and _activate() function. More compatible with Gstreamer 0.9 will submit the patch later Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 47127 [details] [review] patch for the gstvideotestsrc.c
Created attachment 47128 [details] [review] patch for the gstvideotestsrc.h
Created attachment 47129 [details] [review] patch for Makefile.am
Hi Lipeng, Wow, we need to look at these bugs more. Also, a little poking doesn't hurt -- let us know if a patch sits around for too long. Now, some comments. Your patch is a bit too big, difficult to see the actual changes. To fix this next time, 1) Try not to introduce whitespace / indentation changes. If your editor makes this difficult, run gst-indent (from core gstreamer, gstreamer/tools/gst-indent) on the code before diffing. 2) Don't change things randomly -- or if you do, include those style fixes in a separate patch. e.g. -gst_videotestsrc_base_init (gpointer g_class) +gst_videotestsrc_base_init (GstVideotestsrcClass * klass) does not need to be in this patch. + outbuf = gst_pad_alloc_buffer (pad, GST_BUFFER_OFFSET_NONE, newsize, GST_RPAD_CAPS (pad)); + + if (GST_BUFFER_CAPS (outbuf) != GST_PAD_CAPS (pad)) { gst_pad_alloc_buffer does a setcaps already. Also, by now its signature has changed, so as to return a FlowReturn. Otherwise the patch is fine, if updated to the latest API. I'll probably go ahead and do that now, because I need to ping ds for some other videotestsrc-related things.
-gst_videotestsrc_base_init (gpointer g_class) +gst_videotestsrc_base_init (GstVideotestsrcClass * klass) is also wrong, imo.
Hm, right. Well in anycase Wim ported this already, so closing as FIXED.