| 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 class GpuChannel; |
| 16 class GpuCommandBufferStub; |
| 17 class MediaChannelDispatchHelper; |
| 18 struct CreateVideoEncoderParams; |
| 19 |
| 20 class MediaChannel : public IPC::Listener, public IPC::Sender { |
| 21 public: |
| 22 explicit MediaChannel(GpuChannel* channel); |
| 23 ~MediaChannel() override; |
| 24 |
| 25 // IPC::Sender implementation: |
| 26 bool Send(IPC::Message* msg) override; |
| 27 |
| 28 private: |
| 29 friend class MediaChannelDispatchHelper; |
| 30 |
| 31 // IPC::Listener implementation: |
| 32 bool OnMessageReceived(const IPC::Message& message) override; |
| 33 |
| 34 // Message handlers. |
| 35 void OnCreateJpegDecoder(int32_t route_id, IPC::Message* reply_msg); |
| 36 void OnCreateVideoDecoder(int32_t command_buffer_route_id, |
| 37 const media::VideoDecodeAccelerator::Config& config, |
| 38 int32_t route_id, |
| 39 IPC::Message* reply_message); |
| 40 void OnCreateVideoEncoder(int32_t command_buffer_route_id, |
| 41 const CreateVideoEncoderParams& params, |
| 42 IPC::Message* reply_message); |
| 43 |
| 44 GpuChannel* const channel_; |
| 45 scoped_ptr<GpuJpegDecodeAccelerator> jpeg_decoder_; |
| 46 DISALLOW_COPY_AND_ASSIGN(MediaChannel); |
| 47 }; |
| 48 |
| 49 } // namespace content |
| 50 |
| 51 #endif // CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_ |
| OLD | NEW |