Loading media/libmedia/mediaplayer.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -1023,9 +1023,12 @@ status_t MediaPlayer::prepareDrm(const uint8_t uuid[16], const Vector<uint8_t>& return NO_INIT; } // Only allowing it in player's prepared state if (!(mCurrentState & MEDIA_PLAYER_PREPARED)) { ALOGE("prepareDrm must only be called in the prepared state."); // Only allowed it in player's preparing/prepared state. // We get here only if MEDIA_DRM_INFO has already arrived (e.g., prepare is half-way through or // completed) so the state change to "prepared" might not have happened yet (e.g., buffering). // Still, we can allow prepareDrm for the use case of being called in OnDrmInfoListener. if (!(mCurrentState & (MEDIA_PLAYER_PREPARING | MEDIA_PLAYER_PREPARED))) { ALOGE("prepareDrm is called in the wrong state (%d).", mCurrentState); return INVALID_OPERATION; } Loading media/libmediaplayerservice/nuplayer/GenericSource.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1979,7 +1979,8 @@ status_t NuPlayer::GenericSource::onPrepareDrm(const sp<AMessage> &msg) // The legacy mDecryptHandle!=NULL check (for FLAG_PROTECTED) is equivalent to mIsDrmProtected. notifyFlagsChanged( (mIsSecure ? FLAG_SECURE : 0) | (mIsDrmProtected ? FLAG_PROTECTED : 0) | // Setting "protected screen" only for L1: b/38390836 (mIsSecure ? FLAG_PROTECTED : 0) | FLAG_CAN_PAUSE | FLAG_CAN_SEEK_BACKWARD | FLAG_CAN_SEEK_FORWARD | Loading media/libmediaplayerservice/nuplayer/GenericSource.h +3 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,7 @@ private: int32_t mFetchTimedTextDataGeneration; int64_t mDurationUs; bool mAudioIsVorbis; // Secure codec is required. bool mIsSecure; bool mIsStreaming; bool mUIDValid; Loading Loading @@ -310,7 +311,9 @@ private: bool seeking, bool formatChange, media_track_type trackType, Track *track); // Modular DRM // The source is DRM protected and is prepared for DRM. bool mIsDrmProtected; // releaseDrm has been processed. bool mIsDrmReleased; Vector<String8> mMimes; Loading media/libmediaplayerservice/nuplayer/NuPlayerSource.h +2 −2 Original line number Diff line number Diff line Loading @@ -38,8 +38,8 @@ struct NuPlayer::Source : public AHandler { FLAG_CAN_SEEK_FORWARD = 4, // the "10 sec forward button" FLAG_CAN_SEEK = 8, // the "seek bar" FLAG_DYNAMIC_DURATION = 16, FLAG_SECURE = 32, FLAG_PROTECTED = 64, FLAG_SECURE = 32, // Secure codec is required. FLAG_PROTECTED = 64, // The screen needs to be protected (screenshot is disabled). }; enum { Loading Loading
media/libmedia/mediaplayer.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -1023,9 +1023,12 @@ status_t MediaPlayer::prepareDrm(const uint8_t uuid[16], const Vector<uint8_t>& return NO_INIT; } // Only allowing it in player's prepared state if (!(mCurrentState & MEDIA_PLAYER_PREPARED)) { ALOGE("prepareDrm must only be called in the prepared state."); // Only allowed it in player's preparing/prepared state. // We get here only if MEDIA_DRM_INFO has already arrived (e.g., prepare is half-way through or // completed) so the state change to "prepared" might not have happened yet (e.g., buffering). // Still, we can allow prepareDrm for the use case of being called in OnDrmInfoListener. if (!(mCurrentState & (MEDIA_PLAYER_PREPARING | MEDIA_PLAYER_PREPARED))) { ALOGE("prepareDrm is called in the wrong state (%d).", mCurrentState); return INVALID_OPERATION; } Loading
media/libmediaplayerservice/nuplayer/GenericSource.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -1979,7 +1979,8 @@ status_t NuPlayer::GenericSource::onPrepareDrm(const sp<AMessage> &msg) // The legacy mDecryptHandle!=NULL check (for FLAG_PROTECTED) is equivalent to mIsDrmProtected. notifyFlagsChanged( (mIsSecure ? FLAG_SECURE : 0) | (mIsDrmProtected ? FLAG_PROTECTED : 0) | // Setting "protected screen" only for L1: b/38390836 (mIsSecure ? FLAG_PROTECTED : 0) | FLAG_CAN_PAUSE | FLAG_CAN_SEEK_BACKWARD | FLAG_CAN_SEEK_FORWARD | Loading
media/libmediaplayerservice/nuplayer/GenericSource.h +3 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,7 @@ private: int32_t mFetchTimedTextDataGeneration; int64_t mDurationUs; bool mAudioIsVorbis; // Secure codec is required. bool mIsSecure; bool mIsStreaming; bool mUIDValid; Loading Loading @@ -310,7 +311,9 @@ private: bool seeking, bool formatChange, media_track_type trackType, Track *track); // Modular DRM // The source is DRM protected and is prepared for DRM. bool mIsDrmProtected; // releaseDrm has been processed. bool mIsDrmReleased; Vector<String8> mMimes; Loading
media/libmediaplayerservice/nuplayer/NuPlayerSource.h +2 −2 Original line number Diff line number Diff line Loading @@ -38,8 +38,8 @@ struct NuPlayer::Source : public AHandler { FLAG_CAN_SEEK_FORWARD = 4, // the "10 sec forward button" FLAG_CAN_SEEK = 8, // the "seek bar" FLAG_DYNAMIC_DURATION = 16, FLAG_SECURE = 32, FLAG_PROTECTED = 64, FLAG_SECURE = 32, // Secure codec is required. FLAG_PROTECTED = 64, // The screen needs to be protected (screenshot is disabled). }; enum { Loading