can i take live video from TV tuner? how? urgent help is needed

can i take live video from TV tuner? how?

i have downloaded this code for a web cam how can i adjust it to take live video from TV tuner

/*

* WebcamPlayer.java

*

* Created on November 22, 2004, 4:09 PM

*/

import javax.media.Player;

import javax.media.CaptureDeviceInfo;

import javax.media.MediaLocator;

import javax.media.CaptureDeviceManager;

import javax.media.Manager;

import javax.media.format.VideoFormat;

import java.awt.Component;

import java.applet.*;

import java.util.Vector;

/**

*

* @author Administrator

*/

public class WebcamPlayer extends Applet

{

private CaptureDeviceInfo device; // Contains the device properties

private MediaLocator ml; // Contains the location of the media comming from the webcam

private Player player; // the player

private Component videoScreen; // Component that is capable to show the player's visual component

public void init()

{

try

{//gets a list of devices how support the given videoformat

Vector deviceList = CaptureDeviceManager.getDeviceList(new VideoFormat(VideoFormat.MJPG) );

//device = CaptureDeviceManager.getDevice("vfw:Creative WebCam NX Pro (VFW):0");

//gets the first device from the deviceList

device = (CaptureDeviceInfo) deviceList.firstElement();

System.out.println("Chosen device: "+device.getName());

//String str1 = "vfw:Creative WebCam NX Pro (VFW):0";

// de webcam indentifiseren

//device = CaptureDeviceManager.getDevice(str1);

//gets the location of the device, is needed for player

ml = device.getLocator();

// makes player and gives the streaming video location (that is locate in the MediaLocator)

// this oparation is blocking until Manager has made a player that is realized.

player = Manager.createRealizedPlayer(ml);

//starts the play

player.start();

//Gets a component from the player that can show the actual streaming from the

//webcam.

videoScreen = player.getVisualComponent();

//adds the component that displays the streaming to the applet.

add(videoScreen);

// Now the user can see the steam that is from the webcam in the applet

}

catch(Exception e)

{

System.out.println("no device");

}

}

}

thanks here is my mail if any wants to mail me hanyhosnycs@gmail.com

[2507 byte] By [hanyhosnycsa] at [2007-11-26 22:52:05]
# 1
just visit http://javasolution.blogspot.com/2007/04/java-tv-api-overview.html
Arunssofta at 2007-7-10 12:14:36 > top of Java-index,Security,Cryptography...