CodecInst operator<<
I always find myself re-writing this function for debug purposes. It'd save so much time if it already existed... BUG=none Review-Url: https://codereview.webrtc.org/2589773002 Cr-Commit-Position: refs/heads/master@{#15677}
This commit is contained in:
parent
35b41a29b3
commit
5bf4e0810c
@ -14,6 +14,7 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -328,6 +329,16 @@ struct CodecInst {
|
||||
}
|
||||
|
||||
bool operator!=(const CodecInst& other) const { return !(*this == other); }
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& os, const CodecInst& ci) {
|
||||
os << "{pltype: " << ci.pltype;
|
||||
os << ", plname: " << ci.plname;
|
||||
os << ", plfreq: " << ci.plfreq;
|
||||
os << ", pacsize: " << ci.pacsize;
|
||||
os << ", channels: " << ci.channels;
|
||||
os << ", rate: " << ci.rate << "}";
|
||||
return os;
|
||||
}
|
||||
};
|
||||
|
||||
// RTP
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user