| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 typedef base::Callback<void( | 48 typedef base::Callback<void( |
| 49 scoped_ptr<media::VideoCaptureDevice::Client::Buffer>, | 49 scoped_ptr<media::VideoCaptureDevice::Client::Buffer>, |
| 50 const scoped_refptr<media::VideoFrame>&, | 50 const scoped_refptr<media::VideoFrame>&, |
| 51 const base::TimeTicks&)> DecodeDoneCB; | 51 const base::TimeTicks&)> DecodeDoneCB; |
| 52 | 52 |
| 53 // |decode_done_cb| is called on the IO thread when decode succeed. This can | 53 // |decode_done_cb| is called on the IO thread when decode succeed. This can |
| 54 // be on any thread. |decode_done_cb| is never called after | 54 // be on any thread. |decode_done_cb| is never called after |
| 55 // VideoCaptureGpuJpegDecoder is destroyed. | 55 // VideoCaptureGpuJpegDecoder is destroyed. |
| 56 VideoCaptureGpuJpegDecoder(const DecodeDoneCB& decode_done_cb); | 56 explicit VideoCaptureGpuJpegDecoder(const DecodeDoneCB& decode_done_cb); |
| 57 ~VideoCaptureGpuJpegDecoder() override; | 57 ~VideoCaptureGpuJpegDecoder() override; |
| 58 | 58 |
| 59 // Creates and intializes decoder asynchronously. | 59 // Creates and intializes decoder asynchronously. |
| 60 void Initialize(); | 60 void Initialize(); |
| 61 | 61 |
| 62 // Returns initialization status. | 62 // Returns initialization status. |
| 63 STATUS GetStatus() const; | 63 STATUS GetStatus() const; |
| 64 | 64 |
| 65 // Decodes a JPEG picture. | 65 // Decodes a JPEG picture. |
| 66 void DecodeCapturedData( | 66 void DecodeCapturedData( |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 scoped_ptr<base::SharedMemory> in_shared_memory_; | 119 scoped_ptr<base::SharedMemory> in_shared_memory_; |
| 120 | 120 |
| 121 STATUS decoder_status_; | 121 STATUS decoder_status_; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(VideoCaptureGpuJpegDecoder); | 123 DISALLOW_COPY_AND_ASSIGN(VideoCaptureGpuJpegDecoder); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace content | 126 } // namespace content |
| 127 | 127 |
| 128 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ | 128 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_GPU_JPEG_DECODER_H_ |
| OLD | NEW |