Add tracing for slow paths in new video API.
Allows tracking what actually takes time in SetRemoteDescription and SetLocalDescription. BUG=1788 R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/38809004 Cr-Commit-Position: refs/heads/master@{#8202} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8202 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
4161715e3f
commit
50fe359eb6
@ -45,6 +45,7 @@
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/stringutils.h"
|
||||
#include "webrtc/call.h"
|
||||
#include "webrtc/system_wrappers/interface/trace_event.h"
|
||||
#include "webrtc/video_decoder.h"
|
||||
#include "webrtc/video_encoder.h"
|
||||
|
||||
@ -673,6 +674,7 @@ WebRtcVideoChannel2::FilterSupportedCodecs(
|
||||
}
|
||||
|
||||
bool WebRtcVideoChannel2::SetRecvCodecs(const std::vector<VideoCodec>& codecs) {
|
||||
TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetRecvCodecs");
|
||||
LOG(LS_INFO) << "SetRecvCodecs: " << CodecVectorToString(codecs);
|
||||
if (!ValidateCodecFormats(codecs)) {
|
||||
return false;
|
||||
@ -706,6 +708,7 @@ bool WebRtcVideoChannel2::SetRecvCodecs(const std::vector<VideoCodec>& codecs) {
|
||||
}
|
||||
|
||||
bool WebRtcVideoChannel2::SetSendCodecs(const std::vector<VideoCodec>& codecs) {
|
||||
TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetSendCodecs");
|
||||
LOG(LS_INFO) << "SetSendCodecs: " << CodecVectorToString(codecs);
|
||||
if (!ValidateCodecFormats(codecs)) {
|
||||
return false;
|
||||
@ -1166,6 +1169,7 @@ bool WebRtcVideoChannel2::MuteStream(uint32 ssrc, bool mute) {
|
||||
|
||||
bool WebRtcVideoChannel2::SetRecvRtpHeaderExtensions(
|
||||
const std::vector<RtpHeaderExtension>& extensions) {
|
||||
TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetRecvRtpHeaderExtensions");
|
||||
LOG(LS_INFO) << "SetRecvRtpHeaderExtensions: "
|
||||
<< RtpExtensionsToString(extensions);
|
||||
if (!ValidateRtpHeaderExtensionIds(extensions))
|
||||
@ -1190,6 +1194,7 @@ bool WebRtcVideoChannel2::SetRecvRtpHeaderExtensions(
|
||||
|
||||
bool WebRtcVideoChannel2::SetSendRtpHeaderExtensions(
|
||||
const std::vector<RtpHeaderExtension>& extensions) {
|
||||
TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetSendRtpHeaderExtensions");
|
||||
LOG(LS_INFO) << "SetSendRtpHeaderExtensions: "
|
||||
<< RtpExtensionsToString(extensions);
|
||||
if (!ValidateRtpHeaderExtensionIds(extensions))
|
||||
@ -1229,6 +1234,7 @@ bool WebRtcVideoChannel2::SetMaxSendBandwidth(int max_bitrate_bps) {
|
||||
}
|
||||
|
||||
bool WebRtcVideoChannel2::SetOptions(const VideoOptions& options) {
|
||||
TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetOptions");
|
||||
LOG(LS_INFO) << "SetOptions: " << options.ToString();
|
||||
VideoOptions old_options = options_;
|
||||
options_.SetAll(options);
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
|
||||
#include "webrtc/system_wrappers/interface/scoped_ptr.h"
|
||||
#include "webrtc/system_wrappers/interface/trace.h"
|
||||
#include "webrtc/system_wrappers/interface/trace_event.h"
|
||||
#include "webrtc/video/video_receive_stream.h"
|
||||
#include "webrtc/video/video_send_stream.h"
|
||||
#include "webrtc/video_engine/include/vie_base.h"
|
||||
@ -221,6 +222,7 @@ PacketReceiver* Call::Receiver() { return this; }
|
||||
VideoSendStream* Call::CreateVideoSendStream(
|
||||
const VideoSendStream::Config& config,
|
||||
const VideoEncoderConfig& encoder_config) {
|
||||
TRACE_EVENT0("webrtc", "Call::CreateVideoSendStream");
|
||||
LOG(LS_INFO) << "CreateVideoSendStream: " << config.ToString();
|
||||
assert(config.rtp.ssrcs.size() > 0);
|
||||
|
||||
@ -245,6 +247,7 @@ VideoSendStream* Call::CreateVideoSendStream(
|
||||
}
|
||||
|
||||
void Call::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) {
|
||||
TRACE_EVENT0("webrtc", "Call::DestroyVideoSendStream");
|
||||
assert(send_stream != NULL);
|
||||
|
||||
send_stream->Stop();
|
||||
@ -277,6 +280,7 @@ void Call::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) {
|
||||
|
||||
VideoReceiveStream* Call::CreateVideoReceiveStream(
|
||||
const VideoReceiveStream::Config& config) {
|
||||
TRACE_EVENT0("webrtc", "Call::CreateVideoReceiveStream");
|
||||
LOG(LS_INFO) << "CreateVideoReceiveStream: " << config.ToString();
|
||||
VideoReceiveStream* receive_stream =
|
||||
new VideoReceiveStream(video_engine_,
|
||||
@ -304,6 +308,7 @@ VideoReceiveStream* Call::CreateVideoReceiveStream(
|
||||
|
||||
void Call::DestroyVideoReceiveStream(
|
||||
webrtc::VideoReceiveStream* receive_stream) {
|
||||
TRACE_EVENT0("webrtc", "Call::DestroyVideoReceiveStream");
|
||||
assert(receive_stream != NULL);
|
||||
|
||||
VideoReceiveStream* receive_stream_impl = NULL;
|
||||
@ -356,6 +361,7 @@ Call::Stats Call::GetStats() const {
|
||||
|
||||
void Call::SetBitrateConfig(
|
||||
const webrtc::Call::Config::BitrateConfig& bitrate_config) {
|
||||
TRACE_EVENT0("webrtc", "Call::SetBitrateConfig");
|
||||
assert(bitrate_config.min_bitrate_bps >= 0);
|
||||
assert(bitrate_config.max_bitrate_bps == -1 ||
|
||||
bitrate_config.max_bitrate_bps > 0);
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
||||
#include "webrtc/system_wrappers/interface/logging.h"
|
||||
#include "webrtc/system_wrappers/interface/trace_event.h"
|
||||
#include "webrtc/video_engine/include/vie_base.h"
|
||||
#include "webrtc/video_engine/include/vie_capture.h"
|
||||
#include "webrtc/video_engine/include/vie_codec.h"
|
||||
@ -291,6 +292,7 @@ void VideoSendStream::Stop() {
|
||||
|
||||
bool VideoSendStream::ReconfigureVideoEncoder(
|
||||
const VideoEncoderConfig& config) {
|
||||
TRACE_EVENT0("webrtc", "VideoSendStream::(Re)configureVideoEncoder");
|
||||
LOG(LS_INFO) << "(Re)configureVideoEncoder: " << config.ToString();
|
||||
const std::vector<VideoStream>& streams = config.streams;
|
||||
assert(!streams.empty());
|
||||
|
Loading…
x
Reference in New Issue
Block a user