JMF Solutions

Clone DataSources

 
Problem
To create clones from a DataSource and use them to create different players for playback.

Solution
A sample application is written.  It accepts a URL of the input media for playback and a number specifying how many copies of the playback it should generate. It performs the following steps:  
  1. Create a DataSource for the given input URL.
  2. Create a cloneable DataSource from the original DataSource with the Manager.createCloneableDataSource call.
  3. Create clones from the cloneable DataSource.
  4. For the cloneable DataSource and each of the clones created, create a player for playback.

 
 
Requirements
 
Platform: JDK 1.1.6 or later
JMF API: 2.0 or later
Implementation: AJ, WPP, SPP *


* AJ = All Java, WPP = Windows Performance Pack, SPP = Solaris Performance Pack
 
Related Classes
 
 
How to run this sample
 
java Clone <URL> <# of copies>


Example:
java Clone file:/c:/temp/foo.mov 2
 
Source Code
 
 
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
Virtual Tech Summit Multidate Banner

Java SE Advanced Best Practices WebCast

Duke's Choice RHS Banner

JavaOne 2014 Replay banner