Index: webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc |
diff --git a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc |
index 9681ad17ea827ed2477754b169c0d061ae0b8cc9..e3a829bd243a7e4d5f1e203ad5587e2c96cd424b 100644 |
--- a/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc |
+++ b/webrtc/modules/audio_coding/neteq/tools/rtp_file_source.cc |
@@ -32,6 +32,18 @@ RtpFileSource* RtpFileSource::Create(const std::string& file_name) { |
return source; |
} |
+bool RtpFileSource::ValidRtpDump(const std::string& file_name) { |
+ rtc::scoped_ptr<RtpFileReader> temp_file( |
+ RtpFileReader::Create(RtpFileReader::kRtpDump, file_name)); |
+ return !!temp_file; |
ivoc
2015/11/02 15:27:09
I have a hard time understanding the !!, is there
hlundin-webrtc
2015/11/02 15:41:21
I blame kwiberg for recruiting me to the dark side
kwiberg-webrtc
2015/11/02 19:24:59
!x is true if x is false, false if x is true. So !
hlundin-webrtc
2015/11/03 06:44:41
Thanks for providing that invaluable truth table.
|
+} |
+ |
+bool RtpFileSource::ValidPcap(const std::string& file_name) { |
+ rtc::scoped_ptr<RtpFileReader> temp_file( |
+ RtpFileReader::Create(RtpFileReader::kPcap, file_name)); |
+ return !!temp_file; |
+} |
+ |
RtpFileSource::~RtpFileSource() { |
} |