Chromium Code Reviews| 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 99e963a96b27fe7ff7532447e20541ca50c12669..a619179d45384593ea26ff0743c6c3237bc11ebd 100644 |
| --- a/content/renderer/media/rtc_video_encoder.cc |
| +++ b/content/renderer/media/rtc_video_encoder.cc |
| @@ -12,6 +12,7 @@ |
| #include "base/metrics/histogram.h" |
| #include "base/rand_util.h" |
| #include "base/synchronization/waitable_event.h" |
| +#include "content/renderer/media/rtc_video_encoder_factory.h" |
| #include "media/base/bitstream_buffer.h" |
| #include "media/base/video_frame.h" |
| #include "media/base/video_util.h" |
| @@ -546,15 +547,13 @@ void RTCVideoEncoder::Impl::SignalAsyncWaiter(int32_t retval) { |
| RTCVideoEncoder::RTCVideoEncoder( |
| webrtc::VideoCodecType type, |
| - media::VideoCodecProfile profile, |
| const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories) |
| : video_codec_type_(type), |
| - video_codec_profile_(profile), |
| gpu_factories_(gpu_factories), |
| encoded_image_callback_(NULL), |
| impl_status_(WEBRTC_VIDEO_CODEC_UNINITIALIZED), |
| weak_factory_(this) { |
| - DVLOG(1) << "RTCVideoEncoder(): profile=" << profile; |
| + DVLOG(1) << "RTCVideoEncoder(): type=" << type; |
|
Pawel Osciak
2014/10/25 01:23:04
s/type/codec type/
hshi1
2014/10/25 01:36:51
Done.
|
| } |
| RTCVideoEncoder::~RTCVideoEncoder() { |
| @@ -574,6 +573,9 @@ int32_t RTCVideoEncoder::InitEncode(const webrtc::VideoCodec* codec_settings, |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| DCHECK(!impl_.get()); |
| + video_codec_profile_ = RTCVideoEncoderFactory::GetCodecProfile( |
|
Pawel Osciak
2014/10/25 01:23:04
video_codec_profile_ could just be a local variabl
hshi1
2014/10/25 01:36:51
Done.
|
| + video_codec_type_, codec_settings); |
| + |
| weak_factory_.InvalidateWeakPtrs(); |
| impl_ = new Impl(weak_factory_.GetWeakPtr(), gpu_factories_); |
| base::WaitableEvent initialization_waiter(true, false); |