[Live-devel] How to use SimpleRTPSource for transferring metadata?

Steve Ha steveha at u2sr.com
Fri Apr 8 01:05:38 PDT 2022


Dear Ross,

So far I know how to transfer H.264 video streams to clients by subclassing
the class OnDemandServerMediaSubsession. To send metadata to the client I
am using the same way as the video stream, and also I follow your answer I
found here:
http://lists.live555.com/pipermail/live-devel/2018-June/020938.html

This is the source:










































*FramedSource* MyServerMediaSubsession::createNewStreamSource(unsigned
clientSessionId, unsigned& estBitrate) { FramedSource* framedSource =
nullptr; switch (codecId) { case MediaCodec::H264: { FramedSource*
framedSource = new MyVideoSource(envir(), pTaskScheduler, codecId);
framedSource = H264VideoStreamDiscreteFramer::createNew(envir(),
framedSource); } break; case MediaCodec::OnvifMeta: //framedSource =
SimpleRTPSource::createNew(envir(), &rtpGroupsock, 107, 90000, //
"application/vnd.onvif.metadata", 1, False); break; } return
framedSource;}RTPSink* MyServerMediaSubsession::createNewRTPSink(Groupsock*
rtpGroupsock, unsigned char rtpPayloadTypeIfDynamic, FramedSource*
inputSource){ RTPSink* pRTPSink {}; switch (codecId) { case
MediaCodec::H264: pRTPSink = H264VideoRTPSink::createNew(envir(),
rtpGroupsock, rtpPayloadTypeIfDynamic); break; case MediaCodec::OnvifMeta:
pRTPSink = SimpleRTPSink::createNew(envir(), rtpGroupsock,
rtpPayloadTypeIfDynamic, 90000, "application", "VND.ONVIF.METADATA", 1,
False); break; } return pRTPSink;}*

I am struggling to find a correct 'rtpGroupsock' argument to the  function
*SimpleRTPSource::createNew().*
Please tell me the right way to get 'rtpGroupsock' to create the
SimpleRTPSource object.


* framedSource = SimpleRTPSource::createNew(envir(), &rtpGroupsock, 107,
90000, "application/vnd.onvif.metadata", 1, False);*

Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20220408/eae77173/attachment.htm>


More information about the live-devel mailing list