Remove the remaining non-test stringstreams from api/
Bug: webrtc:8982 Change-Id: Ie54ed24a609398228a69bdd92728ebf679cf3fe3 Reviewed-on: https://webrtc-review.googlesource.com/76561 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23239}
This commit is contained in:
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ostream>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -10,10 +10,10 @@
|
|||||||
#include "api/rtpparameters.h"
|
#include "api/rtpparameters.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <sstream>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
|
#include "rtc_base/strings/string_builder.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -69,14 +69,15 @@ RtpParameters::RtpParameters() {}
|
|||||||
RtpParameters::~RtpParameters() {}
|
RtpParameters::~RtpParameters() {}
|
||||||
|
|
||||||
std::string RtpExtension::ToString() const {
|
std::string RtpExtension::ToString() const {
|
||||||
std::stringstream ss;
|
char buf[256];
|
||||||
ss << "{uri: " << uri;
|
rtc::SimpleStringBuilder sb(buf);
|
||||||
ss << ", id: " << id;
|
sb << "{uri: " << uri;
|
||||||
|
sb << ", id: " << id;
|
||||||
if (encrypt) {
|
if (encrypt) {
|
||||||
ss << ", encrypt";
|
sb << ", encrypt";
|
||||||
}
|
}
|
||||||
ss << '}';
|
sb << '}';
|
||||||
return ss.str();
|
return sb.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char RtpExtension::kAudioLevelUri[] =
|
const char RtpExtension::kAudioLevelUri[] =
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "api/video/video_timing.h"
|
#include "api/video/video_timing.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include "rtc_base/strings/string_builder.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
@ -60,19 +60,22 @@ bool TimingFrameInfo::IsInvalid() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string TimingFrameInfo::ToString() const {
|
std::string TimingFrameInfo::ToString() const {
|
||||||
std::stringstream out;
|
|
||||||
if (IsInvalid()) {
|
if (IsInvalid()) {
|
||||||
out << "";
|
return "";
|
||||||
} else {
|
|
||||||
out << rtp_timestamp << ',' << capture_time_ms << ',' << encode_start_ms
|
|
||||||
<< ',' << encode_finish_ms << ',' << packetization_finish_ms << ','
|
|
||||||
<< pacer_exit_ms << ',' << network_timestamp_ms << ','
|
|
||||||
<< network2_timestamp_ms << ',' << receive_start_ms << ','
|
|
||||||
<< receive_finish_ms << ',' << decode_start_ms << ','
|
|
||||||
<< decode_finish_ms << ',' << render_time_ms << ','
|
|
||||||
<< IsOutlier() << ',' << IsTimerTriggered();
|
|
||||||
}
|
}
|
||||||
return out.str();
|
|
||||||
|
char buf[1024];
|
||||||
|
rtc::SimpleStringBuilder sb(buf);
|
||||||
|
|
||||||
|
sb << rtp_timestamp << ',' << capture_time_ms << ',' << encode_start_ms << ','
|
||||||
|
<< encode_finish_ms << ',' << packetization_finish_ms << ','
|
||||||
|
<< pacer_exit_ms << ',' << network_timestamp_ms << ','
|
||||||
|
<< network2_timestamp_ms << ',' << receive_start_ms << ','
|
||||||
|
<< receive_finish_ms << ',' << decode_start_ms << ',' << decode_finish_ms
|
||||||
|
<< ',' << render_time_ms << ',' << IsOutlier() << ','
|
||||||
|
<< IsTimerTriggered();
|
||||||
|
|
||||||
|
return sb.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
Reference in New Issue
Block a user