"Reflecting" RTP streams

Hi, I'm pretty new to JMF and doing some proof of concept work to build a Video Conference Application. I've modified the AVReceive2 and AVTransmit2 classes so that MachineA transmits a stream to MachineB, MahineB accepts the stream and "reflects" it to MachineC. This works fine if I use the original datasource, however I would actually like to create copies of the DataSource to reflect the stream to several different machines. The problem is that if I create a clone of the data source I cannot configure() the processor...it hangs. I'm not entirely sure if this is the right approach. In a nutshell this is the difference.

// Stream Received from untouched AVTransmit2.java

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

DataSource ds = stream.getDataSource();

.... etc....

retransmit(ds,destIP,destP); // This works for one machine.

and

DataSource cloneableDS = Manager.createCloneableDataSource(ds);

DataSource clonedDS = ((SourceCloneable)cloneableDS).getClone();

// neither of these work. They hang on the waitForState(processor,Processor.Configured);

retransmit(cloneableDS,destIP,destP);

retransmit(clonedDS,destIP,destP);

// Any thoughts would be greatly appreciated. I'll keep looking into it myself. Thanks in advance.

[1366 byte] By [coday] at [2007-9-26 14:06:51]
# 1
This:DataSource clonedDS = ((SourceCloneable)cloneableDS).getClone();should read:DataSource clonedDS = ((SourceCloneable)cloneableDS).createClone(); But I'm sure you knew that :)
coday at 2007-7-2 15:26:13 > top of Java-index,Security,Cryptography...
# 2
In case anyone is interested this implementation does work. It was a stupid mistake on my part ... which I won't mention here. I realized this once I rewrote a skeleton test app.
coday at 2007-7-2 15:26:13 > top of Java-index,Security,Cryptography...
# 3
DOH! :-) I know how that feels...
jfrankparnel at 2007-7-2 15:26:13 > top of Java-index,Security,Cryptography...
# 4
You should be using RTP not cloned DataSources. With RTP the network takes care of all the duplication that is required.
DMGaskin at 2007-7-2 15:26:13 > top of Java-index,Security,Cryptography...
# 5

Now,i am working on similiar problem,but,,

machine A trasnsmite to Machine B,

Machine B,has to receive the packet,and Trasnmite it to Machine C.

my probelm is:

I Want Machine B recieving the Packet and Trasnmit ti WITHOUT JMF object,

The Machine C recicve with a JMf using (Maybe )RTPConnector from the Solutions,

How to Recicve and transmit (from machine B)?

I try using simple datagram packet object but ,,no result.

I did reaserch and ,not using socks5 these is the only solution.(the probelm defined as the private ip)

and these seem to be the theortical answer.

pls,if someone knows,answer...

yoav

yoavadler at 2007-7-2 15:26:13 > top of Java-index,Security,Cryptography...
# 6

At a a very high level RTP works:

With RTP one machine has to be the Session manager. All new members of the session have to register with the session manager, at the time of registration the session manager can inform all current registered members of the session about the new member to the session. Then the participants can multicast their broadcasts so that all participants recieve everything broudcast by other members of the session.

There are of course a number of details that have to be kept in mind, the most important of which is that each member of a session need a player for EACH of the other members of the session.

RTP is not specific to JMF. Quote from JMF Programmers Guide.

For broadcast data, one protocol is the Real-time Transport Protocol (RTP), under development by the Internet Engineering Task Force (IETF).

DMGaskin at 2007-7-2 15:26:13 > top of Java-index,Security,Cryptography...
# 7

Hello All

I Managed to do so.

Using a simple DataGram packet which recive and transmit i passed the info.

As i read in the Last few days ,these called "Reflector"

I did it in java/c++

the result are same.

Note::the Buffer size in the packet has to be 60

yoav

yoavadler at 2007-7-2 15:26:13 > top of Java-index,Security,Cryptography...
# 8

Hi Cauley and all,

I'm a newbie in JMF and I have to realize a project concerning this.

I have a poroblem that you seems not to have with the applications in JMF Solutions:

I've tried AVTransmit2 and AVReceive2 to send and receive audio streams (created from a prerecorded mp3 file).

- In 1 PC, there's a conflict when the 2 programs use the same port.

(e.g : 127.0.0.1 port 4000)

- With 2 PCs, the receiver receive nothing !!!

