Live Video Capture
When doing live video cpature , if you have your
dataSource (the name and format of the videoCapture card) , is it enough to just create a player after that with the following line :
player3 = Manager.createPlayer(dataSourceCurrent);
or do I have to use medialocator or URL or anything else?
If so how do you set the mediaLocator to a datasource.
I know you can set it to a string or URL but how about a datasource?
Thanks
Melissa
> When doing live video cpature , if you have your
> dataSource (the name and format of the videoCapture
> card) , is it enough to just create a player after
> that with the following line :
>
> player3 = Manager.createPlayer(dataSourceCurrent);
>
this should work. I found an example:
[...]
try{
file = new FileInputStream( new File( "yahtzee.mp3" ) );
}
catch(Exception e){
System.out.println("File open failed");
}
try{
dataSource = new StreamDataSource( file, "audio.mpeg" );
player = Manager.createPlayer( dataSource );
player.addControllerListener(this);
player.realize();
player.start();
} catch (Exception e){
e.printStackTrace();
}
}
[...]
The StreamDataSource is something a personal implementation from someone else, extending the PullDataSource.
As long as your dataSourceCurrent is by some means a DataSource/related to the DataSource (there is a diagram in the JMF API guide, showing the relations) ...
- Sascha