ERLEDIGT
JA
JA
ANTWORTEN
1
1
ZUGRIFFE
580
580
EMPFEHLEN
-
Hallo,
ich versuche gerade eine Software zu schreiben, die RTP Daten austauscht und mittels RTCP die Verbindungsqualität überwacht. Bisher funktioniert die Verbindungsaufbau, der RTP Datenaustausch und teilweise RTCP.
Jedoch beim RTCP werden nur SenderReports ausgetauscht und keine ReceiverReports. Die Übertragung übernimmt die folgende Methode, die ich anhand Beispielen implementiert habe. callParameter enthält IP, Port und Payloadtype, die mittels sip ausgehandelt wurden.
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
public int transmitData(CallParameter callParameter) { int value = 0; try { myProcessor = Manager.createProcessor(iDS); myProcessor.configure(); while (myProcessor.getState() != Processor.Configured) { try { Thread.sleep(20); } catch (InterruptedException ex) { return -1; } } myProcessor.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW)); track = myProcessor.getTrackControls(); switch (callParameter.getPayloadType()) { case 0: af = new AudioFormat(AudioFormat.ULAW_RTP, 8000, 8, 1); break; case 3: af = new AudioFormat(AudioFormat.GSM_RTP, 8000, 4, 1); break; case 8: //TODO: aLaw break; } AudioFormat f = (AudioFormat) track[0].getFormat(); if (!f.equals(af)) { track[0].setFormat(af); } myProcessor.realize(); while (myProcessor.getState() != Processor.Realized) { try { Thread.sleep(20); } catch (InterruptedException ex) { } } oDs = myProcessor.getDataOutput(); // com.sun.media.rtp.RTPSessionMgr myRTPSessionMgr = new RTPSessionMgr(); SessionAddress senderAddr = new SessionAddress(); myRTPSessionMgr.initSession(senderAddr, null, 0.5, 0.25); myRTPSessionMgr.addSendStreamListener(this); myRTPSessionMgr.addRemoteListener(this); myRTPSessionMgr.addReceiveStreamListener(this); myRTPSessionMgr.addSessionListener(this); InetAddress destAddr = InetAddress.getByName(callParameter.getRemoteIP()); InetAddress srcAddr = InetAddress.getByName(callParameter.getLocalIP()); SessionAddress localAddr = new SessionAddress(srcAddr, callParameter.getLocalRTPPort(), srcAddr, callParameter.getLocalRTPPort() + 1); SessionAddress remoteAddr = new SessionAddress(destAddr, callParameter.getRemotePort(), destAddr, callParameter.getRemotePort() + 1); value = myRTPSessionMgr.startSession(localAddr, localAddr, remoteAddr, null); ss = myRTPSessionMgr.createSendStream(oDs, 0); ss.start(); myProcessor.start(); }... }
Hat jemand vielleicht eine Idee woran es liegen könnte, dass keine RR ausgetauscht werden ?
Gruß
Taner
-
Hallo,
http://java.sun.com/javase/technolog...hitecture.html
"....You control the transmission through the SendStream start and stop methods.
When it is first started, the SessionManager behaves as a receiver (sends out RTCP receiver reports). As soon as a SendStream is created, it begins to send out RTCP sender reports and behaves as a sender host as long as one or more send streams exist. If all SendStreams are closed (not just stopped), the session manager reverts to being a passive receiver...."
Gruß
Taner
Ähnliche Themen
-
COM-Port Senden/Empfangen
Von PingOfDeath1983 im Forum Visual Basic 6.0Antworten: 1Letzter Beitrag: 24.04.07, 11:14 -
Objekte im Netzwerk senden/empfangen
Von illaX im Forum JavaAntworten: 11Letzter Beitrag: 20.02.06, 07:50 -
[IRC] Verbindung zum Server -> Senden/Empfangen?
Von Suchfunktion im Forum Visual Basic 6.0Antworten: 3Letzter Beitrag: 13.04.05, 21:28 -
comm port problem beim empfangen
Von Serethos im Forum JavaAntworten: 1Letzter Beitrag: 17.02.05, 08:18 -
UDP - senden/empfangen funktioniert nicht
Von matt im Forum C/C++Antworten: 8Letzter Beitrag: 23.10.03, 13:14





Zitieren
Login





