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

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

Issue 170843004: Pass Client pointer in Initialize() for VDA/VEA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 50e826de Rebase. Created 6 years, 9 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 | Annotate | Revision Log
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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 16 matching lines...) Expand all
27 27
28 namespace content { 28 namespace content {
29 // A VideoDecodeAccelerator implementation for Android. 29 // A VideoDecodeAccelerator implementation for Android.
30 // 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
31 // class. http://developer.android.com/reference/android/media/MediaCodec.html 31 // class. http://developer.android.com/reference/android/media/MediaCodec.html
32 class CONTENT_EXPORT AndroidVideoDecodeAccelerator 32 class CONTENT_EXPORT AndroidVideoDecodeAccelerator
33 : public VideoDecodeAcceleratorImpl { 33 : public VideoDecodeAcceleratorImpl {
34 public: 34 public:
35 // Does not take ownership of |client| which must outlive |*this|. 35 // Does not take ownership of |client| which must outlive |*this|.
36 AndroidVideoDecodeAccelerator( 36 AndroidVideoDecodeAccelerator(
37 media::VideoDecodeAccelerator::Client* client,
38 const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder, 37 const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder,
39 const base::Callback<bool(void)>& make_context_current); 38 const base::Callback<bool(void)>& make_context_current);
40 39
41 // media::VideoDecodeAccelerator implementation. 40 // media::VideoDecodeAccelerator implementation.
42 virtual bool Initialize(media::VideoCodecProfile profile) OVERRIDE; 41 virtual bool Initialize(media::VideoCodecProfile profile,
42 Client* client) OVERRIDE;
43 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; 43 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE;
44 virtual void AssignPictureBuffers( 44 virtual void AssignPictureBuffers(
45 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; 45 const std::vector<media::PictureBuffer>& buffers) OVERRIDE;
46 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; 46 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE;
47 virtual void Flush() OVERRIDE; 47 virtual void Flush() OVERRIDE;
48 virtual void Reset() OVERRIDE; 48 virtual void Reset() OVERRIDE;
49 virtual void Destroy() OVERRIDE; 49 virtual void Destroy() OVERRIDE;
50 50
51 private: 51 private:
52 enum State { 52 enum State {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // Repeating timer responsible for draining pending IO to the codec. 164 // Repeating timer responsible for draining pending IO to the codec.
165 base::RepeatingTimer<AndroidVideoDecodeAccelerator> io_timer_; 165 base::RepeatingTimer<AndroidVideoDecodeAccelerator> io_timer_;
166 166
167 friend class AndroidVideoDecodeAcceleratorTest; 167 friend class AndroidVideoDecodeAcceleratorTest;
168 }; 168 };
169 169
170 } // namespace content 170 } // namespace content
171 171
172 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_ 172 #endif // CONTENT_COMMON_GPU_MEDIA_ANDROID_VIDEO_DECODE_ACCELERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698