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

Side by Side Diff: media/gpu/android_video_decode_accelerator.h

Issue 1939683002: Test X11 header pollution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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) 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 MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 6 #define MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <queue> 13 #include <queue>
14 #include <string> 14 #include <string>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
18 #include "base/threading/thread_checker.h" 18 #include "base/threading/thread_checker.h"
19 #include "base/timer/timer.h" 19 #include "base/timer/timer.h"
20 #include "content/common/content_export.h"
21 #include "content/common/gpu/media/avda_state_provider.h"
22 #include "content/common/gpu/media/gpu_video_decode_accelerator_helpers.h"
23 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 20 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
24 #include "gpu/command_buffer/service/gpu_preferences.h" 21 #include "gpu/command_buffer/service/gpu_preferences.h"
25 #include "media/base/android/media_drm_bridge_cdm_context.h" 22 #include "media/base/android/media_drm_bridge_cdm_context.h"
26 #include "media/base/android/sdk_media_codec_bridge.h" 23 #include "media/base/android/sdk_media_codec_bridge.h"
27 #include "media/base/media_keys.h" 24 #include "media/base/media_keys.h"
25 #include "media/gpu/avda_state_provider.h"
26 #include "media/gpu/gpu_video_decode_accelerator_helpers.h"
27 #include "media/gpu/media_gpu_export.h"
28 #include "media/video/video_decode_accelerator.h" 28 #include "media/video/video_decode_accelerator.h"
29 #include "ui/gl/android/scoped_java_surface.h" 29 #include "ui/gl/android/scoped_java_surface.h"
30 30
31 namespace gfx { 31 namespace gfx {
32 class SurfaceTexture; 32 class SurfaceTexture;
33 } 33 }
34 34
35 namespace content { 35 namespace media {
36 36
37 // A VideoDecodeAccelerator implementation for Android. 37 // A VideoDecodeAccelerator implementation for Android.
38 // This class decodes the input encoded stream by using Android's MediaCodec 38 // This class decodes the input encoded stream by using Android's MediaCodec
39 // class. http://developer.android.com/reference/android/media/MediaCodec.html 39 // class. http://developer.android.com/reference/android/media/MediaCodec.html
40 // It delegates attaching pictures to PictureBuffers to a BackingStrategy, but 40 // It delegates attaching pictures to PictureBuffers to a BackingStrategy, but
41 // otherwise handles the work of transferring data to / from MediaCodec. 41 // otherwise handles the work of transferring data to / from MediaCodec.
42 class CONTENT_EXPORT AndroidVideoDecodeAccelerator 42 class MEDIA_GPU_EXPORT AndroidVideoDecodeAccelerator
43 : public media::VideoDecodeAccelerator, 43 : public media::VideoDecodeAccelerator,
44 public AVDAStateProvider { 44 public AVDAStateProvider {
45 public: 45 public:
46 using OutputBufferMap = std::map<int32_t, media::PictureBuffer>; 46 using OutputBufferMap = std::map<int32_t, media::PictureBuffer>;
47 47
48 // A BackingStrategy is responsible for making a PictureBuffer's texture 48 // A BackingStrategy is responsible for making a PictureBuffer's texture
49 // contain the image that a MediaCodec decoder buffer tells it to. 49 // contain the image that a MediaCodec decoder buffer tells it to.
50 class BackingStrategy { 50 class BackingStrategy {
51 public: 51 public:
52 virtual ~BackingStrategy() {} 52 virtual ~BackingStrategy() {}
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 // True if and only if VDA initialization is deferred, and we have not yet 415 // True if and only if VDA initialization is deferred, and we have not yet
416 // called NotifyInitializationComplete. 416 // called NotifyInitializationComplete.
417 bool deferred_initialization_pending_; 417 bool deferred_initialization_pending_;
418 418
419 // WeakPtrFactory for posting tasks back to |this|. 419 // WeakPtrFactory for posting tasks back to |this|.
420 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; 420 base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_;
421 421
422 friend class AndroidVideoDecodeAcceleratorTest; 422 friend class AndroidVideoDecodeAcceleratorTest;
423 }; 423 };
424 424
425 } // namespace content 425 } // namespace media
426 426
427 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 427 #endif // MEDIA_GPU_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « media/gpu/android_deferred_rendering_backing_strategy.cc ('k') | media/gpu/android_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698