<html dir="ltr"><head></head><body style="text-align:left; direction:ltr;"><div>On Thu, 2020-11-12 at 11:39 +0500, Hassan Muhammad wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr">Thank you for your prompt response. It has been really helpful. I have taken a look over the plugin writing tutorial that you have referenced and it seems to me that this may be the most appropriate solution to modifying buffers in a non-intrusive manner i.e. within an element between source and sink pads.</div></blockquote><div><br></div><div>It would at least be the cleanest solution. You also don't have to write a full plugin but can also do just an element as part of your application.</div><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"> One thing I'd like to ask is, would mapping buffer read/writable and performing some operation on the buffer (i.e. like you did converting BGRx colorspace to GRAY8) impose any significant performance penalty on the pipeline when specifically rendering HD or FHD videos?<div>Sorry if this seems like a silly question, I'm actually new to gstreamer and only starting to get the hang of how it works. Thanks again for your help.</div></div></blockquote><div><br></div><div>Mapping a buffer writable might cause it to be copied if the buffer's memory is also in use elsewhere. Apart from that, if you need to modify the individual pixels then there's not much else you can do.</div><div><br></div><div>By using the overlaycomposition element this could potentially be more efficient if the overlayed frames end up in an element (e.g. a sink) that can handle the overlaying separately.</div><div><br></div><div><span><pre>-- <br></pre><div style="width: 71ch;">Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com">https://www.centricular.com</a></div><div style="width: 71ch;"><br></div></span></div></body></html>