I have a home-made DataSource and SourceStream. They extend the PullBufferDataSource and PullBufferStream, and provide access to audio previously received through LAN.
Creating a Player for this DataSource using the Manager factory works fine and the player can reproduce my audio. Very Well.
Then instead of a Player, I create a Processor (through Manager again), setting its output to RAW_RTP, and I feed it with the very same DataSource. The processor output is then sent to another machine on my local network (with either a SendStream or a DataSink), where I'm running JMFStudio to play the received stream. But there, the audio is not fine at all.
I discovered that the Player calls the read() method of my SourceStream every second (more or less), whereas the Processor calls it every 10ms !! Of course, since the SourceStream receives its audio from the network at constant rate, the Processor just drains its buffer... and sends "no sound".
Why is that ? Why does the RTP Processor not seem to see the bitrate of the stream and calls read() so much ?
Joined: Nov 16, 2005
I managed to solve this problem by extending PushBufferDataSource and PushBufferStream instead of PullBuffer...
Now I've got new issues, but that's another story...