|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ocap.shared.dvr.RecordingManager
org.ocap.dvr.OcapRecordingManager
public abstract class OcapRecordingManager
RecordingManager represents the entity that performs recordings and maintains a database of recordings. An instance of this class is returned when an application calls the RecordingManager.getInstance() class in OCAP platforms.
The setPrioitization method is intended to be used with the current set of prioritized resource usages that would be returned by a call to the getPrioritizedUsages method. However, the set of resource usages returned by a call to the getPrioritizedResourceUsages MAY be invalid in a subsequent call to the setPrioritization method as the set MAY have changed during the time between the two method calls.
Constructor Summary | |
---|---|
OcapRecordingManager()
|
Method Summary | |
---|---|
abstract void |
addRecordingAlertListener(RecordingAlertListener ral)
Adds an event listener for receiving events corresponding to a transition from a pending state to an in-progress state or a failed state. |
abstract void |
addRecordingAlertListener(RecordingAlertListener ral,
long alertBefore)
Adds an event listener for receiving events corresponding to a transition from a pending state to an in-progress state or a failed state. |
abstract void |
addRecordingPlaybackListener(RecordingPlaybackListener listener)
Adds an event listener for receiving events corresponding to a recording playback start. |
abstract void |
cancelBufferingRequest(BufferingRequest request)
Cancels an active buffering request. |
abstract void |
deleteAllRecordings()
Deletes all recordings. |
abstract void |
deleteRecordings(RecordingList requests)
Deletes multiple recordings. |
abstract void |
disableBuffering()
Disables time-shift buffering and buffering without presentation. |
abstract void |
enableBuffering()
Enables time-shift buffering and buffering without presentation. |
abstract BufferingRequest[] |
getBufferingRequests()
Gets a set of buffering requests that were passed to the requestBuffering method and have not been cancelled. |
abstract long |
getMaxBitRate()
Gets the maximum bit rate the implementation will use for duration to space in calculations. |
abstract ResourceUsage[] |
getPrioritizedResourceUsages(RecordingRequest recording)
Get the prioritized list of overlapping ResourceUsages corresponding to a particular recording request. |
abstract long |
getSmallestTimeShiftDuration()
Gets the smallest time-shift duration supported by the implementation. |
abstract RecordingRequest |
record(RecordingSpec source,
java.lang.String[] keys,
java.io.Serializable[] appData)
Records the stream or streams according to the source parameter. |
abstract void |
removeRecordingAlertListener(RecordingAlertListener ral)
Removes a registered event listener for receiving recording events. |
abstract void |
removeRecordingPlaybackListener(RecordingPlaybackListener listener)
Removes a registered event listener for receiving recording playback events. |
abstract void |
requestBuffering(BufferingRequest request)
Requests the implementation to start buffering a service using implementation specific time-shift storage. |
abstract RecordingRequest |
resolve(RecordingRequest request,
RecordingSpec spec,
int resolutionState)
Schedule a child recording request corresponding to an unresolved or partially resolved recording request. |
abstract void |
setPrioritization(ResourceUsage[] resourceUsageList)
Sets the relative priorities for a set of ResourceUsages. |
abstract void |
setRecordingDelay(long seconds)
Sets the amount of time to delay the start of scheduled recordings after the initial monitor application is running. |
abstract void |
setRequestResolutionHandler(RequestResolutionHandler rrh)
Set the RequestResolutionHandler that will be invoked when any application calls the RecordingManager.record method. |
abstract void |
setSpaceAllocationHandler(SpaceAllocationHandler sah)
Set the SpaceAllocationHandler that will be invoked when any application attempts to allocate space in any MediaStorageVolume. |
abstract void |
signalRecordingStart()
Informs the implementation it SHALL start scheduled recordings if it hasn't already done so. |
Methods inherited from class org.ocap.shared.dvr.RecordingManager |
---|
addRecordingChangedListener, getEntries, getEntries, getInstance, getRecordingRequest, record, removeRecordingChangedListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OcapRecordingManager()
Method Detail |
---|
public abstract void addRecordingAlertListener(RecordingAlertListener ral)
ral
- The listener to be registered.public abstract void addRecordingAlertListener(RecordingAlertListener ral, long alertBefore)
ral
- The listener to be registered.alertBefore
- Time in milliseconds for the alert to be generated
before the start of the scheduled event.public abstract void removeRecordingAlertListener(RecordingAlertListener ral)
ral
- the listener to be removed.public abstract void addRecordingPlaybackListener(RecordingPlaybackListener listener)
listener
- The listener to add.public abstract void removeRecordingPlaybackListener(RecordingPlaybackListener listener)
listener
- The listener to be removed.public abstract void setSpaceAllocationHandler(SpaceAllocationHandler sah)
sah
- the space reservation handler.
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("handler.recording").public abstract void setRequestResolutionHandler(RequestResolutionHandler rrh)
rrh
- the request resolution handler.
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("handler.recording").public abstract RecordingRequest resolve(RecordingRequest request, RecordingSpec spec, int resolutionState)
Implementation should set the state of the recording request "request" to "resolutionState" before the return of this call.
request
- the RecordingRequest for which the resolution is
provided.spec
- the RecordingSpec for the child recording request.resolutionState
- the state of the RecordingRequest after
the return of this method. The possible values for this
parameter are the states defined in ParentRecordingRequest.
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("handler.recording").
java.lang.IllegalArgumentException
- if the resolutionState is not a
state defined in ParentRecordingRequest, or if the
request is not in unresolved or partially resolved state.public abstract ResourceUsage[] getPrioritizedResourceUsages(RecordingRequest recording)
recording
- the RecordingRequest for which overlapping resource
usages are sought.
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("handler.recording").
java.lang.IllegalArgumentException
- if the parameter is null.public abstract void setPrioritization(ResourceUsage[] resourceUsageList)
resourceUsageList
- a list of ResourceUsages sorted in
descending order of prioritization
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("handler.recording").
java.lang.IllegalArgumentException
- if the parameter does not match a
current set of overlapping ResourceUsages.public abstract void requestBuffering(BufferingRequest request)
request
- The <@link BufferingRequest> to make active.
java.lang.SecurityException
- if the calling application does not have the
"file" element set to true in its permission request file.public abstract BufferingRequest[] getBufferingRequests()
public abstract void cancelBufferingRequest(BufferingRequest request)
request
- The BufferingRequest
to cancel.
java.lang.SecurityException
- if the calling application does not
have write permission for the request as determined by the
ExtendedFileAccessPermissions
returned by
the getExtendedFileAccessPermissions
method
in the parameter, or if the calling application does not
have MonitorAppPermission("handler.recording").public abstract long getMaxBitRate()
public abstract RecordingRequest record(RecordingSpec source, java.lang.String[] keys, java.io.Serializable[] appData) throws AccessDeniedException
org.ocap.shared.dvr.RecordingManager.record
method. This method is identical to that method except for the
key and appData parameters used to add application specific
private data.
The keys and appData parameters are parallel arrays where the first entry
in the keys array corresponds to the first entry in the appData array
and so forth. When a RecordingRequest
is created from a
call to this method and then delivered to a
RecordingChangedListener
, the request SHALL contain the
application data passed to this method. This method SHALL add the
new RecordingRequest to the recording database maintained by this
manager before returning and it SHALL include the appData parameter in
the RecordingRequest in the database at that time. If conflicts are
detected during this method, the appData SHALL be made available in the
recording database for application access before any OCAP handler
application is called, e.g., resource contention handler application.
source
- specification of stream or streams to be recorded
and how they are to be recorded.keys
- the IDs under which the application data is to be added.appData
- the private application data to be added.
java.lang.IllegalArgumentException
- if the source is an application
defined class or as defined in the concrete sub-class of
RecordingSpec for instances of that class. Also throws this
exception if the keys or appData parameters are null or not
the same length.
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("create",..) or RecordingPermission("*",..)public abstract void setRecordingDelay(long seconds)
seconds
- Number of seconds to delay.
java.lang.SecurityException
- if the calling application does not
have MonitorAppPermission("recording").
java.lang.IllegalArgumentException
- is the parameter is negative.public abstract void signalRecordingStart()
java.lang.SecurityException
- if the calling application does not
have MonitorAppPermission("recording").public abstract long getSmallestTimeShiftDuration()
public abstract void enableBuffering()
java.lang.SecurityException
- if the calling application does not have
MonitorAppPermission("recording").public abstract void disableBuffering()
enableBuffering
method is called. If
an implementation uses time-shift buffering for recording creation it
MAY segment the recording.
java.lang.SecurityException
- if the calling application does not have
MonitorAppPermission("recording").public abstract void deleteRecordings(RecordingList requests)
RecordingRequest.delete
method for each
RecordingRequest
in the requests
parameter.
The recordings SHALL be deleted in incrementing array index order from
the first element at requests[0]
.
requests
- List of RecordingRequest
recordings
to delete.
AccessDeniedException
- if the calling application is not granted
MonitorAppPermission("handler.recording").public abstract void deleteAllRecordings()
RecordingRequest.delete
method
for each RecordingRequest
in the database of
recordings maintained by this manager and delete all of the recordings
in the database.
The recordings SHALL be deleted in order of pending recordings first in any order, then in progress recordings in any order, then failed recordings in any order, then completed recordings in any order.
AccessDeniedException
- if the calling application is not granted
MonitorAppPermission("handler.recording").
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |