org.ocap.shared.dvr
Interface RecordedService

All Superinterfaces:
javax.tv.service.Service
All Known Subinterfaces:
DVBRecordedService, OcapRecordedService, SegmentedRecordedService

public interface RecordedService
extends javax.tv.service.Service

This interface represents the recorded portion of a service that is being recorded or was recorded for a period of time. As soon as recording begins a recorded service will be created. If the recording request fails for any reason the recording shall be stopped normally and the recorded service shall be available containing however much of the service was recorded.

A RecordedService has a media time attribute that determines where playback begins when the recorded service is selected on a ServiceContext. This media time is persistent and is applicable for all future service selections by all applications until the media time is changed with a call to setMediaTime.

Note the following subinterface-specific behavior for methods defined by the javax.tv.service.Service superinterface:


Method Summary
 void delete()
          Deletes the recorded service.
 javax.media.Time getFirstMediaTime()
          Gets the JMF media time at the start of the recorded service.
 javax.media.MediaLocator getMediaLocator()
          Returns the MediaLocator corresponding to the RecordedService.
 javax.media.Time getMediaTime()
          Gets the JMF media time that was set using the method setMediaTime(..)
 long getRecordedDuration()
          Gets the the actual duration of the content recorded.
 RecordingRequest getRecordingRequest()
          Gets the RecordingRequest corresponding to the RecordedService.
 java.util.Date getRecordingStartTime()
          Gets the time when the recording was initiated.
 void setMediaTime(javax.media.Time mediaTime)
          Set the JMF media time for the location from where the playback will begin when this recorded service is selected on a ServiceContext.
 
Methods inherited from interface javax.tv.service.Service
equals, getLocator, getName, getServiceType, hashCode, hasMultipleInstances, retrieveDetails
 

Method Detail

getRecordingRequest

RecordingRequest getRecordingRequest()
Gets the RecordingRequest corresponding to the RecordedService.

Returns:
The RecordingRequest for the service.

getRecordedDuration

long getRecordedDuration()
Gets the the actual duration of the content recorded. For recordings in progress this will return the duration of the completed part of the recording.

Returns:
The duration of the recording in milli-seconds.

getMediaLocator

javax.media.MediaLocator getMediaLocator()
Returns the MediaLocator corresponding to the RecordedService.

Returns:
RecordedServce MediaLocator.

setMediaTime

void setMediaTime(javax.media.Time mediaTime)
                  throws AccessDeniedException
Set the JMF media time for the location from where the playback will begin when this recorded service is selected on a ServiceContext.

If an instance of Time less than the JMF media time at the start of the recorded service is set, or if this method was not called for this recorded service, the playback will begin at the start of the recorded content. If the instance of Time set corresponds to positive infinity or a value more than the duration of the recorded content, the playback will begin at the live point if recording is in progress for the recorded service. If the recording is not in progress, the playback will immediately hit the end-of-media. Note: The media time set will be applicable for all future service selections by all applications.

Parameters:
mediaTime - the media time corresponding to the location from where the playback will begin when this service is selected.
Throws:
AccessDeniedException - if the calling application is not permitted to perform this operation by RecordingRequest specific security attributes corresponding to the RecordingRequest associated with this recorded service.
java.lang.SecurityException - if the calling application does not have RecordingPermission("modify",..) or RecordingPermission("*",..)

getMediaTime

javax.media.Time getMediaTime()
Gets the JMF media time that was set using the method setMediaTime(..)

Returns:
the value of JMF media time that was set using the method setMediaTime(..), if that method was called on this RecordedService before. If the method setMediaTime was not called before, this method Should return the JMF media time corresponding to the beginning of the RecordedService.

getRecordingStartTime

java.util.Date getRecordingStartTime()
Gets the time when the recording was initiated.

Returns:
the time when the recording was initiated by the implementation.

delete

void delete()
            throws AccessDeniedException
Deletes the recorded service. The method removes the recorded service and all recorded elementary streams (e.g., files and directory entries) associated with the RecordedService. The corresponding recording request will transition to DELETED_STATE.

If the recording request is in the IN_PROGRESS_STATE or the IN_PROGRESS_INSUFFICIENT_SPACE_STATE, the implementation will stop the recording before deleting the recorded service. If the RecordedService was being presented when it was deleted, a PresentationTerminatedEvent will be sent with reason SERVICE_VANISHED.

Throws:
AccessDeniedException - if the calling application is not permitted to perform this operation by RecordingRequest specific security attributes.
java.lang.SecurityException - if the calling application does not have RecordingPermission("delete",..) or RecordingPermission("*",..)

getFirstMediaTime

javax.media.Time getFirstMediaTime()
Gets the JMF media time at the start of the recorded service.

Returns:
a media time