[gst-devel] PushSrc problem

Corentin BARON corentin.baron at inrialpes.fr
Thu Aug 10 11:20:50 CEST 2006


Right, this also changed from 0.8, now it goes up to the PREROLLING  
stage before crashing :p

Now the problem I got is with my create() function (too much things  
have changed in 0.10 from 0.8, I'm quite lost on some points):

As it's made on videotestsrc, I replaced my old good working 0.8  
style get() function with a create() function:

> static GstFlowReturn
> gst_blinkysrc_create(GstPushSrc * psrc,
> 					GstBuffer ** buffer) {
> 	GstBuffer *buf;
> 	[...]
> 	buf = gst_buffer_new();
> 	gst_buffer_set_caps(buf, gst_blinkysrc_getcaps(GST_BASE_SRC(psrc));
> 	[... fill buf as I did in 0.8 ...]
> 	*buffer = buf;
> 	return GST_FLOW_OK;
> }

And registered it in the class_init() function:

> static void
> gst_blinkysrc_class_init(GstBlinkySrcClass *klass) {
> 	GstBaseSrcClass *gstbasesrc_class;
> 	GstPushSrcClass *gstpushsrc_class;
> 	[...]
> 	gstpushsrc_class->create = gst_blinkysrc_create;
> }

But if the create function is present, my element does'nt even load  
in GStreamer. And, of course, when absent nothing happens but a  
segfault (but the plugin loads).

Thx,
Corentin.

Le 10 août 06 à 09:45, Benoit Fouet a écrit :

> Corentin BARON wrote:
>
>> Right, I forgot to update the boilerplate. But it still doesn't work:
>> gstreamer goes twice through my getcaps() function (which are
>> strictly the same as in 0.8), but tells me the pipeline is wrong,
>> even if I fix the framerate. Here's my plugin's verbose output
>> (sorry, french system):
>>
>>> getcaps()
>>> | Caps:
>>> video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)
>>> 480, framerate=(double)[ 1, 100 ]
>>> getcaps()
>>> | Caps:
>>> video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)
>>> 480, framerate=(double)[ 1, 100 ]
>>> AVERTISSEMENT: tube erroné: impossible de connecter blinkysrc0 a
>>> xvimagesink0
>>
>>
> doesn't framerate have to be a fraction, and not a double ?



-------------- next part --------------
A non-text attachment was scrubbed...
Name: corentinbaron.gpgkey
Type: application/octet-stream
Size: 916 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20060810/e959c001/attachment.obj>
-------------- next part --------------




More information about the gstreamer-devel mailing list