diff --git a/packager/media/formats/mp4/aac_audio_specific_config.cc b/packager/media/codecs/aac_audio_specific_config.cc similarity index 98% rename from packager/media/formats/mp4/aac_audio_specific_config.cc rename to packager/media/codecs/aac_audio_specific_config.cc index 72d59f1781..9ca9d14b5b 100644 --- a/packager/media/formats/mp4/aac_audio_specific_config.cc +++ b/packager/media/codecs/aac_audio_specific_config.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "packager/media/formats/mp4/aac_audio_specific_config.h" +#include "packager/media/codecs/aac_audio_specific_config.h" #include @@ -25,8 +25,6 @@ const uint8_t kChannelConfigs[] = {0, 1, 2, 3, 4, 5, 6, 8}; namespace shaka { namespace media { -namespace mp4 { - AACAudioSpecificConfig::AACAudioSpecificConfig() : audio_object_type_(0), frequency_index_(0), @@ -260,7 +258,5 @@ bool AACAudioSpecificConfig::SkipGASpecificConfig(BitReader* bit_reader) const { return true; } -} // namespace mp4 - } // namespace media } // namespace shaka diff --git a/packager/media/formats/mp4/aac_audio_specific_config.h b/packager/media/codecs/aac_audio_specific_config.h similarity index 93% rename from packager/media/formats/mp4/aac_audio_specific_config.h rename to packager/media/codecs/aac_audio_specific_config.h index d249f55a48..e7e61742b3 100644 --- a/packager/media/formats/mp4/aac_audio_specific_config.h +++ b/packager/media/codecs/aac_audio_specific_config.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef MEDIA_FORMATS_MP4_AAC_AUDIO_SPECIFIC_CONFIG_H_ -#define MEDIA_FORMATS_MP4_AAC_AUDIO_SPECIFIC_CONFIG_H_ +#ifndef MEDIA_CODECS_AAC_AUDIO_SPECIFIC_CONFIG_H_ +#define MEDIA_CODECS_AAC_AUDIO_SPECIFIC_CONFIG_H_ #include #include @@ -15,8 +15,6 @@ namespace media { class BitReader; -namespace mp4 { - // Methods are virtual for mocking. /// This class parses the AAC information from decoder specific information /// embedded in the @b esds box in an ISO BMFF file. @@ -85,8 +83,7 @@ class AACAudioSpecificConfig { uint8_t num_channels_; }; -} // namespace mp4 } // namespace media } // namespace shaka -#endif // MEDIA_FORMATS_MP4_AAC_AUDIO_SPECIFIC_CONFIG_H_ +#endif // MEDIA_CODECS_AAC_AUDIO_SPECIFIC_CONFIG_H_ diff --git a/packager/media/formats/mp4/aac_audio_specific_config_unittest.cc b/packager/media/codecs/aac_audio_specific_config_unittest.cc similarity index 97% rename from packager/media/formats/mp4/aac_audio_specific_config_unittest.cc rename to packager/media/codecs/aac_audio_specific_config_unittest.cc index 77b0a8bf87..a5432d83ea 100644 --- a/packager/media/formats/mp4/aac_audio_specific_config_unittest.cc +++ b/packager/media/codecs/aac_audio_specific_config_unittest.cc @@ -4,11 +4,10 @@ #include -#include "packager/media/formats/mp4/aac_audio_specific_config.h" +#include "packager/media/codecs/aac_audio_specific_config.h" namespace shaka { namespace media { -namespace mp4 { TEST(AACAudioSpecificConfigTest, BasicProfileTest) { AACAudioSpecificConfig aac_audio_specific_config; @@ -141,6 +140,5 @@ TEST(AACAudioSpecificConfigTest, IncorrectChannelTest) { EXPECT_TRUE(aac_audio_specific_config.Parse(data)); } -} // namespace mp4 } // namespace media } // namespace shaka diff --git a/packager/media/filters/avc_decoder_configuration_record.cc b/packager/media/codecs/avc_decoder_configuration_record.cc similarity index 96% rename from packager/media/filters/avc_decoder_configuration_record.cc rename to packager/media/codecs/avc_decoder_configuration_record.cc index df1e56599f..acee168139 100644 --- a/packager/media/filters/avc_decoder_configuration_record.cc +++ b/packager/media/codecs/avc_decoder_configuration_record.cc @@ -4,13 +4,13 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/avc_decoder_configuration_record.h" +#include "packager/media/codecs/avc_decoder_configuration_record.h" #include "packager/base/strings/string_number_conversions.h" #include "packager/base/strings/string_util.h" #include "packager/media/base/buffer_reader.h" #include "packager/media/base/rcheck.h" -#include "packager/media/filters/h264_parser.h" +#include "packager/media/codecs/h264_parser.h" namespace shaka { namespace media { diff --git a/packager/media/filters/avc_decoder_configuration_record.h b/packager/media/codecs/avc_decoder_configuration_record.h similarity index 87% rename from packager/media/filters/avc_decoder_configuration_record.h rename to packager/media/codecs/avc_decoder_configuration_record.h index 7682a37498..ab53af66b3 100644 --- a/packager/media/filters/avc_decoder_configuration_record.h +++ b/packager/media/codecs/avc_decoder_configuration_record.h @@ -4,15 +4,15 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_AVC_DECODER_CONFIGURATION_RECORD_H_ -#define MEDIA_FILTERS_AVC_DECODER_CONFIGURATION_RECORD_H_ +#ifndef MEDIA_CODECS_AVC_DECODER_CONFIGURATION_RECORD_H_ +#define MEDIA_CODECS_AVC_DECODER_CONFIGURATION_RECORD_H_ #include #include #include #include "packager/base/macros.h" -#include "packager/media/filters/decoder_configuration_record.h" +#include "packager/media/codecs/decoder_configuration_record.h" namespace shaka { namespace media { @@ -61,4 +61,4 @@ class AVCDecoderConfigurationRecord : public DecoderConfigurationRecord { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_AVC_DECODER_CONFIGURATION_RECORD_H_ +#endif // MEDIA_CODECS_AVC_DECODER_CONFIGURATION_RECORD_H_ diff --git a/packager/media/filters/avc_decoder_configuration_record_unittest.cc b/packager/media/codecs/avc_decoder_configuration_record_unittest.cc similarity index 97% rename from packager/media/filters/avc_decoder_configuration_record_unittest.cc rename to packager/media/codecs/avc_decoder_configuration_record_unittest.cc index 74dbfaedd5..e00f60b986 100644 --- a/packager/media/filters/avc_decoder_configuration_record_unittest.cc +++ b/packager/media/codecs/avc_decoder_configuration_record_unittest.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/avc_decoder_configuration_record.h" +#include "packager/media/codecs/avc_decoder_configuration_record.h" #include diff --git a/packager/media/filters/filters.gyp b/packager/media/codecs/codecs.gyp similarity index 83% rename from packager/media/filters/filters.gyp rename to packager/media/codecs/codecs.gyp index 29663614cd..477e2a295a 100644 --- a/packager/media/filters/filters.gyp +++ b/packager/media/codecs/codecs.gyp @@ -1,7 +1,7 @@ # Copyright 2014 Google Inc. All rights reserved. # # Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE filters or at +# license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd { @@ -10,15 +10,19 @@ ], 'targets': [ { - 'target_name': 'filters', + 'target_name': 'codecs', 'type': '<(component)', 'sources': [ + 'aac_audio_specific_config.cc', + 'aac_audio_specific_config.h', 'avc_decoder_configuration_record.cc', 'avc_decoder_configuration_record.h', 'decoder_configuration_record.cc', 'decoder_configuration_record.h', 'ec3_audio_util.cc', 'ec3_audio_util.h', + 'es_descriptor.cc', + 'es_descriptor.h', 'h264_byte_to_unit_stream_converter.cc', 'h264_byte_to_unit_stream_converter.h', 'h264_parser.cc', @@ -37,6 +41,8 @@ 'nal_unit_to_byte_stream_converter.h', 'nalu_reader.cc', 'nalu_reader.h', + 'video_slice_header_parser.cc', + 'video_slice_header_parser.h', 'vp_codec_configuration_record.cc', 'vp_codec_configuration_record.h', 'vp8_parser.cc', @@ -50,11 +56,13 @@ ], }, { - 'target_name': 'filters_unittest', + 'target_name': 'codecs_unittest', 'type': '<(gtest_target_type)', 'sources': [ + 'aac_audio_specific_config_unittest.cc', 'avc_decoder_configuration_record_unittest.cc', 'ec3_audio_util_unittest.cc', + 'es_descriptor_unittest.cc', 'h264_byte_to_unit_stream_converter_unittest.cc', 'h264_parser_unittest.cc', 'h265_byte_to_unit_stream_converter_unittest.cc', @@ -63,6 +71,7 @@ 'hevc_decoder_configuration_record_unittest.cc', 'nal_unit_to_byte_stream_converter_unittest.cc', 'nalu_reader_unittest.cc', + 'video_slice_header_parser_unittest.cc', 'vp_codec_configuration_record_unittest.cc', 'vp8_parser_unittest.cc', 'vp9_parser_unittest.cc', @@ -72,7 +81,7 @@ '../../testing/gmock.gyp:gmock', '../../testing/gtest.gyp:gtest', '../test/media_test.gyp:media_test_support', - 'filters', + 'codecs', ], }, ], diff --git a/packager/media/filters/decoder_configuration_record.cc b/packager/media/codecs/decoder_configuration_record.cc similarity index 91% rename from packager/media/filters/decoder_configuration_record.cc rename to packager/media/codecs/decoder_configuration_record.cc index 2cfcdeabc6..7e437c26d5 100644 --- a/packager/media/filters/decoder_configuration_record.cc +++ b/packager/media/codecs/decoder_configuration_record.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/decoder_configuration_record.h" +#include "packager/media/codecs/decoder_configuration_record.h" namespace shaka { namespace media { diff --git a/packager/media/filters/decoder_configuration_record.h b/packager/media/codecs/decoder_configuration_record.h similarity index 91% rename from packager/media/filters/decoder_configuration_record.h rename to packager/media/codecs/decoder_configuration_record.h index 4adc753ec5..533bf97d55 100644 --- a/packager/media/filters/decoder_configuration_record.h +++ b/packager/media/codecs/decoder_configuration_record.h @@ -4,14 +4,14 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_DECODER_CONFIGURATION_RECORD_H_ -#define MEDIA_FILTERS_DECODER_CONFIGURATION_RECORD_H_ +#ifndef MEDIA_CODECS_DECODER_CONFIGURATION_RECORD_H_ +#define MEDIA_CODECS_DECODER_CONFIGURATION_RECORD_H_ #include #include "packager/base/logging.h" #include "packager/base/macros.h" -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/nalu_reader.h" namespace shaka { namespace media { @@ -77,4 +77,4 @@ class DecoderConfigurationRecord { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_DECODER_CONFIGURATION_RECORD_H_ +#endif // MEDIA_CODECS_DECODER_CONFIGURATION_RECORD_H_ diff --git a/packager/media/filters/ec3_audio_util.cc b/packager/media/codecs/ec3_audio_util.cc similarity index 98% rename from packager/media/filters/ec3_audio_util.cc rename to packager/media/codecs/ec3_audio_util.cc index e7d23df71f..a8588d9fa0 100644 --- a/packager/media/filters/ec3_audio_util.cc +++ b/packager/media/codecs/ec3_audio_util.cc @@ -6,7 +6,7 @@ #include "packager/media/base/bit_reader.h" #include "packager/media/base/rcheck.h" -#include "packager/media/filters/ec3_audio_util.h" +#include "packager/media/codecs/ec3_audio_util.h" namespace shaka { namespace media { diff --git a/packager/media/filters/ec3_audio_util.h b/packager/media/codecs/ec3_audio_util.h similarity index 84% rename from packager/media/filters/ec3_audio_util.h rename to packager/media/codecs/ec3_audio_util.h index b99c224146..be85e915be 100644 --- a/packager/media/filters/ec3_audio_util.h +++ b/packager/media/codecs/ec3_audio_util.h @@ -6,8 +6,8 @@ // // Enhanced AC3 audio utility functions. -#ifndef MEDIA_FILTERS_EC3_AUDIO_UTIL_H_ -#define MEDIA_FILTERS_EC3_AUDIO_UTIL_H_ +#ifndef MEDIA_CODECS_EC3_AUDIO_UTIL_H_ +#define MEDIA_CODECS_EC3_AUDIO_UTIL_H_ #include #include @@ -24,4 +24,4 @@ bool CalculateEC3ChannelMap(const std::vector& ec3_data, } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_EC3_AUDIO_UTIL_H_ +#endif // MEDIA_CODECS_EC3_AUDIO_UTIL_H_ diff --git a/packager/media/filters/ec3_audio_util_unittest.cc b/packager/media/codecs/ec3_audio_util_unittest.cc similarity index 97% rename from packager/media/filters/ec3_audio_util_unittest.cc rename to packager/media/codecs/ec3_audio_util_unittest.cc index 45a970c501..e78cca84e4 100644 --- a/packager/media/filters/ec3_audio_util_unittest.cc +++ b/packager/media/codecs/ec3_audio_util_unittest.cc @@ -7,7 +7,7 @@ #include #include "packager/base/macros.h" -#include "packager/media/filters/ec3_audio_util.h" +#include "packager/media/codecs/ec3_audio_util.h" namespace shaka { namespace media { diff --git a/packager/media/formats/mp4/es_descriptor.cc b/packager/media/codecs/es_descriptor.cc similarity index 98% rename from packager/media/formats/mp4/es_descriptor.cc rename to packager/media/codecs/es_descriptor.cc index a43172a93e..12a5f5c4b4 100644 --- a/packager/media/formats/mp4/es_descriptor.cc +++ b/packager/media/codecs/es_descriptor.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "packager/media/formats/mp4/es_descriptor.h" +#include "packager/media/codecs/es_descriptor.h" #include "packager/media/base/bit_reader.h" #include "packager/media/base/buffer_writer.h" @@ -62,8 +62,6 @@ const uint32_t kUnknownBitrate = 0; } // namespace -namespace mp4 { - ESDescriptor::ESDescriptor() : esid_(0), object_type_(kForbidden), @@ -190,7 +188,5 @@ size_t ESDescriptor::ComputeSize() const { return es_size + kHeaderSize; } -} // namespace mp4 - } // namespace media } // namespace shaka diff --git a/packager/media/formats/mp4/es_descriptor.h b/packager/media/codecs/es_descriptor.h similarity index 94% rename from packager/media/formats/mp4/es_descriptor.h rename to packager/media/codecs/es_descriptor.h index a037a9efab..c49bbe719f 100644 --- a/packager/media/formats/mp4/es_descriptor.h +++ b/packager/media/codecs/es_descriptor.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef MEDIA_FORMATS_MP4_ES_DESCRIPTOR_H_ -#define MEDIA_FORMATS_MP4_ES_DESCRIPTOR_H_ +#ifndef MEDIA_CODECS_ES_DESCRIPTOR_H_ +#define MEDIA_CODECS_ES_DESCRIPTOR_H_ #include #include @@ -16,8 +16,6 @@ namespace media { class BitReader; class BufferWriter; -namespace mp4 { - // The following values are extracted from ISO 14496 Part 1 Table 5 - // objectTypeIndication Values. Only values currently in use are included. enum ObjectType { @@ -90,9 +88,7 @@ class ESDescriptor { std::vector decoder_specific_info_; }; -} // namespace mp4 - } // namespace media } // namespace shaka -#endif // MEDIA_FORMATS_MP4_ES_DESCRIPTOR_H_ +#endif // MEDIA_CODECS_ES_DESCRIPTOR_H_ diff --git a/packager/media/formats/mp4/es_descriptor_unittest.cc b/packager/media/codecs/es_descriptor_unittest.cc similarity index 96% rename from packager/media/formats/mp4/es_descriptor_unittest.cc rename to packager/media/codecs/es_descriptor_unittest.cc index 415629d1e1..abe6fe32fd 100644 --- a/packager/media/formats/mp4/es_descriptor_unittest.cc +++ b/packager/media/codecs/es_descriptor_unittest.cc @@ -4,13 +4,11 @@ #include -#include "packager/media/formats/mp4/es_descriptor.h" +#include "packager/media/codecs/es_descriptor.h" namespace shaka { namespace media { -namespace mp4 { - TEST(ESDescriptorTest, SingleByteLengthTest) { ESDescriptor es_desc; uint8_t buffer[] = {0x03, 0x19, 0x00, 0x01, 0x00, 0x04, 0x11, 0x40, 0x15, @@ -76,7 +74,5 @@ TEST(ESDescriptorTest, FiveByteLengthTest) { EXPECT_EQ(es_desc.decoder_specific_info().size(), 0u); } -} // namespace mp4 - } // namespace media } // namespace shaka diff --git a/packager/media/filters/h264_byte_to_unit_stream_converter.cc b/packager/media/codecs/h264_byte_to_unit_stream_converter.cc similarity index 95% rename from packager/media/filters/h264_byte_to_unit_stream_converter.cc rename to packager/media/codecs/h264_byte_to_unit_stream_converter.cc index a079b80365..9de79e9a79 100644 --- a/packager/media/filters/h264_byte_to_unit_stream_converter.cc +++ b/packager/media/codecs/h264_byte_to_unit_stream_converter.cc @@ -4,13 +4,13 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/h264_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h264_byte_to_unit_stream_converter.h" #include #include "packager/base/logging.h" #include "packager/media/base/buffer_writer.h" -#include "packager/media/filters/h264_parser.h" +#include "packager/media/codecs/h264_parser.h" namespace shaka { namespace media { diff --git a/packager/media/filters/h264_byte_to_unit_stream_converter.h b/packager/media/codecs/h264_byte_to_unit_stream_converter.h similarity index 80% rename from packager/media/filters/h264_byte_to_unit_stream_converter.h rename to packager/media/codecs/h264_byte_to_unit_stream_converter.h index 823b78b3fd..5b177eeee2 100644 --- a/packager/media/filters/h264_byte_to_unit_stream_converter.h +++ b/packager/media/codecs/h264_byte_to_unit_stream_converter.h @@ -4,15 +4,15 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_H264_BYTE_TO_UNIT_STREAM_CONVERTER_H_ -#define MEDIA_FILTERS_H264_BYTE_TO_UNIT_STREAM_CONVERTER_H_ +#ifndef MEDIA_CODECS_H264_BYTE_TO_UNIT_STREAM_CONVERTER_H_ +#define MEDIA_CODECS_H264_BYTE_TO_UNIT_STREAM_CONVERTER_H_ #include #include #include -#include "packager/media/filters/h26x_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h26x_byte_to_unit_stream_converter.h" namespace shaka { namespace media { @@ -42,4 +42,4 @@ class H264ByteToUnitStreamConverter : public H26xByteToUnitStreamConverter { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_H264_BYTE_TO_UNIT_STREAM_CONVERTER_H_ +#endif // MEDIA_CODECS_H264_BYTE_TO_UNIT_STREAM_CONVERTER_H_ diff --git a/packager/media/filters/h264_byte_to_unit_stream_converter_unittest.cc b/packager/media/codecs/h264_byte_to_unit_stream_converter_unittest.cc similarity index 97% rename from packager/media/filters/h264_byte_to_unit_stream_converter_unittest.cc rename to packager/media/codecs/h264_byte_to_unit_stream_converter_unittest.cc index 756f040e07..eeb54c3ded 100644 --- a/packager/media/filters/h264_byte_to_unit_stream_converter_unittest.cc +++ b/packager/media/codecs/h264_byte_to_unit_stream_converter_unittest.cc @@ -8,7 +8,7 @@ #include #include "packager/base/strings/string_number_conversions.h" -#include "packager/media/filters/h264_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h264_byte_to_unit_stream_converter.h" #include "packager/media/test/test_data_util.h" namespace { diff --git a/packager/media/filters/h264_parser.cc b/packager/media/codecs/h264_parser.cc similarity index 99% rename from packager/media/filters/h264_parser.cc rename to packager/media/codecs/h264_parser.cc index 9bd0bb7a68..252f85cdd4 100644 --- a/packager/media/filters/h264_parser.cc +++ b/packager/media/codecs/h264_parser.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "packager/media/filters/h264_parser.h" +#include "packager/media/codecs/h264_parser.h" #include "packager/base/logging.h" #include "packager/base/memory/scoped_ptr.h" diff --git a/packager/media/filters/h264_parser.h b/packager/media/codecs/h264_parser.h similarity index 97% rename from packager/media/filters/h264_parser.h rename to packager/media/codecs/h264_parser.h index fd4371d9a3..0663d1c2ca 100644 --- a/packager/media/filters/h264_parser.h +++ b/packager/media/codecs/h264_parser.h @@ -4,16 +4,16 @@ // // This file contains an implementation of an H264 Annex-B video stream parser. -#ifndef MEDIA_FILTERS_H264_PARSER_H_ -#define MEDIA_FILTERS_H264_PARSER_H_ +#ifndef MEDIA_CODECS_H264_PARSER_H_ +#define MEDIA_CODECS_H264_PARSER_H_ #include #include #include -#include "packager/media/filters/h26x_bit_reader.h" -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/h26x_bit_reader.h" +#include "packager/media/codecs/nalu_reader.h" namespace shaka { namespace media { @@ -335,4 +335,4 @@ class H264Parser { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_H264_PARSER_H_ +#endif // MEDIA_CODECS_H264_PARSER_H_ diff --git a/packager/media/filters/h264_parser_unittest.cc b/packager/media/codecs/h264_parser_unittest.cc similarity index 98% rename from packager/media/filters/h264_parser_unittest.cc rename to packager/media/codecs/h264_parser_unittest.cc index f705e1b078..2a7329ff36 100644 --- a/packager/media/filters/h264_parser_unittest.cc +++ b/packager/media/codecs/h264_parser_unittest.cc @@ -5,8 +5,8 @@ #include #include "packager/base/logging.h" +#include "packager/media/codecs/h264_parser.h" #include "packager/media/test/test_data_util.h" -#include "packager/media/filters/h264_parser.h" namespace shaka { namespace media { diff --git a/packager/media/filters/h265_byte_to_unit_stream_converter.cc b/packager/media/codecs/h265_byte_to_unit_stream_converter.cc similarity index 97% rename from packager/media/filters/h265_byte_to_unit_stream_converter.cc rename to packager/media/codecs/h265_byte_to_unit_stream_converter.cc index 6e77f822d7..17da8f37f6 100644 --- a/packager/media/filters/h265_byte_to_unit_stream_converter.cc +++ b/packager/media/codecs/h265_byte_to_unit_stream_converter.cc @@ -4,14 +4,14 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/h265_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h265_byte_to_unit_stream_converter.h" #include #include "packager/base/logging.h" #include "packager/media/base/buffer_writer.h" #include "packager/media/base/rcheck.h" -#include "packager/media/filters/h265_parser.h" +#include "packager/media/codecs/h265_parser.h" namespace shaka { namespace media { diff --git a/packager/media/filters/h265_byte_to_unit_stream_converter.h b/packager/media/codecs/h265_byte_to_unit_stream_converter.h similarity index 81% rename from packager/media/filters/h265_byte_to_unit_stream_converter.h rename to packager/media/codecs/h265_byte_to_unit_stream_converter.h index ff4111f82f..d9f87966ad 100644 --- a/packager/media/filters/h265_byte_to_unit_stream_converter.h +++ b/packager/media/codecs/h265_byte_to_unit_stream_converter.h @@ -4,15 +4,15 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_H265_BYTE_TO_UNIT_STREAM_CONVERTER_H_ -#define MEDIA_FILTERS_H265_BYTE_TO_UNIT_STREAM_CONVERTER_H_ +#ifndef MEDIA_CODECS_H265_BYTE_TO_UNIT_STREAM_CONVERTER_H_ +#define MEDIA_CODECS_H265_BYTE_TO_UNIT_STREAM_CONVERTER_H_ #include #include #include -#include "packager/media/filters/h26x_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h26x_byte_to_unit_stream_converter.h" namespace shaka { namespace media { @@ -43,4 +43,4 @@ class H265ByteToUnitStreamConverter : public H26xByteToUnitStreamConverter { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_H265_BYTE_TO_UNIT_STREAM_CONVERTER_H_ +#endif // MEDIA_CODECS_H265_BYTE_TO_UNIT_STREAM_CONVERTER_H_ diff --git a/packager/media/filters/h265_byte_to_unit_stream_converter_unittest.cc b/packager/media/codecs/h265_byte_to_unit_stream_converter_unittest.cc similarity index 95% rename from packager/media/filters/h265_byte_to_unit_stream_converter_unittest.cc rename to packager/media/codecs/h265_byte_to_unit_stream_converter_unittest.cc index 41daff588c..bfa9976d01 100644 --- a/packager/media/filters/h265_byte_to_unit_stream_converter_unittest.cc +++ b/packager/media/codecs/h265_byte_to_unit_stream_converter_unittest.cc @@ -8,8 +8,8 @@ #include #include "packager/base/strings/string_number_conversions.h" -#include "packager/media/filters/h265_byte_to_unit_stream_converter.h" -#include "packager/media/filters/hevc_decoder_configuration_record.h" +#include "packager/media/codecs/h265_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/hevc_decoder_configuration_record.h" #include "packager/media/test/test_data_util.h" namespace { diff --git a/packager/media/filters/h265_parser.cc b/packager/media/codecs/h265_parser.cc similarity index 99% rename from packager/media/filters/h265_parser.cc rename to packager/media/codecs/h265_parser.cc index 6c89f7d559..667a58aa8c 100644 --- a/packager/media/filters/h265_parser.cc +++ b/packager/media/codecs/h265_parser.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/h265_parser.h" +#include "packager/media/codecs/h265_parser.h" #include #include @@ -12,7 +12,7 @@ #include "packager/base/logging.h" #include "packager/base/stl_util.h" #include "packager/media/base/macros.h" -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/nalu_reader.h" #define TRUE_OR_RETURN(a) \ do { \ diff --git a/packager/media/filters/h265_parser.h b/packager/media/codecs/h265_parser.h similarity index 98% rename from packager/media/filters/h265_parser.h rename to packager/media/codecs/h265_parser.h index 77380f9d9e..4e848db389 100644 --- a/packager/media/filters/h265_parser.h +++ b/packager/media/codecs/h265_parser.h @@ -4,14 +4,14 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_H265_PARSER_H_ -#define MEDIA_FILTERS_H265_PARSER_H_ +#ifndef MEDIA_CODECS_H265_PARSER_H_ +#define MEDIA_CODECS_H265_PARSER_H_ #include #include #include "packager/base/memory/scoped_ptr.h" -#include "packager/media/filters/h26x_bit_reader.h" +#include "packager/media/codecs/h26x_bit_reader.h" namespace shaka { namespace media { @@ -354,4 +354,4 @@ class H265Parser { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_H265_PARSER_H_ +#endif // MEDIA_CODECS_H265_PARSER_H_ diff --git a/packager/media/filters/h265_parser_unittest.cc b/packager/media/codecs/h265_parser_unittest.cc similarity index 98% rename from packager/media/filters/h265_parser_unittest.cc rename to packager/media/codecs/h265_parser_unittest.cc index f2ad61aeb3..a9de1d8a05 100644 --- a/packager/media/filters/h265_parser_unittest.cc +++ b/packager/media/codecs/h265_parser_unittest.cc @@ -6,8 +6,8 @@ #include -#include "packager/media/filters/h265_parser.h" -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/h265_parser.h" +#include "packager/media/codecs/nalu_reader.h" namespace shaka { namespace media { diff --git a/packager/media/filters/h26x_bit_reader.cc b/packager/media/codecs/h26x_bit_reader.cc similarity index 98% rename from packager/media/filters/h26x_bit_reader.cc rename to packager/media/codecs/h26x_bit_reader.cc index 23634b2fa7..e1ef625009 100644 --- a/packager/media/filters/h26x_bit_reader.cc +++ b/packager/media/codecs/h26x_bit_reader.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "packager/base/logging.h" -#include "packager/media/filters/h26x_bit_reader.h" +#include "packager/media/codecs/h26x_bit_reader.h" namespace shaka { namespace media { diff --git a/packager/media/filters/h26x_bit_reader.h b/packager/media/codecs/h26x_bit_reader.h similarity index 96% rename from packager/media/filters/h26x_bit_reader.h rename to packager/media/codecs/h26x_bit_reader.h index 1291d4e495..fdd36981e5 100644 --- a/packager/media/filters/h26x_bit_reader.h +++ b/packager/media/codecs/h26x_bit_reader.h @@ -4,8 +4,8 @@ // // This file contains an implementation of an H264 Annex-B video stream parser. -#ifndef MEDIA_FILTERS_H264_BIT_READER_H_ -#define MEDIA_FILTERS_H264_BIT_READER_H_ +#ifndef MEDIA_CODECS_H264_BIT_READER_H_ +#define MEDIA_CODECS_H264_BIT_READER_H_ #include #include @@ -98,4 +98,4 @@ class H26xBitReader { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_H264_BIT_READER_H_ +#endif // MEDIA_CODECS_H264_BIT_READER_H_ diff --git a/packager/media/filters/h26x_bit_reader_unittest.cc b/packager/media/codecs/h26x_bit_reader_unittest.cc similarity index 98% rename from packager/media/filters/h26x_bit_reader_unittest.cc rename to packager/media/codecs/h26x_bit_reader_unittest.cc index 1552aab495..f15b866e3f 100644 --- a/packager/media/filters/h26x_bit_reader_unittest.cc +++ b/packager/media/codecs/h26x_bit_reader_unittest.cc @@ -4,7 +4,7 @@ #include -#include "packager/media/filters/h26x_bit_reader.h" +#include "packager/media/codecs/h26x_bit_reader.h" namespace shaka { namespace media { diff --git a/packager/media/filters/h26x_byte_to_unit_stream_converter.cc b/packager/media/codecs/h26x_byte_to_unit_stream_converter.cc similarity index 96% rename from packager/media/filters/h26x_byte_to_unit_stream_converter.cc rename to packager/media/codecs/h26x_byte_to_unit_stream_converter.cc index 9643acb65e..98b7169872 100644 --- a/packager/media/filters/h26x_byte_to_unit_stream_converter.cc +++ b/packager/media/codecs/h26x_byte_to_unit_stream_converter.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/h26x_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h26x_byte_to_unit_stream_converter.h" #include diff --git a/packager/media/filters/h26x_byte_to_unit_stream_converter.h b/packager/media/codecs/h26x_byte_to_unit_stream_converter.h similarity index 89% rename from packager/media/filters/h26x_byte_to_unit_stream_converter.h rename to packager/media/codecs/h26x_byte_to_unit_stream_converter.h index 57176b0f25..b43da69528 100644 --- a/packager/media/filters/h26x_byte_to_unit_stream_converter.h +++ b/packager/media/codecs/h26x_byte_to_unit_stream_converter.h @@ -4,14 +4,14 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_H26X_BYTE_TO_UNIT_STREAM_CONVERTER_H_ -#define MEDIA_FILTERS_H26X_BYTE_TO_UNIT_STREAM_CONVERTER_H_ +#ifndef MEDIA_CODECS_H26X_BYTE_TO_UNIT_STREAM_CONVERTER_H_ +#define MEDIA_CODECS_H26X_BYTE_TO_UNIT_STREAM_CONVERTER_H_ #include #include -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/nalu_reader.h" namespace shaka { namespace media { @@ -60,5 +60,5 @@ class H26xByteToUnitStreamConverter { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_H26x_BYTE_TO_UNIT_STREAM_CONVERTER_H_ +#endif // MEDIA_CODECS_H26x_BYTE_TO_UNIT_STREAM_CONVERTER_H_ diff --git a/packager/media/filters/hevc_decoder_configuration_record.cc b/packager/media/codecs/hevc_decoder_configuration_record.cc similarity index 98% rename from packager/media/filters/hevc_decoder_configuration_record.cc rename to packager/media/codecs/hevc_decoder_configuration_record.cc index ebc3ed1e12..5c101d3591 100644 --- a/packager/media/filters/hevc_decoder_configuration_record.cc +++ b/packager/media/codecs/hevc_decoder_configuration_record.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/hevc_decoder_configuration_record.h" +#include "packager/media/codecs/hevc_decoder_configuration_record.h" #include "packager/base/strings/string_number_conversions.h" #include "packager/base/strings/string_util.h" diff --git a/packager/media/filters/hevc_decoder_configuration_record.h b/packager/media/codecs/hevc_decoder_configuration_record.h similarity index 82% rename from packager/media/filters/hevc_decoder_configuration_record.h rename to packager/media/codecs/hevc_decoder_configuration_record.h index 37e6e69687..dcaa1eaef1 100644 --- a/packager/media/filters/hevc_decoder_configuration_record.h +++ b/packager/media/codecs/hevc_decoder_configuration_record.h @@ -4,8 +4,8 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_HEVC_DECODER_CONFIGURATION_RECORD_H_ -#define MEDIA_FILTERS_HEVC_DECODER_CONFIGURATION_RECORD_H_ +#ifndef MEDIA_CODECS_HEVC_DECODER_CONFIGURATION_RECORD_H_ +#define MEDIA_CODECS_HEVC_DECODER_CONFIGURATION_RECORD_H_ #include #include @@ -13,7 +13,7 @@ #include "packager/base/macros.h" #include "packager/media/base/video_stream_info.h" -#include "packager/media/filters/decoder_configuration_record.h" +#include "packager/media/codecs/decoder_configuration_record.h" namespace shaka { namespace media { @@ -44,4 +44,4 @@ class HEVCDecoderConfigurationRecord : public DecoderConfigurationRecord { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_HEVC_DECODER_CONFIGURATION_RECORD_H_ +#endif // MEDIA_CODECS_HEVC_DECODER_CONFIGURATION_RECORD_H_ diff --git a/packager/media/filters/hevc_decoder_configuration_record_unittest.cc b/packager/media/codecs/hevc_decoder_configuration_record_unittest.cc similarity index 96% rename from packager/media/filters/hevc_decoder_configuration_record_unittest.cc rename to packager/media/codecs/hevc_decoder_configuration_record_unittest.cc index 2fb5873bb2..722a89f8cb 100644 --- a/packager/media/filters/hevc_decoder_configuration_record_unittest.cc +++ b/packager/media/codecs/hevc_decoder_configuration_record_unittest.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/hevc_decoder_configuration_record.h" +#include "packager/media/codecs/hevc_decoder_configuration_record.h" #include diff --git a/packager/media/filters/nal_unit_to_byte_stream_converter.cc b/packager/media/codecs/nal_unit_to_byte_stream_converter.cc similarity index 97% rename from packager/media/filters/nal_unit_to_byte_stream_converter.cc rename to packager/media/codecs/nal_unit_to_byte_stream_converter.cc index e49a57ad23..9bcef858e1 100644 --- a/packager/media/filters/nal_unit_to_byte_stream_converter.cc +++ b/packager/media/codecs/nal_unit_to_byte_stream_converter.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/nal_unit_to_byte_stream_converter.h" +#include "packager/media/codecs/nal_unit_to_byte_stream_converter.h" #include @@ -13,8 +13,8 @@ #include "packager/media/base/buffer_reader.h" #include "packager/media/base/buffer_writer.h" #include "packager/media/base/macros.h" -#include "packager/media/filters/avc_decoder_configuration_record.h" -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/avc_decoder_configuration_record.h" +#include "packager/media/codecs/nalu_reader.h" namespace shaka { namespace media { diff --git a/packager/media/filters/nal_unit_to_byte_stream_converter.h b/packager/media/codecs/nal_unit_to_byte_stream_converter.h similarity index 92% rename from packager/media/filters/nal_unit_to_byte_stream_converter.h rename to packager/media/codecs/nal_unit_to_byte_stream_converter.h index c25565c8bd..77d6621e5f 100644 --- a/packager/media/filters/nal_unit_to_byte_stream_converter.h +++ b/packager/media/codecs/nal_unit_to_byte_stream_converter.h @@ -4,8 +4,8 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef PACKAGER_MEDIA_FILTERS_NAL_UNIT_TO_BYTE_STREAM_CONVERTER_H_ -#define PACKAGER_MEDIA_FILTERS_NAL_UNIT_TO_BYTE_STREAM_CONVERTER_H_ +#ifndef PACKAGER_MEDIA_CODECS_NAL_UNIT_TO_BYTE_STREAM_CONVERTER_H_ +#define PACKAGER_MEDIA_CODECS_NAL_UNIT_TO_BYTE_STREAM_CONVERTER_H_ #include #include @@ -73,4 +73,4 @@ class NalUnitToByteStreamConverter { } // namespace media } // namespace shaka -#endif // PACKAGER_MEDIA_FILTERS_NAL_UNIT_TO_BYTE_STREAM_CONVERTER_H_ +#endif // PACKAGER_MEDIA_CODECS_NAL_UNIT_TO_BYTE_STREAM_CONVERTER_H_ diff --git a/packager/media/filters/nal_unit_to_byte_stream_converter_unittest.cc b/packager/media/codecs/nal_unit_to_byte_stream_converter_unittest.cc similarity index 99% rename from packager/media/filters/nal_unit_to_byte_stream_converter_unittest.cc rename to packager/media/codecs/nal_unit_to_byte_stream_converter_unittest.cc index 14404ef9cc..b4d0dcf17d 100644 --- a/packager/media/filters/nal_unit_to_byte_stream_converter_unittest.cc +++ b/packager/media/codecs/nal_unit_to_byte_stream_converter_unittest.cc @@ -7,7 +7,7 @@ #include #include "packager/media/base/media_sample.h" -#include "packager/media/filters/nal_unit_to_byte_stream_converter.h" +#include "packager/media/codecs/nal_unit_to_byte_stream_converter.h" namespace shaka { namespace media { diff --git a/packager/media/filters/nalu_reader.cc b/packager/media/codecs/nalu_reader.cc similarity index 99% rename from packager/media/filters/nalu_reader.cc rename to packager/media/codecs/nalu_reader.cc index 8f01d22c29..a8aa7dc5cf 100644 --- a/packager/media/filters/nalu_reader.cc +++ b/packager/media/codecs/nalu_reader.cc @@ -4,13 +4,13 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/nalu_reader.h" #include #include "packager/base/logging.h" #include "packager/media/base/buffer_reader.h" -#include "packager/media/filters/h264_parser.h" +#include "packager/media/codecs/h264_parser.h" namespace shaka { namespace media { diff --git a/packager/media/filters/nalu_reader.h b/packager/media/codecs/nalu_reader.h similarity index 98% rename from packager/media/filters/nalu_reader.h rename to packager/media/codecs/nalu_reader.h index b9a8864cbb..78f9fb3789 100644 --- a/packager/media/filters/nalu_reader.h +++ b/packager/media/codecs/nalu_reader.h @@ -4,8 +4,8 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_NALU_READER_H_ -#define MEDIA_FILTERS_NALU_READER_H_ +#ifndef MEDIA_CODECS_NALU_READER_H_ +#define MEDIA_CODECS_NALU_READER_H_ #include #include @@ -214,4 +214,4 @@ class NaluReader { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_NALU_READER_H_ +#endif // MEDIA_CODECS_NALU_READER_H_ diff --git a/packager/media/filters/nalu_reader_unittest.cc b/packager/media/codecs/nalu_reader_unittest.cc similarity index 99% rename from packager/media/filters/nalu_reader_unittest.cc rename to packager/media/codecs/nalu_reader_unittest.cc index e416b066c3..294aa33351 100644 --- a/packager/media/filters/nalu_reader_unittest.cc +++ b/packager/media/codecs/nalu_reader_unittest.cc @@ -6,7 +6,7 @@ #include -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/nalu_reader.h" namespace shaka { namespace media { diff --git a/packager/media/formats/mp4/video_slice_header_parser.cc b/packager/media/codecs/video_slice_header_parser.cc similarity index 91% rename from packager/media/formats/mp4/video_slice_header_parser.cc rename to packager/media/codecs/video_slice_header_parser.cc index 8c4b07f737..cce8b418dc 100644 --- a/packager/media/formats/mp4/video_slice_header_parser.cc +++ b/packager/media/codecs/video_slice_header_parser.cc @@ -4,15 +4,14 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/formats/mp4/video_slice_header_parser.h" +#include "packager/media/codecs/video_slice_header_parser.h" #include "packager/media/base/rcheck.h" -#include "packager/media/filters/avc_decoder_configuration_record.h" -#include "packager/media/filters/hevc_decoder_configuration_record.h" +#include "packager/media/codecs/avc_decoder_configuration_record.h" +#include "packager/media/codecs/hevc_decoder_configuration_record.h" namespace shaka { namespace media { -namespace mp4 { namespace { @@ -90,7 +89,6 @@ int64_t H265VideoSliceHeaderParser::GetHeaderSize(const Nalu& nalu) { return NumBitsToNumBytes(slice_header.header_bit_size); } -} // namespace mp4 } // namespace media } // namespace shaka diff --git a/packager/media/formats/mp4/video_slice_header_parser.h b/packager/media/codecs/video_slice_header_parser.h similarity index 85% rename from packager/media/formats/mp4/video_slice_header_parser.h rename to packager/media/codecs/video_slice_header_parser.h index a4675a8292..3a2b57bc85 100644 --- a/packager/media/formats/mp4/video_slice_header_parser.h +++ b/packager/media/codecs/video_slice_header_parser.h @@ -4,18 +4,17 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FORMATS_MP4_VIDEO_SLICE_HEADER_PARSER_H_ -#define MEDIA_FORMATS_MP4_VIDEO_SLICE_HEADER_PARSER_H_ +#ifndef MEDIA_CODECS_VIDEO_SLICE_HEADER_PARSER_H_ +#define MEDIA_CODECS_VIDEO_SLICE_HEADER_PARSER_H_ #include #include "packager/media/base/macros.h" -#include "packager/media/filters/h264_parser.h" -#include "packager/media/filters/h265_parser.h" +#include "packager/media/codecs/h264_parser.h" +#include "packager/media/codecs/h265_parser.h" namespace shaka { namespace media { -namespace mp4 { class VideoSliceHeaderParser { public: @@ -68,9 +67,8 @@ class H265VideoSliceHeaderParser : public VideoSliceHeaderParser { DISALLOW_COPY_AND_ASSIGN(H265VideoSliceHeaderParser); }; -} // namespace mp4 } // namespace media } // namespace shaka -#endif // MEDIA_FORMATS_MP4_VIDEO_SLICE_HEADER_PARSER_H_ +#endif // MEDIA_CODECS_VIDEO_SLICE_HEADER_PARSER_H_ diff --git a/packager/media/formats/mp4/video_slice_header_parser_unittest.cc b/packager/media/codecs/video_slice_header_parser_unittest.cc similarity index 97% rename from packager/media/formats/mp4/video_slice_header_parser_unittest.cc rename to packager/media/codecs/video_slice_header_parser_unittest.cc index 99ef6015af..8975a37b82 100644 --- a/packager/media/formats/mp4/video_slice_header_parser_unittest.cc +++ b/packager/media/codecs/video_slice_header_parser_unittest.cc @@ -6,11 +6,10 @@ #include -#include "packager/media/formats/mp4/video_slice_header_parser.h" +#include "packager/media/codecs/video_slice_header_parser.h" namespace shaka { namespace media { -namespace mp4 { TEST(H264VideoSliceHeaderParserTest, BasicSupport) { // Taken from bear-640x360.mp4 (video) @@ -152,6 +151,5 @@ TEST(H264VideoSliceHeaderParserTest, ErrorsForEOSWithinEntry) { EXPECT_FALSE(parser.Initialize(extra_data)); } -} // namespace mp4 } // namespace media } // namespace shaka diff --git a/packager/media/filters/vp8_parser.cc b/packager/media/codecs/vp8_parser.cc similarity index 99% rename from packager/media/filters/vp8_parser.cc rename to packager/media/codecs/vp8_parser.cc index 2726485990..b925e54c2d 100644 --- a/packager/media/filters/vp8_parser.cc +++ b/packager/media/codecs/vp8_parser.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/vp8_parser.h" +#include "packager/media/codecs/vp8_parser.h" #include "packager/base/logging.h" #include "packager/media/base/bit_reader.h" diff --git a/packager/media/filters/vp8_parser.h b/packager/media/codecs/vp8_parser.h similarity index 91% rename from packager/media/filters/vp8_parser.h rename to packager/media/codecs/vp8_parser.h index fbc9ff36e2..73b88fd003 100644 --- a/packager/media/filters/vp8_parser.h +++ b/packager/media/codecs/vp8_parser.h @@ -4,14 +4,14 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_VP8_PARSER_H_ -#define MEDIA_FILTERS_VP8_PARSER_H_ +#ifndef MEDIA_CODECS_VP8_PARSER_H_ +#define MEDIA_CODECS_VP8_PARSER_H_ #include #include #include "packager/base/macros.h" -#include "packager/media/filters/vpx_parser.h" +#include "packager/media/codecs/vpx_parser.h" namespace shaka { namespace media { @@ -52,4 +52,4 @@ class VP8Parser : public VPxParser { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_VP8_PARSER_H_ +#endif // MEDIA_CODECS_VP8_PARSER_H_ diff --git a/packager/media/filters/vp8_parser_unittest.cc b/packager/media/codecs/vp8_parser_unittest.cc similarity index 98% rename from packager/media/filters/vp8_parser_unittest.cc rename to packager/media/codecs/vp8_parser_unittest.cc index af72970cf5..357000fda8 100644 --- a/packager/media/filters/vp8_parser_unittest.cc +++ b/packager/media/codecs/vp8_parser_unittest.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/vp8_parser.h" +#include "packager/media/codecs/vp8_parser.h" #include #include diff --git a/packager/media/filters/vp9_parser.cc b/packager/media/codecs/vp9_parser.cc similarity index 99% rename from packager/media/filters/vp9_parser.cc rename to packager/media/codecs/vp9_parser.cc index 51e4893ba8..6203ae8e13 100644 --- a/packager/media/filters/vp9_parser.cc +++ b/packager/media/codecs/vp9_parser.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/vp9_parser.h" +#include "packager/media/codecs/vp9_parser.h" #include "packager/base/logging.h" #include "packager/media/base/bit_reader.h" diff --git a/packager/media/filters/vp9_parser.h b/packager/media/codecs/vp9_parser.h similarity index 90% rename from packager/media/filters/vp9_parser.h rename to packager/media/codecs/vp9_parser.h index 32389b1d61..a2a791107c 100644 --- a/packager/media/filters/vp9_parser.h +++ b/packager/media/codecs/vp9_parser.h @@ -4,14 +4,14 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_VP9_PARSER_H_ -#define MEDIA_FILTERS_VP9_PARSER_H_ +#ifndef MEDIA_CODECS_VP9_PARSER_H_ +#define MEDIA_CODECS_VP9_PARSER_H_ #include #include #include "packager/base/macros.h" -#include "packager/media/filters/vpx_parser.h" +#include "packager/media/codecs/vpx_parser.h" namespace shaka { namespace media { @@ -51,4 +51,4 @@ class VP9Parser : public VPxParser { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_VP9_PARSER_H_ +#endif // MEDIA_CODECS_VP9_PARSER_H_ diff --git a/packager/media/filters/vp9_parser_unittest.cc b/packager/media/codecs/vp9_parser_unittest.cc similarity index 99% rename from packager/media/filters/vp9_parser_unittest.cc rename to packager/media/codecs/vp9_parser_unittest.cc index c51e9da6a9..f7d3517525 100644 --- a/packager/media/filters/vp9_parser_unittest.cc +++ b/packager/media/codecs/vp9_parser_unittest.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/vp9_parser.h" +#include "packager/media/codecs/vp9_parser.h" #include #include diff --git a/packager/media/filters/vp_codec_configuration_record.cc b/packager/media/codecs/vp_codec_configuration_record.cc similarity index 98% rename from packager/media/filters/vp_codec_configuration_record.cc rename to packager/media/codecs/vp_codec_configuration_record.cc index e2772120b2..be670c24d0 100644 --- a/packager/media/filters/vp_codec_configuration_record.cc +++ b/packager/media/codecs/vp_codec_configuration_record.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/vp_codec_configuration_record.h" +#include "packager/media/codecs/vp_codec_configuration_record.h" #include "packager/base/strings/string_number_conversions.h" #include "packager/base/strings/string_util.h" diff --git a/packager/media/filters/vp_codec_configuration_record.h b/packager/media/codecs/vp_codec_configuration_record.h similarity index 95% rename from packager/media/filters/vp_codec_configuration_record.h rename to packager/media/codecs/vp_codec_configuration_record.h index 0013d23546..fc6363a284 100644 --- a/packager/media/filters/vp_codec_configuration_record.h +++ b/packager/media/codecs/vp_codec_configuration_record.h @@ -4,8 +4,8 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_VP_CODEC_CONFIGURATION_RECORD_H_ -#define MEDIA_FILTERS_VP_CODEC_CONFIGURATION_RECORD_H_ +#ifndef MEDIA_CODECS_VP_CODEC_CONFIGURATION_RECORD_H_ +#define MEDIA_CODECS_VP_CODEC_CONFIGURATION_RECORD_H_ #include #include @@ -102,4 +102,4 @@ class VPCodecConfigurationRecord { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_VP_CODEC_CONFIGURATION_RECORD_H_ +#endif // MEDIA_CODECS_VP_CODEC_CONFIGURATION_RECORD_H_ diff --git a/packager/media/filters/vp_codec_configuration_record_unittest.cc b/packager/media/codecs/vp_codec_configuration_record_unittest.cc similarity index 96% rename from packager/media/filters/vp_codec_configuration_record_unittest.cc rename to packager/media/codecs/vp_codec_configuration_record_unittest.cc index d0ca7f95f3..caea6993cd 100644 --- a/packager/media/filters/vp_codec_configuration_record_unittest.cc +++ b/packager/media/codecs/vp_codec_configuration_record_unittest.cc @@ -4,7 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#include "packager/media/filters/vp_codec_configuration_record.h" +#include "packager/media/codecs/vp_codec_configuration_record.h" #include diff --git a/packager/media/filters/vpx_parser.h b/packager/media/codecs/vpx_parser.h similarity index 89% rename from packager/media/filters/vpx_parser.h rename to packager/media/codecs/vpx_parser.h index 8038444841..3b18a8f745 100644 --- a/packager/media/filters/vpx_parser.h +++ b/packager/media/codecs/vpx_parser.h @@ -4,14 +4,14 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd -#ifndef MEDIA_FILTERS_VPX_PARSER_H_ -#define MEDIA_FILTERS_VPX_PARSER_H_ +#ifndef MEDIA_CODECS_VPX_PARSER_H_ +#define MEDIA_CODECS_VPX_PARSER_H_ #include #include #include "packager/base/macros.h" -#include "packager/media/filters/vp_codec_configuration_record.h" +#include "packager/media/codecs/vp_codec_configuration_record.h" namespace shaka { namespace media { @@ -57,4 +57,4 @@ class VPxParser { } // namespace media } // namespace shaka -#endif // MEDIA_FILTERS_VPX_PARSER_H_ +#endif // MEDIA_CODECS_VPX_PARSER_H_ diff --git a/packager/media/filters/webvtt_util.h b/packager/media/codecs/webvtt_util.h similarity index 87% rename from packager/media/filters/webvtt_util.h rename to packager/media/codecs/webvtt_util.h index 689d8340e4..01da562117 100644 --- a/packager/media/filters/webvtt_util.h +++ b/packager/media/codecs/webvtt_util.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef PACKAGER_MEDIA_FILTERS_WEBVTT_UTIL_H_ -#define PACKAGER_MEDIA_FILTERS_WEBVTT_UTIL_H_ +#ifndef PACKAGER_MEDIA_CODECS_WEBVTT_UTIL_H_ +#define PACKAGER_MEDIA_CODECS_WEBVTT_UTIL_H_ #include @@ -29,4 +29,4 @@ void MakeSideData(T id_begin, T id_end, } // namespace media } // namespace shaka -#endif // PACKAGER_MEDIA_FILTERS_WEBVTT_UTIL_H_ +#endif // PACKAGER_MEDIA_CODECS_WEBVTT_UTIL_H_ diff --git a/packager/media/event/media_event.gyp b/packager/media/event/media_event.gyp index fa90fc2275..3e3131afbc 100644 --- a/packager/media/event/media_event.gyp +++ b/packager/media/event/media_event.gyp @@ -28,8 +28,8 @@ # Depends on full protobuf to read/write with TextFormat. '../../third_party/protobuf/protobuf.gyp:protobuf_full_do_not_use', '../base/media_base.gyp:media_base', + '../codecs/codecs.gyp:codecs', '../file/file.gyp:file', - '../filters/filters.gyp:filters', ], }, { diff --git a/packager/media/event/muxer_listener_internal.cc b/packager/media/event/muxer_listener_internal.cc index 894fe333d8..c165d0df36 100644 --- a/packager/media/event/muxer_listener_internal.cc +++ b/packager/media/event/muxer_listener_internal.cc @@ -15,7 +15,7 @@ #include "packager/media/base/muxer_options.h" #include "packager/media/base/protection_system_specific_info.h" #include "packager/media/base/video_stream_info.h" -#include "packager/media/filters/ec3_audio_util.h" +#include "packager/media/codecs/ec3_audio_util.h" #include "packager/mpd/base/media_info.pb.h" namespace shaka { diff --git a/packager/media/formats/mp2t/es_parser_h264.cc b/packager/media/formats/mp2t/es_parser_h264.cc index bb2fc80d3c..1aca695c77 100644 --- a/packager/media/formats/mp2t/es_parser_h264.cc +++ b/packager/media/formats/mp2t/es_parser_h264.cc @@ -10,9 +10,9 @@ #include "packager/media/base/media_sample.h" #include "packager/media/base/timestamp.h" #include "packager/media/base/video_stream_info.h" -#include "packager/media/filters/avc_decoder_configuration_record.h" -#include "packager/media/filters/h264_byte_to_unit_stream_converter.h" -#include "packager/media/filters/h264_parser.h" +#include "packager/media/codecs/avc_decoder_configuration_record.h" +#include "packager/media/codecs/h264_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h264_parser.h" #include "packager/media/formats/mp2t/mp2t_common.h" namespace shaka { diff --git a/packager/media/formats/mp2t/es_parser_h264_unittest.cc b/packager/media/formats/mp2t/es_parser_h264_unittest.cc index 67bd4d9a01..f5ef077813 100644 --- a/packager/media/formats/mp2t/es_parser_h264_unittest.cc +++ b/packager/media/formats/mp2t/es_parser_h264_unittest.cc @@ -12,7 +12,7 @@ #include "packager/media/base/media_sample.h" #include "packager/media/base/timestamp.h" #include "packager/media/base/video_stream_info.h" -#include "packager/media/filters/h264_parser.h" +#include "packager/media/codecs/h264_parser.h" #include "packager/media/formats/mp2t/es_parser_h264.h" #include "packager/media/test/test_data_util.h" diff --git a/packager/media/formats/mp2t/es_parser_h265.cc b/packager/media/formats/mp2t/es_parser_h265.cc index 490c58c3cf..ceb101ac45 100644 --- a/packager/media/formats/mp2t/es_parser_h265.cc +++ b/packager/media/formats/mp2t/es_parser_h265.cc @@ -13,9 +13,9 @@ #include "packager/media/base/offset_byte_queue.h" #include "packager/media/base/timestamp.h" #include "packager/media/base/video_stream_info.h" -#include "packager/media/filters/hevc_decoder_configuration_record.h" -#include "packager/media/filters/h265_byte_to_unit_stream_converter.h" -#include "packager/media/filters/h265_parser.h" +#include "packager/media/codecs/h265_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h265_parser.h" +#include "packager/media/codecs/hevc_decoder_configuration_record.h" #include "packager/media/formats/mp2t/mp2t_common.h" namespace shaka { diff --git a/packager/media/formats/mp2t/es_parser_h26x.cc b/packager/media/formats/mp2t/es_parser_h26x.cc index 29570651f5..a9d2a96e7f 100644 --- a/packager/media/formats/mp2t/es_parser_h26x.cc +++ b/packager/media/formats/mp2t/es_parser_h26x.cc @@ -12,8 +12,8 @@ #include "packager/media/base/offset_byte_queue.h" #include "packager/media/base/timestamp.h" #include "packager/media/base/video_stream_info.h" -#include "packager/media/filters/h264_byte_to_unit_stream_converter.h" -#include "packager/media/filters/h265_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h264_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h265_byte_to_unit_stream_converter.h" #include "packager/media/formats/mp2t/mp2t_common.h" namespace shaka { diff --git a/packager/media/formats/mp2t/es_parser_h26x.h b/packager/media/formats/mp2t/es_parser_h26x.h index 981500ca4b..b5c8a3aa7b 100644 --- a/packager/media/formats/mp2t/es_parser_h26x.h +++ b/packager/media/formats/mp2t/es_parser_h26x.h @@ -12,7 +12,7 @@ #include "packager/base/callback.h" #include "packager/base/compiler_specific.h" #include "packager/base/memory/scoped_ptr.h" -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/nalu_reader.h" #include "packager/media/formats/mp2t/es_parser.h" namespace shaka { diff --git a/packager/media/formats/mp2t/es_parser_h26x_unittest.cc b/packager/media/formats/mp2t/es_parser_h26x_unittest.cc index 3ab822a021..1efd5e5c0c 100644 --- a/packager/media/formats/mp2t/es_parser_h26x_unittest.cc +++ b/packager/media/formats/mp2t/es_parser_h26x_unittest.cc @@ -13,7 +13,7 @@ #include "packager/media/base/media_sample.h" #include "packager/media/base/stream_info.h" #include "packager/media/base/timestamp.h" -#include "packager/media/filters/h26x_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h26x_byte_to_unit_stream_converter.h" #include "packager/media/formats/mp2t/es_parser_h26x.h" namespace shaka { diff --git a/packager/media/formats/mp2t/mp2t.gyp b/packager/media/formats/mp2t/mp2t.gyp index 8b90293a54..ffa8a4dd24 100644 --- a/packager/media/formats/mp2t/mp2t.gyp +++ b/packager/media/formats/mp2t/mp2t.gyp @@ -55,10 +55,7 @@ ], 'dependencies': [ '../../base/media_base.gyp:media_base', - '../../filters/filters.gyp:filters', - # TODO(rkuroiwa): AACAudioSpecificConfig is used to create ADTS. - # Break this dependency on mp4 by moving it to media/filters. - '../../formats/mp4/mp4.gyp:mp4', + '../../codecs/codecs.gyp:codecs', ], }, { @@ -77,8 +74,8 @@ 'dependencies': [ '../../../testing/gtest.gyp:gtest', '../../../testing/gmock.gyp:gmock', + '../../codecs/codecs.gyp:codecs', '../../event/media_event.gyp:mock_muxer_listener', - '../../filters/filters.gyp:filters', '../../test/media_test.gyp:media_test_support', '../mpeg/mpeg.gyp:mpeg', 'mp2t', diff --git a/packager/media/formats/mp2t/pes_packet_generator.cc b/packager/media/formats/mp2t/pes_packet_generator.cc index 6e46703aa1..388c681c34 100644 --- a/packager/media/formats/mp2t/pes_packet_generator.cc +++ b/packager/media/formats/mp2t/pes_packet_generator.cc @@ -15,10 +15,10 @@ #include "packager/media/base/buffer_writer.h" #include "packager/media/base/media_sample.h" #include "packager/media/base/video_stream_info.h" -#include "packager/media/filters/nal_unit_to_byte_stream_converter.h" -#include "packager/media/filters/nalu_reader.h" +#include "packager/media/codecs/aac_audio_specific_config.h" +#include "packager/media/codecs/nal_unit_to_byte_stream_converter.h" +#include "packager/media/codecs/nalu_reader.h" #include "packager/media/formats/mp2t/pes_packet.h" -#include "packager/media/formats/mp4/aac_audio_specific_config.h" namespace shaka { namespace media { @@ -116,7 +116,7 @@ bool PesPacketGenerator::Initialize(const StreamInfo& stream_info) { return false; } timescale_scale_ = kTsTimescale / audio_stream_info.time_scale(); - adts_converter_.reset(new mp4::AACAudioSpecificConfig()); + adts_converter_.reset(new AACAudioSpecificConfig()); return adts_converter_->Parse(audio_stream_info.extra_data()); } diff --git a/packager/media/formats/mp2t/pes_packet_generator.h b/packager/media/formats/mp2t/pes_packet_generator.h index 05f9e29d9e..7e50bdd7b0 100644 --- a/packager/media/formats/mp2t/pes_packet_generator.h +++ b/packager/media/formats/mp2t/pes_packet_generator.h @@ -19,13 +19,10 @@ namespace shaka { namespace media { +class AACAudioSpecificConfig; class NalUnitToByteStreamConverter; class StreamInfo; -namespace mp4 { -class AACAudioSpecificConfig; -} // namespace mp4 - namespace mp2t { class PesPacket; @@ -79,7 +76,7 @@ class PesPacketGenerator { double timescale_scale_ = 0.0; scoped_ptr converter_; - scoped_ptr adts_converter_; + scoped_ptr adts_converter_; // This is the PES packet that this object is currently working on. // This can be used to create a PES from multiple audio samples. diff --git a/packager/media/formats/mp2t/pes_packet_generator_unittest.cc b/packager/media/formats/mp2t/pes_packet_generator_unittest.cc index 611cf7c894..4ff15c0e81 100644 --- a/packager/media/formats/mp2t/pes_packet_generator_unittest.cc +++ b/packager/media/formats/mp2t/pes_packet_generator_unittest.cc @@ -11,10 +11,10 @@ #include "packager/media/base/media_sample.h" #include "packager/media/base/text_stream_info.h" #include "packager/media/base/video_stream_info.h" -#include "packager/media/filters/nal_unit_to_byte_stream_converter.h" +#include "packager/media/codecs/aac_audio_specific_config.h" +#include "packager/media/codecs/nal_unit_to_byte_stream_converter.h" #include "packager/media/formats/mp2t/pes_packet.h" #include "packager/media/formats/mp2t/pes_packet_generator.h" -#include "packager/media/formats/mp4/aac_audio_specific_config.h" namespace shaka { namespace media { @@ -96,7 +96,7 @@ class MockNalUnitToByteStreamConverter : public NalUnitToByteStreamConverter { std::vector* output)); }; -class MockAACAudioSpecificConfig : public mp4::AACAudioSpecificConfig { +class MockAACAudioSpecificConfig : public AACAudioSpecificConfig { public: MOCK_METHOD1(Parse, bool(const std::vector& data)); MOCK_CONST_METHOD1(ConvertToADTS, bool(std::vector* buffer)); diff --git a/packager/media/formats/mp2t/program_map_table_writer.cc b/packager/media/formats/mp2t/program_map_table_writer.cc index c08bf74e9a..b82c26d07b 100644 --- a/packager/media/formats/mp2t/program_map_table_writer.cc +++ b/packager/media/formats/mp2t/program_map_table_writer.cc @@ -11,9 +11,9 @@ #include "packager/base/logging.h" #include "packager/media/base/buffer_writer.h" #include "packager/media/base/fourccs.h" +#include "packager/media/codecs/aac_audio_specific_config.h" #include "packager/media/formats/mp2t/continuity_counter.h" #include "packager/media/formats/mp2t/ts_packet_writer_util.h" -#include "packager/media/formats/mp4/aac_audio_specific_config.h" namespace shaka { namespace media { @@ -199,7 +199,7 @@ void WritePrivateDataIndicatorDescriptor(FourCC fourcc, BufferWriter* output) { bool WriteAacAudioSetupInformation(const uint8_t* aac_audio_specific_config, size_t aac_audio_specific_config_size, BufferWriter* audio_setup_information) { - mp4::AACAudioSpecificConfig config; + AACAudioSpecificConfig config; const bool result = config.Parse(std::vector( aac_audio_specific_config, aac_audio_specific_config + aac_audio_specific_config_size)); diff --git a/packager/media/formats/mp4/box_definitions.h b/packager/media/formats/mp4/box_definitions.h index d726f6e807..7d3802827c 100644 --- a/packager/media/formats/mp4/box_definitions.h +++ b/packager/media/formats/mp4/box_definitions.h @@ -9,9 +9,9 @@ #include "packager/media/base/decrypt_config.h" #include "packager/media/base/fourccs.h" -#include "packager/media/formats/mp4/aac_audio_specific_config.h" +#include "packager/media/codecs/aac_audio_specific_config.h" +#include "packager/media/codecs/es_descriptor.h" #include "packager/media/formats/mp4/box.h" -#include "packager/media/formats/mp4/es_descriptor.h" namespace shaka { namespace media { diff --git a/packager/media/formats/mp4/encrypting_fragmenter.cc b/packager/media/formats/mp4/encrypting_fragmenter.cc index afc654eea3..8e69aac10c 100644 --- a/packager/media/formats/mp4/encrypting_fragmenter.cc +++ b/packager/media/formats/mp4/encrypting_fragmenter.cc @@ -13,9 +13,9 @@ #include "packager/media/base/buffer_reader.h" #include "packager/media/base/key_source.h" #include "packager/media/base/media_sample.h" -#include "packager/media/filters/nalu_reader.h" -#include "packager/media/filters/vp8_parser.h" -#include "packager/media/filters/vp9_parser.h" +#include "packager/media/codecs/nalu_reader.h" +#include "packager/media/codecs/vp8_parser.h" +#include "packager/media/codecs/vp9_parser.h" #include "packager/media/formats/mp4/box_definitions.h" namespace shaka { diff --git a/packager/media/formats/mp4/encrypting_fragmenter.h b/packager/media/formats/mp4/encrypting_fragmenter.h index 489b097a5a..01d64da76f 100644 --- a/packager/media/formats/mp4/encrypting_fragmenter.h +++ b/packager/media/formats/mp4/encrypting_fragmenter.h @@ -10,9 +10,9 @@ #include "packager/base/memory/ref_counted.h" #include "packager/base/memory/scoped_ptr.h" #include "packager/media/base/fourccs.h" -#include "packager/media/filters/vpx_parser.h" +#include "packager/media/codecs/video_slice_header_parser.h" +#include "packager/media/codecs/vpx_parser.h" #include "packager/media/formats/mp4/fragmenter.h" -#include "packager/media/formats/mp4/video_slice_header_parser.h" namespace shaka { namespace media { diff --git a/packager/media/formats/mp4/mp4.gyp b/packager/media/formats/mp4/mp4.gyp index 28478f9316..2ebc5f2636 100644 --- a/packager/media/formats/mp4/mp4.gyp +++ b/packager/media/formats/mp4/mp4.gyp @@ -13,8 +13,6 @@ 'target_name': 'mp4', 'type': '<(component)', 'sources': [ - 'aac_audio_specific_config.cc', - 'aac_audio_specific_config.h', 'box.cc', 'box.h', 'box_buffer.h', @@ -30,8 +28,6 @@ 'decoding_time_iterator.h', 'encrypting_fragmenter.cc', 'encrypting_fragmenter.h', - 'es_descriptor.cc', - 'es_descriptor.h', 'fragmenter.cc', 'fragmenter.h', 'key_rotation_fragmenter.cc', @@ -50,31 +46,26 @@ 'sync_sample_iterator.h', 'track_run_iterator.cc', 'track_run_iterator.h', - 'video_slice_header_parser.cc', - 'video_slice_header_parser.h', ], 'dependencies': [ '../../../third_party/boringssl/boringssl.gyp:boringssl', '../../base/media_base.gyp:media_base', + '../../codecs/codecs.gyp:codecs', '../../event/media_event.gyp:media_event', - '../../filters/filters.gyp:filters', ], }, { 'target_name': 'mp4_unittest', 'type': '<(gtest_target_type)', 'sources': [ - 'aac_audio_specific_config_unittest.cc', 'box_definitions_unittest.cc', 'box_reader_unittest.cc', 'chunk_info_iterator_unittest.cc', 'composition_offset_iterator_unittest.cc', 'decoding_time_iterator_unittest.cc', - 'es_descriptor_unittest.cc', 'mp4_media_parser_unittest.cc', 'sync_sample_iterator_unittest.cc', 'track_run_iterator_unittest.cc', - 'video_slice_header_parser_unittest.cc', ], 'dependencies': [ '../../../testing/gtest.gyp:gtest', diff --git a/packager/media/formats/mp4/mp4_media_parser.cc b/packager/media/formats/mp4/mp4_media_parser.cc index 8aea7841ee..f8fe144b56 100644 --- a/packager/media/formats/mp4/mp4_media_parser.cc +++ b/packager/media/formats/mp4/mp4_media_parser.cc @@ -19,14 +19,14 @@ #include "packager/media/base/media_sample.h" #include "packager/media/base/rcheck.h" #include "packager/media/base/video_stream_info.h" +#include "packager/media/codecs/avc_decoder_configuration_record.h" +#include "packager/media/codecs/es_descriptor.h" +#include "packager/media/codecs/hevc_decoder_configuration_record.h" +#include "packager/media/codecs/vp_codec_configuration_record.h" #include "packager/media/file/file.h" #include "packager/media/file/file_closer.h" -#include "packager/media/filters/avc_decoder_configuration_record.h" -#include "packager/media/filters/hevc_decoder_configuration_record.h" -#include "packager/media/filters/vp_codec_configuration_record.h" #include "packager/media/formats/mp4/box_definitions.h" #include "packager/media/formats/mp4/box_reader.h" -#include "packager/media/formats/mp4/es_descriptor.h" #include "packager/media/formats/mp4/track_run_iterator.h" namespace shaka { diff --git a/packager/media/formats/mp4/mp4_muxer.cc b/packager/media/formats/mp4/mp4_muxer.cc index 124fc08b74..2c11dcbb3f 100644 --- a/packager/media/formats/mp4/mp4_muxer.cc +++ b/packager/media/formats/mp4/mp4_muxer.cc @@ -15,10 +15,10 @@ #include "packager/media/base/media_sample.h" #include "packager/media/base/media_stream.h" #include "packager/media/base/video_stream_info.h" +#include "packager/media/codecs/es_descriptor.h" #include "packager/media/event/muxer_listener.h" #include "packager/media/file/file.h" #include "packager/media/formats/mp4/box_definitions.h" -#include "packager/media/formats/mp4/es_descriptor.h" #include "packager/media/formats/mp4/multi_segment_segmenter.h" #include "packager/media/formats/mp4/single_segment_segmenter.h" diff --git a/packager/media/formats/webm/webm.gyp b/packager/media/formats/webm/webm.gyp index cf312be0e4..3a1d7d3623 100644 --- a/packager/media/formats/webm/webm.gyp +++ b/packager/media/formats/webm/webm.gyp @@ -58,7 +58,7 @@ '../../../third_party/boringssl/boringssl.gyp:boringssl', '../../../third_party/libwebm/libwebm.gyp:mkvmuxer', '../../base/media_base.gyp:media_base', - '../../filters/filters.gyp:filters' + '../../codecs/codecs.gyp:codecs' ], }, { diff --git a/packager/media/formats/webm/webm_cluster_parser.cc b/packager/media/formats/webm/webm_cluster_parser.cc index 5a15b5ff77..fdfb2e74fa 100644 --- a/packager/media/formats/webm/webm_cluster_parser.cc +++ b/packager/media/formats/webm/webm_cluster_parser.cc @@ -10,9 +10,9 @@ #include "packager/base/sys_byteorder.h" #include "packager/media/base/decrypt_config.h" #include "packager/media/base/timestamp.h" -#include "packager/media/filters/vp8_parser.h" -#include "packager/media/filters/vp9_parser.h" -#include "packager/media/filters/webvtt_util.h" +#include "packager/media/codecs/vp8_parser.h" +#include "packager/media/codecs/vp9_parser.h" +#include "packager/media/codecs/webvtt_util.h" #include "packager/media/formats/webm/webm_constants.h" #include "packager/media/formats/webm/webm_crypto_helpers.h" #include "packager/media/formats/webm/webm_webvtt_parser.h" diff --git a/packager/media/formats/wvm/wvm.gyp b/packager/media/formats/wvm/wvm.gyp index 910b0ca250..e6c070071f 100644 --- a/packager/media/formats/wvm/wvm.gyp +++ b/packager/media/formats/wvm/wvm.gyp @@ -18,9 +18,8 @@ ], 'dependencies': [ '../../base/media_base.gyp:media_base', - '../../filters/filters.gyp:filters', + '../../codecs/codecs.gyp:codecs', '../../formats/mp2t/mp2t.gyp:mp2t', - '../../formats/mp4/mp4.gyp:mp4', '../mpeg/mpeg.gyp:mpeg', ], }, diff --git a/packager/media/formats/wvm/wvm_media_parser.cc b/packager/media/formats/wvm/wvm_media_parser.cc index 88a3096969..3d0fd7f5c9 100644 --- a/packager/media/formats/wvm/wvm_media_parser.cc +++ b/packager/media/formats/wvm/wvm_media_parser.cc @@ -15,10 +15,10 @@ #include "packager/media/base/media_sample.h" #include "packager/media/base/status.h" #include "packager/media/base/video_stream_info.h" -#include "packager/media/filters/avc_decoder_configuration_record.h" +#include "packager/media/codecs/aac_audio_specific_config.h" +#include "packager/media/codecs/avc_decoder_configuration_record.h" +#include "packager/media/codecs/es_descriptor.h" #include "packager/media/formats/mp2t/adts_header.h" -#include "packager/media/formats/mp4/aac_audio_specific_config.h" -#include "packager/media/formats/mp4/es_descriptor.h" #define HAS_HEADER_EXTENSION(x) ((x != 0xBC) && (x != 0xBE) && (x != 0xBF) \ && (x != 0xF0) && (x != 0xF2) && (x != 0xF8) \ @@ -711,7 +711,7 @@ bool WvmMediaParser::ParseIndexEntry() { pixel_height = static_cast(value); break; case Audio_EsDescriptor: { - mp4::ESDescriptor descriptor; + ESDescriptor descriptor; if (!descriptor.Parse(binary_data)) { LOG(ERROR) << "Could not extract AudioSpecificConfig from ES_Descriptor"; @@ -929,7 +929,7 @@ bool WvmMediaParser::Output(bool output_encrypted_sample) { } else { // Set AudioStreamInfo fields using information from the // AACAudioSpecificConfig record. - mp4::AACAudioSpecificConfig aac_config; + AACAudioSpecificConfig aac_config; if (!aac_config.Parse(stream_infos_[i]->extra_data())) { LOG(ERROR) << "Could not parse AACAudioSpecificconfig"; return false; diff --git a/packager/media/formats/wvm/wvm_media_parser.h b/packager/media/formats/wvm/wvm_media_parser.h index e558583743..6b7df972f0 100644 --- a/packager/media/formats/wvm/wvm_media_parser.h +++ b/packager/media/formats/wvm/wvm_media_parser.h @@ -15,7 +15,7 @@ #include "packager/base/memory/scoped_ptr.h" #include "packager/media/base/media_parser.h" #include "packager/media/base/network_util.h" -#include "packager/media/filters/h264_byte_to_unit_stream_converter.h" +#include "packager/media/codecs/h264_byte_to_unit_stream_converter.h" namespace shaka { namespace media { diff --git a/packager/packager.gyp b/packager/packager.gyp index 6dbcf5f0b1..05b94ce147 100644 --- a/packager/packager.gyp +++ b/packager/packager.gyp @@ -35,9 +35,9 @@ ], 'dependencies': [ 'hls/hls.gyp:hls_builder', + 'media/codecs/codecs.gyp:codecs', 'media/event/media_event.gyp:media_event', 'media/file/file.gyp:file', - 'media/filters/filters.gyp:filters', 'media/formats/mp2t/mp2t.gyp:mp2t', 'media/formats/mp4/mp4.gyp:mp4', 'media/formats/mpeg/mpeg.gyp:mpeg', @@ -78,8 +78,8 @@ 'media/test/packager_test.cc', ], 'dependencies': [ + 'media/codecs/codecs.gyp:codecs', 'media/file/file.gyp:file', - 'media/filters/filters.gyp:filters', 'media/formats/mp2t/mp2t.gyp:mp2t', 'media/formats/mp4/mp4.gyp:mp4', 'media/formats/mpeg/mpeg.gyp:mpeg', @@ -109,9 +109,9 @@ 'dependencies': [ 'hls/hls.gyp:hls_unittest', 'media/base/media_base.gyp:media_base_unittest', + 'media/codecs/codecs.gyp:codecs_unittest', 'media/event/media_event.gyp:media_event_unittest', 'media/file/file.gyp:file_unittest', - 'media/filters/filters.gyp:filters_unittest', 'media/formats/mp2t/mp2t.gyp:mp2t_unittest', 'media/formats/mp4/mp4.gyp:mp4_unittest', 'media/formats/webm/webm.gyp:webm_unittest',