(Auto)update libjingle 74873066-> 74873164

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7089 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-09-05 16:39:08 +00:00
parent a3344cfda4
commit 992febb997
9 changed files with 47 additions and 23 deletions

View File

@ -930,6 +930,10 @@ class FakeVideoEngine : public FakeBaseEngine {
capture_ = capture;
return true;
}
VideoFormat GetStartCaptureFormat() const {
return VideoFormat(640, 480, cricket::VideoFormat::FpsToInterval(30),
FOURCC_I420);
}
sigslot::repeater2<VideoCapturer*, CaptureState> SignalCaptureStateChange;

View File

@ -150,6 +150,9 @@ class FileMediaEngine : public MediaEngineInterface {
MediaProcessorDirection direction) {
return true;
}
VideoFormat GetStartCaptureFormat() const {
return VideoFormat();
}
virtual sigslot::repeater2<VideoCapturer*, CaptureState>&
SignalVideoCaptureStateChange() {

View File

@ -147,6 +147,8 @@ class MediaEngineInterface {
VoiceProcessor* video_processor,
MediaProcessorDirection direction) = 0;
virtual VideoFormat GetStartCaptureFormat() const = 0;
virtual sigslot::repeater2<VideoCapturer*, CaptureState>&
SignalVideoCaptureStateChange() = 0;
};
@ -276,6 +278,9 @@ class CompositeMediaEngine : public MediaEngineInterface {
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_;
@ -356,6 +361,7 @@ class NullVideoEngine {
return rtp_header_extensions_;
}
void SetLogging(int min_sev, const char* filter) {}
VideoFormat GetStartCaptureFormat() const { return VideoFormat(); }
sigslot::signal2<VideoCapturer*, CaptureState> SignalCaptureStateChange;
private:

View File

@ -185,6 +185,9 @@ class DelegatingWebRtcMediaEngine : public cricket::MediaEngineInterface {
return delegate_->UnregisterVoiceProcessor(ssrc, video_processor,
direction);
}
virtual VideoFormat GetStartCaptureFormat() const OVERRIDE {
return delegate_->GetStartCaptureFormat();
}
virtual sigslot::repeater2<VideoCapturer*, CaptureState>&
SignalVideoCaptureStateChange() {
return delegate_->SignalVideoCaptureStateChange();

View File

@ -169,6 +169,8 @@ class WebRtcVideoEngine : public sigslot::has_slots<>,
bool ShouldIgnoreTrace(const std::string& trace);
int GetNumOfChannels();
VideoFormat GetStartCaptureFormat() const { return default_codec_format_; }
rtc::CpuMonitor* cpu_monitor() { return cpu_monitor_.get(); }
protected:

View File

@ -286,6 +286,10 @@ WebRtcVideoEngine2::WebRtcVideoEngine2()
: 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) {
@ -354,6 +358,11 @@ bool WebRtcVideoEngine2::SetDefaultEncoderConfig(
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;

View File

@ -168,6 +168,8 @@ class WebRtcVideoEngine2 : public sigslot::has_slots<> {
// 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();
@ -177,6 +179,7 @@ class WebRtcVideoEngine2 : public sigslot::has_slots<> {
WebRtcVoiceEngine* voice_engine_;
std::vector<VideoCodec> video_codecs_;
std::vector<RtpHeaderExtension> rtp_header_extensions_;
VideoFormat default_codec_format_;
bool initialized_;

View File

@ -724,28 +724,16 @@ bool ChannelManager::SetCaptureDevice_w(const Device* cam_device) {
}
bool ChannelManager::SetDefaultVideoEncoderConfig(const VideoEncoderConfig& c) {
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) {
bool ret = true;
if (initialized_) {
if (!media_engine_->SetDefaultVideoEncoderConfig(c)) {
return false;
}
ret = worker_thread_->Invoke<bool>(
Bind(&MediaEngineInterface::SetDefaultVideoEncoderConfig,
media_engine_.get(), c));
}
default_video_encoder_config_ = c;
return true;
}
VideoEncoderConfig ChannelManager::GetDefaultVideoEncoderConfig_w() const {
return default_video_encoder_config_;
if (ret) {
default_video_encoder_config_ = c;
}
return ret;
}
bool ChannelManager::SetLocalMonitor(bool enable) {
@ -957,6 +945,11 @@ void ChannelManager::SetVideoCaptureDeviceMaxFormat(
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));

View File

@ -163,7 +163,6 @@ class ChannelManager : public rtc::MessageHandler,
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);
@ -231,6 +230,10 @@ class ChannelManager : public rtc::MessageHandler,
// 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.
@ -279,8 +282,6 @@ class ChannelManager : public rtc::MessageHandler,
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_;