RidgeRun / gstd-1.x

GStreamer Daemon is a GStreamer framework for controlling audio and video streaming using TCP messages. This version is based on GStreamer 1.x
https://developer.ridgerun.com/wiki/index.php?title=Gstd-1.0
GNU Lesser General Public License v2.1
172 stars 55 forks source link

gstd adding and removing elements #309

Open ajlennon opened 2 years ago

ajlennon commented 2 years ago

We really really like gstd here, to the extent that we are trying hard to work out if we can use it instead of the programmatic option.

We think we need to be able to add and remove kvssink element to our pipeline dynamically as we don't want it to connect up when the pipeline starts up.

It seems that gstd doesn't support adding and removing elements dynamically?

We're wondering maybe if we can sort of work around this with the GstInterPipe elements

https://developer.ridgerun.com/wiki/index.php/GstInterpipe_-_Simple_Examples

So just a suggestion - it might be neat for gstd to support adding/removing elements from pipelines to make it even more awesome?

Cheers,

Alex

clogwog commented 2 years ago

Hi Alex,

we have a similar requirement and i solved it by creating multiple pipelines

camerasrc->interpipesink name=cam

interpipesrc listen-to-cam -> save to disk

and whenever we need to startup another pipline that does

interpipesrc listen-to=cam -> kvssink

and when we no longer need kinesis streaming we delete that last steaming pipeline

ajlennon commented 2 years ago

Very interesting - yet again thnks @clogwog !!!

ajlennon commented 2 years ago

We're investigating here.... Do you happen to know if the interpipesink actually pipes the buffer through or if multiple copies of packets are made? As we're a bit short of memory!

clogwog commented 2 years ago

sorry, i'm not sure. i would think that if you are running it on nvidia hardware and are using video/x-raw(memory:NVMM) it would pass the memory pointers along, but in the non-nvidia gpu case, it might be a copy, but not sure.. maybe someone else can help out here ?

filiphanes commented 2 years ago

From: https://developer.ridgerun.com/wiki/index.php/GstInterpipe_-_Features_and_Limitations

Interpipesink will transfer automatically the buffers it receives to all the interpipesrcs that are currently listening to it. There is no data copy.

ajlennon commented 1 year ago

Thanks @filiphanes