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

Unified Diff: media/video/video_decode_accelerator.h

Issue 1485043002: Passed is_encrypted parameter to the VDA initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years 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/video/mock_video_decode_accelerator.h ('k') | media/video/video_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/video_decode_accelerator.h
diff --git a/media/video/video_decode_accelerator.h b/media/video/video_decode_accelerator.h
index e2bcdf64855fdf3455fc0a3b73ae2b59c2e928e6..da184ee2d46247169282e08793638e64aa18cc81 100644
--- a/media/video/video_decode_accelerator.h
+++ b/media/video/video_decode_accelerator.h
@@ -53,6 +53,19 @@ class MEDIA_EXPORT VideoDecodeAccelerator {
LARGEST_ERROR_ENUM,
};
+ // Config structure contains parameters required for the VDA initialization.
+ struct MEDIA_EXPORT Config {
+ Config() = default;
+ Config(VideoCodecProfile profile);
+ Config(const VideoDecoderConfig& video_decoder_config);
+
+ // |profile| combines the information about the codec and its profile.
+ VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN;
+
+ // The flag indicating whether the stream is encrypted.
+ bool is_encrypted = false;
+ };
+
// Interface for collaborating with picture interface to provide memory for
// output picture and blitting them. These callbacks will not be made unless
// Initialize() has returned successfully.
@@ -111,10 +124,10 @@ class MEDIA_EXPORT VideoDecodeAccelerator {
// attached can we start to decode.
//
// Parameters:
- // |profile| is the video stream's format profile.
+ // |config| contains the initialization parameters.
// |client| is the client of this video decoder. Does not take ownership of
// |client| which must be valid until Destroy() is called.
- virtual bool Initialize(VideoCodecProfile profile, Client* client) = 0;
+ virtual bool Initialize(const Config& config, Client* client) = 0;
// Sets a CDM to be used by the decoder to decode encrypted buffers.
// Client::NotifyCdmAttached() will then be called to indicate whether the CDM
« no previous file with comments | « media/video/mock_video_decode_accelerator.h ('k') | media/video/video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698