| OLD | NEW | 
|    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 20 matching lines...) Expand all  Loading... | 
|   31 class CONTENT_EXPORT AndroidVideoDecodeAccelerator |   31 class CONTENT_EXPORT AndroidVideoDecodeAccelerator | 
|   32     : public media::VideoDecodeAccelerator { |   32     : public media::VideoDecodeAccelerator { | 
|   33  public: |   33  public: | 
|   34   // Does not take ownership of |client| which must outlive |*this|. |   34   // Does not take ownership of |client| which must outlive |*this|. | 
|   35   AndroidVideoDecodeAccelerator( |   35   AndroidVideoDecodeAccelerator( | 
|   36       const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder, |   36       const base::WeakPtr<gpu::gles2::GLES2Decoder> decoder, | 
|   37       const base::Callback<bool(void)>& make_context_current); |   37       const base::Callback<bool(void)>& make_context_current); | 
|   38  |   38  | 
|   39   // media::VideoDecodeAccelerator implementation. |   39   // media::VideoDecodeAccelerator implementation. | 
|   40   virtual bool Initialize(media::VideoCodecProfile profile, |   40   virtual bool Initialize(media::VideoCodecProfile profile, | 
|   41                           Client* client) OVERRIDE; |   41                           Client* client) override; | 
|   42   virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; |   42   virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 
|   43   virtual void AssignPictureBuffers( |   43   virtual void AssignPictureBuffers( | 
|   44       const std::vector<media::PictureBuffer>& buffers) OVERRIDE; |   44       const std::vector<media::PictureBuffer>& buffers) override; | 
|   45   virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; |   45   virtual void ReusePictureBuffer(int32 picture_buffer_id) override; | 
|   46   virtual void Flush() OVERRIDE; |   46   virtual void Flush() override; | 
|   47   virtual void Reset() OVERRIDE; |   47   virtual void Reset() override; | 
|   48   virtual void Destroy() OVERRIDE; |   48   virtual void Destroy() override; | 
|   49   virtual bool CanDecodeOnIOThread() OVERRIDE; |   49   virtual bool CanDecodeOnIOThread() override; | 
|   50  |   50  | 
|   51  private: |   51  private: | 
|   52   enum State { |   52   enum State { | 
|   53     NO_ERROR, |   53     NO_ERROR, | 
|   54     ERROR, |   54     ERROR, | 
|   55   }; |   55   }; | 
|   56  |   56  | 
|   57   static const base::TimeDelta kDecodePollDelay; |   57   static const base::TimeDelta kDecodePollDelay; | 
|   58  |   58  | 
|   59   virtual ~AndroidVideoDecodeAccelerator(); |   59   virtual ~AndroidVideoDecodeAccelerator(); | 
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  163  |  163  | 
|  164   // WeakPtrFactory for posting tasks back to |this|. |  164   // WeakPtrFactory for posting tasks back to |this|. | 
|  165   base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; |  165   base::WeakPtrFactory<AndroidVideoDecodeAccelerator> weak_this_factory_; | 
|  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_ | 
| OLD | NEW |