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

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

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

Powered by Google App Engine
This is Rietveld 408576698