AUDIO CONFERENCE USING JMF

I use JMF RTP Manager to send and receive audio streams... Audio peripheral file1 and a data source allows you to him and he listens to the Audio stream from another system. After receiving the audio stream from another system, it confuses the audio captured and audio received together. Then, he transmits the resulting data source to another system and plays using player.
Audio peripheral File2 and a data source allows you to him. It then transmits the data source captured and he listens to the Audio stream. After receiving, he's just playing it.

Run the file1 in a single system and file2 in another system.

PROBLEM:
Now, the problem I have is that the system in which I run file1... running plays the mixed audio good... But the system to one in which I run File2 doesnot cheek... She shows up to 'receive streaming.. evt' but it never shows "receiver wire started...". »



FILE1
/**
*
* John @author
*
*/
Import Java.util;
javax. Import media;
Javax.media.protocol import. *;
Import javax.media.bean.playerbean.MediaPlayer;
Javax.media.format import. *;
java.net import. *;
import java.util.StringTokenizer;
import java.util.Vector;
Javax.media.rtp import. *;
Javax.media.rtp.event import. *;
/ * This class is used to add, remove peer to the mixer and receive all peer voices and mix it and send to all peers * /.

public class implements SessionListener, ReceiveStreamListener mixer
{
public static processor audioProcessor, audioProcessor1;
public static String mixer_ip;
Data source data source;
Data source processedAudioSource, processedAudioSource1;
Data source audioInputSource, audioInputSource1;
public static RTPManager srcMgrs;
Sources of the object [];
List of data sources;
public static SessionAddress srclocalAddr;
public Mixing()
{
Try
{
dataSources = new ArrayList();
if(srcMgrs==null)
{
System.out.println ("NŒUDS CHILDREN");
srcMgrs = RTPManager.newInstance ((RTPManager));
srclocalAddr = new SessionAddress (InetAddress.getByName (InetAddress.getLocalHost (CI.g etHostName())), 3000);
srcMgrs.initialize (srclocalAddr);
srcMgrs.addTarget ("HOST NAME the sstm another", 3000);
srcMgrs.addReceiveStreamListener (this);
srcMgrs.addSessionListener (this);
System.out.println ("insider listeners...");

}

Process();

}
catch (System.Exception e)
{
System.out.println ("error in mixing add child Nodes11");
System.out.println("Error"+e);
}

}


public synchronized void update (SessionEvent evt)
{
Try
{
System.out.println ("Come within the Session event");
}
catch (System.Exception e)
{
System.out.println ("error in Session");
System.out.println("Error"+e);
}
}

public void process()
{
Try
{
Vector of information = CaptureDeviceManager.getDeviceList (null);
If (info is nothing)
System.out.println ("No. capture devices JMF");
on the other
{
DeviceInfo = (CaptureDeviceInfo) info.elementAt CaptureDeviceInfo (0);
MediaLocator locator = deviceInfo.getLocator ();
System.out.println ("got clue:" + index);
audioInputSource = Manager .createDataSource (locator);
System.out.println ("started to capture...");
System.out.println ("Configuration in the mixing process");
The formats [] = new Format [1];
formats [0] = new AudioFormat(AudioFormat.GSM_RTP,8000,16,1);
audioProcessor is Manager.createRealizedProcessor (new ProcessorModel (audioInputSource, formats, new FileTypeDescriptor (FileTypeDescriptor.RAW)));.
processedAudioSource = audioProcessor.getDataOutput ();
dataSources.add (processedAudioSource);
audioProcessor.start ();
System.out.println ("transfer to peers');

}
catch (System.Exception e)
{
System.out.println ("error in the mixing process");
System.out.println("Error"+e);
}

}


Public Shared Sub main (ar [] chain)
{
Mixture of m = new Mixing();
}


public synchronized void update (ReceiveStreamEvent evt)
{

System.out.println ("to receive feed evt...");
Try
{
If (evt instanceof RemotePayloadChangeEvent)
{
System.Err.println ("-a received a RTP PayloadChangeEvent.");
System.Exit (0);
}
on the other
{
If (evt instanceof NewReceiveStreamEvent)
{
System.out.println ("inside reception game event");
Bishop RTPManager = (RTPManager) evt.getSource ();
Participant participant = evt.getParticipant ();
Stream ReceiveStream = evt.getReceiveStream ();
audioInputSource1 = stream.getDataSource ();

dataSources.add (audioInputSource1);
sources = dataSources.toArray (new DataSource [0]);
dataSource = Manager.createMergingDataSource ((DataSource[]) sources);

sendStream = srcMgrs.createSendStream(dataSource,0);
sendStream.start ();

Player AudioPlayer = Manager.createRealizedPlayer (dataSource);
System.out.println ("receiver wire started");
audioPlayer.start ();
}
}
}
catch (System.Exception e)
{
System.out.println ("error in the game receive event");
System.out.println("Error"+e);
}
}
}



FILE2
/**
*
* John @author
*
*/
javax. Import media;
Javax.media.protocol import. *;
Import javax.media.bean.playerbean.MediaPlayer;
Javax.media.format import. *;
java.net import. *;
import java.util.StringTokenizer;
import java.util.Vector;
Javax.media.rtp import. *;
Javax.media.rtp.event import. *;

/ public class Mixing_c implements SessionListener, ReceiveStreamListener
{
public static processor audioProcessor;
String mixer_ip;
ProcessedAudioSource of data source;
Data source audioInputSource, audioInputSource1;
public static RTPManager srcMgrs;
public static SessionAddress srclocalAddr;
public Mixing_c()
{
VR;
{
if(srcMgrs==null)
{
System.out.println ("NŒUDS CHILDREN in mixing_c");
srcMgrs = RTPManager.newInstance ((RTPManager));
srclocalAddr = new SessionAddress (InetAddress.getByName (InetAddress.getLocalHost (CI.g etHostName())), 3000);
srcMgrs.initialize (srclocalAddr);

srcMgrs.addTarget ("host name of the sstm', 3000");
srcMgrs.addReceiveStreamListener (this);
srcMgrs.addSessionListener (this);
System.out.println ("insider listeners of mixing_c...");
}
Process();

}
catch (System.Exception e)
{
System.out.println ("error in mixing add child Nodes11");
System.out.println("Error"+e);
}

}


public synchronized void update (SessionEvent evt)
{
VR;
{
System.out.println ("Come within the Session event");
}
catch (System.Exception e)
{
System.out.println ("error in Session");
System.out.println("Error"+e);
}
}

public void process()
{
VR;
{
Vector of information = CaptureDeviceManager.getDeviceList (null);
If (info is nothing)
System.out.println ("No. capture devices JMF");
on the other
{
DeviceInfo = (CaptureDeviceInfo) info.elementAt CaptureDeviceInfo (0);
MediaLocator locator = deviceInfo.getLocator ();
System.out.println ("got clue:" + index);
audioInputSource = Manager .createDataSource (locator);
}

System.out.println ("started to capture...");

System.out.println ("Configuration in the mixing process");

The formats [] = new Format [1];
formats [0] = new AudioFormat(AudioFormat.GSM_RTP,8000,16,1);

audioProcessor is Manager.createRealizedProcessor (new ProcessorModel (audioInputSource, formats, new FileTypeDescriptor (FileTypeDescriptor.RAW)));.

processedAudioSource = audioProcessor.getDataOutput ();

sendStream = srcMgrs.createSendStream(processedAudioSource,0);

sendStream.start ();

audioProcessor.start ();
System.out.println ("transfer to peers');

}
catch (System.Exception e)
{
System.out.println ("error in the mixing process");
System.out.println("Error"+e);
}

}


Public Shared Sub main (ar [] chain)
{
Mixing_c m = new Mixing_c();
}


public synchronized void update (ReceiveStreamEvent evt)
{

System.out.println ("to receive feed evt...");
VR;
{
If (evt instanceof RemotePayloadChangeEvent)
{
System.Err.println ("-a received a RTP PayloadChangeEvent.");
System.Exit (0);
}
on the other
{
If (evt instanceof NewReceiveStreamEvent)
{
System.out.println ("inside reception game event");
Bishop RTPManager = (RTPManager) evt.getSource ();
Participant participant = evt.getParticipant ();
Stream ReceiveStream = evt.getReceiveStream ();
audioInputSource1 = stream.getDataSource ();

Player AudioPlayer = Manager.createRealizedPlayer (audioInputSource1);
System.out.println ("receiver wire started");
audioPlayer.start ();
}
}
}
catch (System.Exception e)
{
System.out.println ("error in the game receive event");
System.out.println("Error"+e);
}
}
}

Tags: Java

Similar Questions

  • FMS and audio conference

    Hello guys, I use the Flash Media Development Server 4 to test and set up an audio conference. I am having some problems. I implement this audio conference as follows:

    1 - an audio stream is created with a specific name;

    2 - If a stream with the name specified already there is another name is spent and it is republished with this name.

    I don't know if this is the best approach, but I couldn't figure out how to publish more than one microphone in the same stream.

    Well, the problem is that the first stream is created successfully, but when the other user create second stream channel, there suddenly new. I used the administration area of the FMS to see what is happening and saw that the other stream of data is created, but without a Publisher and the client to be published is with a State of rest. Customers often receive a code "NetStream.Play.InsufficientBW" when the second stream is created.

    It is a limitation of the development version of FMS or should I use another approach to implement this feature?

    Kind regards.

    The debugger shows any exceptions when this happens? I have not tried the same approach you use, but in the case of the NetConnection class, you cannot call some methods from the State Manager. I wonder if the same is true for the NetStream class (that is, you cannot call publish() of in the State Manager).

  • Try to copy MP3 files to an audio disc using Disc Creator

    I'm trying to copy MP3 files to an audio disc using Disc Creator.
    I can find the audio file that I want to copy but do not appear in the Source window.

    Do you mean Toshiba recovery disc creator?

    This tool has been designed with chisel only drive recovery!

    In your case I advise to use a tool like Nero third 3rd

  • Help! Cannot save the audio intelligible using AP 10 Audio (Please read for more details)

    I am trying to record audio by using the Audio recording feature in Adobe Presenter 10. I'm using a USB microphone, but when I try to record, all I get is a lot of confusing noise. I tried recording using the parameters of "Mic" both "Line In", but neither yields anything intelligible (although the option of audio product line is just a little more intelligible). When I use the Mic setting and the box to "Check the input level", nothing happens to the "meter" as I read the test sentence - it seems that AP 10 does not recognize that I have even a connected microphone.

    But here, this is where it gets particularly weird... I have no problem recording beautiful acoustic clear using this same microphone when I use the function of video recording of AP 10! Certainly, this does not seem to use some sort of separate component 'Add-on', but, again, if this component can recognize my mic, why not request 'base' of Adobe Presenter? (I also have no problems to import audio files, but it is something else entirely.)

    Unfortunately, my company is not subscribe to an Adobe service contract (they are insanely expensive for what maybe once or twice a year thing) and I'm not allowed to buy a single support call (also very expensive). So, I hope that someone here might be able to help me, how I have helped so many people on similar forums in the past... I hope above all a kind of quick response, I am supposed to do the demonstration of this software to several potential buyers of this software in my organization and they are particularly interested in this specific feature piece (since they use AP to register a nickname-"podcasts" that employees can access from our Adobe server).

    Thanks in advance!

    Laura

    P.S. If it helps, I use a laptop Lenovo running Windows 7 and uses Adobe Presenter 10 with PowerPoint 2010. I use a Plantronics DSP400 USB microphone (which, as I said, works very well with the AP video recording application).

    Okay - problem solved. Here is what happened this morning...

    I started my computer cool (as I do every morning... I always stopped at night). I plugged my microphone before start PowerPoint at all. I started to PowerPoint, grew up in the presentation, I wanted to do the test recording on and you click on the folder option in the Audio section. This time, while the level control came and I talked, it was record green so I thought, "Yay - fixed problem! Not so fast... When in fact I recorded something and played again, it was still confusing and unnecessary. Then I thought: "maybe he's still looking to pick up the audio from the built-in microphone, rather than the USB microphone," so I pressed the button muting the microphone on my laptop (hardware button). I noticed presenter thingy recorder shows the mute symbol, who confirmed that he thought it was the microphone should I use (even if, in the settings, I had the USB microphone than 'active'). So I went to the control panel sound and actually disabled the microphone press the mute mic (that I had supported before) equipment to uncheck the mute. Then when I returned in the presenter and tried to save again, voila!, it actually saved my USB microphone and everything was kitties and rainbows!

    So, if someone else is the same problem and reading this thread (which is the main reason I came here to document all of this), the solution is in fact completely disable the microphone and, possibly, also make sure to connect your USB microphone before launching PowerPoint. (Not 100% sure that the second part is necessary, but it certainly cannot hurt...)

  • Problems streaming of audio files on the web using JMF plugin

    Hi, I had problems with the JMF extension when used in an Applet on the web.  The program worked fine before but not returns the following error...

    PackageManager: Error reading registry

    javax.media.NoPlayerException: could not find a player: [file_name]

    to javax.media.Manager.createPlayerForContent (Manager .java: 1412)

    to javax.media.Manager.createPlayer (Manager .java: 417)

    to javax.media.Manager.createPlayer (Manager .java: 332)

    to Jukebox$ 2.run(Jukebox.java:164)

    at java.security.AccessController.doPrivileged (Native Method)

    to the Jukebox$ 1.run (Jukebox.java:155

    However, the program works fine in Eclipse without error.  I tried reinstalling the JMF package and setting the CLASSPATH and JMFHOME, but it still does not work.  I use the version of jmf-2_1_1e-alljava.  I also tried to put the code of player in a block of AccessController.doPrivileged (), but again, this doesn't seem to work.  Suggestions, I don't know what went wrong.

    Has finally found the solution.  Apparently, the distribution of all-java will not work in the browser, it works with the Windows installation...

  • Problems of implementation of video chat using JMF.

    Hello

    I am beginner in JMF and the obtaining of some problem while application.

    -> my algo base application:
    LAYOUT ŒUVRE (BASIC-ALGORITHM)
    (1) first need to capture the video\audio of device (Cam\microphone) of the computer.
    (2) the need to send on the network using RTP (Real Time Protocol).
    (3) captured the media at one end and the other end to the network (using RTP) play this media stream.
    When 4) complete three steps above, then I need to extend to the peer to peer video chat.

    -> what I've implemented is given below:
    (1) I created datasource with the help of ds = Manager.createDataSource (new MediaLocator("vfw://0"));) and I need to show this captured video on the jpanel for the next, I can send this data source on the network using RTP.
    Important: I created the drive using the drive = Manager.createRealizedPlayer (new MediaLocator("vfw://0"));) and add in jframe componet of the player, but to send media stream on the network, we must right processor? but for the creation of processor, we need to create the data source.

