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

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

Issue 2892083002: Send enter / exit fullscreen signal to AVDA (Closed)
Patch Set: added constructor tests 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
155 // An optional graphics surface that the VDA should render to. For setting 156 // Optional overlay info available at startup, rather than waiting for the
156 // an output SurfaceView on Android. It's only valid when not equal to 157 // VDA to receive a callback.
157 // |kNoSurfaceID|. 158 OverlayInfo overlay_info;
158 // TODO(liberato): should this be Optional<> instead?
159 int surface_id = SurfaceManager::kNoSurfaceID;
160
161 // An optional routing token for AndroidOverlay.
162 base::Optional<base::UnguessableToken> overlay_routing_token;
163 159
164 // Coded size of the video frame hint, subject to change. 160 // Coded size of the video frame hint, subject to change.
165 gfx::Size initial_expected_coded_size = gfx::Size(320, 240); 161 gfx::Size initial_expected_coded_size = gfx::Size(320, 240);
166 162
167 OutputMode output_mode = OutputMode::ALLOCATE; 163 OutputMode output_mode = OutputMode::ALLOCATE;
168 164
169 // The list of picture buffer formats that the client knows how to use. An 165 // The list of picture buffer formats that the client knows how to use. An
170 // empty list means any format is supported. 166 // empty list means any format is supported.
171 std::vector<VideoPixelFormat> supported_output_formats; 167 std::vector<VideoPixelFormat> supported_output_formats;
172 168
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 // NotifyFlushDone() and VDA should cancel the flush. Note NotifyFlushDone() 304 // NotifyFlushDone() and VDA should cancel the flush. Note NotifyFlushDone()
309 // may be on the way to the client. If client gets NotifyFlushDone(), it 305 // may be on the way to the client. If client gets NotifyFlushDone(), it
310 // should be before NotifyResetDone(). 306 // should be before NotifyResetDone().
311 virtual void Reset() = 0; 307 virtual void Reset() = 0;
312 308
313 // An optional graphics surface that the VDA should render to. For setting 309 // An optional graphics surface that the VDA should render to. For setting
314 // an output SurfaceView on Android. Passing |kNoSurfaceID| will clear any 310 // an output SurfaceView on Android. Passing |kNoSurfaceID| will clear any
315 // previously set surface in favor of an internally generated texture. 311 // previously set surface in favor of an internally generated texture.
316 // |routing_token| is an optional AndroidOverlay routing token. At most one 312 // |routing_token| is an optional AndroidOverlay routing token. At most one
317 // should be non-empty. 313 // should be non-empty.
318 virtual void SetSurface( 314 virtual void SetOverlayInfo(const OverlayInfo& overlay_info);
319 int32_t surface_id,
320 const base::Optional<base::UnguessableToken>& routing_token);
321 315
322 // Destroys the decoder: all pending inputs are dropped immediately and the 316 // Destroys the decoder: all pending inputs are dropped immediately and the
323 // component is freed. This call may asynchornously free system resources, 317 // component is freed. This call may asynchornously free system resources,
324 // but its client-visible effects are synchronous. After this method returns 318 // but its client-visible effects are synchronous. After this method returns
325 // no more callbacks will be made on the client. Deletes |this| 319 // no more callbacks will be made on the client. Deletes |this|
326 // unconditionally, so make sure to drop all pointers to it! 320 // unconditionally, so make sure to drop all pointers to it!
327 virtual void Destroy() = 0; 321 virtual void Destroy() = 0;
328 322
329 // TO BE CALLED IN THE SAME PROCESS AS THE VDA IMPLEMENTATION ONLY. 323 // TO BE CALLED IN THE SAME PROCESS AS THE VDA IMPLEMENTATION ONLY.
330 // 324 //
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to 372 // std::unique_ptr<VideoDecodeAccelerator> uses "Destroy()" instead of trying to
379 // use the destructor. 373 // use the destructor.
380 template <> 374 template <>
381 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> { 375 struct MEDIA_EXPORT default_delete<media::VideoDecodeAccelerator> {
382 void operator()(media::VideoDecodeAccelerator* vda) const; 376 void operator()(media::VideoDecodeAccelerator* vda) const;
383 }; 377 };
384 378
385 } // namespace std 379 } // namespace std
386 380
387 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_ 381 #endif // MEDIA_VIDEO_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698