File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes JMF - RTP Processor fails where Player succeeds... Why ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "JMF - RTP Processor fails where Player succeeds... Why ???" Watch "JMF - RTP Processor fails where Player succeeds... Why ???" New topic
Author

JMF - RTP Processor fails where Player succeeds... Why ???

Julien Roubieu
Greenhorn

Joined: Nov 16, 2005
Posts: 10
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 ?
Julien Roubieu
Greenhorn

Joined: Nov 16, 2005
Posts: 10
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...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMF - RTP Processor fails where Player succeeds... Why ???