> I try very simply to modify the name of 'test.wav' by '/tmp/my_fifo'. But it 
> doesn't work.

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).


> 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.

See <http://www.live555.com/liveMedia/faq.html#liveInput-unicast>

You will need to define and implement your own subclass of 
"OnDemandServerMediaSubsession", and, in particular, reimplement the 
"createNewStreamSource()" and "createNewRTPSink()" virtual functions.

For tips on how to do this, see "WAVAudioFileServerMediaSubsession.cpp"

Because you are streaming 24-bit stereo PCM audio, read from a pipe, your 
"createNewStreamSource()" function should:
        - 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).
        - You must then feed this into a "EndianSwap24" object (see line 118 of 
"WAVAudioFileServerMediaSubsession.cpp")

Your "createNewRTPSink()" function can be very simple.  You just call:
           return SimpleRTPSink::createNew(envir(), rtpGroupsock,
                                    rtpPayloadTypeIfDynamic, 48000,
                                    "audio", "L24", 2);
        (again, assuming a 48 kHz sampling rate)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to