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