Re: bets place for PA_STREAM_FIX_* flags
- From: Alexey Fisher <bug-track fisher-privat net>
- To: Stefan Kost <ensonic hora-obscura de>
- Cc: gstreamer-devel lists sourceforge net, cheese-list gnome org
- Subject: Re: bets place for PA_STREAM_FIX_* flags
- Date: Mon, 16 Aug 2010 16:57:19 +0200
On Mo, 2010-08-16 at 17:46 +0300, Stefan Kost wrote:
> On 16.08.2010 13:47, Alexey Fisher wrote:
> > Hallo all,
> >
> > i working currently on cheese to make it use less resources. One thing
> > what is in todo list is to make pulse use less CPU if i make record with
> > cheese or other app. Current cheese will capture default stream and
> > encode it. The problem is, gstreamers pulsesrc do not use same format
> > provided by microphone, so pulse need to resample it and it use more
> > cpu.
> > Simple example: i have webcam which provide "s16le 1ch 16000Hz" pulsesrc
> > will take "float32le 1ch 44100Hz". In this case pulse will convert it.
> > At end point we have bigger file with 44100Hz even if we used source
> > with 16000Hz.
> >
>
> won't it work using: pulsesrc ! audio/x-raw-int, channels=1,rate=16000 ! ...
I wrote - it is for Cheese or even for gnome sound recorder. Check your
microphone - it will have other format. So - no. It should make
automatically correct choice. PA_STREAM_FIX_ make it possible.
> > Solution is to use flags when creating the stream: PA_STREAM_FIX_FORMAT,
> > PA_STREAM_FIX_RATE and PA_STREAM_FIX_CHANNELS.
> >
> > My question is: what is the proper place for this flags? Hard coded in
> > gst-plugins-good0.10? Or some haw by app what use pulsesrc?
> > Other ideas?
> >
> >
> > here is patch what i used to hard code this flags, it work fine for me:
> > --- gst-plugins-good0.10-0.10.24.3.orig/ext/pulse/pulsesrc.c
> > +++ gst-plugins-good0.10-0.10.24.3/ext/pulse/pulsesrc.c
> > @@ -963,6 +963,8 @@ gst_pulsesrc_prepare (GstAudioSrc * asrc
> > #ifdef HAVE_PULSE_0_9_11
> > PA_STREAM_ADJUST_LATENCY |
> > #endif
> > + PA_STREAM_FIX_FORMAT | PA_STREAM_FIX_RATE |
> > + PA_STREAM_FIX_CHANNELS |
> > PA_STREAM_START_CORKED) < 0) {
> > GST_ELEMENT_ERROR (pulsesrc, RESOURCE, FAILED,
> > ("Failed to connect stream: %s",
> >
> >
> > Regards,
> > Alexey
> >
> >
> > _______________________________________________
> > cheese-list mailing list
> > cheese-list gnome org
> > http://mail.gnome.org/mailman/listinfo/cheese-list
> >
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]