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

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

Issue 2849043002: Send AndroidOverlay routing token from WMPI to AVDA. (Closed)
Patch Set: rebased Created 3 years, 7 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
« no previous file with comments | « media/renderers/default_renderer_factory.cc ('k') | media/video/video_decode_accelerator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/optional.h"
16 #include "base/unguessable_token.h"
15 #include "media/base/bitstream_buffer.h" 17 #include "media/base/bitstream_buffer.h"
16 #include "media/base/cdm_context.h" 18 #include "media/base/cdm_context.h"
17 #include "media/base/encryption_scheme.h" 19 #include "media/base/encryption_scheme.h"
18 #include "media/base/surface_manager.h" 20 #include "media/base/surface_manager.h"
19 #include "media/base/video_decoder_config.h" 21 #include "media/base/video_decoder_config.h"
20 #include "media/video/picture.h" 22 #include "media/video/picture.h"
21 #include "ui/gfx/geometry/size.h" 23 #include "ui/gfx/geometry/size.h"
22 #include "ui/gfx/gpu_memory_buffer.h" 24 #include "ui/gfx/gpu_memory_buffer.h"
23 25
24 typedef unsigned int GLenum; 26 typedef unsigned int GLenum;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // The CDM that the VDA should use to decode encrypted streams. Must be 148 // The CDM that the VDA should use to decode encrypted streams. Must be
147 // set to a valid ID if |is_encrypted|. 149 // set to a valid ID if |is_encrypted|.
148 int cdm_id = CdmContext::kInvalidCdmId; 150 int cdm_id = CdmContext::kInvalidCdmId;
149 151
150 // Whether the client supports deferred initialization. 152 // Whether the client supports deferred initialization.
151 bool is_deferred_initialization_allowed = false; 153 bool is_deferred_initialization_allowed = false;
152 154
153 // An optional graphics surface that the VDA should render to. For setting 155 // An optional graphics surface that the VDA should render to. For setting
154 // an output SurfaceView on Android. It's only valid when not equal to 156 // an output SurfaceView on Android. It's only valid when not equal to
155 // |kNoSurfaceID|. 157 // |kNoSurfaceID|.
158 // TODO(liberato): should this be Optional<> instead?
156 int surface_id = SurfaceManager::kNoSurfaceID; 159 int surface_id = SurfaceManager::kNoSurfaceID;
157 160
161 // An optional routing token for AndroidOverlay.
162 base::Optional<base::UnguessableToken> overlay_routing_token;
163
158 // Coded size of the video frame hint, subject to change. 164 // Coded size of the video frame hint, subject to change.
159 gfx::Size initial_expected_coded_size = gfx::Size(320, 240); 165 gfx::Size initial_expected_coded_size = gfx::Size(320, 240);
160 166
161 OutputMode output_mode = OutputMode::ALLOCATE; 167 OutputMode output_mode = OutputMode::ALLOCATE;
162 168
163 // The list of picture buffer formats that the client knows how to use. An 169 // The list of picture buffer formats that the client knows how to use. An
164 // empty list means any format is supported. 170 // empty list means any format is supported.
165 std::vector<VideoPixelFormat> supported_output_formats; 171 std::vector<VideoPixelFormat> supported_output_formats;
166 172
167 // The H264 SPS and PPS configuration data. Not all clients populate these 173 // The H264 SPS and PPS configuration data. Not all clients populate these
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // NotifyResetDone() being called on the client. Can be used to implement 306 // NotifyResetDone() being called on the client. Can be used to implement
301 // "seek". After Flush is called, it is OK to call Reset before receiving 307 // "seek". After Flush is called, it is OK to call Reset before receiving
302 // NotifyFlushDone() and VDA should cancel the flush. Note NotifyFlushDone() 308 // NotifyFlushDone() and VDA should cancel the flush. Note NotifyFlushDone()
303 // may be on the way to the client. If client gets NotifyFlushDone(), it 309 // may be on the way to the client. If client gets NotifyFlushDone(), it
304 // should be before NotifyResetDone(). 310 // should be before NotifyResetDone().
305 virtual void Reset() = 0; 311 virtual void Reset() = 0;
306 312
307 // An optional graphics surface that the VDA should render to. For setting 313 // An optional graphics surface that the VDA should render to. For setting
308 // an output SurfaceView on Android. Passing |kNoSurfaceID| will clear any 314 // an output SurfaceView on Android. Passing |kNoSurfaceID| will clear any
309 // previously set surface in favor of an internally generated texture. 315 // previously set surface in favor of an internally generated texture.
310 virtual void SetSurface(int32_t surface_id); 316 // |routing_token| is an optional AndroidOverlay routing token. At most one
317 // should be non-empty.
318 virtual void SetSurface(
319 int32_t surface_id,
320 const base::Optional<base::UnguessableToken>& routing_token);
311 321
312 // Destroys the decoder: all pending inputs are dropped immediately and the 322 // Destroys the decoder: all pending inputs are dropped immediately and the
313 // component is freed. This call may asynchornously free system resources, 323 // component is freed. This call may asynchornously free system resources,
314 // but its client-visible effects are synchronous. After this method returns 324 // but its client-visible effects are synchronous. After this method returns
315 // no more callbacks will be made on the client. Deletes |this| 325 // no more callbacks will be made on the client. Deletes |this|
316 // unconditionally, so make sure to drop all pointers to it! 326 // unconditionally, so make sure to drop all pointers to it!
317 virtual void Destroy() = 0; 327 virtual void Destroy() = 0;
318 328
319 // TO BE CALLED IN THE SAME PROCESS AS THE VDA IMPLEMENTATION ONLY. 329 // TO BE CALLED IN THE SAME PROCESS AS THE VDA IMPLEMENTATION ONLY.
320 // 330 //
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to 378 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to
369 // use the destructor. 379 // use the destructor.
370 template <> 380 template <>
371 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { 381 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> {
372 void operator()(media::VideoDecodeAccelerator* vda) const; 382 void operator()(media::VideoDecodeAccelerator* vda) const;
373 }; 383 };
374 384
375 } // namespace std 385 } // namespace std
376 386
377 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 387 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « media/renderers/default_renderer_factory.cc ('k') | media/video/video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698