All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ocap.media.MediaAccessHandler.html Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version






MediaAccessHandler














org.ocap.media
Interface MediaAccessHandler


public interface MediaAccessHandler

A class implementing this interface can prevent the presentation of A/V service components.

Only one instance of the class that implements this interface can be registered to MediaAccessHandlerRegistrar via the MediaAccessHandlerRegistrar.registerMediaAccessHandler(MediaAccessHandler) method. JMF calls checkMediaAccessAuthorization() before AV service components presentation.

An application which has a MonitorAppPermission("mediaAccess") may implement this interface, and may set an instance of it in MediaAccessHandlerRegistrar.

Note : this handler is only responsible for the presentation of A/V service components and not for launching or not applications.


Method Summary
 MediaAccessAuthorization checkMediaAccessAuthorization(javax.media.Player p, OcapLocator sourceURL, boolean isSourceDigital, ElementaryStream[] esList, MediaPresentationEvaluationTrigger evaluationTrigger)
          The checkMediaAccessAuthorization() method is invoked each time a MediaPresentationEvaluationTrigger is generated either by the OCAP implementation, or, by a monitor application that has MonitorAppPermission(?mediaAccess?) through the MediaAccessConditionControl JMF control.
 

Method Detail

checkMediaAccessAuthorization

MediaAccessAuthorization checkMediaAccessAuthorization(javax.media.Player p,
                                                       OcapLocator sourceURL,
                                                       boolean isSourceDigital,
                                                       ElementaryStream[] esList,
                                                       MediaPresentationEvaluationTrigger evaluationTrigger)
The checkMediaAccessAuthorization() method is invoked each time a MediaPresentationEvaluationTrigger is generated either by the OCAP implementation, or, by a monitor application that has MonitorAppPermission(?mediaAccess?) through the MediaAccessConditionControl JMF control. The OCAP implementation SHALL block the new presentation corresponding to the new environment that led to the generation of the trigger until the MediaAccessHandler grants permission. It is implementation dependent whether presentation of previously selected service components is stopped or not. The OCAP implementation gives all the service components that are part of the service selection even if they are already presented before the trigger is issued.

Parameters:
p - the concerned player.
sourceURL - the URL of the content to be presented.
isSourceDigital - a boolean indicating if the source is digital or analog.
esList - is the list of service components that are going to be presented. esList can be null, for instance if isSourceDigital is false.
evaluationTrigger - is one of the constant defined in MediaPresentationEvaluationTrigger or an application defined MediaPresentationEvaluationTrigger.
Returns:
a MediaAccessAuthorization defined by MediaAccessHandler for the given service components. The MediaAccessAuthorization contains the reason(s), if any, of denied access (use constant defined in AlternativeMediaPresentationReason) per service component.
See Also:
MediaAccessAuthorization, AlternativeMediaPresentationReason, MediaPresentationEvaluationTrigger






© 2015 - 2025 Weber Informatics LLC | Privacy Policy