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

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

Issue 23125014: Run VDA::Decode on GPU IO thread if VDA supports it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use filter_.get() to decide whether RemoveFilter should be called Created 7 years, 3 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 CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 6 #define CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
7 7
8 #include <dlfcn.h> 8 #include <dlfcn.h>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
11 #include <queue> 11 #include <queue>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
16 #include "base/threading/thread_checker.h" 16 #include "base/threading/thread_checker.h"
17 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
18 #include "content/common/gpu/media/video_decode_accelerator_impl.h"
18 #include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h" 19 #include "gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h"
19 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 20 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
20 #include "media/base/android/media_codec_bridge.h" 21 #include "media/base/android/media_codec_bridge.h"
21 #include "media/video/video_decode_accelerator.h" 22 #include "media/video/video_decode_accelerator.h"
22 23
23 namespace gfx { 24 namespace gfx {
24 class SurfaceTextureBridge; 25 class SurfaceTextureBridge;
25 } 26 }
26 27
27 namespace content { 28 namespace content {
28 // A VideoDecodeAccelerator implementation for Android. 29 // A VideoDecodeAccelerator implementation for Android.
29 // This class decodes the input encoded stream by using Android's MediaCodec 30 // This class decodes the input encoded stream by using Android's MediaCodec
30 // class. http://developer.android.com/reference/android/media/MediaCodec.html 31 // class. http://developer.android.com/reference/android/media/MediaCodec.html
31 class CONTENT_EXPORT AndroidVideoDecodeAccelerator : 32 class CONTENT_EXPORT AndroidVideoDecodeAccelerator
32 public media::VideoDecodeAccelerator { 33 : public VideoDecodeAcceleratorImpl {
33 public: 34 public:
34 // Does not take ownership of |client| which must outlive |*this|. 35 // Does not take ownership of |client| which must outlive |*this|.
35 AndroidVideoDecodeAccelerator( 36 AndroidVideoDecodeAccelerator(
36 media::VideoDecodeAccelerator::Client* client, 37 media::VideoDecodeAccelerator::Client* client,
37 const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder, 38 const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder,
38 const base::Callback<bool(void)>& make_context_current); 39 const base::Callback<bool(void)>& make_context_current);
39 40
40 // media::VideoDecodeAccelerator implementation. 41 // media::VideoDecodeAccelerator implementation.
41 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE; 42 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE;
42 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; 43 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 163
163 // Used for copy the texture from |surface_texture_| to picture buffers. 164 // Used for copy the texture from |surface_texture_| to picture buffers.
164 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_; 165 scoped_ptr<gpu::CopyTextureCHROMIUMResourceManager> copier_;
165 166
166 friend class AndroidVideoDecodeAcceleratorTest; 167 friend class AndroidVideoDecodeAcceleratorTest;
167 }; 168 };
168 169
169 } // namespace content 170 } // namespace content
170 171
171 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 172 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/media/dxva_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698