Index: webrtc/modules/rtp_rtcp/source/h264/sps_parser_unittest.cc |
diff --git a/webrtc/modules/rtp_rtcp/source/h264_sps_parser_unittest.cc b/webrtc/modules/rtp_rtcp/source/h264/sps_parser_unittest.cc |
similarity index 88% |
rename from webrtc/modules/rtp_rtcp/source/h264_sps_parser_unittest.cc |
rename to webrtc/modules/rtp_rtcp/source/h264/sps_parser_unittest.cc |
index 7a7e3ed2937a139ac87c35666015b415cfa71ccf..baf1f5fecf4b632f008b952ce6b641ea0ea39f8f 100644 |
--- a/webrtc/modules/rtp_rtcp/source/h264_sps_parser_unittest.cc |
+++ b/webrtc/modules/rtp_rtcp/source/h264/sps_parser_unittest.cc |
@@ -8,7 +8,7 @@ |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
-#include "webrtc/modules/rtp_rtcp/source/h264_sps_parser.h" |
+#include "webrtc/modules/rtp_rtcp/source/h264/sps_parser.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -122,10 +122,10 @@ TEST(H264SpsParserTest, TestSampleSPSHdLandscape) { |
const uint8_t buffer[] = {0x7A, 0x00, 0x1F, 0xBC, 0xD9, 0x40, 0x50, 0x05, |
0xBA, 0x10, 0x00, 0x00, 0x03, 0x00, 0xC0, 0x00, |
0x00, 0x2A, 0xE0, 0xF1, 0x83, 0x19, 0x60}; |
- H264SpsParser parser = H264SpsParser(buffer, arraysize(buffer)); |
+ SpsParser parser = SpsParser(buffer, arraysize(buffer)); |
EXPECT_TRUE(parser.Parse()); |
- EXPECT_EQ(1280u, parser.width()); |
- EXPECT_EQ(720u, parser.height()); |
+ EXPECT_EQ(1280u, parser.GetState()->width); |
+ EXPECT_EQ(720u, parser.GetState()->height); |
} |
TEST(H264SpsParserTest, TestSampleSPSVgaLandscape) { |
@@ -134,10 +134,10 @@ TEST(H264SpsParserTest, TestSampleSPSVgaLandscape) { |
const uint8_t buffer[] = {0x7A, 0x00, 0x1E, 0xBC, 0xD9, 0x40, 0xA0, 0x2F, |
0xF8, 0x98, 0x40, 0x00, 0x00, 0x03, 0x01, 0x80, |
0x00, 0x00, 0x56, 0x83, 0xC5, 0x8B, 0x65, 0x80}; |
- H264SpsParser parser = H264SpsParser(buffer, arraysize(buffer)); |
+ SpsParser parser = SpsParser(buffer, arraysize(buffer)); |
EXPECT_TRUE(parser.Parse()); |
- EXPECT_EQ(640u, parser.width()); |
- EXPECT_EQ(360u, parser.height()); |
+ EXPECT_EQ(640u, parser.GetState()->width); |
+ EXPECT_EQ(360u, parser.GetState()->height); |
} |
TEST(H264SpsParserTest, TestSampleSPSWeirdResolution) { |
@@ -146,28 +146,28 @@ TEST(H264SpsParserTest, TestSampleSPSWeirdResolution) { |
const uint8_t buffer[] = {0x7A, 0x00, 0x0D, 0xBC, 0xD9, 0x43, 0x43, 0x3E, |
0x5E, 0x10, 0x00, 0x00, 0x03, 0x00, 0x60, 0x00, |
0x00, 0x15, 0xA0, 0xF1, 0x42, 0x99, 0x60}; |
- H264SpsParser parser = H264SpsParser(buffer, arraysize(buffer)); |
+ SpsParser parser = SpsParser(buffer, arraysize(buffer)); |
EXPECT_TRUE(parser.Parse()); |
- EXPECT_EQ(200u, parser.width()); |
- EXPECT_EQ(400u, parser.height()); |
+ EXPECT_EQ(200u, parser.GetState()->width); |
+ EXPECT_EQ(400u, parser.GetState()->height); |
} |
TEST(H264SpsParserTest, TestSyntheticSPSQvgaLandscape) { |
uint8_t buffer[kSpsBufferMaxSize] = {0}; |
GenerateFakeSps(320u, 180u, buffer); |
- H264SpsParser parser = H264SpsParser(buffer, arraysize(buffer)); |
+ SpsParser parser = SpsParser(buffer, arraysize(buffer)); |
EXPECT_TRUE(parser.Parse()); |
- EXPECT_EQ(320u, parser.width()); |
- EXPECT_EQ(180u, parser.height()); |
+ EXPECT_EQ(320u, parser.GetState()->width); |
+ EXPECT_EQ(180u, parser.GetState()->height); |
} |
TEST(H264SpsParserTest, TestSyntheticSPSWeirdResolution) { |
uint8_t buffer[kSpsBufferMaxSize] = {0}; |
GenerateFakeSps(156u, 122u, buffer); |
- H264SpsParser parser = H264SpsParser(buffer, arraysize(buffer)); |
+ SpsParser parser = SpsParser(buffer, arraysize(buffer)); |
EXPECT_TRUE(parser.Parse()); |
- EXPECT_EQ(156u, parser.width()); |
- EXPECT_EQ(122u, parser.height()); |
+ EXPECT_EQ(156u, parser.GetState()->width); |
+ EXPECT_EQ(122u, parser.GetState()->height); |
} |
} // namespace webrtc |