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

Unified Diff: media/formats/mp2t/es_parser_adts_unittest.cc

Issue 2063443002: Return parsed sample frequency of ADTS header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test Created 4 years, 6 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
« no previous file with comments | « media/formats/mp2t/es_parser_adts.cc ('k') | media/formats/mp2t/es_parser_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp2t/es_parser_adts_unittest.cc
diff --git a/media/formats/mp2t/es_parser_adts_unittest.cc b/media/formats/mp2t/es_parser_adts_unittest.cc
index 59fa85047c1cf298a54a4a7f1db92614968b4dbe..68fc24b10d90a4cd7ae0b6074949bae3406ef5cf 100644
--- a/media/formats/mp2t/es_parser_adts_unittest.cc
+++ b/media/formats/mp2t/es_parser_adts_unittest.cc
@@ -17,6 +17,9 @@ namespace media {
class AudioDecoderConfig;
namespace mp2t {
+namespace {
+const char kAac44100PacketTimestamp[] = "(0) (23) (46) (69)";
+}
class EsParserAdtsTest : public EsParserTestBase,
public testing::Test {
@@ -73,6 +76,16 @@ TEST_F(EsParserAdtsTest, AacLcAdts) {
EXPECT_EQ(1u, config_count_);
EXPECT_EQ(14u, buffer_count_);
}
+
+TEST_F(EsParserAdtsTest, AacSampleRate) {
+ std::vector<Packet> pes_packets =
+ LoadPacketsFromFiles("aac-44100-packet-%d", 4);
+
+ pes_packets.front().pts = base::TimeDelta::FromSeconds(0);
+ EXPECT_TRUE(Process(pes_packets, false));
+ EXPECT_EQ(4u, buffer_count_);
+ EXPECT_EQ(kAac44100PacketTimestamp, buffer_timestamps_);
+}
} // namespace mp2t
} // namespace media
« no previous file with comments | « media/formats/mp2t/es_parser_adts.cc ('k') | media/formats/mp2t/es_parser_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698