[Live-devel] RTPSink for a PCM audio subsession
Ross Finlayson
finlayson at live555.com
Wed Jul 29 14:05:36 PDT 2015
> We need to broadcast the PCM (S16LE/16000) audio as a separate channel
> with our RTSP-server.
[…]
> What is a preferred RTPSink class that I should use for this audio
> format in our OnDemandServerMediaSubsession?
You should use a “SimpleRTPSink” - specifically:
SimpleRTPSink::createNew(envir(), rtpGroupsock,
rtpPayloadTypeIfDynamic, 16000,
"audio", “L16", numChannels);
where “numChannels” is 1 for mono, and 2 for stereo.
Note, however, that because your input source is in ‘little-endian’ form (I presume that’s what the “LE” stands for), you will need to byte-swap it before you feed it into your “SimpleRTPSink” (because the IETF standard RTP payload format for the “audio/L16” type specifies that the data be packed into RTP packets in big-endian form.
Therefore, your implementation of the “createNewStreamSource()” virtual function should feed the input source into a new “EndianSwap16” filter object (and return a pointer to that filter object).
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20150729/04a10b90/attachment.html>
More information about the live-devel
mailing list