Class AntPlusVideoControllableDevicePcc
java.lang.Object
com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
com.dsi.ant.plugins.antplus.pcc.controls.pccbase.AntPlusBaseControllableDevicePcc
com.dsi.ant.plugins.antplus.pcc.controls.AntPlusVideoControllableDevicePcc
Enables communication between a client and the video link of the AntPlusControllableDevice plugin service.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Defines the keys and values used to communicate between the PCC and plugin.static interface
Receiver for the VideoCommand event, which is: Commands sent by a remote control to initiate an action on a video device.Nested classes/interfaces inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
AntPluginPcc.IDeviceStateChangeReceiver, AntPluginPcc.IPluginAccessResultReceiver<T extends AntPluginPcc>, AntPluginPcc.RequestAccessResultHandler<T extends AntPluginPcc>, AntPluginPcc.RequestAccessResultHandler_AsyncSearchByDevNumber<T extends AntPluginPcc>, AntPluginPcc.RequestAccessResultHandler_UI<T extends AntPluginPcc>, AntPluginPcc.StandardReleaseHandle<T extends AntPluginPcc>
-
Field Summary
Fields inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
mReleaseHandle, mStateChangeReceiver, PATH_ANTPLUS_PLUGINS_PKG, reportedServiceVersion, supportsRssiEvent
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected void
handlePluginEvent
(android.os.Message eventMsg) requestAccess
(android.content.Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusVideoControllableDevicePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusVideoControllableDevicePcc.IVideoCommandReceiver videoCommandReceiver, VideoDeviceCapabilities capabilities, int channelDeviceId) Send a request to access the plugin to receive video commands and gain control of video status updates.void
updateVideoStatus
(int volume, boolean muted, int timeRemaining, int timeProgressed, VideoDeviceState videoState) Update the status of the video deviceMethods inherited from class com.dsi.ant.plugins.antplus.pcc.controls.pccbase.AntPlusBaseControllableDevicePcc
getRequiredServiceVersionForBind, getServiceBindIntent
Methods inherited from class com.dsi.ant.plugins.antplus.pccbase.AntPluginPcc
bindAndRequest, closePluginConnection, createCmdMsg, getAntDeviceNumber, getCurrentDeviceState, getDeviceName, getInstalledPluginsVersionNumber, getInstalledPluginsVersionString, getMissingDependencyName, getMissingDependencyPackageName, handleNonCmdPluginMessage, isUserPreferredDeviceForPlugin, isUserRecognizedDevice, releaseAccess, requestAccess_Helper_AsyncScanController, requestAccess_Helper_AsyncSearchByDevNumber, requestAccess_Helper_Main, requestAccess_Helper_SearchActivity, requestAccess_Helper_SubMain, requestAsyncScan_Helper_SubMain, sendPluginCommand, sendPluginCommand, startPluginManagerActivity, subscribeToEvent, unsubscribeFromEvent
-
Method Details
-
requestAccess
public static PccReleaseHandle<AntPlusVideoControllableDevicePcc> requestAccess(android.content.Context bindToContext, AntPluginPcc.IPluginAccessResultReceiver<AntPlusVideoControllableDevicePcc> resultReceiver, AntPluginPcc.IDeviceStateChangeReceiver stateReceiver, AntPlusVideoControllableDevicePcc.IVideoCommandReceiver videoCommandReceiver, VideoDeviceCapabilities capabilities, int channelDeviceId) Send a request to access the plugin to receive video commands and gain control of video status updates. Only one client is allowed access to this mode at a time.- Parameters:
bindToContext
- The context to which the plugin will be bound. Used for plugin lifecycle management.resultReceiver
- The receiver to receive the results of the request. Possible returns include:stateReceiver
- The receiver to receive the state updates of the accessed device, if successful. This receiver will receive notifications of all state changes to the device that occur subsequent to the initial state returned in the result receiver.videoCommandReceiver
- Receiver to receive eventscapabilities
- An instance ofVideoDeviceCapabilities
used to indicate the capabilities of the video device (e.g., support for recorder or playback). Capabilities cannot be changed after initialization.channelDeviceId
- Two-byte device number in the ANT channel ID to use when opening the controls channel. This number is used for pairing with remotes and should be as unique as possible. Set to zero to let the plugin generate the device ID (RECOMMENDED) based on the ANDROID_ID. This number cannot be changed after initialization.
-
getPluginPrintableName
- Specified by:
getPluginPrintableName
in classAntPluginPcc
-
handlePluginEvent
protected void handlePluginEvent(android.os.Message eventMsg) - Overrides:
handlePluginEvent
in classAntPlusBaseControllableDevicePcc
-
updateVideoStatus
public void updateVideoStatus(int volume, boolean muted, int timeRemaining, int timeProgressed, VideoDeviceState videoState) Update the status of the video device- Parameters:
volume
- Current volume setting, given as a percentage.muted
- True if the audio is muted; false otherwisetimeRemaining
- Time remaining on the video clip on a playback device, or time remaining available for recording on a recoding device. In seconds.timeProgressed
- Current number of seconds into playback/recording.videoState
- CurrentVideoDeviceState
of the video device
-