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

Side by Side Diff: media/gpu/ipc/service/media_gpu_channel.h

Issue 2870333003: gpu: Remove gpu channel filter and queue from header. (Closed)
Patch Set: Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_H_ 5 #ifndef MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_H_
6 #define MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_H_ 6 #define MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/weak_ptr.h"
sandersd (OOO until July 31) 2017/05/11 21:09:18 Nit: Only needed by the impl.
10 #include "base/unguessable_token.h" 11 #include "base/unguessable_token.h"
11 #include "ipc/ipc_listener.h" 12 #include "ipc/ipc_listener.h"
12 #include "ipc/ipc_sender.h" 13 #include "ipc/ipc_sender.h"
13 #include "media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h" 14 #include "media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h"
14 #include "media/video/video_decode_accelerator.h" 15 #include "media/video/video_decode_accelerator.h"
15 16
16 namespace media { 17 namespace media {
17 struct CreateVideoEncoderParams; 18 struct CreateVideoEncoderParams;
18 } 19 }
19 20
20 namespace gpu { 21 namespace gpu {
21 class GpuChannel; 22 class GpuChannel;
22 } 23 }
23 24
24 namespace media { 25 namespace media {
25 26
26 class MediaGpuChannelDispatchHelper; 27 class MediaGpuChannelDispatchHelper;
28 class MediaGpuChannelFilter;
27 29
28 class MediaGpuChannel : public IPC::Listener, public IPC::Sender { 30 class MediaGpuChannel : public IPC::Listener, public IPC::Sender {
29 public: 31 public:
30 MediaGpuChannel(gpu::GpuChannel* channel, 32 MediaGpuChannel(gpu::GpuChannel* channel,
31 const base::UnguessableToken& channel_token); 33 const base::UnguessableToken& channel_token);
32 ~MediaGpuChannel() override; 34 ~MediaGpuChannel() override;
33 35
34 // IPC::Sender implementation: 36 // IPC::Sender implementation:
35 bool Send(IPC::Message* msg) override; 37 bool Send(IPC::Message* msg) override;
36 38
37 private: 39 private:
38 friend class MediaGpuChannelDispatchHelper; 40 friend class MediaGpuChannelDispatchHelper;
39 41
40 // IPC::Listener implementation: 42 // IPC::Listener implementation:
41 bool OnMessageReceived(const IPC::Message& message) override; 43 bool OnMessageReceived(const IPC::Message& message) override;
42 44
43 // Message handlers. 45 // Message handlers.
44 void OnCreateJpegDecoder(int32_t route_id, IPC::Message* reply_msg); 46 void OnCreateJpegDecoder(int32_t route_id, IPC::Message* reply_msg);
45 void OnCreateVideoDecoder(int32_t command_buffer_route_id, 47 void OnCreateVideoDecoder(int32_t command_buffer_route_id,
46 const VideoDecodeAccelerator::Config& config, 48 const VideoDecodeAccelerator::Config& config,
47 int32_t route_id, 49 int32_t route_id,
48 IPC::Message* reply_message); 50 IPC::Message* reply_message);
49 void OnCreateVideoEncoder(int32_t command_buffer_route_id, 51 void OnCreateVideoEncoder(int32_t command_buffer_route_id,
50 const CreateVideoEncoderParams& params, 52 const CreateVideoEncoderParams& params,
51 IPC::Message* reply_message); 53 IPC::Message* reply_message);
52 54
53 gpu::GpuChannel* const channel_; 55 gpu::GpuChannel* const channel_;
54 base::UnguessableToken channel_token_; 56 scoped_refptr<MediaGpuChannelFilter> filter_;
55 std::unique_ptr<GpuJpegDecodeAccelerator> jpeg_decoder_; 57 std::unique_ptr<GpuJpegDecodeAccelerator> jpeg_decoder_;
58
56 DISALLOW_COPY_AND_ASSIGN(MediaGpuChannel); 59 DISALLOW_COPY_AND_ASSIGN(MediaGpuChannel);
57 }; 60 };
58 61
59 } // namespace media 62 } // namespace media
60 63
61 #endif // MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_H_ 64 #endif // MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698