(Auto)update libjingle 74825084-> 74825992
git-svn-id: http://webrtc.googlecode.com/svn/trunk/talk@7074 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/media/base/fakemediaengine.h b/media/base/fakemediaengine.h
index a6eabef..8963aa7 100644
--- a/media/base/fakemediaengine.h
+++ b/media/base/fakemediaengine.h
@@ -930,10 +930,6 @@
capture_ = capture;
return true;
}
- VideoFormat GetStartCaptureFormat() const {
- return VideoFormat(640, 480, cricket::VideoFormat::FpsToInterval(30),
- FOURCC_I420);
- }
sigslot::repeater2<VideoCapturer*, CaptureState> SignalCaptureStateChange;
diff --git a/media/base/filemediaengine.h b/media/base/filemediaengine.h
index 981e945..ad6c938 100644
--- a/media/base/filemediaengine.h
+++ b/media/base/filemediaengine.h
@@ -150,9 +150,6 @@
MediaProcessorDirection direction) {
return true;
}
- VideoFormat GetStartCaptureFormat() const {
- return VideoFormat();
- }
virtual sigslot::repeater2<VideoCapturer*, CaptureState>&
SignalVideoCaptureStateChange() {
diff --git a/media/base/mediaengine.h b/media/base/mediaengine.h
index 25f7eb3..9daa05d 100644
--- a/media/base/mediaengine.h
+++ b/media/base/mediaengine.h
@@ -147,8 +147,6 @@
VoiceProcessor* video_processor,
MediaProcessorDirection direction) = 0;
- virtual VideoFormat GetStartCaptureFormat() const = 0;
-
virtual sigslot::repeater2<VideoCapturer*, CaptureState>&
SignalVideoCaptureStateChange() = 0;
};
@@ -278,9 +276,6 @@
MediaProcessorDirection direction) {
return voice_.UnregisterProcessor(ssrc, processor, direction);
}
- virtual VideoFormat GetStartCaptureFormat() const {
- return video_.GetStartCaptureFormat();
- }
virtual sigslot::repeater2<VideoCapturer*, CaptureState>&
SignalVideoCaptureStateChange() {
return signal_state_change_;
@@ -361,7 +356,6 @@
return rtp_header_extensions_;
}
void SetLogging(int min_sev, const char* filter) {}
- VideoFormat GetStartCaptureFormat() const { return VideoFormat(); }
sigslot::signal2<VideoCapturer*, CaptureState> SignalCaptureStateChange;
private:
diff --git a/media/webrtc/webrtcmediaengine.h b/media/webrtc/webrtcmediaengine.h
index 2a8c66c..1700878 100644
--- a/media/webrtc/webrtcmediaengine.h
+++ b/media/webrtc/webrtcmediaengine.h
@@ -185,9 +185,6 @@
return delegate_->UnregisterVoiceProcessor(ssrc, video_processor,
direction);
}
- virtual VideoFormat GetStartCaptureFormat() const OVERRIDE {
- return delegate_->GetStartCaptureFormat();
- }
virtual sigslot::repeater2<VideoCapturer*, CaptureState>&
SignalVideoCaptureStateChange() {
return delegate_->SignalVideoCaptureStateChange();
diff --git a/media/webrtc/webrtcvideoengine.h b/media/webrtc/webrtcvideoengine.h
index 4e41809..b6c37af 100644
--- a/media/webrtc/webrtcvideoengine.h
+++ b/media/webrtc/webrtcvideoengine.h
@@ -169,8 +169,6 @@
bool ShouldIgnoreTrace(const std::string& trace);
int GetNumOfChannels();
- VideoFormat GetStartCaptureFormat() const { return default_codec_format_; }
-
rtc::CpuMonitor* cpu_monitor() { return cpu_monitor_.get(); }
protected:
diff --git a/media/webrtc/webrtcvideoengine2.cc b/media/webrtc/webrtcvideoengine2.cc
index 44c1bf8..d63e8f4 100644
--- a/media/webrtc/webrtcvideoengine2.cc
+++ b/media/webrtc/webrtcvideoengine2.cc
@@ -286,10 +286,6 @@
: worker_thread_(NULL),
voice_engine_(NULL),
video_codecs_(DefaultVideoCodecs()),
- default_codec_format_(kDefaultVideoCodecPref.width,
- kDefaultVideoCodecPref.height,
- FPS_TO_INTERVAL(kDefaultFramerate),
- FOURCC_ANY),
initialized_(false),
cpu_monitor_(new rtc::CpuMonitor(NULL)),
channel_factory_(NULL) {
@@ -358,11 +354,6 @@
return false;
}
- default_codec_format_ =
- VideoFormat(codec.width,
- codec.height,
- VideoFormat::FpsToInterval(codec.framerate),
- FOURCC_ANY);
video_codecs_.clear();
video_codecs_.push_back(codec);
return true;
diff --git a/media/webrtc/webrtcvideoengine2.h b/media/webrtc/webrtcvideoengine2.h
index d77afb9..ab644d0 100644
--- a/media/webrtc/webrtcvideoengine2.h
+++ b/media/webrtc/webrtcvideoengine2.h
@@ -168,8 +168,6 @@
// Check whether the supplied trace should be ignored.
bool ShouldIgnoreTrace(const std::string& trace);
- VideoFormat GetStartCaptureFormat() const { return default_codec_format_; }
-
rtc::CpuMonitor* cpu_monitor() { return cpu_monitor_.get(); }
virtual WebRtcVideoEncoderFactory2* GetVideoEncoderFactory();
@@ -179,7 +177,6 @@
WebRtcVoiceEngine* voice_engine_;
std::vector<VideoCodec> video_codecs_;
std::vector<RtpHeaderExtension> rtp_header_extensions_;
- VideoFormat default_codec_format_;
bool initialized_;
diff --git a/session/media/channelmanager.cc b/session/media/channelmanager.cc
index 45e7e47..2803a7e 100644
--- a/session/media/channelmanager.cc
+++ b/session/media/channelmanager.cc
@@ -724,16 +724,28 @@
}
bool ChannelManager::SetDefaultVideoEncoderConfig(const VideoEncoderConfig& c) {
- bool ret = true;
+ return worker_thread_->Invoke<bool>(
+ Bind(&ChannelManager::SetDefaultVideoEncoderConfig_w, this, c));
+}
+
+VideoEncoderConfig ChannelManager::GetDefaultVideoEncoderConfig() const {
+ return worker_thread_->Invoke<VideoEncoderConfig>(
+ Bind(&ChannelManager::GetDefaultVideoEncoderConfig_w, this));
+}
+
+bool ChannelManager::SetDefaultVideoEncoderConfig_w(
+ const VideoEncoderConfig& c) {
if (initialized_) {
- ret = worker_thread_->Invoke<bool>(
- Bind(&MediaEngineInterface::SetDefaultVideoEncoderConfig,
- media_engine_.get(), c));
+ if (!media_engine_->SetDefaultVideoEncoderConfig(c)) {
+ return false;
+ }
}
- if (ret) {
- default_video_encoder_config_ = c;
- }
- return ret;
+ default_video_encoder_config_ = c;
+ return true;
+}
+
+VideoEncoderConfig ChannelManager::GetDefaultVideoEncoderConfig_w() const {
+ return default_video_encoder_config_;
}
bool ChannelManager::SetLocalMonitor(bool enable) {
@@ -945,11 +957,6 @@
device_manager_->SetVideoCaptureDeviceMaxFormat(usb_id, max_format);
}
-VideoFormat ChannelManager::GetStartCaptureFormat() {
- return worker_thread_->Invoke<VideoFormat>(
- Bind(&MediaEngineInterface::GetStartCaptureFormat, media_engine_.get()));
-}
-
bool ChannelManager::StartAecDump(rtc::PlatformFile file) {
return worker_thread_->Invoke<bool>(
Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file));
diff --git a/session/media/channelmanager.h b/session/media/channelmanager.h
index fa79014..47cb6e5 100644
--- a/session/media/channelmanager.h
+++ b/session/media/channelmanager.h
@@ -163,6 +163,7 @@
VideoCapturer* CreateScreenCapturer(const ScreencastId& screenid);
bool SetCaptureDevice(const std::string& cam_device);
bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config);
+ VideoEncoderConfig GetDefaultVideoEncoderConfig() const;
// RTX will be enabled/disabled in engines that support it. The supporting
// engines will start offering an RTX codec. Must be called before Init().
bool SetVideoRtxEnabled(bool enable);
@@ -230,10 +231,6 @@
// This API is mainly a hook used by unittests.
const std::string& video_device_name() const { return video_device_name_; }
- // TODO(hellner): Remove this function once the engine capturer has been
- // removed.
- VideoFormat GetStartCaptureFormat();
-
protected:
// Adds non-transient parameters which can only be changed through the
// options store.
@@ -282,6 +279,8 @@
bool UnregisterVideoProcessor_w(VideoCapturer* capturer,
VideoProcessor* processor);
bool IsScreencastRunning_w() const;
+ bool SetDefaultVideoEncoderConfig_w(const VideoEncoderConfig& config);
+ VideoEncoderConfig GetDefaultVideoEncoderConfig_w() const;
virtual void OnMessage(rtc::Message *message);
rtc::scoped_ptr<MediaEngineInterface> media_engine_;