[gst-devel] Alsasink rates/channels from gst-inspect versus gstalsa.c
John Faith
jfaith at freescale.com
Thu Nov 15 01:45:55 CET 2007
Tim Müller wrote:
> On Wed, 2007-11-14 at 14:07 -0800, John Faith wrote:
>
>> On my embedded Power architecture board, I noticed that 'gst-inspect
>> alsasink' produces:
>>
>> ...
>> rate: [ 1, 2147483647 ]
>> channels: [ 1, 2147483647 ]
>>
>> , whereas gst_alsa_detect_rates() and gst_alsa_detect_channels() in
>> gst-plugins-base-0.10.12/ext/alsa/gstalsa.c produce minimum rate of 4000
>> and max channels of 8.
>>
>> Why are the ranges from gst-inspect and printfs in gstalsa.c different?
>
> gst-inspect prints the so-called 'pad template caps', which comprises
> any format theoretically possible. gst_alsa_detect_rates() is called
> when the device has been opened, at which point it is possible to query
> the formats the device in question actually supports (which depends on
> things such as the alsa device being used, compare e.g. dmix:0 to hw:0
> to plughw:0, or the device driver or the capabilities of the hardware in
> question).
>
> Cheers
> -Tim
Thanks for your reply.
I started looking at this since "gst-launch audiotestsrc ! audioconvert
! audioresample ! alsasink" failed with:
...
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Negotiating to 1 channels @ 44100 Hz (format = S16_BE)
ERROR: from element /pipeline0/alsasink0: Could not get/set settings
from/on resource.
Additional debug info:
gstalsasink.c(438): set_hwparams (): /pipeline0/alsasink0:
Sample format not available for playback: Invalid argument
I thought maybe the right formats/rates were not being returned by
alsasink and in this case hardcoding the format to S16_LE gets past this
failure. I've generated debug output (level=5), but the cause of the
failure was not obvious to me.
I'm able to play audio with 'aplay', so I assume that the driver is
working at least to some degree. Is something else required to make
alsasink happy?
Thanks!
,
John
More information about the gstreamer-devel
mailing list