I am working on a sample python script originally found here: Adding and removing sound sources to / from the GStreamer on-go pipeline . The goal is to make a script, for example, higher, capable of inserting and deleting audio sources while the pipeline is running , but with audio encoding between the source and the adder. This is because in a more general case, Adder wants the incoming streams to be of the same format.
So here is the code; we create 2 generators (buzzers). The first emits a 1000 Hz tone and waits for a return. The second is a 500 Hz tone, which is added to the first after pressing a key. Again, by pressing the return key, only the second generator will be heard.
#!/usr/bin/python import gobject; gobject.threads_init() import gst
If you use create_raw_audiotest_signal instead of create_audiotest_signal_with_converter in both calls, of course, this works. If you use a mixture of the two, this works, but with an undesirable additional delay between them. The most interesting case is when you use the audio converter in both calls, but gtk blocks with the first return key.
Does anyone have any suggestions? What am I doing wrong? Thank you in advance.
source share