    So what I need is capture video webcam show screen and at the same time to send over the network.
    Please guide.

    Answer in your message to hack who had been separated from stand on its own merits:
    Re: JMF is the best choice for video capture?

  • How can I make audio recordings using my Apple iPhone 5s?

    How can I use my Apple iPhone 5 s for audio recording?

    You can use the voice memo application that is already installed on your iPhone.

    Otherwise, tell us exactly what kind of audio you want to do.

  • Quickly and easily adjust levels dB precisely when the heights of low audio clip using?

    Unless I use a height high enough audio clip, it is extremely tedious to achieve a specific level of dB.

    Is it possible to almost instantly making it easy to slip accurately when the height of the clamp is gray low?

    I know that I can in. the volume up and down by using ctrl - and ctrl = but when I do that I see not reassuring display of the confirmation of the dB level.

    Is it possible to this thumb upward or down while seeing the dB display?

    Ian, if you open the Audio pane of the Inspector and use these keyboard shortcuts to adjust, you see move the volume slider and DB digitally edit to the right of the cursor.

    Russ

    Edit: Insert the volume

  • Toshiba 40L7335DG: small delay audio/video using the tuner internal

    Sometimes the video audio delay when you use the tv tuner internal.
    The delay is sometimes small and insignificant, sometimes reach approximately 500 ms.

