<div dir="ltr"><div>Dear Ross,</div><div dir="ltr"><div>I made it work in a way similar to your guidelines except that I had to set payloadType to a fixed value (107) for the metadata because the 'rtpPayloadTypeIfDynamic' always starts from 96.</div><div><br></div><div><i>"If, on the other hand, you are trying to receive metadata from some other RTP source, and then retransmit it with your server, then things get more complicated (unless the RTP source has its own RTSP server, in which case you should be able to use the existing “LIVE555 Proxy Server”, as is.)"</i><br></div><div>Yes, I have tested the Proxy Server with streams received from cameras, it works with some cameras and does not work with others, the video stream of some cameras that goes through the proxy could not be decoded in my client (though the origin stream can be decoded).<br></div><div><br></div><div>Thank you for the support.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 12, 2022 at 5:54 AM Ross Finlayson <<a href="mailto:finlayson@live555.com">finlayson@live555.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">Are you trying to implement a RTSP server that serves (transmits) metadata from some local source? If so, then you don’t call "SimpleRTPSource::createNew()” at all. “SimpleRTPSource” is for *receiving* RTP streams, not transmitting them.<br>
<br>
What you need to do is:<br>
1/ Implement a “FramedSource” subclass that delivers - in real time - individual “KLVunits” (i.e., one “KLVunit” at a time), each with an appropriate “presentationTime” (aligned with ‘wall-clock time’, i.e., the time that you’d get by calling “gettimeofday()”).<br>
2/ Implement the "createStreamSource()” virtual function, which would create a new instance of your “FramedSource” subclass each time it’s called.<br>
3/ Implement the “createNewRTPSink()” virtual function, as follows:<br>
<br>
RTPSink* MyServerMediaSubsession::createNewRTPSink(Groupsock* rtpGroupsock,<br>
unsigned char rtpPayloadTypeIfDynamic,<br>
FramedSource* /*inputSource*/) {<br>
return SimpleRTPSink::createNew(envir(), rtpGroupsock, rtpPayloadTypeIfDynamic,<br>
90000, // rtpTimestampFrequency<br>
“application”, // sdpMediaTypeString,<br>
“smpte336m”, // rtpPayloadFormatName,<br>
1, // numChannels,<br>
0, // allowMultipleFramesPerPacket<br>
1 // doNormalMBitRule (see the comments in “liveMedia/include/SimpleRTPSink.hh”)<br>
);<br>
}<br>
<br>
<br>
If, on the other hand, you are trying to receive metadata from some other RTP source, and then retransmit it with your server, then things get more complicated (unless the RTP source has its own RTSP server, in which case you should be able to use the existing “LIVE555 Proxy Server”, as is.)<br>
<br>
<br>
Ross Finlayson<br>
Live Networks, Inc.<br>
<a href="http://www.live555.com/" rel="noreferrer" target="_blank">http://www.live555.com/</a><br>
<br>
<br>
_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com" target="_blank">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" rel="noreferrer" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
</blockquote></div></div>