Revert "Reland "Remove our stream << overloads from non-test build targets.""
This reverts commit d7ee72041f882c023c73e27a7436c626c4e43604. Reason for revert: Broke downstream build which was using SdpAudioFormat operator<< Original change's description: > Reland "Remove our stream << overloads from non-test build targets." > > This is a reland of c841d18d257ba8e4ed7d77d105e3c46006bb1e7e > > Original change's description: > > Remove our stream << overloads from non-test build targets. > > > > Most are removed entirely, but RtcErrorType, RtpTransceiverDirection, IPAddress and > > SocketAddress are kept behind gtest's #ifdef UNIT_TEST. > > > > Bug: webrtc:8982 > > Change-Id: I36db19891e7d25aeacb08b9a08aa2b4004765e70 > > Reviewed-on: https://webrtc-review.googlesource.com/64143 > > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> > > Reviewed-by: Benjamin Wright <benwright@webrtc.org> > > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > > Reviewed-by: Åsa Persson <asapersson@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#22916} > > TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org > > Bug: webrtc:8982 > Change-Id: Ibe08c6270e5e693eb661a6ce9e8f074b34ef8123 > Reviewed-on: https://webrtc-review.googlesource.com/71161 > Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org> > Reviewed-by: Jonas Olsson <jonasolsson@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#22949} TBR=deadbeef@webrtc.org,kwiberg@webrtc.org,asapersson@webrtc.org,jonasolsson@webrtc.org,benwright@webrtc.org Change-Id: I3c2b18ec2877d68a522ecbae7a2955c4eecf36df No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:8982 Reviewed-on: https://webrtc-review.googlesource.com/71446 Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22963}
This commit is contained in:
committed by
Commit Bot
parent
4049a25afd
commit
bd7392829a
@ -68,6 +68,20 @@ void swap(SdpAudioFormat& a, SdpAudioFormat& b) {
|
||||
swap(a.parameters, b.parameters);
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const SdpAudioFormat& saf) {
|
||||
os << "{name: " << saf.name;
|
||||
os << ", clockrate_hz: " << saf.clockrate_hz;
|
||||
os << ", num_channels: " << saf.num_channels;
|
||||
os << ", parameters: {";
|
||||
const char* sep = "";
|
||||
for (const auto& kv : saf.parameters) {
|
||||
os << sep << kv.first << ": " << kv.second;
|
||||
sep = ", ";
|
||||
}
|
||||
os << "}}";
|
||||
return os;
|
||||
}
|
||||
|
||||
AudioCodecInfo::AudioCodecInfo(int sample_rate_hz,
|
||||
size_t num_channels,
|
||||
int bitrate_bps)
|
||||
@ -94,4 +108,23 @@ AudioCodecInfo::AudioCodecInfo(int sample_rate_hz,
|
||||
RTC_DCHECK_GE(max_bitrate_bps, default_bitrate_bps);
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const AudioCodecInfo& aci) {
|
||||
os << "{sample_rate_hz: " << aci.sample_rate_hz;
|
||||
os << ", num_channels: " << aci.num_channels;
|
||||
os << ", default_bitrate_bps: " << aci.default_bitrate_bps;
|
||||
os << ", min_bitrate_bps: " << aci.min_bitrate_bps;
|
||||
os << ", max_bitrate_bps: " << aci.max_bitrate_bps;
|
||||
os << ", allow_comfort_noise: " << aci.allow_comfort_noise;
|
||||
os << ", supports_network_adaption: " << aci.supports_network_adaption;
|
||||
os << "}";
|
||||
return os;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const AudioCodecSpec& acs) {
|
||||
os << "{format: " << acs.format;
|
||||
os << ", info: " << acs.info;
|
||||
os << "}";
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#define API_AUDIO_CODECS_AUDIO_FORMAT_H_
|
||||
|
||||
#include <map>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@ -61,6 +62,7 @@ struct SdpAudioFormat {
|
||||
};
|
||||
|
||||
void swap(SdpAudioFormat& a, SdpAudioFormat& b);
|
||||
std::ostream& operator<<(std::ostream& os, const SdpAudioFormat& saf);
|
||||
|
||||
// Information about how an audio format is treated by the codec implementation.
|
||||
// Contains basic information, such as sample rate and number of channels, which
|
||||
@ -119,6 +121,8 @@ struct AudioCodecInfo {
|
||||
// network conditions.
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const AudioCodecInfo& aci);
|
||||
|
||||
// AudioCodecSpec ties an audio format to specific information about the codec
|
||||
// and its implementation.
|
||||
struct AudioCodecSpec {
|
||||
@ -132,6 +136,8 @@ struct AudioCodecSpec {
|
||||
AudioCodecInfo info;
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const AudioCodecSpec& acs);
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_AUDIO_CODECS_AUDIO_FORMAT_H_
|
||||
|
||||
Reference in New Issue
Block a user