[gst-devel] PushSrc problem
Benoit Fouet
benoit.fouet at purplelabs.com
Thu Aug 10 14:04:13 CEST 2006
Corentin BARON wrote:
> 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) {
>
for what i've done with src plugins, it seems that the prototype is
something like:
static GstFlowReturn
gst_salcam_src_create( GstBaseSrc *basesrc, guint64 offset, guint length,
GstBuffer **buffer )
Rgds,
--Ben
>> 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 ?
>
>
>
>
>
>
>------------------------------------------------------------------------
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>------------------------------------------------------------------------
>
>_______________________________________________
>gstreamer-devel mailing list
>gstreamer-devel at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
More information about the gstreamer-devel
mailing list