| 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 // This file contains an implementation of VideoDecodeAccelerator | 5 // This file contains an implementation of VideoDecodeAccelerator |
| 6 // that utilizes hardware video decoders, which expose Video4Linux 2 API | 6 // that utilizes hardware video decoders, which expose Video4Linux 2 API |
| 7 // (http://linuxtv.org/downloads/v4l-dvb-apis/). | 7 // (http://linuxtv.org/downloads/v4l-dvb-apis/). |
| 8 | 8 |
| 9 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 9 #ifndef CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| 10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 10 #define CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 V4L2VideoDecodeAccelerator( | 78 V4L2VideoDecodeAccelerator( |
| 79 EGLDisplay egl_display, | 79 EGLDisplay egl_display, |
| 80 EGLContext egl_context, | 80 EGLContext egl_context, |
| 81 const base::WeakPtr<Client>& io_client_, | 81 const base::WeakPtr<Client>& io_client_, |
| 82 const base::Callback<bool(void)>& make_context_current, | 82 const base::Callback<bool(void)>& make_context_current, |
| 83 scoped_ptr<V4L2Device> device, | 83 scoped_ptr<V4L2Device> device, |
| 84 const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy); | 84 const scoped_refptr<base::MessageLoopProxy>& io_message_loop_proxy); |
| 85 virtual ~V4L2VideoDecodeAccelerator(); | 85 virtual ~V4L2VideoDecodeAccelerator(); |
| 86 | 86 |
| 87 // media::VideoDecodeAccelerator implementation. | 87 // media::VideoDecodeAccelerator implementation. |
| 88 static std::vector<media::VideoDecodeAccelerator::SupportedProfile> |
| 89 GetSupportedProfiles(); |
| 88 // Note: Initialize() and Destroy() are synchronous. | 90 // Note: Initialize() and Destroy() are synchronous. |
| 89 virtual bool Initialize(media::VideoCodecProfile profile, | 91 virtual bool Initialize(media::VideoCodecProfile profile, |
| 90 Client* client) override; | 92 Client* client) override; |
| 91 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 93 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
| 92 virtual void AssignPictureBuffers( | 94 virtual void AssignPictureBuffers( |
| 93 const std::vector<media::PictureBuffer>& buffers) override; | 95 const std::vector<media::PictureBuffer>& buffers) override; |
| 94 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; | 96 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; |
| 95 virtual void Flush() override; | 97 virtual void Flush() override; |
| 96 virtual void Reset() override; | 98 virtual void Reset() override; |
| 97 virtual void Destroy() override; | 99 virtual void Destroy() override; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 | 439 |
| 438 // The WeakPtrFactory for |weak_this_|. | 440 // The WeakPtrFactory for |weak_this_|. |
| 439 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; | 441 base::WeakPtrFactory<V4L2VideoDecodeAccelerator> weak_this_factory_; |
| 440 | 442 |
| 441 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); | 443 DISALLOW_COPY_AND_ASSIGN(V4L2VideoDecodeAccelerator); |
| 442 }; | 444 }; |
| 443 | 445 |
| 444 } // namespace content | 446 } // namespace content |
| 445 | 447 |
| 446 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ | 448 #endif // CONTENT_COMMON_GPU_MEDIA_V4L2_VIDEO_DECODE_ACCELERATOR_H_ |
| OLD | NEW |