[gst-devel] Plugin
Michael Smith
msmith at xiph.org
Wed Feb 4 19:19:52 CET 2009
On Wed, Feb 4, 2009 at 4:25 AM, vaisakh.n <vaisakh.n at nestgroup.net> wrote:
> I am trying to write mp3plugin,now its in a partial working stage
>
> but problem is that,
> caps of my element is fixed caps by using this api,
> gst_pad_use_fixed_caps (filter->srcpad);
> and caps set using this function
> void Set_Caps(GstExampleFilter *filter,int sample_rate,int channels)
> {
>
> GstCaps *caps;
> caps = gst_caps_new_simple ("audio/x-raw-int",
>
> "endianness", G_TYPE_INT,G_BYTE_ORDER, //little endian//
>
> "signed", G_TYPE_BOOLEAN, TRUE,
>
> "width", G_TYPE_INT,32,
>
> "depth", G_TYPE_INT,32,
>
> "rate", G_TYPE_INT,sample_rate,
> "channels",G_TYPE_INT,channels,NULL);
> gst_pad_set_caps (filter->srcpad, caps);
>
> }
This looks pretty plausible.
> if i put " 1" for channels it play the 2channel song (stereo) very well
> but it become worse if i put 2 for that(channels)
It's a bug in your element somewhere - your caps look fine, but maybe
you're decoding the audio data incorrectly.
You've shown _far_ too little detail for us to give any more specific advice.
Mike
More information about the gstreamer-devel
mailing list