How to solve the problem "cannot create a datasink for **(datasource)"

There is a forums that can send and receive RTP streams, and it can play on the client. Now I want to save it. I write the code according to the jmf2_0-guide, how ever it always throws the exception "cannot create a datasink for **(datasource)". The datasource is the RTP stream received from the server. Is there anything wrong with the data source or anything else?

here is the code:

public synchronized void update( ReceiveStreamEvent evt){

if(evt instanceof NewReceiveStreamEvent){

try{

stream = ((NewReceiveStreamEvent)evt).getReceiveStream();

DataSource ds = stream.getDataSource();

MediaLocator f = new MediaLocator("file://foo.au");

Manager.createDataSink(ds, f);

RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");

if (ctl != null) {

System.err.println(" - Recevied new RTP stream: " + ctl.getFormat());

} else {

System.err.println(" - Recevied new RTP stream");

}

if (participant == null) {

System.err.println("The sender of this stream had yet to be identified.");

} else {

System.err.println("The stream comes from: " + participant.getCNAME());

}

// create a player by passing datasource to the Media Manager

Player p = javax.media.Manager.createPlayer(ds);

if (p == null) {

return;

}

p.addControllerListener(this);

p.realize();

PlayerWindow pw = new PlayerWindow(p, stream);

playerWindows.addElement(pw);

// Notify intialize() that a new stream had arrived.

synchronized (dataSync) {

dataReceived = true;

dataSync.notifyAll();

}

} catch (Exception e) {

System.err.println("NewReceiveStreamEvent exception " + e.getMessage());

return;

}

}

}

Does any one know how to solve this problem? How to save or how to create a datasink? Please help! Thank you!!

[1939 byte] By [famouse941a] at [2007-11-26 17:10:14]
# 1
The complete error message:NewReceiveStreamEvent exception Cannot find a DataSink for: com.sun.media.protocol.rtp.DataSource@4741d6
famouse941a at 2007-7-8 23:38:05 > top of Java-index,Security,Cryptography...
# 2
Does anybody know?
famouse941a at 2007-7-8 23:38:05 > top of Java-index,Security,Cryptography...