Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: content/common/gpu/client/gpu_jpeg_decode_accelerator_host.h

Issue 1132683004: MJPEG acceleration for video capture, browser part (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mjpeg-2-gpu
Patch Set: fix compile for clang/windows/mac Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_COMMON_GPU_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/threading/non_thread_safe.h" 9 #include "base/threading/non_thread_safe.h"
10 #include "media/video/jpeg_decode_accelerator.h" 10 #include "media/video/jpeg_decode_accelerator.h"
11 11
12 namespace base { 12 namespace base {
13 class SingleThreadTaskRunner; 13 class SingleThreadTaskRunner;
14 } 14 }
15 15
16 namespace IPC { 16 namespace IPC {
17 class Listener; 17 class Listener;
18 class Message; 18 class Message;
19 } 19 }
20 20
21 namespace content { 21 namespace content {
22 class GpuChannelHost; 22 class GpuChannelHost;
23 23
24 // This class is used to talk to JpegDecodeAccelerator in the GPU process 24 // This class is used to talk to JpegDecodeAccelerator in the GPU process
25 // through IPC messages. 25 // through IPC messages.
26 class GpuJpegDecodeAcceleratorHost : public media::JpegDecodeAccelerator, 26 class GpuJpegDecodeAcceleratorHost : public media::JpegDecodeAccelerator,
27 public base::NonThreadSafe { 27 public base::NonThreadSafe {
28 public: 28 public:
29 // GpuJpegDecoder owns |this| and |channel|. And GpuJpegDecoder delete |this| 29 // VideoCaptureGpuJpegDecoder owns |this| and |channel|. And
30 // before |channel|. So |this| is guaranteed not to outlive |channel|. 30 // VideoCaptureGpuJpegDecoder delete |this| before |channel|. So |this| is
31 // guaranteed not to outlive |channel|.
31 GpuJpegDecodeAcceleratorHost( 32 GpuJpegDecodeAcceleratorHost(
32 GpuChannelHost* channel, 33 GpuChannelHost* channel,
33 int32 route_id, 34 int32 route_id,
34 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); 35 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
35 ~GpuJpegDecodeAcceleratorHost() override; 36 ~GpuJpegDecodeAcceleratorHost() override;
36 37
37 // media::JpegDecodeAccelerator implementation. 38 // media::JpegDecodeAccelerator implementation.
38 // |client| is called on the IO thread, but is never called into after the 39 // |client| is called on the IO thread, but is never called into after the
39 // GpuJpegDecodeAcceleratorHost is destroyed. 40 // GpuJpegDecodeAcceleratorHost is destroyed.
40 bool Initialize(media::JpegDecodeAccelerator::Client* client) override; 41 bool Initialize(media::JpegDecodeAccelerator::Client* client) override;
(...skipping 18 matching lines...) Expand all
59 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 60 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
60 61
61 scoped_ptr<Receiver> receiver_; 62 scoped_ptr<Receiver> receiver_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(GpuJpegDecodeAcceleratorHost); 64 DISALLOW_COPY_AND_ASSIGN(GpuJpegDecodeAcceleratorHost);
64 }; 65 };
65 66
66 } // namespace content 67 } // namespace content
67 68
68 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_ 69 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698