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

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

Issue 27420004: Remove threading from RendererGpuVideoAcceleratorFactories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dthread
Patch Set: cf596ded Rebase. Created 6 years, 11 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/renderer/media/rtc_video_encoder.h ('k') | content/renderer/media/rtc_video_encoder_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_encoder.cc
diff --git a/content/renderer/media/rtc_video_encoder.cc b/content/renderer/media/rtc_video_encoder.cc
index 83e49d656136d8b5f0a71c28e6f816688c32eb83..890ff7be8c44a25a98d55ad72d58cafa1f902236 100644
--- a/content/renderer/media/rtc_video_encoder.cc
+++ b/content/renderer/media/rtc_video_encoder.cc
@@ -11,7 +11,6 @@
#include "base/message_loop/message_loop_proxy.h"
#include "base/metrics/histogram.h"
#include "base/synchronization/waitable_event.h"
-#include "content/renderer/media/renderer_gpu_video_accelerator_factories.h"
#include "media/base/bitstream_buffer.h"
#include "media/base/video_frame.h"
#include "media/base/video_util.h"
@@ -42,9 +41,8 @@ class RTCVideoEncoder::Impl
: public media::VideoEncodeAccelerator::Client,
public base::RefCountedThreadSafe<RTCVideoEncoder::Impl> {
public:
- Impl(
- const base::WeakPtr<RTCVideoEncoder>& weak_encoder,
- const scoped_refptr<RendererGpuVideoAcceleratorFactories>& gpu_factories);
+ Impl(const base::WeakPtr<RTCVideoEncoder>& weak_encoder,
+ const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories);
// Create the VEA and call Initialize() on it. Called once per instantiation,
// and then the instance is bound forevermore to whichever thread made the
@@ -119,7 +117,7 @@ class RTCVideoEncoder::Impl
const scoped_refptr<base::MessageLoopProxy> encoder_message_loop_proxy_;
// Factory for creating VEAs, shared memory buffers, etc.
- const scoped_refptr<RendererGpuVideoAcceleratorFactories> gpu_factories_;
+ const scoped_refptr<media::GpuVideoAcceleratorFactories> gpu_factories_;
// webrtc::VideoEncoder expects InitEncode() and Encode() to be synchronous.
// Do this by waiting on the |async_waiter_| and returning the return value in
@@ -155,7 +153,7 @@ class RTCVideoEncoder::Impl
RTCVideoEncoder::Impl::Impl(
const base::WeakPtr<RTCVideoEncoder>& weak_encoder,
- const scoped_refptr<RendererGpuVideoAcceleratorFactories>& gpu_factories)
+ const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories)
: weak_encoder_(weak_encoder),
encoder_message_loop_proxy_(base::MessageLoopProxy::current()),
gpu_factories_(gpu_factories),
@@ -471,7 +469,7 @@ void RTCVideoEncoder::Impl::SignalAsyncWaiter(int32_t retval) {
RTCVideoEncoder::RTCVideoEncoder(
webrtc::VideoCodecType type,
media::VideoCodecProfile profile,
- const scoped_refptr<RendererGpuVideoAcceleratorFactories>& gpu_factories)
+ const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories)
: video_codec_type_(type),
video_codec_profile_(profile),
gpu_factories_(gpu_factories),
@@ -563,9 +561,6 @@ int32_t RTCVideoEncoder::Release() {
DVLOG(3) << "Release()";
DCHECK(thread_checker_.CalledOnValidThread());
- // Reset the gpu_factory_, in case we reuse this encoder.
- gpu_factories_->Abort();
- gpu_factories_ = gpu_factories_->Clone();
if (impl_) {
gpu_factories_->GetTaskRunner()->PostTask(
FROM_HERE, base::Bind(&RTCVideoEncoder::Impl::Destroy, impl_));
« no previous file with comments | « content/renderer/media/rtc_video_encoder.h ('k') | content/renderer/media/rtc_video_encoder_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698