Let RtpFileSource use RtpFileReader
RtpFileSource used to implement it's own RTP dump file reader, but with this change it simply uses RtpFileReader. One benefit is that pcap files are now also supported. All NetEq test tools that use RtpFileSource are updated. BUG=2692 R=kwiberg@webrtc.org Review URL: https://webrtc-codereview.appspot.com/22839004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7367 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -91,13 +91,12 @@ int main(int argc, char* argv[]) {
|
||||
fprintf(out_file, "\n");
|
||||
|
||||
webrtc::scoped_ptr<webrtc::test::Packet> packet;
|
||||
while (!file_source->EndOfFile()) {
|
||||
while (true) {
|
||||
packet.reset(file_source->NextPacket());
|
||||
if (!packet.get()) {
|
||||
// This is probably an RTCP packet. Move on to the next one.
|
||||
continue;
|
||||
// End of file reached.
|
||||
break;
|
||||
}
|
||||
assert(packet.get());
|
||||
// Write packet data to file.
|
||||
fprintf(out_file,
|
||||
"%5u %10u %10u %5i %5i %2i %#08X",
|
||||
|
||||
Reference in New Issue
Block a user