Writing a conference server for RTP streams

Hello,
I'm trying to write a conference server which accepts multiple RTP streams (one for each participant), creates a mixed RTP stream of all other participants and sends that stream back to each participant.
For 2 participants, I was able to correctly receive and send the stream of the other participant to each party.
For 3 participants, creating the merging data source does not seem to work - i.e. no data is received by the participants.
I tried creating a cloneable data sources instead, thinking that this may be the root cause, but when creating cloneable data sources from incoming RTP sources, I am unable to get the Processor into Configured state, it seems to deadlock. Here's the code outline :
    Iterator pIt = participants.iterator();
    List dataSources = new ArrayList();
    while(pIt.hasNext()) {
      Party p = (Party) pIt.next();
      if(p!=dest) {
        DataSource ds = p.getDataSource();
        DataSource cds = Manager.createCloneableDataSource(ds);
        DataSource clone= ((SourceCloneable)cds).createClone();
        dataSources.add(clone);
    Object[] sources = dataSources.toArray(new DataSource[0]);
    DataSource dataSource =   Manager.createMergingDataSource((DataSource[])sources);
    Processor p = Manager.createProcessor(dataSource);
    MixControllerListener cl = new MixControllerListener();
    p.addControllerListener(cl);
    // Put the Processor into configured state.
    p.configure();
    if (!cl.waitForState(p, p.Configured)) {
        System.err.println("Failed to configure the processor.");
        assert false;
    }Here are couple of stack traces :
"RTPEventHandler" daemon prio=1 tid=0x081d6828 nid=0x3ea6 in Object.wait() [98246000..98247238]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x9f37e4a8> (a java.lang.Object)
        at java.lang.Object.wait(Object.java:429)
        at demo.Mixer$MixControllerListener.waitForState(Mixer.java:248)
        - locked <0x9f37e4a8> (a java.lang.Object)
        at demo.Mixer.createMergedDataSource(Mixer.java:202)
        at demo.Mixer.createSendStreams(Mixer.java:165)
        at demo.Mixer.createSendStreamsWhenAllJoined(Mixer.java:157)
        - locked <0x9f481840> (a demo.Mixer)
        at demo.Mixer.update(Mixer.java:123)
        at com.sun.media.rtp.RTPEventHandler.processEvent(RTPEventHandler.java:62)
        at com.sun.media.rtp.RTPEventHandler.dispatchEvents(RTPEventHandler.java:96)
        at com.sun.media.rtp.RTPEventHandler.run(RTPEventHandler.java:115)
"JMF thread: com.sun.media.ProcessEngine@a3c5b6[ com.sun.media.ProcessEngine@a3c5b6 ] ( configureThread)" daemon prio=1 tid=0x082fe3c8 nid=0x3ea6 in Object.wait() [977e0000..977e1238]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x9f387560> (a java.lang.Object)
        at java.lang.Object.wait(Object.java:429)
        at com.sun.media.parser.RawBufferParser$FrameTrack.parse(RawBufferParser.java:247)
        - locked <0x9f387560> (a java.lang.Object)
        at com.sun.media.parser.RawBufferParser.getTracks(RawBufferParser.java:112)
        at com.sun.media.BasicSourceModule.doRealize(BasicSourceModule.java:180)
        at com.sun.media.PlaybackEngine.doConfigure1(PlaybackEngine.java:229)
        at com.sun.media.ProcessEngine.doConfigure(ProcessEngine.java:43)
        at com.sun.media.ConfigureWorkThread.process(BasicController.java:1370)
        at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1339)
"JMF thread" daemon prio=1 tid=0x080db410 nid=0x3ea6 in Object.wait() [97f41000..97f41238]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x9f480578> (a com.ibm.media.protocol.CloneableSourceStreamAdapter$PushBufferStreamSlave)
        at java.lang.Object.wait(Object.java:429)
        at com.ibm.media.protocol.CloneableSourceStreamAdapter$PushBufferStreamSlave.run(CloneableSourceStreamAdapter.java:375)
        - locked <0x9f480578> (a com.ibm.media.protocol.CloneableSourceStreamAdapter$PushBufferStreamSlave)
        at java.lang.Thread.run(Thread.java:534)Any ideas ?
Thanks,
Jarek

bgl,
I was able to get past the cloning issue by following the Clone.java example to the letter :)
Turns out that the cloneable data source must be added as a send stream first, and then the clonet data source. Now for each party in the call the conf. server does the following :
Party(RTPManager mgr,DataSource ds) {
      this.mgr=mgr;
      this.ds=Manager.createCloneableDataSource(ds);
   synchronized DataSource cloneDataSource() {
      DataSource retVal;
      if(getNeedsCloning()) {
        retVal = ((SourceCloneable) ds).createClone();
      } else {
        retVal = ds;
        setNeedsCloning();
      return retVal;
    private void setNeedsCloning() {
      needsCloning=true;
    private boolean getNeedsCloning() {
      return needsCloning;
     private synchronized void addSendStreamFromNewParticipant(Party newOne) throws UnsupportedFormatException, IOException {
    debug("*** - New one joined. Creating the send streams. Curr count :" + participants.size());
    Iterator pIt = participants.iterator();
    while(pIt.hasNext()) {
      Party p = (Party)pIt.next();
      assert p!=newOne;
      // update existing participant
      SendStream sendStream = p.getMgr().createSendStream(newOne.cloneDataSource(),0);
      sendStream.start();
      // send data from existing participant to the new one
      sendStream = newOne.getMgr().createSendStream(p.cloneDataSource(),0);
      sendStream.start();
    debug("*** - Done creating the streams.");So I made some progress, but I'm still not quite there.
The RTP manager JavaDoc for createSendStream states the following :
* This method is used to create a sending stream within the RTP
* session. For each time the call is made, a new sending stream
* will be created. This stream will use the SDES items as entered
* in the initialize() call for all its RTCP messages. Each stream
* is sent out with a new SSRC (Synchronisation SouRCe
* identifier), but from the same participant i.e. local
* participant. <BR>
For 3 participants, my conf. server creates 2 send streams to every one of them, so I'd expect 2 SSRCs on the wire. Examining the RTP packets in Ethereal, I only see 1 SSRC, as if the 2nd createSendStream call failed. Consequently, each participany in the conference is able to receive voice from only 1 other participant, even though I create RTPManager instance for each participany, and add 2 send streams.
Any ideas ?
Thanks,
Jarek

Similar Messages

  • Why don't my DRM policies seem to work? Using "License Server for Protected Streaming"

    Do you find yourself setting rights/restrictions in a DRM policy (like disallow playback on Linux), only to see that the right/restriction isn't being enforced when you play your content?  There may be several reason causing this to happen:
    1. If you are using the "Adobe Access Server for Protected Streaming" that came on your ESD/DVD, this streaming-only server is configured to specifically ignore any policy that was used to package content.  Instead, the server itself overrides the entire packaged policy and instead, reads rights from its tenant configuration XML file (flashaccess-tenant.xml) to generate licenses issued back to the requesting device.
    2. Is your license server configured to use a PolicyUpdateList?  This is a list that can be used to override any old policy (according to its Policy ID) and to use a newly defined policy instead.  This is useful if content was pacakged with a policy and then afterwards, the business rules have changed for the particular policy, warranting an across-the-board change to all content packaged with that particular policy.  Using a PolicyUpdateList is essentially a way to version your older (already used) policies.
    3. is your license server overriding the policy manually in its code?  If you're using the Reference Implementation license server (or building your own server from the SDK), your server has direct access to the policy.  The server can add/remove/change any right in the policy before using it to generate a license for the requesting device.  If you're using the Reference Implementation, by default, it will simply generate a license directly from the policy without any manipulation to it.
    4. Are you sure you re-packaged your content using the new policy where you made your changes?  On your license server, since you have access to the policy (it's sent up to the license server as part of the license request), the license server can log the policy ID of the policy.  Check your logs to verify the new policy is actually being used.
    5. Are you sure you're playing back the newly-packaged content?  Caches may be stale.
    cheers,
    /Eric.

    Not possible with a POP account.
    The email account sync process with iTunes syncs (or transfers) email account setup information for select accounts only from your computer to the iPhone. This does not not involve messages.
    The reason the account's Inbox mailbox seemed to sync is because received messages with a POP account are the only server stored messages and if not removed from the server when downloaded by one email client can be downloaded from the server by another - in this case the iPhone.
    If you want Sent messages kept synchronized between your computer's email client and the iPhone's email client, you MUST use an IMAP account for this purpose.

  • Configurations Flash Access Server for Protected Streaming

    Do anybody have informations, how configurate files flashaccess-global.xml and flashaccess-tenant.xml?
    I now that Flash Access Server for Protected Streaming ignored content policy, and policy have to set in that configurations files.
    Where can I read about that? Very small informations are about that
    Thanks

    Hello,
    Please check chapter "Deploying the Flash Access Server for Protected Streaming" in http://help.adobe.com/en_US/flashaccess/2.0/protecting_content.pdf.
    Best regards,
    Wang Chao

  • Adobe Access Server for Protected Streaming Configuration Problem

    I cannot get the Adobe Access Server for Protected Streaming sample implementation up and running.  Could somebody help me figure out where I'm going wrong?
    I've configured the license server with the correct PFX files and when I run the validation tool, I get the following output.  This is a clean install with only the license server configuration (the content server is a separate machine).  I also get a similar error in the tomcat logs when I try to access a piece of content licensed to this server. 
    $ java -jar libs/flashaccess-validator.jar -g -r /var/lib/tomcat6/licenseserver/
    Validating global deployment ...
            Validating partition deployment - flashaccessserver...
                    Validating tenant deployment - flashaccessserver/mediafly...Failed to validate tenant deployment 'flashaccessserver/mediafly' - Error reading key server certificate for partition='flashaccessserver', tenant='mediafly'
    See log for details:
    (/tmp/temp281722781181937073071254678876423/flashaccessserver/flashaccess-partition.log)
    $ cat /tmp/temp281722781181937073071254678876423/flashaccessserver/flashaccess-partition.log
    [] 2013-02-12 15:37:26,383 INFO  [[Partition(flashaccessserver)].com.adobe.flashaccess.server.license.context.SimpleContex tFactory] Creating class loader for partition 'flashaccessserver' with libraries '[file:/var/lib/tomcat6/licenseserver/flashaccessserver/libs/, file:/var/lib/tomcat6/licenseserver/flashaccessserver/libs/flashaccess-license-server-ext -sample.jar]'
    [] 2013-02-12 15:38:41,247 ERROR [[Partition(flashaccessserver)].com.adobe.flashaccess.server.license.tools.Validator] Failed to validate tenant deployment 'flashaccessserver/mediafly'
    com.adobe.flashaccess.server.common.configuration.ConfigurationException: Error reading key server certificate for partition='flashaccessserver', tenant='mediafly'
            at com.adobe.flashaccess.server.license.configuration.commonsadapter.TenantConfigurationImpl $ServerCertsImpl.readCerts(TenantConfigurationImpl.java:720)
            at com.adobe.flashaccess.server.license.configuration.commonsadapter.TenantConfigurationImpl $ServerCertsImpl.<init>(TenantConfigurationImpl.java:705)
            at com.adobe.flashaccess.server.license.configuration.commonsadapter.TenantConfigurationImpl .<init>(TenantConfigurationImpl.java:115)
            at com.adobe.flashaccess.server.license.configuration.commonsadapter.CommonsConfigurationBas edFactory.getTenantConfiguration(CommonsConfigurationBasedFactory.java:90)
            at com.adobe.flashaccess.server.license.tools.Validator.validateTenantDeployment(Validator.j ava:255)
            at com.adobe.flashaccess.server.license.tools.Validator.validatePartitionDeployment(Validato r.java:283)
            at com.adobe.flashaccess.server.license.tools.Validator.validateGlobalDeployment(Validator.j ava:301)
            at com.adobe.flashaccess.server.license.tools.Validator.process(Validator.java:173)
            at com.adobe.flashaccess.server.license.tools.Validator.main(Validator.java:117)
    Caused by: java.security.cert.CertificateException: java.lang.IllegalArgumentException: unknown object in factory: org.bouncycastle.asn1.DERInteger
            at org.bouncycastle.jce.provider.JDKX509CertificateFactory.engineGenerateCertificate(Unknown Source)
            at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:322)
            at com.adobe.flashaccess.core.crypto.CertUtil.loadCert(CertUtil.java:33)
            at com.adobe.flashaccess.sdk.cert.CertificateFactory.loadCert(CertificateFactory.java:45)
            at com.adobe.flashaccess.server.license.configuration.commonsadapter.TenantConfigurationImpl $ServerCertsImpl.readCert(TenantConfigurationImpl.java:739)
            at com.adobe.flashaccess.server.license.configuration.commonsadapter.TenantConfigurationImpl $ServerCertsImpl.readCerts(TenantConfigurationImpl.java:718)
            ... 8 more
    Some additional information:
    $ uname -s -r -v -m
    Linux 2.6.32-350-ec2 #59-Ubuntu SMP Mon Jan 7 14:20:59 UTC 2013 x86_64
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 10.04.4 LTS
    Release:        10.04
    Codename:       lucid
    $ dpkg -l | grep tomcat
    ii  libtomcat6-java                                             6.0.24-2ubuntu1.12                Servlet and JSP engine -- core libraries
    ii  tomcat6                                                     6.0.24-2ubuntu1.12                Servlet and JSP engine
    ii  tomcat6-common                                              6.0.24-2ubuntu1.12                Servlet and JSP engine -- common files
    $ dpkg -l | grep jdk
    ii  openjdk-6-jre-headless                                      6b24-1.11.5-0ubuntu1~10.04.2      OpenJDK Java runtime, using Hotspot JIT (hea
    ii  openjdk-6-jre-lib                                           6b24-1.11.5-0ubuntu1~10.04.2      OpenJDK Java runtime (architecture independe
    $ md5sum AdobeAccessProSDK_4_0_LS1_java.exe
    73068d8348cbdc1c29211a463a58b8df  AdobeAccessProSDK_4_0_LS1_java.exe
    Thanks,
    Bryan

    I found the problem. 
    Certificates/KeyServer/File[@path] needs to be set your license file, but it must be in the ".cer" format.  The server won't start without this fileand it was not mentioned anywhere in the quick start guide but is mentioned in the protected streaming document.
    Bryan

  • Enough bandwith to usa a NAS server for itune & stream via Airport Express?

    Hi,
    i posted this question in the itunes forum, but got zero feedback. i was hoping someone here could possibly answer my question :
    I was thinking of getting a ByteCC LANDisk NAS to use as an itunes music 'jukebox' server for 2 macs (a G5 and a macbook). I have a Airport Express that i'd like to use to stream music to my living room stereo via itunes,
    My question is is there enough bandwith to stream from the NAS server to the macs, and then to also stream the audio to the living room stereo via the airport express at the same time?
    I'm sure someone must've atempted this set up
    Any help or info is apreciated!

    This works. I have a WD Netcenter (320G) which I store my main iTunes library on (holding down the command key when starting iTunes allows you to chose which library you want to use). I'm not using an Airport base (D-Link and now a Zyxel) and I can stream music AND video no problem - all my movies are on there too and they play fine through Front Row.
    Oh and I usually mount it as nfs rather then smb - handy little apple script for this which I run as an app (when are Apple going to bring out a proper location manager that automounts networked drives etc based on where you are?!!!).
    Have fun.
    Charlie

  • Apache or Windows server for HTTP streaming

    Does is matter what HTTP server I use?
    In the process of upgrading from FMS 3.0 on Windows using IIS 5 to FMS 4.0. Will dynamic HTTP Streaming work from a Windows server?

    Hi,
    Thanks for your interest in HDS.
    HTTP Dynamic Streaming only works with Apache web server. The basic Apache web server is already bundled along with FMS from the 4.0 versions where the HTTP Dynamic streaming modules are loaded by default. Alternatively, any external apache installation also can be used, by copying the required module files and changing the configuration apache files to enable them..

  • Firewall latency for rtp streams

    Does anyone have test info on PIX or other firewall latency changes as the number of voice or video connections increases? 1, 10, 100, 1000 connections? Any reference documents? Thanks in advance.

    You can refer to the document on Low Latency Queuing (LLQ) for IPSec Encryption Engines
    http://www.cisco.com/en/US/products/ps6350/products_configuration_guide_chapter09186a00804dfa7f.html

  • RTP-Streaming (MP3)

    Dear Java-Users,
    we like to build a little RTP-Streaming radio.
    We found a lot of code samples for example the AVTransmit/Recieve from java.sun.
    Our client is working well and is able to recieve RTP-Streams.
    But our server isn't running at the moment.
    When we start both (server and client) on one local machine, the client can recieve the Stream. When we start the server on an other machine from the same network, the client cannot recieve the stream.
    Well there are two problems left :
    1) As I said the server does not work except from localhost.
    2) We read that there is no MP3 support on Java-RTP-Streaming. But as you know MP3 is the most used audio-format and that's why we like to implement it.
    If somebody could help me, I would be really glad.
    Please send me an email or post here. ([email protected])
    I appreciate for your time. with good greetings,
    Tobias Belch

    Really I have to pay to use MP3 ?
    No I didn't knew this.
    I want to use MP3, for I want to build a simple and small client/server for RTP-Streaming over a standard network. And MP3 is the most used format and that's why it is just comfortable for the user to use mp3.
    But thank you very much for your hint.
    greetings

  • Having multiple threads for receiving RTP streams

    Hello,
    Developing an audio conference server, I have come to think that if I manage to separate the different audioReceivers who receive the RTP streams the performance could improve.
    At this moment I have the main program, so the main thread let�s say, who initializes a new audioRx object for each remote client.
    Would separation of the different receivers into different threads improve the applications performance?
    has anyone thought of this? or done something similar?
    Thanks for your help.
    bgl

    i need help from about the RTP stream from the same port

  • Mixing audio RTP-Streams to conference

    I'm trying to create a telefon conference applikation with jmf.
    My problem:
    I need to mix multiple incomming RTP-Streams (Audio/G711_ulaw) together into one outgoing RTP-Stream.
    If I use a MergingDataSource i can get one DataSource with multiple Tracks, but i'm not able to send them out together over one RTP-Session.
    Is there any way to do this?
    I have also thaught about using RawBufferMux or WAVMux to multiplex the tracks included in the MergingDataSource ,but i cant find out how to use them.
    Or is there an easyer way to create an conference over RTP?
    I need to connect to cisco ip-phones, so i can only use the g711_ulaw codec.
    Is there anyone out who can help me?

    Im sorry, but I met this problem in past and find it impossible to resolve.
    Im also thought about MergingDataSource, about Many2One class and more and more but nothing I could use. And nobody could answer this question in this forum half of year ago.
    Oh, nearly forgot: it is possible to write merged streams to file, seems possible to write them into file and then to transmit it to net from file. But how to realize more than one Processor?..

  • Can anyone send/post me the code for RTP server which reads soundcard

    hi all,
    can anyone send me the code for RTP server which reads soundcard and RTP client to tranmit the sound.

    How much are you going to pay?

  • H.264 Settings for Darwin Streaming Server

    I would like to encode H.264 for unicast streaming delivery off of the Darwin platform. We've done a lot of testing and the .mov encodes that we've been putting out at 768kbps (hinted for streaming) have been serving quite slow and choppy off of anything other than a T1 connection.
    I've seen some H.264 .mp4 encodes at 350kbps that look incredible streaming but we cannot duplicate this size and quality for some reason with our own video.
    At 480x270, or something around those dimensions, I was wondering what the best bit rate and format would be for streaming delivery off of the Darwin platform?
    For Darwin we are running 5.5.5 and we are using Compressor 3.0.1. All testing is being done with Quicktime 7.2 on Mac Pro machines over various types of connections.
    Thanks,
    Mike

    After looking through the apple manual I found this:
    Resetting the Streaming Server Admin User Name and Password
    If you forget the Streaming Server Admin user name and password, you can reset them.
    To reset the user name and password:
    1 Log in to the server computer as root, open a terminal, and type the following:
    qtpasswd someUserName
    where someUserName is a name of your choice.
    2 Follow the prompts by entering the administrator user name and a password you want to
    assign to the user someUserName.
    3 Using a text editor, modify the /Library/QuickTimeStreaming/Config/qtgroups file.
    For Windows, modify the c:\Program Files\Darwin Streaming Server\qtgroups file. For other
    supported platforms, modify the /etc/streaming/qtgroups file. Modify the file so that the user
    name you just created or modified is included in the group Admin, as follows:
    admin: someUserName
    4 Save the file as ordinary text (not .rtf or any other file format).

  • Get a event for a new received rtp stream in a player

    Hi!
    I'm trying to implement a RTP-player, that receives a AV-stream and play it. The special thing about this player should be, that even if the stream interrupts, the player wait's on the same IP and port for a new stream and open it in the SAME frame (not like jmstudio in new window).
    I try to catch the "ReceiveStreamEvent", so i can restart the player, but i don't get eny events for this. I tried to do it with a "RTPManager", but i don't know how.
    Does anybody has a example how to get the "ReceiveStreamEvent", so i know, the RTP-stream has been interrupted?
    Thanks
    Adam

    See AVReceive2 in JMF Solutions, in JMF web site

  • Setting up Debian server for HTTP Dyn Streaming (without FMS)?

    Hi!
    Is it possible to set up a Debian server for Http Dynamic Streaming without Flash Media Server?
    (I realize that this means video on demand only, no live streaming!)
    Are there any walkthrouhgs or tutorials on how this can be done?
    Regards / Jonas

    I just found this tread, that answers my question:
    http://forums.adobe.com/thread/747115

  • Merging RTP streams and writing to file

    I'm am in the middle of project using JMF i'm trying to merge incoming RTP streams and write them to file but i always have problem with formats. I have created processor with merged DataSource i set ContentDescriptor to different FileTypeDescriptors and tried to transcode the RTP streams to different formats, but always processor couldnt realize because of this error:
    Unable to handle format: LINEAR, 8000.0 Hz, 16-bit, Mono, LittleEndian, Signed
    Unable to handle format: LINEAR, 8000.0 Hz, 16-bit, Mono, LittleEndian, Signed
    Could someone tell me what content descriptors i need to use and what formats to solve this problem. Any help will be appreciated.
    Message was edited by:
    kaligula

    Hello,
    Here is a procedure i wrote to write on text files the content of any table (and also generate the insert SQL order)
    http://oracle.developpez.com/sources/?page=developpement#Extraction_table
    You can download the script file here http://sheikyerbouti.developpez.com/src/extraction_table.zip
    Hope this help you.
    Francois

Maybe you are looking for

  • Pre purchase download ... won't.  States "This computer is already associated with an Apple ID.

    I prepurchased a movie in iTunes and after waiting several months got an email indicating that I could now download and enjoy the movie.  So I was able to download the iTunes extras, but as for the movie itself, I am getting an annoying message stati

  • (1,15697970) : error 2019

    I installed ODP.NET , I use it with MS's LIGHTSWITCH (VS2012). I found a error in use. this is as follows: IN Chinese: 指定的架构无效.错误: (1,15697970) : 错误 2019: 指定的成员映射无效. 类型"TbdModel.INSPECT_TYPE"中的成员"ID"的类型 "Edm.Decimal[Nullable=False,DefaultValue=,Preci

  • How to insert data quickly to sqlite database

    I have a XML file where the data is written and I want to add it to a database the file has 180000 entries.and takes one day in save that data  I want do it quick, there are another way to do it, I'm using the foreach statement to parse and add to th

  • No Outgoing Audio via Bluetooth Handsfree Device

    My 8330 pairs easily with a Motorola 305T handsfree device, and the incoming audio is fine.  However, there is no outgoing audio transmisson.  After reading other posts, I have tried all suggestions such as removing battery, deleting device and reins

  • Contacts and facebook

    I didn't authorize my phone or my facebook account to merge or whatever, but there are a ton of contacts in my contact list from my facebook friends list. I don't want them there. Most of them don't even have a phone number. My phone says I can't del