OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FAKE_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "media/video/video_decode_accelerator.h" | 13 #include "media/video/video_decode_accelerator.h" |
14 #include "ui/gfx/geometry/size_f.h" | 14 #include "ui/gfx/geometry/size_f.h" |
15 #include "ui/gl/gl_context.h" | 15 #include "ui/gl/gl_context.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 class CONTENT_EXPORT FakeVideoDecodeAccelerator | 19 class CONTENT_EXPORT FakeVideoDecodeAccelerator |
20 : public media::VideoDecodeAccelerator { | 20 : public media::VideoDecodeAccelerator { |
21 public: | 21 public: |
22 FakeVideoDecodeAccelerator( | 22 FakeVideoDecodeAccelerator( |
23 gfx::GLContext* gl, | 23 gfx::GLContext* gl, |
24 gfx::Size size, | 24 gfx::Size size, |
25 const base::Callback<bool(void)>& make_context_current); | 25 const base::Callback<bool(void)>& make_context_current); |
26 ~FakeVideoDecodeAccelerator() override; | 26 ~FakeVideoDecodeAccelerator() override; |
27 | 27 |
28 bool Initialize(media::VideoCodecProfile profile, | 28 bool Initialize(media::VideoCodecProfile profile, |
| 29 uint32 min_picture_count, |
29 Client* client) override; | 30 Client* client) override; |
30 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 31 void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
31 void AssignPictureBuffers( | 32 void AssignPictureBuffers( |
32 const std::vector<media::PictureBuffer>& buffers) override; | 33 const std::vector<media::PictureBuffer>& buffers) override; |
33 void ReusePictureBuffer(int32 picture_buffer_id) override; | 34 void ReusePictureBuffer(int32 picture_buffer_id) override; |
34 void Flush() override; | 35 void Flush() override; |
35 void Reset() override; | 36 void Reset() override; |
36 void Destroy() override; | 37 void Destroy() override; |
37 bool CanDecodeOnIOThread() override; | 38 bool CanDecodeOnIOThread() override; |
38 | 39 |
(...skipping 23 matching lines...) Expand all Loading... |
62 | 63 |
63 // The WeakPtrFactory for |weak_this_|. | 64 // The WeakPtrFactory for |weak_this_|. |
64 base::WeakPtrFactory<FakeVideoDecodeAccelerator> weak_this_factory_; | 65 base::WeakPtrFactory<FakeVideoDecodeAccelerator> weak_this_factory_; |
65 | 66 |
66 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecodeAccelerator); | 67 DISALLOW_COPY_AND_ASSIGN(FakeVideoDecodeAccelerator); |
67 }; | 68 }; |
68 | 69 |
69 } // namespace content | 70 } // namespace content |
70 | 71 |
71 #endif // CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_ | 72 #endif // CONTENT_COMMON_GPU_MEDIA_FAKE_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |