| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Implementation of VideoCaptureJpegDecoder: | 49 // Implementation of VideoCaptureJpegDecoder: |
| 50 void Initialize() override; | 50 void Initialize() override; |
| 51 STATUS GetStatus() const override; | 51 STATUS GetStatus() const override; |
| 52 void DecodeCapturedData( | 52 void DecodeCapturedData( |
| 53 const uint8_t* data, | 53 const uint8_t* data, |
| 54 size_t in_buffer_size, | 54 size_t in_buffer_size, |
| 55 const media::VideoCaptureFormat& frame_format, | 55 const media::VideoCaptureFormat& frame_format, |
| 56 base::TimeTicks reference_time, | 56 base::TimeTicks reference_time, |
| 57 base::TimeDelta timestamp, | 57 base::TimeDelta timestamp, |
| 58 media::VideoCaptureDevice::Client::Buffer out_buffer) override; | 58 std::unique_ptr<media::VideoCaptureDevice::Client::Buffer> out_buffer) |
| 59 override; |
| 59 | 60 |
| 60 // JpegDecodeAccelerator::Client implementation. | 61 // JpegDecodeAccelerator::Client implementation. |
| 61 // These will be called on IO thread. | 62 // These will be called on IO thread. |
| 62 void VideoFrameReady(int32_t buffer_id) override; | 63 void VideoFrameReady(int32_t buffer_id) override; |
| 63 void NotifyError(int32_t buffer_id, | 64 void NotifyError(int32_t buffer_id, |
| 64 media::JpegDecodeAccelerator::Error error) override; | 65 media::JpegDecodeAccelerator::Error error) override; |
| 65 | 66 |
| 66 private: | 67 private: |
| 67 // Initialization helper, to establish GPU channel. | 68 // Initialization helper, to establish GPU channel. |
| 68 static void EstablishGpuChannelOnUIThread( | 69 static void EstablishGpuChannelOnUIThread( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 std::unique_ptr<base::SharedMemory> in_shared_memory_; | 109 std::unique_ptr<base::SharedMemory> in_shared_memory_; |
| 109 | 110 |
| 110 STATUS decoder_status_; | 111 STATUS decoder_status_; |
| 111 | 112 |
| 112 DISALLOW_COPY_AND_ASSIGN(VideoCaptureGpuJpegDecoder); | 113 DISALLOW_COPY_AND_ASSIGN(VideoCaptureGpuJpegDecoder); |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 } // namespace content | 116 } // namespace content |
| 116 | 117 |
| 117 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ | 118 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ |
| OLD | NEW |