gstd-1.x icon indicating copy to clipboard operation
gstd-1.x copied to clipboard

gstd adding and removing elements

Open ajlennon opened this issue 3 years ago • 6 comments
trafficstars

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

ajlennon avatar Aug 18 '22 10:08 ajlennon

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

clogwog avatar Aug 18 '22 10:08 clogwog

Very interesting - yet again thnks @clogwog !!!

ajlennon avatar Aug 18 '22 10:08 ajlennon

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!

ajlennon avatar Aug 18 '22 11:08 ajlennon

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 ?

clogwog avatar Aug 18 '22 11:08 clogwog

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.

filiphanes avatar Nov 21 '22 00:11 filiphanes

Thanks @filiphanes

ajlennon avatar Nov 21 '22 08:11 ajlennon