Index: webrtc/media/base/codec.h |
diff --git a/webrtc/media/base/codec.h b/webrtc/media/base/codec.h |
index 7dd8889671beffeee56216c9548b8e3549437d42..0aa0d58ef76b6cc07ec10c5c0a0ea2b88b5fd487 100644 |
--- a/webrtc/media/base/codec.h |
+++ b/webrtc/media/base/codec.h |
@@ -144,6 +144,28 @@ struct AudioCodec : public Codec { |
} |
}; |
+inline std::ostream& operator<<(std::ostream& os, const AudioCodec& ac) { |
+ os << "{id: " << ac.id; |
+ os << ", name: " << ac.name; |
+ os << ", clockrate: " << ac.clockrate; |
+ os << ", bitrate: " << ac.bitrate; |
+ os << ", channels: " << ac.channels; |
+ os << ", params: {"; |
+ const char* sep = ""; |
+ for (const auto& kv : ac.params) { |
+ os << sep << kv.first << ": " << kv.second; |
+ sep = ", "; |
+ } |
+ os << "}, feedback_params: {"; |
+ sep = ""; |
+ for (const FeedbackParam& fp : ac.feedback_params.params()) { |
+ os << sep << fp.id() << ": " << fp.param(); |
+ sep = ", "; |
+ } |
+ os << "}}"; |
+ return os; |
+} |
+ |
struct VideoCodec : public Codec { |
// Creates a codec with the given parameters. |
VideoCodec(int id, const std::string& name); |