(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; capture_ = capture;
return true; return true;
} }
VideoFormat GetStartCaptureFormat() const {
return VideoFormat(640, 480, cricket::VideoFormat::FpsToInterval(30),
FOURCC_I420);
}
sigslot::repeater2<VideoCapturer*, CaptureState> SignalCaptureStateChange; sigslot::repeater2<VideoCapturer*, CaptureState> SignalCaptureStateChange;

View File

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

View File

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

View File

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

View File

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

View File

@ -286,6 +286,10 @@ WebRtcVideoEngine2::WebRtcVideoEngine2()
: worker_thread_(NULL), : worker_thread_(NULL),
voice_engine_(NULL), voice_engine_(NULL),
video_codecs_(DefaultVideoCodecs()), video_codecs_(DefaultVideoCodecs()),
default_codec_format_(kDefaultVideoCodecPref.width,
kDefaultVideoCodecPref.height,
FPS_TO_INTERVAL(kDefaultFramerate),
FOURCC_ANY),
initialized_(false), initialized_(false),
cpu_monitor_(new rtc::CpuMonitor(NULL)), cpu_monitor_(new rtc::CpuMonitor(NULL)),
channel_factory_(NULL) { channel_factory_(NULL) {
@ -354,6 +358,11 @@ bool WebRtcVideoEngine2::SetDefaultEncoderConfig(
return false; return false;
} }
default_codec_format_ =
VideoFormat(codec.width,
codec.height,
VideoFormat::FpsToInterval(codec.framerate),
FOURCC_ANY);
video_codecs_.clear(); video_codecs_.clear();
video_codecs_.push_back(codec); video_codecs_.push_back(codec);
return true; return true;

View File

@ -168,6 +168,8 @@ class WebRtcVideoEngine2 : public sigslot::has_slots<> {
// Check whether the supplied trace should be ignored. // Check whether the supplied trace should be ignored.
bool ShouldIgnoreTrace(const std::string& trace); bool ShouldIgnoreTrace(const std::string& trace);
VideoFormat GetStartCaptureFormat() const { return default_codec_format_; }
rtc::CpuMonitor* cpu_monitor() { return cpu_monitor_.get(); } rtc::CpuMonitor* cpu_monitor() { return cpu_monitor_.get(); }
virtual WebRtcVideoEncoderFactory2* GetVideoEncoderFactory(); virtual WebRtcVideoEncoderFactory2* GetVideoEncoderFactory();
@ -177,6 +179,7 @@ class WebRtcVideoEngine2 : public sigslot::has_slots<> {
WebRtcVoiceEngine* voice_engine_; WebRtcVoiceEngine* voice_engine_;
std::vector<VideoCodec> video_codecs_; std::vector<VideoCodec> video_codecs_;
std::vector<RtpHeaderExtension> rtp_header_extensions_; std::vector<RtpHeaderExtension> rtp_header_extensions_;
VideoFormat default_codec_format_;
bool initialized_; bool initialized_;

View File

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

View File

@ -163,7 +163,6 @@ class ChannelManager : public rtc::MessageHandler,
VideoCapturer* CreateScreenCapturer(const ScreencastId& screenid); VideoCapturer* CreateScreenCapturer(const ScreencastId& screenid);
bool SetCaptureDevice(const std::string& cam_device); bool SetCaptureDevice(const std::string& cam_device);
bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config); bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config);
VideoEncoderConfig GetDefaultVideoEncoderConfig() const;
// RTX will be enabled/disabled in engines that support it. The supporting // RTX will be enabled/disabled in engines that support it. The supporting
// engines will start offering an RTX codec. Must be called before Init(). // engines will start offering an RTX codec. Must be called before Init().
bool SetVideoRtxEnabled(bool enable); bool SetVideoRtxEnabled(bool enable);
@ -231,6 +230,10 @@ class ChannelManager : public rtc::MessageHandler,
// This API is mainly a hook used by unittests. // This API is mainly a hook used by unittests.
const std::string& video_device_name() const { return video_device_name_; } 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: protected:
// Adds non-transient parameters which can only be changed through the // Adds non-transient parameters which can only be changed through the
// options store. // options store.
@ -279,8 +282,6 @@ class ChannelManager : public rtc::MessageHandler,
bool UnregisterVideoProcessor_w(VideoCapturer* capturer, bool UnregisterVideoProcessor_w(VideoCapturer* capturer,
VideoProcessor* processor); VideoProcessor* processor);
bool IsScreencastRunning_w() const; bool IsScreencastRunning_w() const;
bool SetDefaultVideoEncoderConfig_w(const VideoEncoderConfig& config);
VideoEncoderConfig GetDefaultVideoEncoderConfig_w() const;
virtual void OnMessage(rtc::Message *message); virtual void OnMessage(rtc::Message *message);
rtc::scoped_ptr<MediaEngineInterface> media_engine_; rtc::scoped_ptr<MediaEngineInterface> media_engine_;