    When some audio or video settings are set to different values to the default values stay worse.

    Other TV (LG) don't have the problem when using the same signal.

    Hello

    Have Hmm you tried to reset the TV to factory default?
    Do this. I read somewhere else that factory settings could help solve such audio problems.

    I had a similar problem with my TV from another manufacturer using a HiFi amplifier as part of s the TV HDMI port.
    But I could solve it an option in the menu of the amp which decreased the output of audio sync problems.

  • A60: Work of the Audio Conference on laptop but not on the car radio CD/home

    Hello
    I tried a number of blank disc CD - R and CD - RW, but none of them work with record Sonic to burn music from an audio disc on a blank CD. Music plays on laptop, but not in the CD drive or the car home. Anyone know what the problem is. Really is tired of the use of different brands. nothing works!

    Hello

    You burned the CD and this CD works fine on your laptop, but it of not possible to play in the drive of the car and on your cd player. Is this good?
    Well, in this case there no problems with your laptop.
    I guess that the other players cannot read the CD because they don t supports the support or the audio file format.
    Which audio format you used and you burn music from the original CD?

  • Cannot install audio maxx using Vista 64 bit on Qosmio F50

    Hello

    I just did a clean install of Vista x 64 and installed the audio drivers Realtek from Toshiba.
    The problem is that the Maxx-audio plugins do not appear in the Realtek Control Panel and do not work, even though I see a MaxxAudioAPO20.dll in the System32 folder.

