The OCAP Digital Video Recorder Specification
by Linden deCarmo

Listing One

import org.ocap.shared.media;
import org.ocap.dvr;

   // sample controllerUpdate() processing for DVR applications
   //
   // All JMF applications implement a controllerUpdate() method
   // The OCAP DVR specification adds new events that DVR applications
   // should listen to.  In this illustration, the listener
   // monitors EnteringLiveModeEvent
   
   public synchronized void controllerUpdate(ControllerEvent event) 
   {
     // this event will be received when the DVR JMF player is playing live 
     // content from a tuner. Typically, this event will be received when 
     // the user does a trick operation (such as a fast forward) that causes 
     // the player to run out of recorded digital video and automatically 
     // start playing live content.
     if (event instanceof EnteringLiveModeEvent) 
     {
       // your application work would be done here...
     }
     // this event will be received when the DVR JMF player is
     // playing is playing recorded content.  This typically
     // is generated when the application performs a trick operation
     // (i.e. pause or rewind) on live content.

     else if (event instanceof LeavingLiveModeEvent) 
     {
       // your application work would be done here...
     }
   }

     





1


