Merge pull request #454 from pakerfeldt/property-setter

Support setting properties on MediaDrm
This commit is contained in:
ojw28 2015-05-13 10:29:37 +01:00
commit ea9611aceb

View file

@ -213,6 +213,18 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
return mediaDrm.getPropertyString(key);
}
/**
* Provides access to {@link MediaDrm#setPropertyString(String, String)}.
* <p>
* This method may be called when the manager is in any state.
*
* @param key The property to write.
* @param value The value to write.
*/
public final void setPropertyString(String key, String value) {
mediaDrm.setPropertyString(key, value);
}
/**
* Provides access to {@link MediaDrm#getPropertyByteArray(String)}.
* <p>
@ -225,6 +237,18 @@ public class StreamingDrmSessionManager implements DrmSessionManager {
return mediaDrm.getPropertyByteArray(key);
}
/**
* Provides access to {@link MediaDrm#setPropertyByteArray(String, byte[])}.
* <p>
* This method may be called when the manager is in any state.
*
* @param key The property to write.
* @param value The value to write.
*/
public final void setPropertyByteArray(String key, byte[] value) {
mediaDrm.setPropertyByteArray(key, value);
}
@Override
public void open(DrmInitData drmInitData) {
if (++openCount != 1) {