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

Unified Diff: content/renderer/media/rtc_video_decoder_factory.cc

Issue 13890012: Integrate VDA with WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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
Index: content/renderer/media/rtc_video_decoder_factory.cc
diff --git a/content/renderer/media/rtc_video_decoder_factory.cc b/content/renderer/media/rtc_video_decoder_factory.cc
new file mode 100644
index 0000000000000000000000000000000000000000..bba8a40bbf3a2bfee2cbb1c71ec4dbea877a3626
--- /dev/null
+++ b/content/renderer/media/rtc_video_decoder_factory.cc
@@ -0,0 +1,33 @@
+// Copyright (c) 2013 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.
+
+#include "content/renderer/media/rtc_video_decoder_factory.h"
+
+namespace content {
+
+RTCVideoDecoderFactory::RTCVideoDecoderFactory(
+ const scoped_refptr<base::MessageLoopProxy>& chrome_loop_proxy,
+ const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories)
+ : chrome_loop_proxy_(chrome_loop_proxy),
Ami GONE FROM CHROMIUM 2013/04/26 00:42:05 nit: +2 additional indent this and the next line
wuchengli 2013/05/08 15:58:56 Done.
+ gpu_factories_(gpu_factories) {
+
+}
+
+webrtc::VideoDecoder* RTCVideoDecoderFactory::CreateVideoDecoder(
+ webrtc::VideoCodecType type) {
+ if (type == webrtc::kVideoCodecVP8) {
Ami GONE FROM CHROMIUM 2013/04/26 00:42:05 why not also allow h264 here?
Pawel Osciak 2013/04/26 07:08:01 This should be decided by each vda implementation
wuchengli 2013/05/08 15:58:56 H264 is not in the enum. All enum values are kVide
+ scoped_refptr<media::VideoDecoder> gpu_video_decoder =
+ new media::GpuVideoDecoder(chrome_loop_proxy_, gpu_factories_);
+
+ return new RTCVideoDecoderBridge(gpu_video_decoder, chrome_loop_proxy_);
+ }
+ return NULL;
+}
+
+void RTCVideoDecoderFactory::DestroyVideoDecoder(
+ webrtc::VideoDecoder* decoder) {
+ delete decoder;
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698