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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 13890012: Integrate VDA with WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update the license of rtc_video_decoder.h Created 7 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2930 matching lines...) Expand 10 before | Expand all | Expand 10 after
2941 return web_media_player_android.release(); 2941 return web_media_player_android.release();
2942 #endif // defined(OS_ANDROID) 2942 #endif // defined(OS_ANDROID)
2943 2943
2944 scoped_refptr<media::AudioRendererSink> sink; 2944 scoped_refptr<media::AudioRendererSink> sink;
2945 if (!cmd_line->HasSwitch(switches::kDisableAudio)) { 2945 if (!cmd_line->HasSwitch(switches::kDisableAudio)) {
2946 sink = RenderThreadImpl::current()->GetAudioRendererMixerManager()-> 2946 sink = RenderThreadImpl::current()->GetAudioRendererMixerManager()->
2947 CreateInput(routing_id_); 2947 CreateInput(routing_id_);
2948 DVLOG(1) << "Using AudioRendererMixerManager-provided sink: " << sink.get(); 2948 DVLOG(1) << "Using AudioRendererMixerManager-provided sink: " << sink.get();
2949 } 2949 }
2950 2950
2951 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories; 2951 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories =
2952 WebGraphicsContext3DCommandBufferImpl* context3d = NULL; 2952 RenderThreadImpl::current()->GetGpuFactories();
2953 if (!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode))
2954 context3d = RenderThreadImpl::current()->GetGpuVDAContext3D();
2955 if (context3d) {
2956 scoped_refptr<base::MessageLoopProxy> factories_loop =
2957 RenderThreadImpl::current()->compositor_message_loop_proxy();
2958 if (!factories_loop.get())
2959 factories_loop = base::MessageLoopProxy::current();
2960 GpuChannelHost* gpu_channel_host =
2961 RenderThreadImpl::current()->EstablishGpuChannelSync(
2962 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
2963 gpu_factories = new RendererGpuVideoDecoderFactories(
2964 gpu_channel_host, factories_loop, context3d);
2965 }
2966 2953
2967 WebMediaPlayerParams params( 2954 WebMediaPlayerParams params(
2968 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), 2955 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(),
2969 base::Bind(&ContentRendererClient::DeferMediaLoad, 2956 base::Bind(&ContentRendererClient::DeferMediaLoad,
2970 base::Unretained(GetContentClient()->renderer()), 2957 base::Unretained(GetContentClient()->renderer()),
2971 static_cast<RenderView*>(this)), 2958 static_cast<RenderView*>(this)),
2972 sink, 2959 sink,
2973 gpu_factories, 2960 gpu_factories,
2974 new RenderMediaLog()); 2961 new RenderMediaLog());
2975 return new WebMediaPlayerImpl(frame, client, AsWeakPtr(), params); 2962 return new WebMediaPlayerImpl(frame, client, AsWeakPtr(), params);
(...skipping 3844 matching lines...) Expand 10 before | Expand all | Expand 10 after
6820 WebURL url = icon_urls[i].iconURL(); 6807 WebURL url = icon_urls[i].iconURL();
6821 if (!url.isEmpty()) 6808 if (!url.isEmpty())
6822 urls.push_back(FaviconURL(url, 6809 urls.push_back(FaviconURL(url,
6823 ToFaviconType(icon_urls[i].iconType()))); 6810 ToFaviconType(icon_urls[i].iconType())));
6824 } 6811 }
6825 SendUpdateFaviconURL(urls); 6812 SendUpdateFaviconURL(urls);
6826 } 6813 }
6827 6814
6828 6815
6829 } // namespace content 6816 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | media/filters/mock_gpu_video_decoder_factories.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698