Skip to main content

Gap in updating isContentProtected() on VideoOutputPort.

4 replies [Last post]
pradeep_gupta
Offline
Joined: 2010-10-27
Points: 0

In OCAP RI, we have the below mpeos API to determine isContentProtected() on a VideoOutputPort

mpe_Error mpeos_dispIsContentProtected(mpe_DispOutputPort port, mpe_Bool* encrypted)

This API will be implemented by the Vendors platform.

In Stack, we have below API to determine the same:

VideoOutputSettings.isContentProtected()

DeviceSettingsVideoOutputPortImpl.isContentProtected() - This API calls the above API.

But there is no way through which the mpeos api return value gets reflected in the stack API.

Preferably, in JNI Layer, I am recommending the below change in the function commonUpdate of org_cablelabs_impl_ocap_hardware_device_VideoOutputSettingsProxy.c

Please update whether I can raise an Issue Tracker for this issue.

Pradeep Gupta

mpe_Bool encrypted;
if (MPE_SUCCESS == mpe_dispIsContentProtected(port, &encrypted))
{
(*env)->SetBooleanField(env, obj,
jniutil_CachedIds.VideoOutputSettingsProxy_isContentProtected,
JNI_ISTRUE(encrypted));
}
else
{
(*env)->SetBooleanField(env, obj,
jniutil_CachedIds.VideoOutputSettingsProxy_isContentProtected,
JNI_FALSE);
}

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sarendt
Offline
Joined: 2009-07-21
Points: 0

Good catch -- that is definately an bug -- please create an Issue for it.

I wonder if we should instead just make a direct call to mpe_dispIsContentProtected from VideoOutputSettingsProxy::isContentProtected. The DS spec says that isContentProtected SHALL return true if both this port and the connected display support content protection AND content is
protected. The commonUpdate call will handle the check for both the port and the connected display supporting content protection, because I believe that commonUpdate will is called if a new display is attached. But if the content transitions between protected and unprotected, then commonUpdate would not be called.

pradeep_gupta
Offline
Joined: 2010-10-27
Points: 0

Currently, I have modified the commonUpdate method, but as you said if the content transitions between protected and unprotected, then commonUpdate would not be called, i am thinking in terms of getting it called during service selection or presentation event.

Also, I am thinking how expensive it do make a direct call instead of updating it in commonUpdate() function.

I will be raising an IT for this issue.

Pradeep Gupta

sarendt
Offline
Joined: 2009-07-21
Points: 0

I can't imagine that there would be a big performance penalty for a direct call to mpe_dispIsContentProtected from VideoOutputSettingsProxy::isContentProtected. After all, it likely wouldn't be called frequently. And its a lot simpler from a code/testing point of view.

If you add a call to commonUpdate during a service selection or presentation event, be sure to take into account separable builds -- that is the RI needs to compile when the Device Settings extension is excluded.

pradeep_gupta
Offline
Joined: 2010-10-27
Points: 0

Thanks for the clarification. I have raised IT-585

http://java.net/jira/browse/OCAP_RI-585