• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic