<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>I try very simply to modify the name of 'test.wav' by '/tmp/my_fifo'. But it doesn't work.</div></blockquote><div><br></div>No, you can't do that, because the "WAVAudioFileSource" class is intended for reading from a WAV file (with a WAV header at the front).<br><br></div><div><br><blockquote type="cite"><div>So, what is the most efficient way to do it. I just want the testOnDemandRTSPServer reading the samples from an Named pipe and sending this stream over the net.<br></div></blockquote><div><br></div>See <<a href="http://www.live555.com/liveMedia/faq.html#liveInput-unicast">http://www.live555.com/liveMedia/faq.html#liveInput-unicast</a>></div><div><br></div><div>You will need to define and implement your own subclass of "OnDemandServerMediaSubsession", and, in particular, reimplement the "createNewStreamSource()" and "createNewRTPSink()" virtual functions.</div><div><br></div><div>For tips on how to do this, see "WAVAudioFileServerMediaSubsession.cpp"</div><div><br></div><div>Because you are streaming 24-bit stereo PCM audio, read from a pipe, your "createNewStreamSource()" function should:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- Create a "ByteStreamFileSource", with "preferredFrameSize" being some multiple of 6 bytes (one 24-bit stereo PCM sample), with "playTimePerFrame" set appropriately (microseconds). Choose a "preferredFrameSize" that's large enough to fit within an outgoing RTP packet. I suggest 1500 bytes (i.e., 250 samples), with "playTimePerFrame" of 5208 microseconds (assuming a sampling rate of 48 kHz).</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>- You must then feed this into a "EndianSwap24" object (see line 118 of "WAVAudioFileServerMediaSubsession.cpp")</div><div><br></div><div>Your "createNewRTPSink()" function can be very simple. You just call:</div><div><span class="Apple-tab-span" style="white-space:pre"> return SimpleRTPSink::createNew(envir(), rtpGroupsock,
rtpPayloadTypeIfDynamic, </span>48000<span class="Apple-tab-span" style="white-space:pre">,
"audio", </span>"L24"<span class="Apple-tab-span" style="white-space:pre">, </span>2<span class="Apple-tab-span" style="white-space:pre">);
<span class="Apple-tab-span" style="white-space:pre"> </span>(</span>again, assuming a 48 kHz sampling rate)</div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>