Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1187)

Unified Diff: media/base/android/media_codec_video_decoder.h

Issue 1344133002: MediaCodecPlayer implementation - stage 7 (DRM) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-drm-prepare
Patch Set: Renamed a variable Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android/media_codec_player.cc ('k') | media/base/android/media_codec_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_video_decoder.h
diff --git a/media/base/android/media_codec_video_decoder.h b/media/base/android/media_codec_video_decoder.h
index e92da297a6fcffc9aee0bc1044bbcac74623614e..557bccdb92829362810d6f3c3c9ca96bd415d0d2 100644
--- a/media/base/android/media_codec_video_decoder.h
+++ b/media/base/android/media_codec_video_decoder.h
@@ -32,6 +32,7 @@ class MediaCodecVideoDecoder : public MediaCodecDecoder {
const base::Closure& starvation_cb,
const base::Closure& drained_requested_cb,
const base::Closure& stop_done_cb,
+ const base::Closure& waiting_for_decryption_key_cb,
const base::Closure& error_cb,
const SetTimeCallback& update_current_time_cb,
const VideoSizeChangedCallback& video_size_changed_cb,
@@ -42,6 +43,7 @@ class MediaCodecVideoDecoder : public MediaCodecDecoder {
bool HasStream() const override;
void SetDemuxerConfigs(const DemuxerConfigs& configs) override;
+ bool IsContentEncrypted() const override;
void ReleaseDecoderResources() override;
void ReleaseMediaCodec() override;
@@ -51,9 +53,15 @@ class MediaCodecVideoDecoder : public MediaCodecDecoder {
// Returns true if there is a video surface to use.
bool HasVideoSurface() const;
+ // Sets whether protected surface is needed for the currently used DRM.
+ void SetProtectedSurfaceRequired(bool value);
+
+ // Returns true if protected surface is needed.
+ bool IsProtectedSurfaceRequired() const;
+
protected:
bool IsCodecReconfigureNeeded(const DemuxerConfigs& next) const override;
- ConfigStatus ConfigureInternal() override;
+ ConfigStatus ConfigureInternal(jobject media_crypto) override;
void AssociateCurrentTimeWithPTS(base::TimeDelta pts) override;
void DissociatePTSFromTime() override;
void OnOutputFormatChanged() override;
@@ -89,6 +97,9 @@ class MediaCodecVideoDecoder : public MediaCodecDecoder {
// Video surface that we render to.
gfx::ScopedJavaSurface surface_;
+ // Flags that indicates whether we need protected surface.
+ bool is_protected_surface_required_;
+
// Reports current playback time to the callee.
SetTimeCallback update_current_time_cb_;
« no previous file with comments | « media/base/android/media_codec_player.cc ('k') | media/base/android/media_codec_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698