<div dir="ltr">I believe I have found a solution.<div><br></div><div>I implemented a strategy where my circular buffer keeps waiting until a new frame arrives, similar to a blocking socket read operation. Then everything goes well.</div><div><br></div><div>Then I do not need to worry about the variables anymore, just like expected from a DeviceSource.</div><div><br></div><div>Best regards,</div><div><br></div><div>Flavio</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 18 Apr 2024 at 16:07, Flavio Alves <<a href="mailto:flavio.alves@vitalintelligencedata.com">flavio.alves@vitalintelligencedata.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>I'm working on a live streaming service using Live55 using an Nvidia Jetson Nano board.</div><div><br></div><div>I'm capturing the frames from an USB webcam and I am encoding using Nvidia's hardware encoder. Then Live555 is responsible for streaming this capture using RTSP.</div><div><br></div><div>The Nvidia software api to use the encoder uses some threads, and I was unable to use it in a single application. I implemented 2 applications: the RTSP server and the Capture application.</div><div><br></div><div>The communication between them is shared memory, in Linux. I implemented a circular buffer on this shared memory to place the encoded frames, which are seen by the RTSP server application.</div><div><br></div><div>I created custom classes for MediaSession (from OnDemandServerMediaSubsession) and DeviceSource (from FramedSource).</div><div><br></div><div>The software is almost working. I had issues with adding SPS and PPS and timestamps on the encoded frame which seems to be fine.</div><div><br></div><div>But what is happening now is that the applications seems to be ignoring the fDurationInMicroseconds and/or the fPresentationTime values ... and the framerate does not seem to be respected when streaming. The video showing up is very fast.</div><div><br></div><div>I would like to ask for any advice about how to properly address this problem.</div><div><br></div><div>Best regards,</div><div><br></div><div>Flavio</div></div>
</blockquote></div>