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

Unified Diff: content/common/gpu/media/media_channel.h

Issue 1736643005: Decouple Media Service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit + fixed compile issue Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/media/gpu_video_encode_accelerator.cc ('k') | content/common/gpu/media/media_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/media_channel.h
diff --git a/content/common/gpu/media/media_channel.h b/content/common/gpu/media/media_channel.h
new file mode 100644
index 0000000000000000000000000000000000000000..b6a00b2d046d92b9b48c3ce02d67c22d9d528211
--- /dev/null
+++ b/content/common/gpu/media/media_channel.h
@@ -0,0 +1,51 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_
+#define CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_
+
+#include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h"
+#include "ipc/ipc_listener.h"
+#include "ipc/ipc_sender.h"
+#include "media/video/video_decode_accelerator.h"
+
+namespace content {
+
+class GpuChannel;
+class GpuCommandBufferStub;
+class MediaChannelDispatchHelper;
+struct CreateVideoEncoderParams;
+
+class MediaChannel : public IPC::Listener, public IPC::Sender {
+ public:
+ explicit MediaChannel(GpuChannel* channel);
+ ~MediaChannel() override;
+
+ // IPC::Sender implementation:
+ bool Send(IPC::Message* msg) override;
+
+ private:
+ friend class MediaChannelDispatchHelper;
+
+ // IPC::Listener implementation:
+ bool OnMessageReceived(const IPC::Message& message) override;
+
+ // Message handlers.
+ void OnCreateJpegDecoder(int32_t route_id, IPC::Message* reply_msg);
+ void OnCreateVideoDecoder(int32_t command_buffer_route_id,
+ const media::VideoDecodeAccelerator::Config& config,
+ int32_t route_id,
+ IPC::Message* reply_message);
+ void OnCreateVideoEncoder(int32_t command_buffer_route_id,
+ const CreateVideoEncoderParams& params,
+ IPC::Message* reply_message);
+
+ GpuChannel* const channel_;
+ scoped_ptr<GpuJpegDecodeAccelerator> jpeg_decoder_;
+ DISALLOW_COPY_AND_ASSIGN(MediaChannel);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_MEDIA_MEDIA_CHANNEL_H_
« no previous file with comments | « content/common/gpu/media/gpu_video_encode_accelerator.cc ('k') | content/common/gpu/media/media_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698