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

Side by Side Diff: content/common/gpu/media/android_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: Deleted erroneously added files 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 5 #ifndef CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 }; 88 };
89 89
90 AndroidVideoDecodeAccelerator( 90 AndroidVideoDecodeAccelerator(
91 const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder, 91 const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder,
92 const base::Callback<bool(void)>& make_context_current, 92 const base::Callback<bool(void)>& make_context_current,
93 scoped_ptr<BackingStrategy> strategy); 93 scoped_ptr<BackingStrategy> strategy);
94 94
95 ~AndroidVideoDecodeAccelerator() override; 95 ~AndroidVideoDecodeAccelerator() override;
96 96
97 // media::VideoDecodeAccelerator implementation: 97 // media::VideoDecodeAccelerator implementation:
98 bool Initialize(media::VideoCodecProfile profile, Client* client) override; 98 bool Initialize(const media::VideoDecodeAccelerator::InitParams& params,
99 Client* client) override;
99 void SetCdm(int cdm_id) override; 100 void SetCdm(int cdm_id) override;
100 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; 101 void Decode(const media::BitstreamBuffer& bitstream_buffer) override;
101 void AssignPictureBuffers( 102 void AssignPictureBuffers(
102 const std::vector<media::PictureBuffer>& buffers) override; 103 const std::vector<media::PictureBuffer>& buffers) override;
103 void ReusePictureBuffer(int32 picture_buffer_id) override; 104 void ReusePictureBuffer(int32 picture_buffer_id) override;
104 void Flush() override; 105 void Flush() override;
105 void Reset() override; 106 void Reset() override;
106 void Destroy() override; 107 void Destroy() override;
107 bool CanDecodeOnIOThread() override; 108 bool CanDecodeOnIOThread() override;
108 109
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 172
172 // To expose client callbacks from VideoDecodeAccelerator. 173 // To expose client callbacks from VideoDecodeAccelerator.
173 Client* client_; 174 Client* client_;
174 175
175 // Callback to set the correct gl context. 176 // Callback to set the correct gl context.
176 base::Callback<bool(void)> make_context_current_; 177 base::Callback<bool(void)> make_context_current_;
177 178
178 // Codec type. Used when we configure media codec. 179 // Codec type. Used when we configure media codec.
179 media::VideoCodec codec_; 180 media::VideoCodec codec_;
180 181
182 // Whether the stream is encrypted.
183 bool is_encrypted_;
184
181 // The current state of this class. For now, this is used only for setting 185 // The current state of this class. For now, this is used only for setting
182 // error state. 186 // error state.
183 State state_; 187 State state_;
184 188
185 // This map maintains the picture buffers passed to the client for decoding. 189 // This map maintains the picture buffers passed to the client for decoding.
186 // The key is the picture buffer id. 190 // The key is the picture buffer id.
187 OutputBufferMap output_picture_buffers_; 191 OutputBufferMap output_picture_buffers_;
188 192
189 // This keeps the free picture buffer ids which can be used for sending 193 // This keeps the free picture buffer ids which can be used for sending
190 // decoded frames to the client. 194 // decoded frames to the client.
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 239
236 // WeakPtrFactory for posting tasks back to |this|. 240 // WeakPtrFactory for posting tasks back to |this|.
237 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; 241 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_;
238 242
239 friend class AndroidVideoDecodeAcceleratorTest; 243 friend class AndroidVideoDecodeAcceleratorTest;
240 }; 244 };
241 245
242 } // namespace content 246 } // namespace content
243 247
244 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 248 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698