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

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

Issue 2892083002: Send enter / exit fullscreen signal to AVDA (Closed)
Patch Set: unit test 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
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" 15 #include "base/optional.h"
16 #include "base/unguessable_token.h" 16 #include "base/unguessable_token.h"
17 #include "media/base/bitstream_buffer.h" 17 #include "media/base/bitstream_buffer.h"
18 #include "media/base/cdm_context.h" 18 #include "media/base/cdm_context.h"
19 #include "media/base/encryption_scheme.h" 19 #include "media/base/encryption_scheme.h"
20 #include "media/base/overlay_info.h"
20 #include "media/base/surface_manager.h" 21 #include "media/base/surface_manager.h"
21 #include "media/base/video_decoder_config.h" 22 #include "media/base/video_decoder_config.h"
22 #include "media/video/picture.h" 23 #include "media/video/picture.h"
23 #include "ui/gfx/geometry/size.h" 24 #include "ui/gfx/geometry/size.h"
24 #include "ui/gfx/gpu_memory_buffer.h" 25 #include "ui/gfx/gpu_memory_buffer.h"
25 26
26 typedef unsigned int GLenum; 27 typedef unsigned int GLenum;
27 28
28 namespace base { 29 namespace base {
29 class SingleThreadTaskRunner; 30 class SingleThreadTaskRunner;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Whether the stream is encrypted, and, if so, the scheme used. 146 // Whether the stream is encrypted, and, if so, the scheme used.
146 EncryptionScheme encryption_scheme; 147 EncryptionScheme encryption_scheme;
147 148
148 // The CDM that the VDA should use to decode encrypted streams. Must be 149 // The CDM that the VDA should use to decode encrypted streams. Must be
149 // set to a valid ID if |is_encrypted|. 150 // set to a valid ID if |is_encrypted|.
150 int cdm_id = CdmContext::kInvalidCdmId; 151 int cdm_id = CdmContext::kInvalidCdmId;
151 152
152 // Whether the client supports deferred initialization. 153 // Whether the client supports deferred initialization.
153 bool is_deferred_initialization_allowed = false; 154 bool is_deferred_initialization_allowed = false;
154 155
156 #if 0
tguilbert 2017/05/24 19:14:54 Intentional?
liberato (no reviews please) 2017/05/24 21:21:07 nope, wanted to be sure that i didn't forget to up
155 // An optional graphics surface that the VDA should render to. For setting 157 // An optional graphics surface that the VDA should render to. For setting
156 // an output SurfaceView on Android. It's only valid when not equal to 158 // an output SurfaceView on Android. It's only valid when not equal to
157 // |kNoSurfaceID|. 159 // |kNoSurfaceID|.
158 // TODO(liberato): should this be Optional<> instead? 160 // TODO(liberato): should this be Optional<> instead?
159 int surface_id = SurfaceManager::kNoSurfaceID; 161 int surface_id = SurfaceManager::kNoSurfaceID;
160 162
161 // An optional routing token for AndroidOverlay. 163 // An optional routing token for AndroidOverlay.
162 base::Optional<base::UnguessableToken> overlay_routing_token; 164 base::Optional<base::UnguessableToken> overlay_routing_token;
165 #endif
166
167 // Optional overlay info available at startup, rather than waiting for the
168 // VDA to receive a callback.
169 OverlayInfo overlay_info;
163 170
164 // Coded size of the video frame hint, subject to change. 171 // Coded size of the video frame hint, subject to change.
165 gfx::Size initial_expected_coded_size = gfx::Size(320, 240); 172 gfx::Size initial_expected_coded_size = gfx::Size(320, 240);
166 173
167 OutputMode output_mode = OutputMode::ALLOCATE; 174 OutputMode output_mode = OutputMode::ALLOCATE;
168 175
169 // The list of picture buffer formats that the client knows how to use. An 176 // The list of picture buffer formats that the client knows how to use. An
170 // empty list means any format is supported. 177 // empty list means any format is supported.
171 std::vector<VideoPixelFormat> supported_output_formats; 178 std::vector<VideoPixelFormat> supported_output_formats;
172 179
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // NotifyFlushDone() and VDA should cancel the flush. Note NotifyFlushDone() 315 // NotifyFlushDone() and VDA should cancel the flush. Note NotifyFlushDone()
309 // may be on the way to the client. If client gets NotifyFlushDone(), it 316 // may be on the way to the client. If client gets NotifyFlushDone(), it
310 // should be before NotifyResetDone(). 317 // should be before NotifyResetDone().
311 virtual void Reset() = 0; 318 virtual void Reset() = 0;
312 319
313 // An optional graphics surface that the VDA should render to. For setting 320 // An optional graphics surface that the VDA should render to. For setting
314 // an output SurfaceView on Android. Passing |kNoSurfaceID| will clear any 321 // an output SurfaceView on Android. Passing |kNoSurfaceID| will clear any
315 // previously set surface in favor of an internally generated texture. 322 // previously set surface in favor of an internally generated texture.
316 // |routing_token| is an optional AndroidOverlay routing token. At most one 323 // |routing_token| is an optional AndroidOverlay routing token. At most one
317 // should be non-empty. 324 // should be non-empty.
318 virtual void SetSurface( 325 virtual void SetOverlayInfo(const OverlayInfo& overlay_info);
319 int32_t surface_id,
320 const base::Optional<base::UnguessableToken>& routing_token);
321 326
322 // Destroys the decoder: all pending inputs are dropped immediately and the 327 // Destroys the decoder: all pending inputs are dropped immediately and the
323 // component is freed. This call may asynchornously free system resources, 328 // component is freed. This call may asynchornously free system resources,
324 // but its client-visible effects are synchronous. After this method returns 329 // but its client-visible effects are synchronous. After this method returns
325 // no more callbacks will be made on the client. Deletes |this| 330 // no more callbacks will be made on the client. Deletes |this|
326 // unconditionally, so make sure to drop all pointers to it! 331 // unconditionally, so make sure to drop all pointers to it!
327 virtual void Destroy() = 0; 332 virtual void Destroy() = 0;
328 333
329 // TO BE CALLED IN THE SAME PROCESS AS THE VDA IMPLEMENTATION ONLY. 334 // TO BE CALLED IN THE SAME PROCESS AS THE VDA IMPLEMENTATION ONLY.
330 // 335 //
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to 383 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to
379 // use the destructor. 384 // use the destructor.
380 template <> 385 template <>
381 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { 386 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> {
382 void operator()(media::VideoDecodeAccelerator* vda) const; 387 void operator()(media::VideoDecodeAccelerator* vda) const;
383 }; 388 };
384 389
385 } // namespace std 390 } // namespace std
386 391
387 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 392 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698