• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

JMF help..............

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I am new to JMF and i am trying to do a voice chat application .I tried out a simple programme to capture and the voice and render it.The following is a part of the code code
-----------------------------------------------------------------
import javax.media.*;
import javax.media.rtp.*;
import java.net.*;
import java.util.*;
import java.io.*;
import javax.media.format.AudioFormat;
public class media3 implements ControllerListener
{
Processor pros;
public media3()
{
//*****finding a capture device to capture live audio
AudioFormat format=new AudioFormat(AudioFormat.LINEAR,8000,8,1);
Vector device=CaptureDeviceManager.getDeviceList(format);//getting the objects in an array i.e vectors
CaptureDeviceInfo di=null;
if(device.size()>0)
{
di=(CaptureDeviceInfo)device.elementAt(0);
}
else
{
//System.out.println("nothing");
System.exit(-1);//exit........if no capturedevice was found
}

//*****now we create a processor and show an error if we cannot create it
try
{
pros=Manager.createProcessor(di.getLocator());
}
catch(IOException ae)
{
System.exit(-1);
}
catch(NoProcessorException e)
{
System.exit(-1);
}
}
public void controllerUpdate(ControllerEvent evt)
{
}
public static void main (String args[])
{
media3 pyr = new media3();
//System.out.println ("starting to play...");
}
}
-----------------------------------------------------------------
Now the code compiles properly,but it exits obviously telling that thereis no capture device now does that mean that i cannot do any capturing .do i need any extra software or hardware for doing so.I even want to do it for vdo.
Can anyone please help me.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
New to JMF
Can you help me.
I've installed JMF i think, I want to use it in Forte. How do I get the import Javax.XXXXXX etc to work?
cheers
jochem
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of quering for devices do the following.
Make a mediaLocator for "javasound://44100".
Now make a processor for it and then run.
Works for me anyway.
bye
Harish
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic