| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_ |
| 7 |
| 8 #include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h" |
| 9 #include "ipc/ipc_listener.h" |
| 10 #include "ipc/ipc_sender.h" |
| 11 #include "media/video/video_decode_accelerator.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 namespace { |
| 16 class DispatchHelper; |
| 17 } |
| 18 |
| 19 class GpuChannel; |
| 20 class GpuCommandBufferStub; |
| 21 struct CreateVideoEncoderParams; |
| 22 |
| 23 class MediaChannel : public IPC::Listener, public IPC::Sender { |
| 24 public: |
| 25 explicit MediaChannel(GpuChannel* channel); |
| 26 ~MediaChannel() override; |
| 27 |
| 28 // IPC::Sender implementation: |
| 29 bool Send(IPC::Message* msg) override; |
| 30 |
| 31 private: |
| 32 friend class DispatchHelper; |
| 33 |
| 34 // IPC::Listener implementation: |
| 35 bool OnMessageReceived(const IPC::Message& message) override; |
| 36 |
| 37 // Message handlers. |
| 38 void OnCreateJpegDecoder(int32_t route_id, IPC::Message* reply_msg); |
| 39 void OnCreateVideoDecoder(int32_t command_buffer_route_id, |
| 40 const media::VideoDecodeAccelerator::Config& config, |
| 41 int32_t route_id, |
| 42 IPC::Message* reply_message); |
| 43 void OnCreateVideoEncoder(int command_buffer_route_id, |
| 44 const CreateVideoEncoderParams& params, |
| 45 IPC::Message* reply_message); |
| 46 |
| 47 GpuChannel* const channel_; |
| 48 scoped_ptr<GpuJpegDecodeAccelerator> jpeg_decoder_; |
| 49 DISALLOW_COPY_AND_ASSIGN(MediaChannel); |
| 50 }; |
| 51 |
| 52 } // namespace content |
| 53 |
| 54 #endif // CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_ |
| OLD | NEW |