| Index: media/filters/h264_to_annex_b_bitstream_converter_unittest.cc
|
| diff --git a/media/base/h264_bitstream_converter_unittest.cc b/media/filters/h264_to_annex_b_bitstream_converter_unittest.cc
|
| similarity index 96%
|
| rename from media/base/h264_bitstream_converter_unittest.cc
|
| rename to media/filters/h264_to_annex_b_bitstream_converter_unittest.cc
|
| index e9ceaf41ce24abf2deb69c473fe7984e78e78411..5b7c356cfb0ab2d2d992ebb1d596a220b1fc320a 100644
|
| --- a/media/base/h264_bitstream_converter_unittest.cc
|
| +++ b/media/filters/h264_to_annex_b_bitstream_converter_unittest.cc
|
| @@ -1,21 +1,21 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| -#include "media/base/h264_bitstream_converter.h"
|
| +#include "media/filters/h264_to_annex_b_bitstream_converter.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace media {
|
|
|
| -class H264BitstreamConverterTest : public testing::Test {
|
| +class H264ToAnnexBBitstreamConverterTest : public testing::Test {
|
| protected:
|
| - H264BitstreamConverterTest() {}
|
| + H264ToAnnexBBitstreamConverterTest() {}
|
|
|
| - virtual ~H264BitstreamConverterTest() {}
|
| + virtual ~H264ToAnnexBBitstreamConverterTest() {}
|
|
|
| private:
|
| - DISALLOW_COPY_AND_ASSIGN(H264BitstreamConverterTest);
|
| + DISALLOW_COPY_AND_ASSIGN(H264ToAnnexBBitstreamConverterTest);
|
| };
|
|
|
| static const uint8 kHeaderDataOkWithFieldLen4[] = {
|
| @@ -263,10 +263,10 @@ static const uint8 kPacketDataOkWithFieldLen4[] = {
|
| 0xEB, 0xE0
|
| };
|
|
|
| -TEST_F(H264BitstreamConverterTest, Conversion_Success) {
|
| +TEST_F(H264ToAnnexBBitstreamConverterTest, Success) {
|
| // Initialize converter.
|
| scoped_array<uint8> output;
|
| - H264BitstreamConverter converter;
|
| + H264ToAnnexBBitstreamConverter converter;
|
|
|
| // Parse the headers.
|
| uint32 config_size = converter.ParseConfigurationAndCalculateSize(
|
| @@ -303,9 +303,9 @@ TEST_F(H264BitstreamConverterTest, Conversion_Success) {
|
| // Classes allocated in stack are automatically destroyed.
|
| }
|
|
|
| -TEST_F(H264BitstreamConverterTest, Conversion_FailureNullData) {
|
| +TEST_F(H264ToAnnexBBitstreamConverterTest, FailureNullData) {
|
| // Initialize converter.
|
| - H264BitstreamConverter converter;
|
| + H264ToAnnexBBitstreamConverter converter;
|
|
|
| // Simulate situation where there is no header data.
|
| uint32 config_size = converter.ParseConfigurationAndCalculateSize(NULL, 0);
|
| @@ -331,9 +331,9 @@ TEST_F(H264BitstreamConverterTest, Conversion_FailureNullData) {
|
| // Classes allocated in stack are automatically destroyed.
|
| }
|
|
|
| -TEST_F(H264BitstreamConverterTest, Conversion_FailureHeaderBufferOverflow) {
|
| +TEST_F(H264ToAnnexBBitstreamConverterTest, FailureHeaderBufferOverflow) {
|
| // Initialize converter
|
| - H264BitstreamConverter converter;
|
| + H264ToAnnexBBitstreamConverter converter;
|
|
|
| // Simulate 10 sps AVCDecoderConfigurationRecord,
|
| // which would extend beyond the buffer.
|
| @@ -352,10 +352,10 @@ TEST_F(H264BitstreamConverterTest, Conversion_FailureHeaderBufferOverflow) {
|
| // Classes allocated in stack are automatically destroyed.
|
| }
|
|
|
| -TEST_F(H264BitstreamConverterTest, Conversion_FailureNalUnitBreakage) {
|
| +TEST_F(H264ToAnnexBBitstreamConverterTest, FailureNalUnitBreakage) {
|
| // Initialize converter.
|
| scoped_array<uint8> output;
|
| - H264BitstreamConverter converter;
|
| + H264ToAnnexBBitstreamConverter converter;
|
|
|
| // Parse the headers.
|
| uint32 config_size = converter.ParseConfigurationAndCalculateSize(
|
| @@ -401,10 +401,10 @@ TEST_F(H264BitstreamConverterTest, Conversion_FailureNalUnitBreakage) {
|
| // Classes allocated in stack are automatically destroyed.
|
| }
|
|
|
| -TEST_F(H264BitstreamConverterTest, Conversion_FailureTooSmallOutputBuffer) {
|
| +TEST_F(H264ToAnnexBBitstreamConverterTest, FailureTooSmallOutputBuffer) {
|
| // Initialize converter.
|
| scoped_array<uint8> output;
|
| - H264BitstreamConverter converter;
|
| + H264ToAnnexBBitstreamConverter converter;
|
|
|
| // Parse the headers.
|
| uint32 config_size = converter.ParseConfigurationAndCalculateSize(
|
|
|