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

Side by Side Diff: media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h

Issue 2923933004: [NotForReview] Move GJDAH and GJDA to media/gpu/mojo
Patch Set: . Created 3 years, 6 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
« no previous file with comments | « media/gpu/ipc/client/BUILD.gn ('k') | media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
6 #define MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
7
8 #include <stdint.h>
9
10 #include <memory>
11
12 #include "base/macros.h"
13 #include "base/memory/weak_ptr.h"
14 #include "base/sequence_checker.h"
15 #include "media/video/jpeg_decode_accelerator.h"
16
17 namespace base {
18 class SingleThreadTaskRunner;
19 }
20
21 namespace gpu {
22 class GpuChannelHost;
23 }
24
25 namespace IPC {
26 class Listener;
27 class Message;
28 }
29
30 namespace media {
31
32 // TODO(c.padhi): Move GpuJpegDecodeAcceleratorHost to media/gpu/mojo, see
33 // http://crbug.com/699255.
34 // This class is used to talk to JpegDecodeAccelerator in the GPU process
35 // through IPC messages.
36 class GpuJpegDecodeAcceleratorHost : public JpegDecodeAccelerator {
37 public:
38 GpuJpegDecodeAcceleratorHost(
39 scoped_refptr<gpu::GpuChannelHost> channel,
40 int32_t route_id,
41 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
42 ~GpuJpegDecodeAcceleratorHost() override;
43
44 // JpegDecodeAccelerator implementation.
45 // |client| is called on the IO thread, but is never called into after the
46 // GpuJpegDecodeAcceleratorHost is destroyed.
47 bool Initialize(JpegDecodeAccelerator::Client* client) override;
48 void Decode(const BitstreamBuffer& bitstream_buffer,
49 const scoped_refptr<VideoFrame>& video_frame) override;
50 bool IsSupported() override;
51
52 base::WeakPtr<IPC::Listener> GetReceiver();
53
54 private:
55 class Receiver;
56
57 void Send(IPC::Message* message);
58
59 scoped_refptr<gpu::GpuChannelHost> channel_;
60
61 // Route ID for the associated decoder in the GPU process.
62 int32_t decoder_route_id_;
63
64 // GPU IO task runner.
65 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
66
67 std::unique_ptr<Receiver> receiver_;
68
69 SEQUENCE_CHECKER(sequence_checker_);
70
71 DISALLOW_COPY_AND_ASSIGN(GpuJpegDecodeAcceleratorHost);
72 };
73
74 } // namespace media
75
76 #endif // MEDIA_GPU_IPC_CLIENT_GPU_JPEG_DECODE_ACCELERATOR_HOST_H_
OLDNEW
« no previous file with comments | « media/gpu/ipc/client/BUILD.gn ('k') | media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698