    Any ideas?

    Thank you.

    Hey Buddy,

    For me it looks like there is something wrong with the order of installation as well as drivers have you already installed? Normally the driver chipset and Windows updates must be installed first and then the audio driver. All you can download on the European driver of Toshiba download page.

    I used the following installation order:
    -Windows Vista 64-bit
    -Service Pack 2 for Vista
    -Chipset driver
    -Display driver
    -Sound driver
    Driver LAN-
    -WLAN driver
    -etc.

  • Crackling audio when using the Sennheiser BTD 300 USB dongle in Windows XP

    I use a pair of headphones from Sennheiser PXC 360 bluetooth (apt - X) with a dongle USB 300 BTD, connected to a computer running Windows XP.  The sound is really bad, crackling as if data be decoded correctly.  The driver being used is USB Audio Device version 07/01/2001 5.1.2535.0.  Is there a registry setting, or another driver that I can use to solve the problem?

    Hello

    ·         What is the brand and model of the sound card?

    ·         Have you tried checking update and the latest sound card drivers?

    ·         The Bluetooth device is connected correctly to the computer?

    I suggest you to contact the provider (the manufacturer) driver for your sound card.

    You can follow the article troubleshooting steps and check if it helps.

    http://Windows.Microsoft.com/en-us/Windows/help/no-sound-in-Windows

