How to convert dataSink transmission into SessionManager transmission in JMF?

Bart

New Member
Good Evening, I am interested to learn and master the JMF before I move on to study others rtp transmission technology. There is something I'm confuse with, can I convert:\[code\]try { String url= "rtp://192.168.1.10:22224/audio/16"; //String url= "rtp://224.0.0.1:22224/audio/16"; MediaLocator m = new MediaLocator(url); DataSink d = Manager.createDataSink(ds, m); d.open(); d.start(); processor.start(); } catch (Exception e) { System.out.println("cannot find the receiver address!!!"); System.exit(-1); }\[/code\]into \[code\]SessionManager rtpsm1 = new com.sun.media.rtp.RTPSessionMgr();rtpsm1.initSession(...); rtpsm1.startSession(...);\[/code\]How should I do that? Is it the same as the InetAddress Stuff like this:\[code\]try{ InetAddress destaddr = InetAddress.getByName(address); SessionAddress sessaddr = new SessionAddress(destaddr, port, destaddr, port + 1); SourceDescription[] userdesclist= new SourceDescription[] { new SourceDescription(SourceDescription .SOURCE_DESC_EMAIL, "[email protected]", 1, false), new SourceDescription(SourceDescription .SOURCE_DESC_CNAME, cname, 1, false), new SourceDescription(SourceDescription .SOURCE_DESC_TOOL, "JMF RTP Player v2.0", 1, false) }; mgr.initSession(localaddr, userdesclist, 0.05, 0.25); mgr.startSession(sessaddr,ttl,null); } catch (Exception e) { System.err.println(e.getMessage()); return null; }\[/code\]Need some hints and guidelines, thanks in advanced^^"
 
Back
Top