content/common/gpu/media/avc_config_record_builder_unittest.cc
// Test building a config record with zero SPS and PPS data.
Test building a config record with zero SPS and PPS data.
Test building a config record with zero SPS and PPS data .
TEST(AVCConfigRecordBuilderTest, EmptyConfig) {
  content::AVCConfigRecordBuilder config;
  content::H264Parser parser;
  std::vector<uint8> config_data;
  content::H264NALU nalu;
  nalu.nal_unit_type = content::H264NALU::kIDRSlice;
  EXPECT_TRUE(config.ProcessNALU(&parser, nalu, &config_data));
  EXPECT_FALSE(config_data.empty());
  EXPECT_EQ(config.coded_width(), 0);
  EXPECT_EQ(config.coded_height(), 0);
  const uint8 kExpectedData[] = {
    0x01, 0x0, 0x00, 0x0, 0xff, 0xe0, 0x00,
  };
  std::vector<uint8> expected_config_data(
        kExpectedData, kExpectedData + arraysize(kExpectedData));
  EXPECT_EQ(config_data, expected_config_data);
}
TEST ( AVCConfigRecordBuilderTest , EmptyConfig ) { content :: AVCConfigRecordBuilder config ; content :: H264Parser parser ; std :: vector < uint8 > config_data ; content :: H264NALU nalu ; nalu . nal_unit_type = content :: H264NALU :: kIDRSlice ; EXPECT_TRUE ( config . ProcessNALU ( & parser , nalu , & config_data ) ) ; EXPECT_FALSE ( config_data . empty ( ) ) ; EXPECT_EQ ( config . coded_width ( ) , 0 ) ; EXPECT_EQ ( config . coded_height ( ) , 0 ) ; const uint8 kExpectedData [ ] = { 0x01 , 0x0 , 0x00 , 0x0 , 0xff , 0xe0 , 0x00 , } ; std :: vector < uint8 > expected_config_data ( kExpectedData , kExpectedData + arraysize ( kExpectedData ) ) ; EXPECT_EQ ( config_data , expected_config_data ) ; }
Test building a config record with zero SPS and PPS data.
Test building a config record with zero SPS and PPS data .
// Feed the builder a slice right away.