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

Side by Side Diff: media/video/video_decode_accelerator.h

Issue 2058113002: Add 'cbcs' encryption scheme support in Android media. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change Android version probing Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "media/base/bitstream_buffer.h" 15 #include "media/base/bitstream_buffer.h"
16 #include "media/base/cdm_context.h" 16 #include "media/base/cdm_context.h"
17 #include "media/base/encryption_scheme.h"
17 #include "media/base/surface_manager.h" 18 #include "media/base/surface_manager.h"
18 #include "media/base/video_decoder_config.h" 19 #include "media/base/video_decoder_config.h"
19 #include "media/video/picture.h" 20 #include "media/video/picture.h"
20 #include "ui/gfx/geometry/size.h" 21 #include "ui/gfx/geometry/size.h"
21 #include "ui/gfx/gpu_memory_buffer.h" 22 #include "ui/gfx/gpu_memory_buffer.h"
22 23
23 typedef unsigned int GLenum; 24 typedef unsigned int GLenum;
24 25
25 namespace base { 26 namespace base {
26 class SingleThreadTaskRunner; 27 class SingleThreadTaskRunner;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 Config(); 123 Config();
123 Config(const Config& config); 124 Config(const Config& config);
124 125
125 // Intentional converting constructor. 126 // Intentional converting constructor.
126 // TODO(watk): Make this explicit. 127 // TODO(watk): Make this explicit.
127 Config(VideoCodecProfile profile); 128 Config(VideoCodecProfile profile);
128 129
129 ~Config(); 130 ~Config();
130 131
131 std::string AsHumanReadableString() const; 132 std::string AsHumanReadableString() const;
133 bool is_encrypted() const { return encryption_scheme.is_encrypted(); }
132 134
133 // The video codec and profile. 135 // The video codec and profile.
134 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN; 136 VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN;
135 137
136 // Whether the stream is encrypted. 138 // Whether the stream is encrypted, and, if so, the scheme used.
137 bool is_encrypted = false; 139 EncryptionScheme encryption_scheme;
138 140
139 // The CDM that the VDA should use to decode encrypted streams. Must be 141 // The CDM that the VDA should use to decode encrypted streams. Must be
140 // set to a valid ID if |is_encrypted|. 142 // set to a valid ID if |is_encrypted|.
141 int cdm_id = CdmContext::kInvalidCdmId; 143 int cdm_id = CdmContext::kInvalidCdmId;
142 144
143 // Whether the client supports deferred initialization. 145 // Whether the client supports deferred initialization.
144 bool is_deferred_initialization_allowed = false; 146 bool is_deferred_initialization_allowed = false;
145 147
146 // An optional graphics surface that the VDA should render to. For setting 148 // An optional graphics surface that the VDA should render to. For setting
147 // an output SurfaceView on Android. It's only valid when not equal to 149 // an output SurfaceView on Android. It's only valid when not equal to
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to 346 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to
345 // use the destructor. 347 // use the destructor.
346 template <> 348 template <>
347 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { 349 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> {
348 void operator()(media::VideoDecodeAccelerator* vda) const; 350 void operator()(media::VideoDecodeAccelerator* vda) const;
349 }; 351 };
350 352
351 } // namespace std 353 } // namespace std
352 354
353 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 355 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698