    You can also contact the Sennheiser service and support on this issue and check if it helps.

    http://www.sennheiserusa.com/Bluetooth-stereo-headphones-wireless-headphones-502384

  • Audio book using Overdrive

    I love my Sansa Clip and use it for books from my local library digital overdrive.  I have a question which I hope someone can help me with.  The clip is very strong for bookmarking so I can go back and forth between books and music.  When I charge the battery all bookmarks are lost.  What I am doing wrong?

    I use my clip almost exclusively to Overdrive audio books.  Make sure that you use the Audiobook folder (prevents accidental jump before too) and also be sure to have the latest firmware update in use.  If two people are on board and after charging the battery or updating the clip you just need to go back to the book you were listening too.  It will now default to the section that you left it on and when you press play, it will ask if you want to resume or start the section.  It is only if you have the latest update in the firmware.  The latest firmware should always remember what that article you were, then he would pick up where you left it within the section.  If you have any questions about the upgrade of the firmware check the firmware update forum on this page.  The people here are great and quick to help.

  • Audio output using the USB connector problem

    I use a USB connector to connect with Audio output. It's because my headphones Jack does not work.

    It worked without problems so far.

    My problem is that there is no output from my laptop to this USB device. The music plays and can be heard on the laptop. Connections (USB device & son) of the laptop work.

    I'm ising Vista home versio

    Any ideas?

    Try this:

    With the USB speaker connected, right click on the speaker icon on the tray (right), left click on 'sounds '. On the tab 'Read' the USB speaker should be listed, click to select it, and then click the button "set as default". Click the OK button to exit.

    Alternatively, you can go to control panel, Sound.

  • Audio transfer using Windows Movie Maker

    "Take over the trap on the Strip" Drew Williams from Microsoft uses Windows Moviemaker and commands to set the audio source by clicking on 'Show the Options' to expose the Narration captured timer and menu Audio device. I can't find the link Options view.

    If you use WIndows Live Movie Maker, it doesn't have the option of storytelling.

    If you use Vista Movie Maker 6... try the following link:

    Windows Vista - Narrator Movie Maker - add to your movie
    http://Windows.Microsoft.com/en-us/Windows-Vista/add-narration-to-your-movie

Maybe you are looking for

  • Download the bootcamp without bootcamp drivers

    Hello Recently, my Windows will not start and now I have to repair Windows Installer. But here's the problem, the internet in the region of the SEA is currently slow because of broken VGA cable and driver download time is very long. Apple have altern

  • What keeps Firefox 38 opening another window other than the first

    Firefox worked fine until what I improved my ability driver double screen. Now when I open firefox, I can only open the first page. If I click to open a new window or my favorites, nothing happens on the screen but I can see them in mailboxes on the

  • Spectrum x 360: out of STOCK?

    I am buying the HP x 360 (No 13, 15) spectrum. However, it is out of stock! 1: when will he be in stock? The stores in my area do not, so this isn't an option. 2: https://www.amazon.com/gp/product/B01F2HKZR8/ref=ox_sc_act_title_1?ie=UTF8&psc=1&smid=A

  • HP Pavilion G7-1328dx: basis of slow AMD driver Sata on AMD HP G7-1328dx

    We have two laptops HP Pavilion: (1) HP G6-1328dx with Intel i3 and Intel chipset and controller Sata Intel running a Samsung SSD 840 very well with high expected random read/write time. and (2) HP-G7-1328 x with AMD Llano A6 - 3420 M procvessor with

  • OfficeJet Pro L7590 is a horizontal line of 1/2 "wide black

    My Officejet Pro L7590 all-in-One and running on XP started putting a 1/2 "wide black horizontal line at the top of the page during the analysis, all the patches?  It was intermittent, but now this on every scan, and I tried cleaning and realign the