magoffin.matt.meta.video
Class JMFLoader

java.lang.Object
  extended by magoffin.matt.meta.video.JMFLoader
All Implemented Interfaces:
javax.media.ControllerListener

public class JMFLoader
extends java.lang.Object
implements javax.media.ControllerListener

Helper class for working with JMF media.

Version:
$Revision: 3 $ $Date: 2008-12-27 08:09:28 +1300 (Sat, 27 Dec 2008) $
Author:
Matt Magoffin (spamsqr@msqr.us)

Constructor Summary
JMFLoader(javax.media.Processor processor)
          Construct with a specific Processor.
 
Method Summary
 void controllerUpdate(javax.media.ControllerEvent event)
           
 javax.media.control.TrackControl getAudioTrack(java.io.File mediaResource)
          Get a TrackControl for an audio track.
 javax.media.control.TrackControl getVideoTrackControl(java.io.File mediaResource)
          Get a TrackControl for an video track.
 boolean waitForState(int state)
          Block until the processor has transitioned to the given state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMFLoader

public JMFLoader(javax.media.Processor processor)
Construct with a specific Processor.

Parameters:
processor - the processor
Method Detail

controllerUpdate

public void controllerUpdate(javax.media.ControllerEvent event)
Specified by:
controllerUpdate in interface javax.media.ControllerListener

waitForState

public boolean waitForState(int state)
Block until the processor has transitioned to the given state. Return false if the transition failed.

Parameters:
state - the state to wait for
Returns:
true if transitioned to that state without error

getVideoTrackControl

public javax.media.control.TrackControl getVideoTrackControl(java.io.File mediaResource)
Get a TrackControl for an video track.

Parameters:
mediaResource - the media resource
Returns:
the TrackControl

getAudioTrack

public javax.media.control.TrackControl getAudioTrack(java.io.File mediaResource)
Get a TrackControl for an audio track.

Parameters:
mediaResource - the media resource
Returns:
the TrackControl