[gst-devel] dynamic pipeline questions

Pavan Kumar Patale pavanpatale at hotmail.com
Sat Nov 25 05:48:25 CET 2006


>1) Record from a device, connected to the sound card, that sometimes has
>a sound input but is mostly quiet, not unlike a microphone.  I need to
>be able to detect the state transitions to and from quiet and stop and
>start recording when the events occur.  This is to reduce the time
>needed to process the resulting files by another application later.  I
>am unsure how to detect the quiet state transitions.

Will try to answer your first questioin

You can add a bus_sync_handler to the pipeline and look for the
GST_MESSAGE_STATE_CHANGED in the handler.
The message->src will give the source element which has
generated this message.  GST_ELEMENT_STATE(message->src) will give
you the current state of the element.

BR, Pavan.


>
>I have a C program constructing a pipeline recording from the sound card
>to a file.  I need to add a few features and am not sure of the best
>approach.  The features are:
>
>1) Record from a device, connected to the sound card, that sometimes has
>a sound input but is mostly quiet, not unlike a microphone.  I need to
>be able to detect the state transitions to and from quiet and stop and
>start recording when the events occur.  This is to reduce the time
>needed to process the resulting files by another application later.  I
>am unsure how to detect the quiet state transitions.
>
>2) The output will be placed into one of several files.  The file to use
>will be determined when a sound is detected.  I do not want to lose any
>signal at the beginning or end of the recording.  In other words, the
>first sound may go to file foo, the second and third sounds to bar, and
>the fourth to foo.  I am unsure of how to most optimally configure the
>pipeline for this type of dynamic operation.
>
>Any advice as to how to proceed would be appreciated.
>


>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share 
>your
>opinions on IT & business topics through brief surveys - and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


>_______________________________________________
>gstreamer-devel mailing list
>gstreamer-devel at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

_________________________________________________________________
Headache during sex? Ask Dr. Prakash & Rachna  
http://content.msn.co.in/Lifestyle/AskExpert/Default03.htm





More information about the gstreamer-devel mailing list