e.g : 138.48.32.54 port 4000 (I tried with other port numbers too)

I tried to modify the AVReceive2, local Address is created w/ another port, says 7000, and the destAddress is the port througt it I want to receive the stream.

(I try to listen to a port by means of another ). So the 2 programs can run smoothly on 1 PC. But the receiver receives nothing too !!!

Have you ever seen this problem ?

I've posted my problem here :

http://forum.java.sun.com/thread.jsp?forum=28&thread=142384

but noone answer, so I think maybe I have some mistakes so that it's not necessary to answer ? ;(

I tried with JMStudio but I can't transmit and receive audio streams too !

Could anyone tell me where my mistakes could be ?

(I tried thoses applications under WindowsME and Linux)

Lots of thanks in advance

Hoang Hai

hoanghai at 2007-7-2 15:26:13 > top of Java-index,Security,Cryptography...
# 9

Hi!

My problem is analog: i have to realize a proxy which get a stream request from clients and get the streams from server before retransmitting to clients. My proxy also do prefix caching of the stream (it saves the

beginning of the stream an send it to the client in the same time it get the rest form the server. In this manner it masquerade the delay of connections and provides an acceptable playout on client-side).

It looks like this:

1 The client request a stream to the proxy.

2 The proxy send to the client the prefix of the requested stream and in the same time request the rest of the stream (the suffix) to server.

My problem is this: the proxy get the rest of the stream before have finished to transmit the prefix. I want to store the suffix in a manner that i can (in the same time) read it (to send to client) and write it (to store from server, usin synchronization for example). I've think to use

Buffer() class, but i don't had find documentation about.

My brutal idea is to find something like a stream where to put the incoming suffix and read and write it like a generic stream, but i haven't find something useful.

Can you help me? :)

Sorry for my very poor and unreadable english... :P

Thanks in advance!

Leonardo

Nerbo at 2007-7-2 15:26:13 > top of Java-index,Security,Cryptography...
# 10

Hi coday,

I have now the same problem and would be very much interested in the solution you found.

thanks in advance,

>Hi, I'm pretty new to JMF and doing some proof of concept work to build a Video Conference >Application. I've modified the AVReceive2 and AVTransmit2 classes so that MachineA transmits a >stream to MachineB, MahineB accepts the stream and "reflects" it to MachineC. This works fine if >I use the original datasource, however I would actually like to create copies of the DataSource to >reflect the stream to several different machines. The problem is that if I create a clone of the data >source I cannot configure() the processor...it hangs. I'm not entirely sure if this is the right >approach. In a nutshell this is the difference.

>

>

>// Stream Received from untouched AVTransmit2.java

>

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

>DataSource ds = stream.getDataSource();

>

>.... etc....

>

>retransmit(ds,destIP,destP); // This works for one machine.

>

>and

>

>DataSource cloneableDS = Manager.createCloneableDataSource(ds);

>DataSource clonedDS = ((SourceCloneable)cloneableDS).getClone();

>

>// neither of these work. They hang on the waitForState(processor,Processor.Configured);

>retransmit(cloneableDS,destIP,destP);

>retransmit(clonedDS,destIP,destP);

>

>// Any thoughts would be greatly appreciated. I'll keep looking into it myself. Thanks in advance.

volo at 2007-7-2 15:26:14 > top of Java-index,Security,Cryptography...
# 11

To hoanghai

You can try the below steps:

before beginning, let`s assume something.

first, 1 pc transmits audio and video and 2 pc receives them.

second, 1 pc ip is 192.168.1.1, used port will be 1234. 2 pc ip is 192.168.1.2, used port must be 1234 too. (In fact , when you select port 1234, JStudio will use additional port 1236 if you transmit both audio and video).

Ok let`s go.

first ,launch JStudio in two pc.

Second, In 1 pc ,you transmits what you want by click File->Transmit menu , Then in the next step ,input 2 pc ip as dest ip. If you transmit both audio and video , you must input same IP but different port, here is 1234, and 1236.(assume 1234 port for audio and 1236 for video).

last, In 2 pc ,you must create RTP Session by click JStudio menu File ->Open RTP Session and input 1 pc ip as souce ip. If you 1 pc only transmit audio, fill the port of audio else fill two port of audio and video.

That`s all.

Hope this will be help for you.

Bob

Bob_Lee at 2007-7-2 15:26:14 > top of Java-index,Security,Cryptography...