RecordedService

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ocap.shared.dvr
Interface RecordedService

All Superinterfaces:
  Service

All Known Subinterfaces:
  OcapRecordedService, SegmentedRecordedService

    public interface RecordedService

extends 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:

- The hasMultipleInstances() method shall always return false.
- The getServiceType() method shall always return RecordedServiceType.RECORDED_SERVICE.
- The getLocator() method shall return a locator corresponding to the recorded service that is different from the locator of the originating service. This locator when passed in to the SIManager.getService(..) should return this RecordedService.
- The getName() method shall return a human readable string.
- RecordedServices shall not be included in service lists returned by the method SIManager.filterServices(..).

Method Summary
`void` | `delete()` Deletes the recorded service.
`Time` | `getFirstMediaTime()` Gets the JMF media time at the start of the recorded service.
`MediaLocator` | `getMediaLocator()` Returns the MediaLocator corresponding to the RecordedService.
`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.
`Date` | `getRecordingStartTime()` Gets the time when the recording was initiated.
`void` | `setMediaTime(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

    MediaLocator getMediaLocator()

  Returns the MediaLocator corresponding to the RecordedService.

  Returns:
    RecordedServce MediaLocator.

### setMediaTime

    void setMediaTime(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.
    `SecurityException` - if the calling application does not have RecordingPermission("modify",..) or RecordingPermission("*",..)

### getMediaTime

    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

    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.
    `SecurityException` - if the calling application does not have RecordingPermission("delete",..) or RecordingPermission("*",..)

### getFirstMediaTime

    Time getFirstMediaTime()

  Gets the JMF media time at the start of the recorded service.

  Returns:
    a media time

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD