Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc

Issue 1427923003: Re-enable PCAP reading in neteq_rtpplay (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
diff --git a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
index 0aaf8c71fdfc8389d591797b6d2b6da1fc66bc14..adce1cfd7906f6741e5a26a64bf2a283bb60ecac 100644
--- a/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
+++ b/webrtc/modules/audio_coding/neteq/tools/neteq_rtpplay.cc
@@ -399,23 +399,12 @@ int main(int argc, char* argv[]) {
printf("Input file: %s\n", argv[1]);
- // TODO(ivoc): Modify the RtpFileSource::Create and RtcEventLogSource::Create
- // functions to return a nullptr on failure instead of crashing
- // the program.
-
- // This temporary solution uses a RtpFileReader directly to check if the file
- // is a valid RtpDump file.
bool is_rtp_dump = false;
- {
- rtc::scoped_ptr<webrtc::test::RtpFileReader> rtp_reader(
- webrtc::test::RtpFileReader::Create(
- webrtc::test::RtpFileReader::kRtpDump, argv[1]));
- if (rtp_reader)
- is_rtp_dump = true;
- }
rtc::scoped_ptr<webrtc::test::PacketSource> file_source;
webrtc::test::RtcEventLogSource* event_log_source = nullptr;
- if (is_rtp_dump) {
+ if (webrtc::test::RtpFileSource::ValidRtpDump(argv[1]) ||
+ webrtc::test::RtpFileSource::ValidPcap(argv[1])) {
+ is_rtp_dump = true;
file_source.reset(webrtc::test::RtpFileSource::Create(argv[1]));
} else {
event_log_source = webrtc::test::RtcEventLogSource::Create(argv[1]);

Powered by Google App Engine
This is Rietveld 408576698