[gst-devel] Help with gst_buffer_alloc

Sameer Naik sameersbn at gmail.com
Tue Oct 24 19:03:03 CEST 2006


hello,
    ive just realized that the reason why its not working for me is
because of my make file.
ive created my own make file to compile the decoder plugin, because of
linking against some libraries.
The make works in a straight forward manner
i.e the object files are created from the sources and then these are
linked to generate the .so file.

*CFLAGS:*
-O2 -DHAVE_CONFIG_H -fno-strict-aliasing -march=armv5t -mabi=apcs-gnu
-fPIC -DPIC -Wall -c
*LDFLAGS:
*-shared -Wl,--rpath -Wl,/opt/gstreamer/lib -pthread -lgstreamer-0.10
-lgobject-2.0 -lgmodule-2.0 -ldl -lgthread-2.0 -lxml2 -lz -lm -lglib-2.0

(the library paths and include paths are also added correctly)

is there any other flag that should be added to get the plugin's buffer
alloc calls to return successfully.
as i said, the plugin works fine otherwise, its only for the pad alloc
call the problems occur. and i have varified thats its due to my make file.
can somebody plz tell me what else should be added in the makefile.

thanks in advance
tc.


Sameer Naik wrote:
> hello,
>   ive written a videosink plugin and a decoder plugin for gstreamer.
> the videosink plugin opens the linux frame buffer device and works on it.
> now in the videosink plugin ive added pad buffer allocation 
> capabilities so that the peer element can take full advantage of the 
> acceleration in copying buffers around.
>
> when i test my plugin with the videotestsrc which requests for pad 
> allocated buffer, it works very well.
>
> now ive also written a decoder plugin, with no get_caps functionality 
> for either the src_pad or sink_pad, assuming the template caps will be 
> returned when requested.
> ive defined a setcaps function for the sink_pad, so when this is 
> called i set the caps on the sink pad, get the caps of the src_pads 
> peer, get an intersection of it, create a new caps and set it as the
> src_pad's caps, and fix the caps on the src_pad, disallowing 
> renegotiation...thereby completing the negotiation.
>
> *(*
> *My PIPELINE:
> gst-launch filesrc location=file.mpeg ! mpegdemux ! onedecoder ! queue 
> ! onevideosink
> onedecoder, is my decoder plugin
> onevideosink, is my videosink plugin
> )
>
> *now in the chain function of the decoder plugin when i make a request 
> for gst_pad_alloc_buffer() , the videosink elements buffer_alloc 
> function is called, the buffer if allocated and the funtion 
> returns(checked  with debug statements)... now before the control 
> returns to the chain_function() where the call was made(i.e. in the 
> chain() of the decoder), i get the following errors:
>
> (gst-launch-0.10:1945): GStreamer-CRITICAL **: 
> gst_pad_alloc_buffer_full: assertion `buf != NULL' failed
> (gst-launch-0.10:1945): GStreamer-CRITICAL **: gst_caps_is_fixed: 
> assertion `GST_IS_CAPS (caps)' failed
> (gst-launch-0.10:1945): GStreamer-CRITICAL **: gst_caps_is_empty: 
> assertion `GST_IS_CAPS (caps)' failed
> (gst-launch-0.10:1945): GStreamer-CRITICAL **: gst_caps_is_any: 
> assertion `GST_IS_CAPS (caps)' failed
> (gst-launch-0.10:1945): GStreamer-CRITICAL **: gst_caps_is_empty: 
> assertion `GST_IS_CAPS (caps)' failed
> (gst-launch-0.10:1945): GStreamer-CRITICAL **: gst_caps_is_any: 
> assertion `GST_IS_CAPS (caps)' failed
> (gst-launch-0.10:1945): GStreamer-CRITICAL **: gst_caps_copy: 
> assertion `GST_IS_CAPS (caps)' failed
>
> and gstreamer exits from the pipeline execution. i have no clue why 
> this is happening
>
> as an alternative test, if i dont request a buffer from the peer and 
> instead allocate it myself (gst_buffer_new()), do the processing, set 
> the caps and push it over the source pad it works ok...meaning the 
> negotiation was successful, buffer is received by the videosink and 
> rendered.
>
> ive tried a lot to get the pad_buffer_alloc() working, but all in vain.
> plz help
>
> thanks in advance
> tc
>
>
>






More information about the gstreamer-devel mailing list