[gst-devel] Sound recording

Andreas Volz lists at brachttal.net
Sat Dec 30 16:52:35 CET 2006


Am Sat, 30 Dec 2006 16:28:05 +0100 schrieb René Stadler:

> Am Samstag, den 30.12.2006, 14:06 +0100 schrieb Andreas Volz:
> > Am Fri, 29 Dec 2006 10:38:42 -0600 schrieb keith preston:
> > 
> > > >
> > > >
> > > >
> > > > Is there an example code that shows how to record sound files?
> > > 
> > > 
> > > gst-launch-0.10 alsasrc ! wavenc ! filesink location=temp.wav
> > > 
> > > Look at some of the gstreamer documentation for how to write the
> > > app that makes this pipeline and suitably control this the
> > > pipeline. The above command should record wavs.   Mp3 and ogg are
> > > not much different.
> > 
> > Thanks, the command worked. But if I like to create a C application
> > that realizes this pipe I get this warning at start time:
> > 
> > (ogg_player:19889): GStreamer-WARNING **: Trying to connect elements
> > that don't share a common ancestor: alsasrc-source and wavenc-enc
> > 
> > Some code points:
> > 
> >   pipeline = gst_pipeline_new ("audio-player");
> >   source = gst_element_factory_make ("alsasrc", "alsasrc-source");
> >   enc = gst_element_factory_make ("wavenc", "wavenc-enc");
> >   sink = gst_element_factory_make ("filesink", "filesink-sink");
> >   ...
> >   gst_element_link (source, enc);
> >   gst_element_link (enc, sink);
> > 
> > So where is the problem?
> > 
> > regards
> > Andreas
> 
> You probably forgot adding one of the elements to the pipeline.

I added it to the pipeline, but I added also an uninitialized element to
the pipeline. After removing the element it works great. 

Thanks
Andreas




More information about the gstreamer-devel mailing list