RidgeRun / gst-interpipe

GStreamer plug-in for interpipeline communication
Other
143 stars 64 forks source link

Usage of "sync" in interpipesink and "is-live" in interpipesrc #108

Open mariannasb opened 2 years ago

mariannasb commented 2 years ago

Are there any guidelines on the usage of the "sync" and "is-live" properties?

In this example https://developer.ridgerun.com/wiki/index.php?title=GstInterpipe_-_Example_2:_Digital_Camera there is no explanation of why some of the sinks use "sync=false" and others "sync=true" or some of the srcs use "is-live=true" while others use "is-live=false".

I would expect that any interpipesrc connected to a live src should use "is-live=true", but that is not true in the example.

Moreover in this test I have issues getting correct playback when "is-live=true" for my audio srcs going into audiomixers:

pipelines.append("autoaudiosrc is-live=true provide-clock=false ! "
                 "audio/x-raw,format=S32LE,layout=interleaved,rate=44100,channels=2,channel-mask=(bitmask)0x3 ! "
                 #"queue ! audioconvert ! autoaudiosink")
                 "queue ! interpipesink name=audio_src sync=false async=false")

#Sound mixing
pipelines.append("interpipesrc listen-to=audio_src is-live=true stream-sync=passthrough-ts format=time ! "
                 #"queue ! audioconvert ! autoaudiosink")
                 "queue ! deinterleave name=d "
                 "d.src_0 ! queue ! interpipesink name=ch0_audio sync=false async=false "
                 "d.src_1 ! queue ! interpipesink name=ch1_audio sync=false async=false ")

pipelines.append("interleave name=ilv ! "
                 "queue ! audioconvert ! autoaudiosink "
                 "audiomixer name=leftamix sink_0::volume=0 sink_1::volume=0 ! "
                 "audio/x-raw,channels=1,channel-mask=(bitmask)0x1 ! queue ! ilv.sink_0 "
                 "audiomixer name=rightamix sink_0::volume=1 sink_1::volume=1 ! "
                 "audio/x-raw,channels=1,channel-mask=(bitmask)0x2 ! queue ! ilv.sink_1 "
                 "interpipesrc listen-to=ch0_audio is-live=false stream-sync=passthrough-ts format=time ! queue ! leftamix. "
                 "interpipesrc listen-to=ch0_audio is-live=false stream-sync=passthrough-ts format=time ! queue ! rightamix. "
                 "interpipesrc listen-to=ch1_audio is-live=false stream-sync=passthrough-ts format=time ! queue ! leftamix. "
                 "interpipesrc listen-to=ch1_audio is-live=false stream-sync=passthrough-ts format=time ! queue ! rightamix. ")
michaelgruner commented 2 years ago

I would expect that any interpipesrc connected to a live src should use "is-live=true"

Indeed that would be my criteria as well. I will get this changed and tested.

mariannasb commented 2 years ago

What about the sync? When does it make sense to use true/false? Is that also related to to live/non-live srcs?