creating sink gstBuffer

Massimiliano Cialdi massimiliano.cialdi at powersoft.it
Mon Feb 4 03:13:35 PST 2013


Starting from gst plugin template I wrote a plugin. This plugin must 
have as output a 16 bit signed integer stereo signal regardless of the 
input.
I have wrote a simpler plugin to try to convert from some integer 
formato to 16 bit signed stereo, with no success.

in particular I have some test suit (raw file). All of them are 5 
seconds long.
if I try to run:

# time gst-launch filesrc location=./stereo_16_sint.raw ! 
audio/x-raw-int, rate=44100, channels=2, endianness=1234, width=16, 
depth=16, signed=true ! typefind ! myconverter  !  alsasink -v

the output on console is:
samples: 340
varoffset 220160
totdur 4992290325
offset 220160
duration 7709751
timestamp 4992290325
Got EOS from element "pipeline0".
Execution ended after 915134490 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/Gstmyconverter:myconverter0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/Gstmyconverter:myconverter0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:src: 
caps = NULL
/GstPipeline:pipeline0/GstTypeFindElement:typefindelement0.GstPad:sink: 
caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...

real    0m2.094s
user    0m1.530s
sys    0m0.300s


note that gst thinks that execution last 9.1 seconds (instead of 5) but 
time tells me that real execution time is about 2 seconds!!!
And from speacker you can hear only silence.

where am I wrong?

here you can find complete souerce code and test raw files:
https://docs.google.com/file/d/0B3hxBclCtyArQTNtQ3hmU3FvMm8/edit?usp=sharing


best regards

Max
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstmyconverter.h
Type: text/x-chdr
Size: 3462 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130204/b948e260/attachment-0001.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstmyconverter.c
Type: text/x-csrc
Size: 12777 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130204/b948e260/attachment-0001.c>


More information about the gstreamer-devel mailing list