From 3114ee945d7aff12a291a2bdf92ec029a9b71f7a Mon Sep 17 00:00:00 2001 From: KongQun Yang Date: Fri, 19 Sep 2014 13:41:13 -0700 Subject: [PATCH] Add namespace edash_packager to packager codes For mpd codes, rename dash_packager to edash_packager; for media codes, add namespace edash_packager. Change-Id: I1120e6110c734cd02bdbe15f1cf7abddcdfdd7ea --- app/libcrypto_threading.cc | 2 ++ app/libcrypto_threading.h | 2 ++ app/libcrypto_threading_posix.cc | 2 ++ app/mpd_generator.cc | 2 +- app/packager_main.cc | 14 +++++------- app/packager_util.cc | 4 ++-- app/packager_util.h | 7 +++--- app/stream_descriptor.cc | 2 ++ app/stream_descriptor.h | 2 ++ media/base/aes_encryptor.cc | 2 ++ media/base/aes_encryptor.h | 2 ++ media/base/aes_encryptor_unittest.cc | 2 ++ media/base/audio_stream_info.cc | 2 ++ media/base/audio_stream_info.h | 2 ++ media/base/audio_timestamp_helper.cc | 2 ++ media/base/audio_timestamp_helper.h | 2 ++ media/base/audio_timestamp_helper_unittest.cc | 2 ++ media/base/bit_reader.cc | 2 ++ media/base/bit_reader.h | 2 ++ media/base/bit_reader_unittest.cc | 2 ++ media/base/buffer_reader.cc | 2 ++ media/base/buffer_reader.h | 2 ++ media/base/buffer_writer.cc | 2 ++ media/base/buffer_writer.h | 2 ++ media/base/buffer_writer_unittest.cc | 2 ++ media/base/byte_queue.cc | 2 ++ media/base/byte_queue.h | 2 ++ media/base/closure_thread.cc | 2 ++ media/base/closure_thread.h | 2 ++ media/base/closure_thread_unittest.cc | 2 ++ media/base/container_names.cc | 2 ++ media/base/container_names.h | 2 ++ media/base/container_names_unittest.cc | 2 ++ media/base/decrypt_config.cc | 2 ++ media/base/decrypt_config.h | 2 ++ media/base/decryptor_source.h | 2 ++ media/base/demuxer.cc | 2 ++ media/base/demuxer.h | 2 ++ media/base/fake_prng.cc | 2 ++ media/base/fake_prng.h | 2 ++ media/base/http_fetcher.cc | 2 ++ media/base/http_fetcher.h | 2 ++ media/base/http_fetcher_unittest.cc | 2 ++ media/base/key_source.cc | 2 ++ media/base/key_source.h | 2 ++ media/base/limits.h | 2 ++ media/base/media_parser.h | 2 ++ media/base/media_sample.cc | 2 ++ media/base/media_sample.h | 2 ++ media/base/media_stream.cc | 2 ++ media/base/media_stream.h | 2 ++ media/base/muxer.cc | 2 ++ media/base/muxer.h | 2 ++ media/base/muxer_options.cc | 2 ++ media/base/muxer_options.h | 2 ++ media/base/muxer_util.cc | 4 +++- media/base/muxer_util.h | 2 ++ media/base/muxer_util_unittest.cc | 2 ++ media/base/network_util.cc | 2 ++ media/base/network_util.h | 2 ++ media/base/offset_byte_queue.cc | 2 ++ media/base/offset_byte_queue.h | 2 ++ media/base/offset_byte_queue_unittest.cc | 2 ++ media/base/producer_consumer_queue.h | 2 ++ .../base/producer_consumer_queue_unittest.cc | 2 ++ media/base/request_signer.cc | 2 ++ media/base/request_signer.h | 2 ++ media/base/rsa_key.cc | 2 ++ media/base/rsa_key.h | 2 ++ media/base/rsa_key_unittest.cc | 2 ++ media/base/rsa_test_data.cc | 2 ++ media/base/rsa_test_data.h | 2 ++ media/base/status.cc | 2 ++ media/base/status.h | 2 ++ media/base/status_test_util.h | 10 +++++++-- media/base/status_test_util_unittest.cc | 17 +++++++++----- media/base/status_unittest.cc | 2 ++ media/base/stream_info.cc | 2 ++ media/base/stream_info.h | 2 ++ media/base/text_track.h | 2 ++ media/base/timestamp.h | 2 ++ media/base/video_stream_info.cc | 2 ++ media/base/video_stream_info.h | 2 ++ media/base/widevine_key_source.cc | 2 ++ media/base/widevine_key_source.h | 2 ++ media/base/widevine_key_source_unittest.cc | 2 ++ media/event/mpd_notify_muxer_listener.cc | 22 ++++++++----------- media/event/mpd_notify_muxer_listener.h | 11 +++++----- media/event/muxer_listener.h | 2 ++ media/event/muxer_listener_internal.cc | 7 ++---- media/event/muxer_listener_internal.h | 11 +++++----- .../vod_media_info_dump_muxer_listener.cc | 4 ++-- .../vod_media_info_dump_muxer_listener.h | 7 +++--- ...media_info_dump_muxer_listener_unittest.cc | 4 ++-- media/file/file.cc | 2 ++ media/file/file.h | 2 ++ media/file/file_closer.h | 2 ++ media/file/file_unittest.cc | 2 ++ media/file/local_file.cc | 2 ++ media/file/local_file.h | 2 ++ media/file/udp_file.cc | 2 ++ media/file/udp_file.h | 2 ++ media/filters/h264_bit_reader.cc | 2 ++ media/filters/h264_bit_reader.h | 2 ++ media/filters/h264_bit_reader_unittest.cc | 2 ++ .../h264_byte_to_unit_stream_converter.cc | 2 ++ .../h264_byte_to_unit_stream_converter.h | 2 ++ ..._byte_to_unit_stream_converter_unittest.cc | 2 ++ media/filters/h264_parser.cc | 2 ++ media/filters/h264_parser.h | 2 ++ media/filters/h264_parser_unittest.cc | 2 ++ media/formats/mp2t/adts_header.cc | 2 ++ media/formats/mp2t/adts_header.h | 2 ++ media/formats/mp2t/adts_header_unittest.cc | 2 ++ media/formats/mp2t/es_parser.h | 2 ++ media/formats/mp2t/es_parser_adts.cc | 2 ++ media/formats/mp2t/es_parser_adts.h | 4 ++-- media/formats/mp2t/es_parser_h264.cc | 2 ++ media/formats/mp2t/es_parser_h264.h | 5 ++--- media/formats/mp2t/es_parser_h264_unittest.cc | 2 ++ media/formats/mp2t/mp2t_common.h | 2 ++ media/formats/mp2t/mp2t_media_parser.cc | 2 ++ media/formats/mp2t/mp2t_media_parser.h | 2 ++ .../mp2t/mp2t_media_parser_unittest.cc | 2 ++ media/formats/mp2t/ts_packet.cc | 2 ++ media/formats/mp2t/ts_packet.h | 2 ++ media/formats/mp2t/ts_section.h | 2 ++ media/formats/mp2t/ts_section_pat.cc | 2 ++ media/formats/mp2t/ts_section_pat.h | 2 ++ media/formats/mp2t/ts_section_pes.cc | 2 ++ media/formats/mp2t/ts_section_pes.h | 2 ++ media/formats/mp2t/ts_section_pmt.cc | 2 ++ media/formats/mp2t/ts_section_pmt.h | 2 ++ media/formats/mp2t/ts_section_psi.cc | 2 ++ media/formats/mp2t/ts_section_psi.h | 2 ++ .../formats/mp4/aac_audio_specific_config.cc | 2 ++ media/formats/mp4/aac_audio_specific_config.h | 2 ++ .../mp4/aac_audio_specific_config_unittest.cc | 2 ++ media/formats/mp4/box.cc | 2 ++ media/formats/mp4/box.h | 2 ++ media/formats/mp4/box_buffer.h | 2 ++ media/formats/mp4/box_definitions.cc | 2 ++ media/formats/mp4/box_definitions.h | 2 ++ .../formats/mp4/box_definitions_comparison.h | 2 ++ media/formats/mp4/box_definitions_unittest.cc | 9 ++++---- media/formats/mp4/box_reader.cc | 2 ++ media/formats/mp4/box_reader.h | 2 ++ media/formats/mp4/box_reader_unittest.cc | 2 ++ media/formats/mp4/cenc.cc | 2 ++ media/formats/mp4/cenc.h | 2 ++ media/formats/mp4/chunk_info_iterator.cc | 2 ++ media/formats/mp4/chunk_info_iterator.h | 2 ++ .../mp4/chunk_info_iterator_unittest.cc | 2 ++ .../mp4/composition_offset_iterator.cc | 2 ++ .../formats/mp4/composition_offset_iterator.h | 2 ++ .../composition_offset_iterator_unittest.cc | 2 ++ media/formats/mp4/decoding_time_iterator.cc | 2 ++ media/formats/mp4/decoding_time_iterator.h | 2 ++ .../mp4/decoding_time_iterator_unittest.cc | 2 ++ media/formats/mp4/encrypting_fragmenter.cc | 2 ++ media/formats/mp4/encrypting_fragmenter.h | 2 ++ media/formats/mp4/es_descriptor.cc | 7 +++--- media/formats/mp4/es_descriptor.h | 2 ++ media/formats/mp4/es_descriptor_unittest.cc | 2 ++ media/formats/mp4/fourccs.h | 2 ++ media/formats/mp4/fragmenter.cc | 2 ++ media/formats/mp4/fragmenter.h | 2 ++ media/formats/mp4/key_rotation_fragmenter.cc | 4 +++- media/formats/mp4/key_rotation_fragmenter.h | 2 ++ media/formats/mp4/mp4_media_parser.cc | 2 ++ media/formats/mp4/mp4_media_parser.h | 2 ++ .../formats/mp4/mp4_media_parser_unittest.cc | 2 ++ media/formats/mp4/mp4_muxer.cc | 2 ++ media/formats/mp4/mp4_muxer.h | 2 ++ media/formats/mp4/multi_segment_segmenter.cc | 2 ++ media/formats/mp4/multi_segment_segmenter.h | 2 ++ media/formats/mp4/segmenter.cc | 2 ++ media/formats/mp4/segmenter.h | 2 ++ media/formats/mp4/single_segment_segmenter.cc | 2 ++ media/formats/mp4/single_segment_segmenter.h | 2 ++ media/formats/mp4/sync_sample_iterator.cc | 2 ++ media/formats/mp4/sync_sample_iterator.h | 2 ++ .../mp4/sync_sample_iterator_unittest.cc | 2 ++ media/formats/mp4/track_run_iterator.cc | 2 ++ media/formats/mp4/track_run_iterator.h | 2 ++ .../mp4/track_run_iterator_unittest.cc | 2 ++ media/formats/mpeg/adts_constants.cc | 2 ++ media/formats/mpeg/adts_constants.h | 2 ++ media/formats/wvm/wvm_media_parser.cc | 2 ++ media/formats/wvm/wvm_media_parser.h | 2 ++ .../formats/wvm/wvm_media_parser_unittest.cc | 2 ++ media/test/packager_test.cc | 2 ++ media/test/test_data_util.cc | 2 ++ media/test/test_data_util.h | 2 ++ mpd/base/bandwidth_estimator_test.cc | 4 ++-- mpd/base/content_protection_element.cc | 4 ++-- mpd/base/content_protection_element.h | 4 ++-- mpd/base/media_info.proto | 2 +- mpd/base/mpd_builder.cc | 4 ++-- mpd/base/mpd_builder.h | 12 +++++----- mpd/base/mpd_builder_unittest.cc | 4 ++-- mpd/base/mpd_notifier.h | 4 ++-- mpd/base/mpd_utils.cc | 4 ++-- mpd/base/mpd_utils.h | 4 ++-- mpd/base/segment_info.h | 4 ++-- mpd/base/simple_mpd_notifier.cc | 6 ++--- mpd/base/simple_mpd_notifier.h | 4 ++-- mpd/base/simple_vod_mpd_notifier.cc | 4 ++-- mpd/base/simple_vod_mpd_notifier.h | 4 ++-- mpd/base/xml/scoped_xml_ptr.h | 4 ++-- mpd/base/xml/xml_node.cc | 10 ++++----- mpd/base/xml/xml_node.h | 4 ++-- mpd/base/xml/xml_node_unittest.cc | 4 ++-- mpd/test/mpd_builder_test_helper.cc | 4 ++-- mpd/test/mpd_builder_test_helper.h | 4 ++-- mpd/test/xml_compare.cc | 4 ++-- mpd/test/xml_compare.h | 4 ++-- mpd/util/mpd_writer.cc | 6 ++--- mpd/util/mpd_writer.h | 6 +++-- mpd/util/mpd_writer_unittest.cc | 4 ++-- 220 files changed, 493 insertions(+), 132 deletions(-) diff --git a/app/libcrypto_threading.cc b/app/libcrypto_threading.cc index 25bf3c71f1..d80d8f7281 100644 --- a/app/libcrypto_threading.cc +++ b/app/libcrypto_threading.cc @@ -6,6 +6,7 @@ #include "app/libcrypto_threading.h" +namespace edash_packager { namespace media { LibcryptoThreading::LibcryptoThreading() {} @@ -19,3 +20,4 @@ bool LibcryptoThreading::Initialize() { } } // namespace media +} // namespace edash_packager diff --git a/app/libcrypto_threading.h b/app/libcrypto_threading.h index d641446378..db53f3d24f 100644 --- a/app/libcrypto_threading.h +++ b/app/libcrypto_threading.h @@ -9,6 +9,7 @@ #include "base/macros.h" +namespace edash_packager { namespace media { /// Enable thread safety for OpenSSL libcrypto. @@ -34,5 +35,6 @@ class LibcryptoThreading { }; } // namespace media +} // namespace edash_packager #endif // APP_LIBCRYPTO_THREADING_H_ diff --git a/app/libcrypto_threading_posix.cc b/app/libcrypto_threading_posix.cc index 32eb0aefdf..461c1e5914 100644 --- a/app/libcrypto_threading_posix.cc +++ b/app/libcrypto_threading_posix.cc @@ -28,6 +28,7 @@ unsigned long ThreadIdFunction() { } // anonymous namespace +namespace edash_packager { namespace media { bool InitLibcryptoThreading() { @@ -50,3 +51,4 @@ bool TerminateLibcryptoThreading() { } } // namespace media +} // namespace edash_packager diff --git a/app/mpd_generator.cc b/app/mpd_generator.cc index 5260968c8a..efeb4bc64b 100644 --- a/app/mpd_generator.cc +++ b/app/mpd_generator.cc @@ -58,7 +58,7 @@ ExitStatus RunMpdGenerator() { base::SplitString(FLAGS_base_urls, ',', &base_urls); } - dash_packager::MpdWriter mpd_writer; + edash_packager::MpdWriter mpd_writer; for (Iterator it = base_urls.begin(); it != base_urls.end(); ++it) mpd_writer.AddBaseUrl(*it); diff --git a/app/packager_main.cc b/app/packager_main.cc index 4ed88e66c4..fb124aa2bc 100644 --- a/app/packager_main.cc +++ b/app/packager_main.cc @@ -51,14 +51,9 @@ const char kUsage[] = "If not specified, its value may be estimated.\n"; } // namespace +namespace edash_packager { namespace media { -using dash_packager::DashProfile; -using dash_packager::kOnDemandProfile; -using dash_packager::kLiveProfile; -using dash_packager::MpdNotifier; -using dash_packager::MpdOptions; -using dash_packager::SimpleMpdNotifier; using event::MpdNotifyMuxerListener; using event::MuxerListener; using event::VodMediaInfoDumpMuxerListener; @@ -287,6 +282,7 @@ bool RunPackager(const StreamDescriptorList& stream_descriptors) { } } // namespace media +} // namespace edash_packager int main(int argc, char** argv) { google::SetUsageMessage(base::StringPrintf(kUsage, argv[0])); @@ -295,17 +291,17 @@ int main(int argc, char** argv) { google::ShowUsageWithFlags(argv[0]); return 1; } - media::LibcryptoThreading libcrypto_threading; + edash_packager::media::LibcryptoThreading libcrypto_threading; if (!libcrypto_threading.Initialize()) { LOG(ERROR) << "Could not initialize libcrypto threading."; return 1; } // TODO(tinskip): Make InsertStreamDescriptor a member of // StreamDescriptorList. - media::StreamDescriptorList stream_descriptors; + edash_packager::media::StreamDescriptorList stream_descriptors; for (int i = 1; i < argc; ++i) { if (!InsertStreamDescriptor(argv[i], &stream_descriptors)) return 1; } - return media::RunPackager(stream_descriptors) ? 0 : 1; + return edash_packager::media::RunPackager(stream_descriptors) ? 0 : 1; } diff --git a/app/packager_util.cc b/app/packager_util.cc index 5fd938af21..19dda74cb6 100644 --- a/app/packager_util.cc +++ b/app/packager_util.cc @@ -24,8 +24,7 @@ DEFINE_bool(dump_stream_info, false, "Dump demuxed stream info."); -using dash_packager::MpdOptions; - +namespace edash_packager { namespace media { void DumpStreamInfo(const std::vector& streams) { @@ -203,3 +202,4 @@ bool AddStreamToMuxer(const std::vector& streams, } } // namespace media +} // namespace edash_packager diff --git a/app/packager_util.h b/app/packager_util.h index 623b23d63e..d80ddb1151 100644 --- a/app/packager_util.h +++ b/app/packager_util.h @@ -17,9 +17,9 @@ DECLARE_bool(dump_stream_info); -namespace dash_packager { +namespace edash_packager { + struct MpdOptions; -} namespace media { @@ -51,7 +51,7 @@ bool AssignFlagsFromProfile(); bool GetMuxerOptions(MuxerOptions* muxer_options); /// Fill MpdOptions members using provided command line options. -bool GetMpdOptions(dash_packager::MpdOptions* mpd_options); +bool GetMpdOptions(edash_packager::MpdOptions* mpd_options); /// Select and add a stream from a provided set to a muxer. /// @param streams contains the set of MediaStreams from which to select. @@ -65,5 +65,6 @@ bool AddStreamToMuxer(const std::vector& streams, Muxer* muxer); } // namespace media +} // namespace edash_packager #endif // APP_PACKAGER_UTIL_H_ diff --git a/app/stream_descriptor.cc b/app/stream_descriptor.cc index adaf966c15..6c82072444 100644 --- a/app/stream_descriptor.cc +++ b/app/stream_descriptor.cc @@ -11,6 +11,7 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" +namespace edash_packager { namespace media { namespace { @@ -120,3 +121,4 @@ bool InsertStreamDescriptor(const std::string& descriptor_string, } } // namespace media +} // namespace edash_packager diff --git a/app/stream_descriptor.h b/app/stream_descriptor.h index 269a5b6560..a9a91bc00a 100644 --- a/app/stream_descriptor.h +++ b/app/stream_descriptor.h @@ -12,6 +12,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { /// Defines a single input/output stream, it's input source, output destination, @@ -49,5 +50,6 @@ bool InsertStreamDescriptor(const std::string& descriptor_string, StreamDescriptorList* descriptor_list); } // namespace media +} // namespace edash_packager #endif // APP_STREAM_DESCRIPTOR_H_ diff --git a/media/base/aes_encryptor.cc b/media/base/aes_encryptor.cc index 86e0c54099..ee1904dfb5 100644 --- a/media/base/aes_encryptor.cc +++ b/media/base/aes_encryptor.cc @@ -38,6 +38,7 @@ const uint32 kCencKeySize = 16; } // namespace +namespace edash_packager { namespace media { AesCtrEncryptor::AesCtrEncryptor() @@ -256,3 +257,4 @@ bool AesCbcDecryptor::SetIv(const std::vector& iv) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/aes_encryptor.h b/media/base/aes_encryptor.h index 1b9049dc34..ca96be186e 100644 --- a/media/base/aes_encryptor.h +++ b/media/base/aes_encryptor.h @@ -18,6 +18,7 @@ struct aes_key_st; typedef struct aes_key_st AES_KEY; +namespace edash_packager { namespace media { class AesCtrEncryptor { @@ -168,5 +169,6 @@ class AesCbcDecryptor { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_AES_ENCRYPTOR_H_ diff --git a/media/base/aes_encryptor_unittest.cc b/media/base/aes_encryptor_unittest.cc index 11f31337f9..419b0deb90 100644 --- a/media/base/aes_encryptor_unittest.cc +++ b/media/base/aes_encryptor_unittest.cc @@ -130,6 +130,7 @@ const uint8 kInvalidIv[] = {0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, } // namespace +namespace edash_packager { namespace media { class AesCtrEncryptorTest : public testing::Test { @@ -440,3 +441,4 @@ TEST_F(AesCbcEncryptorTest, CipherTextNotMultipleOfBlockSize) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/audio_stream_info.cc b/media/base/audio_stream_info.cc index 38eb2e1bf3..d3e7c3c5de 100644 --- a/media/base/audio_stream_info.cc +++ b/media/base/audio_stream_info.cc @@ -11,6 +11,7 @@ #include "base/strings/stringprintf.h" #include "media/base/limits.h" +namespace edash_packager { namespace media { namespace { @@ -112,3 +113,4 @@ std::string AudioStreamInfo::GetCodecString(AudioCodec codec, } } // namespace media +} // namespace edash_packager diff --git a/media/base/audio_stream_info.h b/media/base/audio_stream_info.h index d8fe21720e..18d69fb464 100644 --- a/media/base/audio_stream_info.h +++ b/media/base/audio_stream_info.h @@ -11,6 +11,7 @@ #include "media/base/stream_info.h" +namespace edash_packager { namespace media { enum AudioCodec { @@ -87,5 +88,6 @@ class AudioStreamInfo : public StreamInfo { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_AUDIO_STREAM_INFO_H_ diff --git a/media/base/audio_timestamp_helper.cc b/media/base/audio_timestamp_helper.cc index 9b23688f06..563097db83 100644 --- a/media/base/audio_timestamp_helper.cc +++ b/media/base/audio_timestamp_helper.cc @@ -7,6 +7,7 @@ #include "base/logging.h" #include "media/base/timestamp.h" +namespace edash_packager { namespace media { AudioTimestampHelper::AudioTimestampHelper(uint32 timescale, @@ -74,3 +75,4 @@ int64 AudioTimestampHelper::ComputeTimestamp( } } // namespace media +} // namespace edash_packager diff --git a/media/base/audio_timestamp_helper.h b/media/base/audio_timestamp_helper.h index 79bdee0cc4..12a35cf78c 100644 --- a/media/base/audio_timestamp_helper.h +++ b/media/base/audio_timestamp_helper.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { // Generates timestamps for a sequence of audio sample frames. This class should @@ -67,5 +68,6 @@ class AudioTimestampHelper { }; } // namespace media +} // namespace edash_packager #endif diff --git a/media/base/audio_timestamp_helper_unittest.cc b/media/base/audio_timestamp_helper_unittest.cc index 3e3ed44444..4512de0997 100644 --- a/media/base/audio_timestamp_helper_unittest.cc +++ b/media/base/audio_timestamp_helper_unittest.cc @@ -7,6 +7,7 @@ #include "media/base/audio_timestamp_helper.h" #include "media/base/timestamp.h" +namespace edash_packager { namespace media { static const uint32 kDefaultSampleRate = 44100; @@ -121,3 +122,4 @@ TEST_F(AudioTimestampHelperTest, GetFramesToTarget) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/bit_reader.cc b/media/base/bit_reader.cc index 9f6f4098a1..f269eabc3d 100644 --- a/media/base/bit_reader.cc +++ b/media/base/bit_reader.cc @@ -4,6 +4,7 @@ #include "media/base/bit_reader.h" +namespace edash_packager { namespace media { BitReader::BitReader(const uint8* data, off_t size) @@ -79,3 +80,4 @@ void BitReader::UpdateCurrByte() { } } // namespace media +} // namespace edash_packager diff --git a/media/base/bit_reader.h b/media/base/bit_reader.h index e5a0a29b10..d24be365dc 100644 --- a/media/base/bit_reader.h +++ b/media/base/bit_reader.h @@ -10,6 +10,7 @@ #include "base/basictypes.h" #include "base/logging.h" +namespace edash_packager { namespace media { /// A class to read bit streams. @@ -76,5 +77,6 @@ class BitReader { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_BIT_READER_H_ diff --git a/media/base/bit_reader_unittest.cc b/media/base/bit_reader_unittest.cc index ec20b7d4a3..c5b3e4cb88 100644 --- a/media/base/bit_reader_unittest.cc +++ b/media/base/bit_reader_unittest.cc @@ -6,6 +6,7 @@ #include "media/base/bit_reader.h" +namespace edash_packager { namespace media { TEST(BitReaderTest, NormalOperationTest) { @@ -65,3 +66,4 @@ TEST(BitReaderTest, SkipBitsTest) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/buffer_reader.cc b/media/base/buffer_reader.cc index da70fdb162..093e64101c 100644 --- a/media/base/buffer_reader.cc +++ b/media/base/buffer_reader.cc @@ -8,6 +8,7 @@ #include "base/logging.h" +namespace edash_packager { namespace media { bool BufferReader::Read1(uint8* v) { @@ -77,3 +78,4 @@ bool BufferReader::ReadNBytes(T* v, size_t num_bytes) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/buffer_reader.h b/media/base/buffer_reader.h index 48767857d1..7c22e9efd1 100644 --- a/media/base/buffer_reader.h +++ b/media/base/buffer_reader.h @@ -12,6 +12,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" +namespace edash_packager { namespace media { /// A simple buffer reader implementation, which reads data of various types @@ -75,5 +76,6 @@ class BufferReader { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_BUFFER_READER_H_ diff --git a/media/base/buffer_writer.cc b/media/base/buffer_writer.cc index e3b81edd2f..7169e89b0e 100644 --- a/media/base/buffer_writer.cc +++ b/media/base/buffer_writer.cc @@ -9,6 +9,7 @@ #include "base/sys_byteorder.h" #include "media/file/file.h" +namespace edash_packager { namespace media { BufferWriter::BufferWriter() { @@ -71,3 +72,4 @@ void BufferWriter::AppendInternal(T v) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/buffer_writer.h b/media/base/buffer_writer.h index 39aa75d291..ee4b04daf8 100644 --- a/media/base/buffer_writer.h +++ b/media/base/buffer_writer.h @@ -12,6 +12,7 @@ #include "base/stl_util.h" #include "media/base/status.h" +namespace edash_packager { namespace media { class File; @@ -74,5 +75,6 @@ class BufferWriter { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_BUFFER_WRITER_H_ diff --git a/media/base/buffer_writer_unittest.cc b/media/base/buffer_writer_unittest.cc index 89ce11d194..9de3e432fe 100644 --- a/media/base/buffer_writer_unittest.cc +++ b/media/base/buffer_writer_unittest.cc @@ -32,6 +32,7 @@ const int64 kint64 = -10000000000LL; const uint8 kuint8Array[] = {10, 1, 100, 5, 3, 60}; } // namespace +namespace edash_packager { namespace media { class BufferWriterTest : public testing::Test { @@ -187,3 +188,4 @@ TEST_F(BufferWriterTest, WriteToFile) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/byte_queue.cc b/media/base/byte_queue.cc index 534b55225e..9d2785d6c4 100644 --- a/media/base/byte_queue.cc +++ b/media/base/byte_queue.cc @@ -6,6 +6,7 @@ #include "base/logging.h" +namespace edash_packager { namespace media { // Default starting size for the queue. @@ -82,3 +83,4 @@ void ByteQueue::Pop(int count) { uint8* ByteQueue::front() const { return buffer_.get() + offset_; } } // namespace media +} // namespace edash_packager diff --git a/media/base/byte_queue.h b/media/base/byte_queue.h index 57158f4139..c96f89dcde 100644 --- a/media/base/byte_queue.h +++ b/media/base/byte_queue.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +namespace edash_packager { namespace media { /// Represents a queue of bytes. @@ -53,5 +54,6 @@ class ByteQueue { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_BYTE_QUEUE_H_ diff --git a/media/base/closure_thread.cc b/media/base/closure_thread.cc index a83809509a..8a171f20c5 100644 --- a/media/base/closure_thread.cc +++ b/media/base/closure_thread.cc @@ -6,6 +6,7 @@ #include "media/base/closure_thread.h" +namespace edash_packager { namespace media { ClosureThread::ClosureThread( @@ -21,3 +22,4 @@ ClosureThread::~ClosureThread() { void ClosureThread::Run() { task_.Run(); } } // namespace media +} // namespace edash_packager diff --git a/media/base/closure_thread.h b/media/base/closure_thread.h index 0b45e5e980..d850cbc68f 100644 --- a/media/base/closure_thread.h +++ b/media/base/closure_thread.h @@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/threading/simple_thread.h" +namespace edash_packager { namespace media { /// Class for creating a thread which invokes a closure. @@ -43,5 +44,6 @@ class ClosureThread : public base::SimpleThread { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_CLOSURE_THREAD_H_ diff --git a/media/base/closure_thread_unittest.cc b/media/base/closure_thread_unittest.cc index 7334a13601..a0d8c125c9 100644 --- a/media/base/closure_thread_unittest.cc +++ b/media/base/closure_thread_unittest.cc @@ -28,6 +28,7 @@ class MockOperation { } // namespace +namespace edash_packager { namespace media { class ClosureThreadTest : public ::testing::Test { @@ -118,3 +119,4 @@ TEST_F(ClosureThreadTest, NotStarted) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/container_names.cc b/media/base/container_names.cc index 330004f768..c9111180b0 100644 --- a/media/base/container_names.cc +++ b/media/base/container_names.cc @@ -11,6 +11,7 @@ #include "base/logging.h" #include "media/base/bit_reader.h" +namespace edash_packager { namespace media { #define TAG(a, b, c, d) \ @@ -1669,3 +1670,4 @@ MediaContainerName DetermineContainer(const uint8* buffer, int buffer_size) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/container_names.h b/media/base/container_names.h index 285108d590..410e47b70e 100644 --- a/media/base/container_names.h +++ b/media/base/container_names.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { /// Container formats supported by this utility function. New formats should be @@ -57,5 +58,6 @@ enum MediaContainerName { MediaContainerName DetermineContainer(const uint8* buffer, int buffer_size); } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_CONTAINER_NAMES_H_ diff --git a/media/base/container_names_unittest.cc b/media/base/container_names_unittest.cc index d27ea9bfbf..f812b8eb7b 100644 --- a/media/base/container_names_unittest.cc +++ b/media/base/container_names_unittest.cc @@ -8,6 +8,7 @@ #include "media/base/container_names.h" #include "media/test/test_data_util.h" +namespace edash_packager { namespace media { // Using a macros to simplify tests. Since EXPECT_EQ outputs the second argument @@ -215,3 +216,4 @@ TEST(ContainerNamesTest, FileCheckUNKNOWN) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/decrypt_config.cc b/media/base/decrypt_config.cc index 7214069e8b..52d5ccdc04 100644 --- a/media/base/decrypt_config.cc +++ b/media/base/decrypt_config.cc @@ -6,6 +6,7 @@ #include "base/logging.h" +namespace edash_packager { namespace media { DecryptConfig::DecryptConfig(const std::vector& key_id, @@ -23,3 +24,4 @@ DecryptConfig::DecryptConfig(const std::vector& key_id, DecryptConfig::~DecryptConfig() {} } // namespace media +} // namespace edash_packager diff --git a/media/base/decrypt_config.h b/media/base/decrypt_config.h index e4645a330b..3808be6d6f 100644 --- a/media/base/decrypt_config.h +++ b/media/base/decrypt_config.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +namespace edash_packager { namespace media { /// The Common Encryption spec provides for subsample encryption, where portions @@ -71,5 +72,6 @@ class DecryptConfig { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_DECRYPT_CONFIG_H_ diff --git a/media/base/decryptor_source.h b/media/base/decryptor_source.h index 1d915cd1b6..4ac45b11f0 100644 --- a/media/base/decryptor_source.h +++ b/media/base/decryptor_source.h @@ -11,6 +11,7 @@ #include "media/base/container_names.h" #include "media/base/status.h" +namespace edash_packager { namespace media { /// DecryptorSource is responsible for decryption key acquisition. @@ -32,5 +33,6 @@ class DecryptorSource { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_DECRYPTOR_SOURCE_H_ diff --git a/media/base/demuxer.cc b/media/base/demuxer.cc index f840ded93a..b620996901 100644 --- a/media/base/demuxer.cc +++ b/media/base/demuxer.cc @@ -24,6 +24,7 @@ namespace { const size_t kBufSize = 0x40000; // 256KB. } +namespace edash_packager { namespace media { Demuxer::Demuxer(const std::string& file_name) @@ -161,3 +162,4 @@ Status Demuxer::Parse() { } } // namespace media +} // namespace edash_packager diff --git a/media/base/demuxer.h b/media/base/demuxer.h index 970139c733..a296d49d07 100644 --- a/media/base/demuxer.h +++ b/media/base/demuxer.h @@ -14,6 +14,7 @@ #include "media/base/container_names.h" #include "media/base/status.h" +namespace edash_packager { namespace media { class Decryptor; @@ -78,5 +79,6 @@ class Demuxer { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_DEMUXER_H_ diff --git a/media/base/fake_prng.cc b/media/base/fake_prng.cc index 6b86c6e8db..cd0fad3c10 100644 --- a/media/base/fake_prng.cc +++ b/media/base/fake_prng.cc @@ -39,6 +39,7 @@ const RAND_METHOD kFakeRandMethod = {NULL, // RAND_seed function. } // namespace +namespace edash_packager { namespace media { namespace fake_prng { @@ -71,3 +72,4 @@ void StopFakePrng() { } // namespace fake_prng } // namespace media +} // namespace edash_packager diff --git a/media/base/fake_prng.h b/media/base/fake_prng.h index 4cba896fbc..57bd1b2541 100644 --- a/media/base/fake_prng.h +++ b/media/base/fake_prng.h @@ -9,6 +9,7 @@ #ifndef MEDIA_BASE_FAKE_PRNG_H #define MEDIA_BASE_FAKE_PRNG_H +namespace edash_packager { namespace media { namespace fake_prng { @@ -21,5 +22,6 @@ void StopFakePrng(); } // namespace fake_prng } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_FAKE_PRNG_H diff --git a/media/base/http_fetcher.cc b/media/base/http_fetcher.cc index 6bc171516c..55ae881688 100644 --- a/media/base/http_fetcher.cc +++ b/media/base/http_fetcher.cc @@ -37,6 +37,7 @@ size_t AppendToString(char* ptr, size_t size, size_t nmemb, std::string* respons } } // namespace +namespace edash_packager { namespace media { HttpFetcher::HttpFetcher() {} @@ -110,3 +111,4 @@ Status SimpleHttpFetcher::FetchInternal(HttpMethod method, } } // namespace media +} // namespace edash_packager diff --git a/media/base/http_fetcher.h b/media/base/http_fetcher.h index fd08835d4d..c94dec4034 100644 --- a/media/base/http_fetcher.h +++ b/media/base/http_fetcher.h @@ -10,6 +10,7 @@ #include "base/compiler_specific.h" #include "media/base/status.h" +namespace edash_packager { namespace media { /// Defines a generic http fetcher interface. @@ -77,6 +78,7 @@ class SimpleHttpFetcher : public HttpFetcher { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_HTTP_FETCHER_H_ diff --git a/media/base/http_fetcher_unittest.cc b/media/base/http_fetcher_unittest.cc index f697967b10..ccbce5dd0e 100644 --- a/media/base/http_fetcher_unittest.cc +++ b/media/base/http_fetcher_unittest.cc @@ -24,6 +24,7 @@ const char kExpectedPostResponse[] = const char kDelayTwoSecs[] = "delay=2"; // This causes host to delay 2 seconds. } // namespace +namespace edash_packager { namespace media { static void CheckHttpGet(const std::string& url, @@ -85,4 +86,5 @@ TEST(DISABLED_HttpFetcherTest, BigTimeout) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/key_source.cc b/media/base/key_source.cc index 245d5e8199..428429979d 100644 --- a/media/base/key_source.cc +++ b/media/base/key_source.cc @@ -16,6 +16,7 @@ const uint8 kWidevineSystemId[] = {0xed, 0xef, 0x8b, 0xa9, 0x79, 0xd6, 0xd5, 0x1d, 0x21, 0xed}; } // namespace +namespace edash_packager { namespace media { EncryptionKey::EncryptionKey() {} @@ -150,3 +151,4 @@ KeySource::KeySource(scoped_ptr encryption_key) } } // namespace media +} // namespace edash_packager diff --git a/media/base/key_source.h b/media/base/key_source.h index 08d8c1fc8d..c2f4482141 100644 --- a/media/base/key_source.h +++ b/media/base/key_source.h @@ -12,6 +12,7 @@ #include "base/memory/scoped_ptr.h" #include "media/base/status.h" +namespace edash_packager { namespace media { struct EncryptionKey { @@ -112,5 +113,6 @@ class KeySource { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_KEY_SOURCE_H_ diff --git a/media/base/limits.h b/media/base/limits.h index ed7ac513c7..0b9df839b9 100644 --- a/media/base/limits.h +++ b/media/base/limits.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { namespace limits { @@ -47,5 +48,6 @@ enum { } // namespace limits } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_LIMITS_H_ diff --git a/media/base/media_parser.h b/media/base/media_parser.h index e7b365d092..693807c320 100644 --- a/media/base/media_parser.h +++ b/media/base/media_parser.h @@ -15,6 +15,7 @@ #include "base/memory/scoped_ptr.h" #include "media/base/container_names.h" +namespace edash_packager { namespace media { class KeySource; @@ -65,5 +66,6 @@ class MediaParser { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_MEDIA_PARSER_H_ diff --git a/media/base/media_sample.cc b/media/base/media_sample.cc index dd484e0fee..326eb5ab2c 100644 --- a/media/base/media_sample.cc +++ b/media/base/media_sample.cc @@ -11,6 +11,7 @@ #include "base/logging.h" #include "base/strings/stringprintf.h" +namespace edash_packager { namespace media { MediaSample::MediaSample(const uint8* data, @@ -84,3 +85,4 @@ std::string MediaSample::ToString() const { } } // namespace media +} // namespace edash_packager diff --git a/media/base/media_sample.h b/media/base/media_sample.h index 270b6deaed..d79f623f74 100644 --- a/media/base/media_sample.h +++ b/media/base/media_sample.h @@ -15,6 +15,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +namespace edash_packager { namespace media { /// Class to hold a media sample. @@ -159,5 +160,6 @@ class MediaSample : public base::RefCountedThreadSafe { typedef std::deque > BufferQueue; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_MEDIA_SAMPLE_H_ diff --git a/media/base/media_stream.cc b/media/base/media_stream.cc index 5a1e2380dd..3b186371fe 100644 --- a/media/base/media_stream.cc +++ b/media/base/media_stream.cc @@ -13,6 +13,7 @@ #include "media/base/muxer.h" #include "media/base/stream_info.h" +namespace edash_packager { namespace media { MediaStream::MediaStream(scoped_refptr info, Demuxer* demuxer) @@ -105,3 +106,4 @@ std::string MediaStream::ToString() const { } } // namespace media +} // namespace edash_packager diff --git a/media/base/media_stream.h b/media/base/media_stream.h index a35bc53499..bd845a5350 100644 --- a/media/base/media_stream.h +++ b/media/base/media_stream.h @@ -13,6 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "media/base/status.h" +namespace edash_packager { namespace media { class Demuxer; @@ -74,5 +75,6 @@ class MediaStream { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_MEDIA_STREAM_H_ diff --git a/media/base/muxer.cc b/media/base/muxer.cc index cdd50f0e06..c31ea84973 100644 --- a/media/base/muxer.cc +++ b/media/base/muxer.cc @@ -9,6 +9,7 @@ #include "media/base/media_sample.h" #include "media/base/media_stream.h" +namespace edash_packager { namespace media { Muxer::Muxer(const MuxerOptions& options) @@ -95,3 +96,4 @@ Status Muxer::AddSample(const MediaStream* stream, } } // namespace media +} // namespace edash_packager diff --git a/media/base/muxer.h b/media/base/muxer.h index c5724e7637..c3fe0b1d40 100644 --- a/media/base/muxer.h +++ b/media/base/muxer.h @@ -20,6 +20,7 @@ namespace base { class Clock; } +namespace edash_packager { namespace media { class KeySource; @@ -121,5 +122,6 @@ class Muxer { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_MUXER_H_ diff --git a/media/base/muxer_options.cc b/media/base/muxer_options.cc index 5af50c4d9a..8adbb8ae56 100644 --- a/media/base/muxer_options.cc +++ b/media/base/muxer_options.cc @@ -6,6 +6,7 @@ #include "media/base/muxer_options.h" +namespace edash_packager { namespace media { MuxerOptions::MuxerOptions() @@ -19,3 +20,4 @@ MuxerOptions::MuxerOptions() MuxerOptions::~MuxerOptions() {} } // namespace media +} // namespace edash_packager diff --git a/media/base/muxer_options.h b/media/base/muxer_options.h index 11b06f1648..71cc90d724 100644 --- a/media/base/muxer_options.h +++ b/media/base/muxer_options.h @@ -13,6 +13,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { /// This structure contains the list of configuration options for Muxer. @@ -70,5 +71,6 @@ struct MuxerOptions { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_MUXER_OPTIONS_H_ diff --git a/media/base/muxer_util.cc b/media/base/muxer_util.cc index 1c1ccca723..d00dbbe310 100644 --- a/media/base/muxer_util.cc +++ b/media/base/muxer_util.cc @@ -32,6 +32,7 @@ bool ValidateFormatTag(const std::string& format_tag) { } } // namespace +namespace edash_packager { namespace media { bool ValidateSegmentTemplate(const std::string& segment_template) { @@ -152,4 +153,5 @@ std::string GetSegmentName(const std::string& segment_template, return segment_name; } -} // namespace media +} // namespace media +} // namespace edash_packager diff --git a/media/base/muxer_util.h b/media/base/muxer_util.h index 2a43c3f46f..3ec8ce3087 100644 --- a/media/base/muxer_util.h +++ b/media/base/muxer_util.h @@ -13,6 +13,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { /// Validates the segment template against segment URL construction rule @@ -35,5 +36,6 @@ std::string GetSegmentName(const std::string& segment_template, uint32 bandwidth); } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_MUXER_UTIL_H_ diff --git a/media/base/muxer_util_unittest.cc b/media/base/muxer_util_unittest.cc index 94c15218ae..a056c240cc 100644 --- a/media/base/muxer_util_unittest.cc +++ b/media/base/muxer_util_unittest.cc @@ -8,6 +8,7 @@ #include "media/base/muxer_util.h" +namespace edash_packager { namespace media { TEST(MuxerUtilTest, ValidateSegmentTemplate) { @@ -153,3 +154,4 @@ TEST(MuxerUtilTest, GetSegmentNameLargeTime) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/network_util.cc b/media/base/network_util.cc index 965306425d..11ebe02d84 100644 --- a/media/base/network_util.cc +++ b/media/base/network_util.cc @@ -4,6 +4,7 @@ #include "media/base/network_util.h" +namespace edash_packager { namespace media { uint32 @@ -27,4 +28,5 @@ ntohllFromBuffer( const unsigned char * buf ) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/network_util.h b/media/base/network_util.h index 87037c3a0d..2633d988f2 100644 --- a/media/base/network_util.h +++ b/media/base/network_util.h @@ -8,6 +8,7 @@ #include "base/base_export.h" #include "base/basictypes.h" +namespace edash_packager { namespace media { uint32 ntohlFromBuffer(const unsigned char * buf); @@ -15,5 +16,6 @@ uint16 ntohsFromBuffer(const unsigned char * buf); uint64 ntohllFromBuffer(const unsigned char * buf); } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_NETWORK_UTIL_H_ diff --git a/media/base/offset_byte_queue.cc b/media/base/offset_byte_queue.cc index 35c4a0529c..2f6e7a810c 100644 --- a/media/base/offset_byte_queue.cc +++ b/media/base/offset_byte_queue.cc @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/logging.h" +namespace edash_packager { namespace media { OffsetByteQueue::OffsetByteQueue() : buf_(NULL), size_(0), head_(0) {} @@ -62,3 +63,4 @@ void OffsetByteQueue::Sync() { } } // namespace media +} // namespace edash_packager diff --git a/media/base/offset_byte_queue.h b/media/base/offset_byte_queue.h index 59f3fdeba5..5060bfaf00 100644 --- a/media/base/offset_byte_queue.h +++ b/media/base/offset_byte_queue.h @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "media/base/byte_queue.h" +namespace edash_packager { namespace media { /// Wrapper around ByteQueue, which encapsulates the notion of a @@ -65,5 +66,6 @@ class OffsetByteQueue { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_OFFSET_BYTE_QUEUE_H_ diff --git a/media/base/offset_byte_queue_unittest.cc b/media/base/offset_byte_queue_unittest.cc index 52329953bf..7070c68297 100644 --- a/media/base/offset_byte_queue_unittest.cc +++ b/media/base/offset_byte_queue_unittest.cc @@ -9,6 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "media/base/offset_byte_queue.h" +namespace edash_packager { namespace media { class OffsetByteQueueTest : public testing::Test { @@ -90,3 +91,4 @@ TEST_F(OffsetByteQueueTest, Trim) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/producer_consumer_queue.h b/media/base/producer_consumer_queue.h index 850935500f..72cfb17473 100644 --- a/media/base/producer_consumer_queue.h +++ b/media/base/producer_consumer_queue.h @@ -15,6 +15,7 @@ #include "base/timer/elapsed_timer.h" #include "media/base/status.h" +namespace edash_packager { namespace media { static const size_t kUnlimitedCapacity = 0u; @@ -314,5 +315,6 @@ void ProducerConsumerQueue::SlideHeadOnCenter(size_t pos) { } } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_PRODUCER_CONSUMER_QUEUE_H_ diff --git a/media/base/producer_consumer_queue_unittest.cc b/media/base/producer_consumer_queue_unittest.cc index 800f47fcdf..0646c2137c 100644 --- a/media/base/producer_consumer_queue_unittest.cc +++ b/media/base/producer_consumer_queue_unittest.cc @@ -26,6 +26,7 @@ bool CheckTimeApproxEqual(int64 time_in_milliseconds, } // namespace +namespace edash_packager { namespace media { TEST(ProducerConsumerQueueTest, CheckEmpty) { @@ -364,3 +365,4 @@ INSTANTIATE_TEST_CASE_P(Operations, ::testing::Values(kPush, kPop, kPeek)); } // namespace media +} // namespace edash_packager diff --git a/media/base/request_signer.cc b/media/base/request_signer.cc index e512c542c6..1e85de3554 100644 --- a/media/base/request_signer.cc +++ b/media/base/request_signer.cc @@ -11,6 +11,7 @@ #include "media/base/aes_encryptor.h" #include "media/base/rsa_key.h" +namespace edash_packager { namespace media { RequestSigner::RequestSigner(const std::string& signer_name) @@ -73,3 +74,4 @@ bool RsaRequestSigner::GenerateSignature(const std::string& message, } } // namespace media +} // namespace edash_packager diff --git a/media/base/request_signer.h b/media/base/request_signer.h index ac5999e00b..6603b5d344 100644 --- a/media/base/request_signer.h +++ b/media/base/request_signer.h @@ -12,6 +12,7 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" +namespace edash_packager { namespace media { class AesCbcEncryptor; @@ -87,5 +88,6 @@ class RsaRequestSigner : public RequestSigner { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_REQUEST_SIGNER_H_ diff --git a/media/base/rsa_key.cc b/media/base/rsa_key.cc index 93747ec93c..c824b05d5d 100644 --- a/media/base/rsa_key.cc +++ b/media/base/rsa_key.cc @@ -83,6 +83,7 @@ RSA* DeserializeRsaPublicKey(const std::string& serialized_key) { } // namespace +namespace edash_packager { namespace media { RsaPrivateKey::RsaPrivateKey(RSA* rsa_key) : rsa_key_(rsa_key) { @@ -246,3 +247,4 @@ bool RsaPublicKey::VerifySignature(const std::string& message, } } // namespace media +} // namespace edash_packager diff --git a/media/base/rsa_key.h b/media/base/rsa_key.h index e72feb8a79..c838d7bd9a 100644 --- a/media/base/rsa_key.h +++ b/media/base/rsa_key.h @@ -17,6 +17,7 @@ struct rsa_st; typedef struct rsa_st RSA; +namespace edash_packager { namespace media { /// Rsa private key, used for message signing and decryption. @@ -78,5 +79,6 @@ class RsaPublicKey { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_RSA_KEY_H_ diff --git a/media/base/rsa_key_unittest.cc b/media/base/rsa_key_unittest.cc index ea1a47d895..5f3d33f190 100644 --- a/media/base/rsa_key_unittest.cc +++ b/media/base/rsa_key_unittest.cc @@ -13,6 +13,7 @@ #include "media/base/rsa_key.h" #include "media/base/rsa_test_data.h" +namespace edash_packager { namespace media { class RsaKeyTest : public ::testing::TestWithParam { @@ -146,3 +147,4 @@ INSTANTIATE_TEST_CASE_P(RsaTestKeys, RsaTestData().test_set_2048_bits())); } // namespace media +} // namespace edash_packager diff --git a/media/base/rsa_test_data.cc b/media/base/rsa_test_data.cc index dca728c02e..80ab63128d 100644 --- a/media/base/rsa_test_data.cc +++ b/media/base/rsa_test_data.cc @@ -443,6 +443,7 @@ const uint8 kTestSignature_2048[] = { } // namespace +namespace edash_packager { namespace media { RsaTestSet::RsaTestSet() {} @@ -478,3 +479,4 @@ RsaTestData::RsaTestData() { RsaTestData::~RsaTestData() {} } // namespace media +} // namespace edash_packager diff --git a/media/base/rsa_test_data.h b/media/base/rsa_test_data.h index 2352739e74..396a5bd7ae 100644 --- a/media/base/rsa_test_data.h +++ b/media/base/rsa_test_data.h @@ -13,6 +13,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { /// Self generated test vector to verify algorithm stability. @@ -44,5 +45,6 @@ class RsaTestData { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_RSA_TEST_DATA_H_ diff --git a/media/base/status.cc b/media/base/status.cc index b4c5f613b7..4ba7d4a82b 100644 --- a/media/base/status.cc +++ b/media/base/status.cc @@ -8,6 +8,7 @@ #include "base/strings/stringprintf.h" +namespace edash_packager { namespace media { namespace error { @@ -71,3 +72,4 @@ std::ostream& operator<<(std::ostream& os, const Status& x) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/status.h b/media/base/status.h index 7fb94d198e..dfda7fc80d 100644 --- a/media/base/status.h +++ b/media/base/status.h @@ -11,6 +11,7 @@ #include "base/logging.h" +namespace edash_packager { namespace media { namespace error { @@ -166,5 +167,6 @@ extern std::ostream& operator<<(std::ostream& os, const Status& x); #define DCHECK_OK(val) DCHECK_EQ(Status::OK, (val)) } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_STATUS_H_ diff --git a/media/base/status_test_util.h b/media/base/status_test_util.h index 0b649e9f57..207f0982aa 100644 --- a/media/base/status_test_util.h +++ b/media/base/status_test_util.h @@ -11,7 +11,13 @@ #include "media/base/status.h" -#define EXPECT_OK(val) EXPECT_EQ(media::Status::OK, (val)) -#define ASSERT_OK(val) ASSERT_EQ(media::Status::OK, (val)) +namespace edash_packager { +namespace media { + +#define EXPECT_OK(val) EXPECT_EQ(Status::OK, (val)) +#define ASSERT_OK(val) ASSERT_EQ(Status::OK, (val)) + +} // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_STATUS_TEST_UTIL_H_ diff --git a/media/base/status_test_util_unittest.cc b/media/base/status_test_util_unittest.cc index c2e827a21a..09cbb81cd2 100644 --- a/media/base/status_test_util_unittest.cc +++ b/media/base/status_test_util_unittest.cc @@ -8,21 +8,26 @@ #include "media/base/status_test_util.h" +namespace edash_packager { +namespace media { + TEST(StatusTestUtil, ExpectOkSuccess) { - EXPECT_OK(media::Status::OK); + EXPECT_OK(Status::OK); } TEST(StatusTestUtil, AssertOkSuccess) { - ASSERT_OK(media::Status::OK); + ASSERT_OK(Status::OK); } TEST(StatusTestUtil, ExpectOkFailure) { - media::Status status(media::error::UNKNOWN, "Status Unknown"); + Status status(error::UNKNOWN, "Status Unknown"); EXPECT_NONFATAL_FAILURE(EXPECT_OK(status), "Status Unknown"); } TEST(StatusTestUtil, AssertOkFailure) { - EXPECT_FATAL_FAILURE( - ASSERT_OK(media::Status(media::error::UNKNOWN, "Status Unknown")), - "Status Unknown"); + EXPECT_FATAL_FAILURE(ASSERT_OK(Status(error::UNKNOWN, "Status Unknown")), + "Status Unknown"); } + +} // namespace media +} // namespace edash_packager diff --git a/media/base/status_unittest.cc b/media/base/status_unittest.cc index f486cc5744..a970e675a3 100644 --- a/media/base/status_unittest.cc +++ b/media/base/status_unittest.cc @@ -10,6 +10,7 @@ #include "base/strings/string_number_conversions.h" #include "media/base/status.h" +namespace edash_packager { namespace media { static void CheckStatus(const Status& s, @@ -176,3 +177,4 @@ TEST(Status, EqualsDifferentMessage) { } } // namespace media +} // namespace edash_packager diff --git a/media/base/stream_info.cc b/media/base/stream_info.cc index 3b26038bfd..877d00c25f 100644 --- a/media/base/stream_info.cc +++ b/media/base/stream_info.cc @@ -11,6 +11,7 @@ #include "base/logging.h" #include "base/strings/stringprintf.h" +namespace edash_packager { namespace media { StreamInfo::StreamInfo(StreamType stream_type, @@ -51,3 +52,4 @@ std::string StreamInfo::ToString() const { } } // namespace media +} // namespace edash_packager diff --git a/media/base/stream_info.h b/media/base/stream_info.h index 1d6ed69297..775b5b16c8 100644 --- a/media/base/stream_info.h +++ b/media/base/stream_info.h @@ -12,6 +12,7 @@ #include "base/memory/ref_counted.h" +namespace edash_packager { namespace media { enum StreamType { @@ -87,5 +88,6 @@ class StreamInfo : public base::RefCountedThreadSafe { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_STREAM_INFO_H_ diff --git a/media/base/text_track.h b/media/base/text_track.h index a743112260..e586e1c2dd 100644 --- a/media/base/text_track.h +++ b/media/base/text_track.h @@ -11,6 +11,7 @@ #include "base/memory/scoped_ptr.h" #include "base/time/time.h" +namespace edash_packager { namespace media { /// Specifies the varieties of text tracks. @@ -38,5 +39,6 @@ typedef base::Callback const std::string& language)> AddTextTrackCB; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_TEXT_TRACK_H_ diff --git a/media/base/timestamp.h b/media/base/timestamp.h index df00ff8a58..94241c640d 100644 --- a/media/base/timestamp.h +++ b/media/base/timestamp.h @@ -10,11 +10,13 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { const int64 kNoTimestamp = kint64min; const int64 kInfiniteDuration = kint64max; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_TIMESTAMP_H_ diff --git a/media/base/video_stream_info.cc b/media/base/video_stream_info.cc index d7d05b4aa4..2456f05d82 100644 --- a/media/base/video_stream_info.cc +++ b/media/base/video_stream_info.cc @@ -11,6 +11,7 @@ #include "base/strings/stringprintf.h" #include "media/base/limits.h" +namespace edash_packager { namespace media { namespace { @@ -103,3 +104,4 @@ std::string VideoStreamInfo::GetCodecString(VideoCodec codec, } } // namespace media +} // namespace edash_packager diff --git a/media/base/video_stream_info.h b/media/base/video_stream_info.h index 13ee6cfbe1..83ff92dc09 100644 --- a/media/base/video_stream_info.h +++ b/media/base/video_stream_info.h @@ -9,6 +9,7 @@ #include "media/base/stream_info.h" +namespace edash_packager { namespace media { enum VideoCodec { @@ -76,5 +77,6 @@ class VideoStreamInfo : public StreamInfo { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_VIDEO_STREAM_INFO_H_ diff --git a/media/base/widevine_key_source.cc b/media/base/widevine_key_source.cc index fc16473311..893dbaf99e 100644 --- a/media/base/widevine_key_source.cc +++ b/media/base/widevine_key_source.cc @@ -110,6 +110,7 @@ bool GetPsshDataFromTrack(const base::DictionaryValue& track_dict, } // namespace +namespace edash_packager { namespace media { // A ref counted wrapper for EncryptionKeyMap. @@ -548,3 +549,4 @@ bool WidevineKeySource::PushToKeyPool( } } // namespace media +} // namespace edash_packager diff --git a/media/base/widevine_key_source.h b/media/base/widevine_key_source.h index d7fd5161fa..0699c7585a 100644 --- a/media/base/widevine_key_source.h +++ b/media/base/widevine_key_source.h @@ -15,6 +15,7 @@ #include "media/base/closure_thread.h" #include "media/base/key_source.h" +namespace edash_packager { namespace media { class HttpFetcher; class RequestSigner; @@ -116,5 +117,6 @@ class WidevineKeySource : public KeySource { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_BASE_WIDEVINE_KEY_SOURCE_H_ diff --git a/media/base/widevine_key_source_unittest.cc b/media/base/widevine_key_source_unittest.cc index f5c082c192..8d59e41b3d 100644 --- a/media/base/widevine_key_source_unittest.cc +++ b/media/base/widevine_key_source_unittest.cc @@ -112,6 +112,7 @@ using ::testing::InSequence; using ::testing::Return; using ::testing::SetArgPointee; +namespace edash_packager { namespace media { class MockRequestSigner : public RequestSigner { @@ -457,3 +458,4 @@ TEST_F(WidevineKeySourceTest, KeyRotationTest) { } } // namespace media +} // namespace edash_packager diff --git a/media/event/mpd_notify_muxer_listener.cc b/media/event/mpd_notify_muxer_listener.cc index 28c518aa81..6f807a2ff4 100644 --- a/media/event/mpd_notify_muxer_listener.cc +++ b/media/event/mpd_notify_muxer_listener.cc @@ -15,18 +15,15 @@ #include "mpd/base/media_info.pb.h" #include "mpd/base/mpd_notifier.h" -using dash_packager::MediaInfo; - +namespace edash_packager { namespace media { namespace event { -MpdNotifyMuxerListener::MpdNotifyMuxerListener( - dash_packager::MpdNotifier* mpd_notifier) - : mpd_notifier_(mpd_notifier), - notification_id_(0) { +MpdNotifyMuxerListener::MpdNotifyMuxerListener(MpdNotifier* mpd_notifier) + : mpd_notifier_(mpd_notifier), notification_id_(0) { DCHECK(mpd_notifier); - DCHECK(mpd_notifier->dash_profile() == dash_packager::kOnDemandProfile || - mpd_notifier->dash_profile() == dash_packager::kLiveProfile); + DCHECK(mpd_notifier->dash_profile() == kOnDemandProfile || + mpd_notifier->dash_profile() == kLiveProfile); } MpdNotifyMuxerListener::~MpdNotifyMuxerListener() {} @@ -60,7 +57,7 @@ void MpdNotifyMuxerListener::OnMediaStart( } } - if (mpd_notifier_->dash_profile() == dash_packager::kLiveProfile) { + if (mpd_notifier_->dash_profile() == kLiveProfile) { // TODO(kqyang): Check return result. mpd_notifier_->NotifyNewContainer(*media_info, ¬ification_id_); } else { @@ -76,8 +73,7 @@ void MpdNotifyMuxerListener::OnMediaEnd(bool has_init_range, uint64 index_range_end, float duration_seconds, uint64 file_size) { - if (mpd_notifier_->dash_profile() == dash_packager::kLiveProfile) - return; + if (mpd_notifier_->dash_profile() == kLiveProfile) return; DCHECK(media_info_); if (!internal::SetVodInformation(has_init_range, @@ -101,8 +97,7 @@ void MpdNotifyMuxerListener::OnMediaEnd(bool has_init_range, void MpdNotifyMuxerListener::OnNewSegment(uint64 start_time, uint64 duration, uint64 segment_file_size) { - if (mpd_notifier_->dash_profile() != dash_packager::kLiveProfile) - return; + if (mpd_notifier_->dash_profile() != kLiveProfile) return; // TODO(kqyang): Check return result. mpd_notifier_->NotifyNewSegment( notification_id_, start_time, duration, segment_file_size); @@ -110,3 +105,4 @@ void MpdNotifyMuxerListener::OnNewSegment(uint64 start_time, } // namespace event } // namespace media +} // namespace edash_packager diff --git a/media/event/mpd_notify_muxer_listener.h b/media/event/mpd_notify_muxer_listener.h index 2580e1db95..74732c44c5 100644 --- a/media/event/mpd_notify_muxer_listener.h +++ b/media/event/mpd_notify_muxer_listener.h @@ -16,10 +16,10 @@ #include "media/base/muxer_options.h" #include "media/event/muxer_listener.h" -namespace dash_packager { +namespace edash_packager { + class MediaInfo; class MpdNotifier; -} // namespace dash_packager namespace media { namespace event { @@ -28,7 +28,7 @@ class MpdNotifyMuxerListener : public MuxerListener { public: /// @param mpd_notifier must be initialized, i.e mpd_notifier->Init() must be /// called. - MpdNotifyMuxerListener(dash_packager::MpdNotifier* mpd_notifier); + MpdNotifyMuxerListener(MpdNotifier* mpd_notifier); virtual ~MpdNotifyMuxerListener(); /// If the stream is encrypted use this as 'schemeIdUri' attribute for @@ -58,9 +58,9 @@ class MpdNotifyMuxerListener : public MuxerListener { /// @} private: - dash_packager::MpdNotifier* const mpd_notifier_; + MpdNotifier* const mpd_notifier_; uint32 notification_id_; - scoped_ptr media_info_; + scoped_ptr media_info_; std::string scheme_id_uri_; DISALLOW_COPY_AND_ASSIGN(MpdNotifyMuxerListener); @@ -68,5 +68,6 @@ class MpdNotifyMuxerListener : public MuxerListener { } // namespace event } // namespace media +} // namespace edash_packager #endif // MEDIA_EVENT_MPD_NOTIFY_MUXER_LISTENER_H_ diff --git a/media/event/muxer_listener.h b/media/event/muxer_listener.h index 4c1ff2e153..92f2eee9df 100644 --- a/media/event/muxer_listener.h +++ b/media/event/muxer_listener.h @@ -13,6 +13,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { class StreamInfo; @@ -75,5 +76,6 @@ class MuxerListener { } // namespace event } // namespace media +} // namespace edash_packager #endif // MEDIA_EVENT_MUXER_LISTENER_H_ diff --git a/media/event/muxer_listener_internal.cc b/media/event/muxer_listener_internal.cc index 774a27cd4c..0943afad3f 100644 --- a/media/event/muxer_listener_internal.cc +++ b/media/event/muxer_listener_internal.cc @@ -14,15 +14,11 @@ #include "media/base/video_stream_info.h" #include "mpd/base/media_info.pb.h" +namespace edash_packager { namespace media { namespace event { namespace internal { -using dash_packager::MediaInfo; -using dash_packager::MediaInfo_AudioInfo; -using dash_packager::MediaInfo_VideoInfo; -using dash_packager::Range; - namespace { // This will return a positive value, given that |file_size| and @@ -248,3 +244,4 @@ bool AddContentProtectionElements(MuxerListener::ContainerType container_type, } // namespace internal } // namespace event } // namespace media +} // namespace edash_packager diff --git a/media/event/muxer_listener_internal.h b/media/event/muxer_listener_internal.h index dfd3b74671..ebed26f862 100644 --- a/media/event/muxer_listener_internal.h +++ b/media/event/muxer_listener_internal.h @@ -13,9 +13,9 @@ #include "base/basictypes.h" #include "media/event/muxer_listener.h" -namespace dash_packager { +namespace edash_packager { + class MediaInfo; -} // namespace dash_packager namespace media { @@ -31,7 +31,7 @@ bool GenerateMediaInfo(const MuxerOptions& muxer_options, const std::vector& stream_infos, uint32 reference_time_scale_, MuxerListener::ContainerType container_type, - dash_packager::MediaInfo* media_info); + MediaInfo* media_info); /// @param[in,out] media_info points to the MediaInfo object to be filled. /// @return true on success, false otherwise. @@ -43,7 +43,7 @@ bool SetVodInformation(bool has_init_range, uint64 index_range_end, float duration_seconds, uint64 file_size, - dash_packager::MediaInfo* media_info); + MediaInfo* media_info); /// @param container_type specifies container type. A default ContentProtection /// element will be added if the container is MP4. @@ -52,9 +52,10 @@ bool SetVodInformation(bool has_init_range, /// @return true if a ContentProtectionXml is added, false otherwise. bool AddContentProtectionElements(MuxerListener::ContainerType container_type, const std::string& user_scheme_id_uri, - dash_packager::MediaInfo* media_info); + MediaInfo* media_info); } // namespace internal } // namespace event } // namespace media +} // namespace edash_packager #endif // MEDIA_EVENT_MUXER_LISTENER_INTERNAL_H_ diff --git a/media/event/vod_media_info_dump_muxer_listener.cc b/media/event/vod_media_info_dump_muxer_listener.cc index fbc899aff8..0f92eb84b2 100644 --- a/media/event/vod_media_info_dump_muxer_listener.cc +++ b/media/event/vod_media_info_dump_muxer_listener.cc @@ -15,11 +15,10 @@ #include "media/file/file.h" #include "mpd/base/media_info.pb.h" +namespace edash_packager { namespace media { namespace event { -using dash_packager::MediaInfo; - VodMediaInfoDumpMuxerListener::VodMediaInfoDumpMuxerListener( const std::string& output_file_name) : output_file_name_(output_file_name) {} @@ -114,3 +113,4 @@ bool VodMediaInfoDumpMuxerListener::SerializeMediaInfoToFile() { } // namespace event } // namespace media +} // namespace edash_packager diff --git a/media/event/vod_media_info_dump_muxer_listener.h b/media/event/vod_media_info_dump_muxer_listener.h index 1f4c3baa6e..d29ae5345f 100644 --- a/media/event/vod_media_info_dump_muxer_listener.h +++ b/media/event/vod_media_info_dump_muxer_listener.h @@ -19,9 +19,9 @@ #include "media/base/muxer_options.h" #include "media/event/muxer_listener.h" -namespace dash_packager { +namespace edash_packager { + class MediaInfo; -} // namespace dash_packager namespace media { namespace event { @@ -63,12 +63,13 @@ class VodMediaInfoDumpMuxerListener : public MuxerListener { std::string output_file_name_; std::string scheme_id_uri_; - scoped_ptr media_info_; + scoped_ptr media_info_; DISALLOW_COPY_AND_ASSIGN(VodMediaInfoDumpMuxerListener); }; } // namespace event } // namespace media +} // namespace edash_packager #endif // MEDIA_EVENT_VOD_MEDIA_INFO_DUMP_MUXER_LISTENER_H_ diff --git a/media/event/vod_media_info_dump_muxer_listener_unittest.cc b/media/event/vod_media_info_dump_muxer_listener_unittest.cc index afbef13f8c..883e937fcd 100644 --- a/media/event/vod_media_info_dump_muxer_listener_unittest.cc +++ b/media/event/vod_media_info_dump_muxer_listener_unittest.cc @@ -18,12 +18,11 @@ #include "media/base/video_stream_info.h" #include "mpd/base/media_info.pb.h" -using dash_packager::MediaInfo; - namespace { const bool kEnableEncryption = true; } // namespace +namespace edash_packager { namespace media { namespace event { @@ -288,3 +287,4 @@ TEST_F(VodMediaInfoDumpMuxerListenerTest, EncryptedStream_Normal) { } // namespace event } // namespace media +} // namespace edash_packager diff --git a/media/file/file.cc b/media/file/file.cc index f637f49059..a2958c5216 100644 --- a/media/file/file.cc +++ b/media/file/file.cc @@ -12,6 +12,7 @@ #include "media/file/udp_file.h" #include "base/strings/string_util.h" +namespace edash_packager { namespace media { const char* kLocalFilePrefix = "file://"; @@ -93,3 +94,4 @@ bool File::ReadFileToString(const char* file_name, std::string* contents) { } } // namespace media +} // namespace edash_packager diff --git a/media/file/file.h b/media/file/file.h index ff5f0aebbc..c4db9b3767 100644 --- a/media/file/file.h +++ b/media/file/file.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { extern const char* kLocalFilePrefix; @@ -97,5 +98,6 @@ class File { }; } // namespace media +} // namespace edash_packager #endif // PACKAGER_FILE_FILE_H_ diff --git a/media/file/file_closer.h b/media/file/file_closer.h index 3e5f16b929..50aa611e2a 100644 --- a/media/file/file_closer.h +++ b/media/file/file_closer.h @@ -10,6 +10,7 @@ #include "base/logging.h" #include "media/file/file.h" +namespace edash_packager { namespace media { /// Used by scoped_ptr to automatically close the file when it goes out of @@ -24,5 +25,6 @@ struct FileCloser { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_FILE_FILE_CLOSER_H_ diff --git a/media/file/file_unittest.cc b/media/file/file_unittest.cc index a9cc79f9a9..8b501c2b8a 100644 --- a/media/file/file_unittest.cc +++ b/media/file/file_unittest.cc @@ -14,6 +14,7 @@ const int kDataSize = 1024; const char* kTestLocalFileName = "/tmp/local_file_test"; } +namespace edash_packager { namespace media { class LocalFileTest : public testing::Test { @@ -118,3 +119,4 @@ TEST_F(LocalFileTest, WriteRead) { } } // namespace media +} // namespace edash_packager diff --git a/media/file/local_file.cc b/media/file/local_file.cc index 61abe9baf4..6a1eddaeb1 100644 --- a/media/file/local_file.cc +++ b/media/file/local_file.cc @@ -9,6 +9,7 @@ #include "base/file_util.h" #include "base/logging.h" +namespace edash_packager { namespace media { LocalFile::LocalFile(const char* file_name, const char* mode) @@ -72,3 +73,4 @@ bool LocalFile::Open() { } } // namespace media +} // namespace edash_packager diff --git a/media/file/local_file.h b/media/file/local_file.h index 9ca744aee5..6a05a2be55 100644 --- a/media/file/local_file.h +++ b/media/file/local_file.h @@ -13,6 +13,7 @@ #include "base/compiler_specific.h" #include "media/file/file.h" +namespace edash_packager { namespace media { /// Implement LocalFile which deals with local storage. @@ -46,6 +47,7 @@ class LocalFile : public File { }; } // namespace media +} // namespace edash_packager #endif // PACKAGER_FILE_LOCAL_FILE_H_ diff --git a/media/file/udp_file.cc b/media/file/udp_file.cc index 77dd7306fa..0828a45d0c 100644 --- a/media/file/udp_file.cc +++ b/media/file/udp_file.cc @@ -23,6 +23,7 @@ DEFINE_string(udp_interface_address, "IP address of the interface over which to receive UDP unicast" " or multicast streams"); +namespace edash_packager { namespace media { namespace { @@ -209,3 +210,4 @@ bool UdpFile::Open() { } } // namespace media +} // namespace edash_packager diff --git a/media/file/udp_file.h b/media/file/udp_file.h index 0e0273f2e6..c24de90c1c 100644 --- a/media/file/udp_file.h +++ b/media/file/udp_file.h @@ -13,6 +13,7 @@ #include "base/compiler_specific.h" #include "media/file/file.h" +namespace edash_packager { namespace media { /// Implements UdpFile, which receives UDP unicast and multicast streams. @@ -44,5 +45,6 @@ class UdpFile : public File { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_FILE_UDP_FILE_H_ diff --git a/media/filters/h264_bit_reader.cc b/media/filters/h264_bit_reader.cc index 9894d97897..1ecbc2c80f 100644 --- a/media/filters/h264_bit_reader.cc +++ b/media/filters/h264_bit_reader.cc @@ -5,6 +5,7 @@ #include "base/logging.h" #include "media/filters/h264_bit_reader.h" +namespace edash_packager { namespace media { H264BitReader::H264BitReader() @@ -111,3 +112,4 @@ size_t H264BitReader::NumEmulationPreventionBytesRead() { } } // namespace media +} // namespace edash_packager diff --git a/media/filters/h264_bit_reader.h b/media/filters/h264_bit_reader.h index 14c03240fa..71e744e04e 100644 --- a/media/filters/h264_bit_reader.h +++ b/media/filters/h264_bit_reader.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { // A class to provide bit-granularity reading of H.264 streams. @@ -72,5 +73,6 @@ class H264BitReader { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_FILTERS_H264_BIT_READER_H_ diff --git a/media/filters/h264_bit_reader_unittest.cc b/media/filters/h264_bit_reader_unittest.cc index c758659798..9e9383ff0c 100644 --- a/media/filters/h264_bit_reader_unittest.cc +++ b/media/filters/h264_bit_reader_unittest.cc @@ -6,6 +6,7 @@ #include "media/filters/h264_bit_reader.h" +namespace edash_packager { namespace media { TEST(H264BitReaderTest, ReadStreamWithoutEscapeAndTrailingZeroBytes) { @@ -72,3 +73,4 @@ TEST(H264BitReaderTest, StopBitOccupyFullByte) { } } // namespace media +} // namespace edash_packager diff --git a/media/filters/h264_byte_to_unit_stream_converter.cc b/media/filters/h264_byte_to_unit_stream_converter.cc index cf79118bce..08fce61b81 100644 --- a/media/filters/h264_byte_to_unit_stream_converter.cc +++ b/media/filters/h264_byte_to_unit_stream_converter.cc @@ -10,6 +10,7 @@ #include "media/base/buffer_writer.h" #include "media/filters/h264_parser.h" +namespace edash_packager { namespace media { namespace { @@ -129,3 +130,4 @@ bool H264ByteToUnitStreamConverter::GetAVCDecoderConfigurationRecord( } } // namespace media +} // namespace edash_packager diff --git a/media/filters/h264_byte_to_unit_stream_converter.h b/media/filters/h264_byte_to_unit_stream_converter.h index 87c28fe450..6e06fdf721 100644 --- a/media/filters/h264_byte_to_unit_stream_converter.h +++ b/media/filters/h264_byte_to_unit_stream_converter.h @@ -11,6 +11,7 @@ #include +namespace edash_packager { namespace media { class BufferWriter; @@ -53,5 +54,6 @@ class H264ByteToUnitStreamConverter { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_FILTERS_H264_BYTE_TO_UNIT_STREAM_CONVERTER_H_ diff --git a/media/filters/h264_byte_to_unit_stream_converter_unittest.cc b/media/filters/h264_byte_to_unit_stream_converter_unittest.cc index 63caa67709..7be4ef9703 100644 --- a/media/filters/h264_byte_to_unit_stream_converter_unittest.cc +++ b/media/filters/h264_byte_to_unit_stream_converter_unittest.cc @@ -17,6 +17,7 @@ const char kExpectedConfigRecord[] = "28de0988"; } +namespace edash_packager { namespace media { TEST(H264ByteToUnitStreamConverter, ConversionSuccess) { @@ -59,3 +60,4 @@ TEST(H264ByteToUnitStreamConverter, ConversionFailure) { } } // namespace media +} // namespace edash_packager diff --git a/media/filters/h264_parser.cc b/media/filters/h264_parser.cc index 4cdc695933..edd1b15779 100644 --- a/media/filters/h264_parser.cc +++ b/media/filters/h264_parser.cc @@ -8,6 +8,7 @@ #include "media/filters/h264_parser.h" +namespace edash_packager { namespace media { bool H264SliceHeader::IsPSlice() const { @@ -1262,3 +1263,4 @@ H264Parser::Result H264Parser::ParseSEI(H264SEIMessage* sei_msg) { } } // namespace media +} // namespace edash_packager diff --git a/media/filters/h264_parser.h b/media/filters/h264_parser.h index 37d3a99229..84cd7935c0 100644 --- a/media/filters/h264_parser.h +++ b/media/filters/h264_parser.h @@ -14,6 +14,7 @@ #include "base/basictypes.h" #include "media/filters/h264_bit_reader.h" +namespace edash_packager { namespace media { // For explanations of each struct and its members, see H.264 specification @@ -392,5 +393,6 @@ class H264Parser { }; } // namespace media +} // namespace edash_packager #endif // MEDIA_FILTERS_H264_PARSER_H_ diff --git a/media/filters/h264_parser_unittest.cc b/media/filters/h264_parser_unittest.cc index d72aff9509..0a78234c8e 100644 --- a/media/filters/h264_parser_unittest.cc +++ b/media/filters/h264_parser_unittest.cc @@ -12,6 +12,7 @@ #include "media/test/test_data_util.h" #include "media/filters/h264_parser.h" +namespace edash_packager { namespace media { TEST(H264ParserTest, StreamFileParsing) { @@ -71,3 +72,4 @@ TEST(H264ParserTest, StreamFileParsing) { } } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/adts_header.cc b/media/formats/mp2t/adts_header.cc index ca6b9d3037..4e86868d57 100644 --- a/media/formats/mp2t/adts_header.cc +++ b/media/formats/mp2t/adts_header.cc @@ -10,6 +10,7 @@ #include "media/formats/mp2t/mp2t_common.h" #include "media/formats/mpeg/adts_constants.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -112,3 +113,4 @@ uint8 AdtsHeader::GetNumChannels() const { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/adts_header.h b/media/formats/mp2t/adts_header.h index e42ce42e22..fb0ad88c3a 100644 --- a/media/formats/mp2t/adts_header.h +++ b/media/formats/mp2t/adts_header.h @@ -11,6 +11,7 @@ #include +namespace edash_packager { namespace media { namespace mp2t { @@ -68,5 +69,6 @@ class AdtsHeader { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP2T_ADTS_HEADER_H_ diff --git a/media/formats/mp2t/adts_header_unittest.cc b/media/formats/mp2t/adts_header_unittest.cc index 452438bf16..3742f0c43e 100644 --- a/media/formats/mp2t/adts_header_unittest.cc +++ b/media/formats/mp2t/adts_header_unittest.cc @@ -34,6 +34,7 @@ const uint8 kExpectedAudioSpecificConfig[] = { 0x12, 0x10 }; } // anonymous namespace +namespace edash_packager { namespace media { namespace mp2t { @@ -90,3 +91,4 @@ TEST_F(AdtsHeaderTest, GetHeaderSizeSuccess) { } // Namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/es_parser.h b/media/formats/mp2t/es_parser.h index e04f76243d..599ba94a8b 100644 --- a/media/formats/mp2t/es_parser.h +++ b/media/formats/mp2t/es_parser.h @@ -9,6 +9,7 @@ #include "base/callback.h" #include "base/memory/ref_counted.h" +namespace edash_packager { namespace media { class MediaSample; @@ -43,5 +44,6 @@ class EsParser { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp2t/es_parser_adts.cc b/media/formats/mp2t/es_parser_adts.cc index f3967b80da..81061cb7c1 100644 --- a/media/formats/mp2t/es_parser_adts.cc +++ b/media/formats/mp2t/es_parser_adts.cc @@ -17,6 +17,7 @@ #include "media/formats/mp2t/mp2t_common.h" #include "media/formats/mpeg/adts_constants.h" +namespace edash_packager { namespace media { // Return true if buf corresponds to an ADTS syncword. @@ -268,3 +269,4 @@ void EsParserAdts::DiscardEs(int nbytes) { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/es_parser_adts.h b/media/formats/mp2t/es_parser_adts.h index 062ad4ef22..190e637bdf 100644 --- a/media/formats/mp2t/es_parser_adts.h +++ b/media/formats/mp2t/es_parser_adts.h @@ -15,12 +15,11 @@ #include "media/base/byte_queue.h" #include "media/formats/mp2t/es_parser.h" +namespace edash_packager { namespace media { class AudioTimestampHelper; class BitReader; -} -namespace media { namespace mp2t { class EsParserAdts : public EsParser { @@ -77,5 +76,6 @@ class EsParserAdts : public EsParser { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp2t/es_parser_h264.cc b/media/formats/mp2t/es_parser_h264.cc index bb0f449539..30d32ade80 100644 --- a/media/formats/mp2t/es_parser_h264.cc +++ b/media/formats/mp2t/es_parser_h264.cc @@ -15,6 +15,7 @@ #include "media/filters/h264_parser.h" #include "media/formats/mp2t/mp2t_common.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -378,3 +379,4 @@ bool EsParserH264::UpdateVideoDecoderConfig(const H264SPS* sps) { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/es_parser_h264.h b/media/formats/mp2t/es_parser_h264.h index bcc00a79c1..25fbc53357 100644 --- a/media/formats/mp2t/es_parser_h264.h +++ b/media/formats/mp2t/es_parser_h264.h @@ -14,6 +14,7 @@ #include "base/memory/scoped_ptr.h" #include "media/formats/mp2t/es_parser.h" +namespace edash_packager { namespace media { class H264ByteToUnitStreamConverter; @@ -21,9 +22,6 @@ class H264Parser; class OffsetByteQueue; struct H264SPS; -} // namespace media - -namespace media { namespace mp2t { // Remark: @@ -101,5 +99,6 @@ class EsParserH264 : public EsParser { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp2t/es_parser_h264_unittest.cc b/media/formats/mp2t/es_parser_h264_unittest.cc index 69c91165ef..777351f409 100644 --- a/media/formats/mp2t/es_parser_h264_unittest.cc +++ b/media/formats/mp2t/es_parser_h264_unittest.cc @@ -18,6 +18,7 @@ #include "media/formats/mp2t/es_parser_h264.h" #include "media/test/test_data_util.h" +namespace edash_packager { namespace media { class VideoStreamInfo; @@ -285,3 +286,4 @@ TEST_F(EsParserH264Test, NonIFrameStart) { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/mp2t_common.h b/media/formats/mp2t/mp2t_common.h index 2b0e5889c7..af00e677ee 100644 --- a/media/formats/mp2t/mp2t_common.h +++ b/media/formats/mp2t/mp2t_common.h @@ -19,8 +19,10 @@ #endif +namespace edash_packager { namespace media { const uint32 kMpeg2Timescale = 90000; } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/mp2t_media_parser.cc b/media/formats/mp2t/mp2t_media_parser.cc index fbb1155b8d..bdc1627081 100644 --- a/media/formats/mp2t/mp2t_media_parser.cc +++ b/media/formats/mp2t/mp2t_media_parser.cc @@ -19,6 +19,7 @@ #include "media/formats/mp2t/ts_section_pes.h" #include "media/formats/mp2t/ts_section_pmt.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -424,3 +425,4 @@ bool Mp2tMediaParser::EmitRemainingSamples() { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/mp2t_media_parser.h b/media/formats/mp2t/mp2t_media_parser.h index 8bf525e8fe..6f5d18d4af 100644 --- a/media/formats/mp2t/mp2t_media_parser.h +++ b/media/formats/mp2t/mp2t_media_parser.h @@ -14,6 +14,7 @@ #include "media/base/media_parser.h" #include "media/base/stream_info.h" +namespace edash_packager { namespace media { class MediaSample; @@ -91,5 +92,6 @@ class Mp2tMediaParser : public MediaParser { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp2t/mp2t_media_parser_unittest.cc b/media/formats/mp2t/mp2t_media_parser_unittest.cc index f91d803d95..d796a63ccb 100644 --- a/media/formats/mp2t/mp2t_media_parser_unittest.cc +++ b/media/formats/mp2t/mp2t_media_parser_unittest.cc @@ -19,6 +19,7 @@ #include "media/formats/mp2t/mp2t_media_parser.h" #include "media/test/test_data_util.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -148,3 +149,4 @@ TEST_F(Mp2tMediaParserTest, TimestampWrapAround) { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/ts_packet.cc b/media/formats/mp2t/ts_packet.cc index 91b254f593..64164f6d36 100644 --- a/media/formats/mp2t/ts_packet.cc +++ b/media/formats/mp2t/ts_packet.cc @@ -8,6 +8,7 @@ #include "media/base/bit_reader.h" #include "media/formats/mp2t/mp2t_common.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -210,3 +211,4 @@ bool TsPacket::ParseAdaptationField(BitReader* bit_reader, } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/ts_packet.h b/media/formats/mp2t/ts_packet.h index a232705fbd..46a1838cce 100644 --- a/media/formats/mp2t/ts_packet.h +++ b/media/formats/mp2t/ts_packet.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { class BitReader; @@ -68,6 +69,7 @@ class TsPacket { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp2t/ts_section.h b/media/formats/mp2t/ts_section.h index 9273733d35..ad443ecca4 100644 --- a/media/formats/mp2t/ts_section.h +++ b/media/formats/mp2t/ts_section.h @@ -5,6 +5,7 @@ #ifndef MEDIA_FORMATS_MP2T_TS_SECTION_H_ #define MEDIA_FORMATS_MP2T_TS_SECTION_H_ +namespace edash_packager { namespace media { namespace mp2t { @@ -36,5 +37,6 @@ class TsSection { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp2t/ts_section_pat.cc b/media/formats/mp2t/ts_section_pat.cc index 2fcc24bb71..20037c10c8 100644 --- a/media/formats/mp2t/ts_section_pat.cc +++ b/media/formats/mp2t/ts_section_pat.cc @@ -10,6 +10,7 @@ #include "media/base/bit_reader.h" #include "media/formats/mp2t/mp2t_common.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -119,4 +120,5 @@ void TsSectionPat::ResetPsiSection() { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/ts_section_pat.h b/media/formats/mp2t/ts_section_pat.h index f8079adc33..6cebb25bd1 100644 --- a/media/formats/mp2t/ts_section_pat.h +++ b/media/formats/mp2t/ts_section_pat.h @@ -9,6 +9,7 @@ #include "base/compiler_specific.h" #include "media/formats/mp2t/ts_section_psi.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -35,6 +36,7 @@ class TsSectionPat : public TsSectionPsi { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp2t/ts_section_pes.cc b/media/formats/mp2t/ts_section_pes.cc index 5e198f33aa..fe9059709b 100644 --- a/media/formats/mp2t/ts_section_pes.cc +++ b/media/formats/mp2t/ts_section_pes.cc @@ -79,6 +79,7 @@ static int64 ConvertTimestampSectionToTimestamp(int64 timestamp_section) { (((timestamp_section >> 1) & 0x7fff) << 0); } +namespace edash_packager { namespace media { namespace mp2t { @@ -308,3 +309,4 @@ void TsSectionPes::ResetPesState() { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/ts_section_pes.h b/media/formats/mp2t/ts_section_pes.h index b442ae491f..a49eb35eb1 100644 --- a/media/formats/mp2t/ts_section_pes.h +++ b/media/formats/mp2t/ts_section_pes.h @@ -11,6 +11,7 @@ #include "media/base/byte_queue.h" #include "media/formats/mp2t/ts_section.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -59,6 +60,7 @@ class TsSectionPes : public TsSection { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp2t/ts_section_pmt.cc b/media/formats/mp2t/ts_section_pmt.cc index a5e7b0ec11..26176ac037 100644 --- a/media/formats/mp2t/ts_section_pmt.cc +++ b/media/formats/mp2t/ts_section_pmt.cc @@ -10,6 +10,7 @@ #include "media/base/bit_reader.h" #include "media/formats/mp2t/mp2t_common.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -113,3 +114,4 @@ void TsSectionPmt::ResetPsiSection() { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/ts_section_pmt.h b/media/formats/mp2t/ts_section_pmt.h index 7434699d63..018c4b22b7 100644 --- a/media/formats/mp2t/ts_section_pmt.h +++ b/media/formats/mp2t/ts_section_pmt.h @@ -9,6 +9,7 @@ #include "base/compiler_specific.h" #include "media/formats/mp2t/ts_section_psi.h" +namespace edash_packager { namespace media { namespace mp2t { @@ -34,5 +35,6 @@ class TsSectionPmt : public TsSectionPsi { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp2t/ts_section_psi.cc b/media/formats/mp2t/ts_section_psi.cc index 5f41638481..48b7c6d930 100644 --- a/media/formats/mp2t/ts_section_psi.cc +++ b/media/formats/mp2t/ts_section_psi.cc @@ -34,6 +34,7 @@ static bool IsCrcValid(const uint8* buf, int size) { return (crc == 0); } +namespace edash_packager { namespace media { namespace mp2t { @@ -129,3 +130,4 @@ void TsSectionPsi::ResetPsiState() { } // namespace mp2t } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp2t/ts_section_psi.h b/media/formats/mp2t/ts_section_psi.h index 1b81884854..5c47262ece 100644 --- a/media/formats/mp2t/ts_section_psi.h +++ b/media/formats/mp2t/ts_section_psi.h @@ -9,6 +9,7 @@ #include "media/base/byte_queue.h" #include "media/formats/mp2t/ts_section.h" +namespace edash_packager { namespace media { class BitReader; @@ -49,6 +50,7 @@ class TsSectionPsi : public TsSection { } // namespace mp2t } // namespace media +} // namespace edash_packager #endif diff --git a/media/formats/mp4/aac_audio_specific_config.cc b/media/formats/mp4/aac_audio_specific_config.cc index e70537912e..7162e63f96 100644 --- a/media/formats/mp4/aac_audio_specific_config.cc +++ b/media/formats/mp4/aac_audio_specific_config.cc @@ -23,6 +23,7 @@ const uint8 kChannelConfigs[] = {0, 1, 2, 3, 4, 5, 6, 8}; } // namespace +namespace edash_packager { namespace media { namespace mp4 { @@ -263,3 +264,4 @@ bool AACAudioSpecificConfig::SkipGASpecificConfig(BitReader* bit_reader) const { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/aac_audio_specific_config.h b/media/formats/mp4/aac_audio_specific_config.h index a51efac6bd..a28721b9e6 100644 --- a/media/formats/mp4/aac_audio_specific_config.h +++ b/media/formats/mp4/aac_audio_specific_config.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { class BitReader; @@ -90,5 +91,6 @@ class AACAudioSpecificConfig { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_AAC_AUDIO_SPECIFIC_CONFIG_H_ diff --git a/media/formats/mp4/aac_audio_specific_config_unittest.cc b/media/formats/mp4/aac_audio_specific_config_unittest.cc index af79256748..c04102c1fd 100644 --- a/media/formats/mp4/aac_audio_specific_config_unittest.cc +++ b/media/formats/mp4/aac_audio_specific_config_unittest.cc @@ -6,6 +6,7 @@ #include "media/formats/mp4/aac_audio_specific_config.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -142,3 +143,4 @@ TEST(AACAudioSpecificConfigTest, IncorrectChannelTest) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/box.cc b/media/formats/mp4/box.cc index e2e8e784b7..315a1b3758 100644 --- a/media/formats/mp4/box.cc +++ b/media/formats/mp4/box.cc @@ -9,6 +9,7 @@ #include "base/logging.h" #include "media/formats/mp4/box_buffer.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -63,3 +64,4 @@ bool FullBox::ReadWrite(BoxBuffer* buffer) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/box.h b/media/formats/mp4/box.h index a16062586a..0770f049b8 100644 --- a/media/formats/mp4/box.h +++ b/media/formats/mp4/box.h @@ -11,6 +11,7 @@ #include "base/compiler_specific.h" #include "media/formats/mp4/fourccs.h" +namespace edash_packager { namespace media { class BufferWriter; @@ -67,5 +68,6 @@ struct FullBox : Box { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_BOX_H_ diff --git a/media/formats/mp4/box_buffer.h b/media/formats/mp4/box_buffer.h index f03e4afebd..0b781fac94 100644 --- a/media/formats/mp4/box_buffer.h +++ b/media/formats/mp4/box_buffer.h @@ -12,6 +12,7 @@ #include "media/formats/mp4/box.h" #include "media/formats/mp4/box_reader.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -185,5 +186,6 @@ class BoxBuffer { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_BOX_BUFFER_H_ diff --git a/media/formats/mp4/box_definitions.cc b/media/formats/mp4/box_definitions.cc index 32dda6ba85..f858a7b7d6 100644 --- a/media/formats/mp4/box_definitions.cc +++ b/media/formats/mp4/box_definitions.cc @@ -44,6 +44,7 @@ bool IsFitIn32Bits(uint64 a, uint64 b, uint64 c) { } // namespace +namespace edash_packager { namespace media { namespace mp4 { @@ -1870,3 +1871,4 @@ uint32 MediaData::ComputeSize() { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/box_definitions.h b/media/formats/mp4/box_definitions.h index 51e8399322..a2c9d22b15 100644 --- a/media/formats/mp4/box_definitions.h +++ b/media/formats/mp4/box_definitions.h @@ -13,6 +13,7 @@ #include "media/formats/mp4/es_descriptor.h" #include "media/formats/mp4/fourccs.h" +namespace edash_packager { namespace media { class BufferReader; @@ -594,5 +595,6 @@ struct MediaData { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_H_ diff --git a/media/formats/mp4/box_definitions_comparison.h b/media/formats/mp4/box_definitions_comparison.h index ea8e8e6719..c4df945e08 100644 --- a/media/formats/mp4/box_definitions_comparison.h +++ b/media/formats/mp4/box_definitions_comparison.h @@ -11,6 +11,7 @@ #include "media/formats/mp4/box_definitions.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -361,5 +362,6 @@ inline bool operator==(const SegmentIndex& lhs, const SegmentIndex& rhs) { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_BOX_DEFINITIONS_COMPARISON_H_ diff --git a/media/formats/mp4/box_definitions_unittest.cc b/media/formats/mp4/box_definitions_unittest.cc index 7590aa93d8..87487217b8 100644 --- a/media/formats/mp4/box_definitions_unittest.cc +++ b/media/formats/mp4/box_definitions_unittest.cc @@ -12,6 +12,9 @@ #include "media/formats/mp4/box_definitions_comparison.h" #include "media/formats/mp4/box_reader.h" +namespace edash_packager { +namespace media { +namespace mp4 { namespace { const uint8 kData16Bytes[] = {8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8}; const uint8 kData4[] = {1, 5, 4, 3, 15}; @@ -19,15 +22,12 @@ const uint8 kData8[] = {1, 8, 42, 98, 156}; const uint16 kData16[] = {1, 15, 45, 768, 60000}; const uint32 kData32[] = {1, 24, 99, 1234, 9000000}; const uint64 kData64[] = {1, 9000000, 12345678901234ULL, 56780909090900ULL}; -const media::mp4::TrackType kSampleDescriptionTrackType = media::mp4::kVideo; +const TrackType kSampleDescriptionTrackType = kVideo; // 4-byte FourCC + 4-bytes size. const uint32 kBoxSize = 8; } // namespace -namespace media { -namespace mp4 { - template class BoxDefinitionsTestGeneral : public testing::Test { public: @@ -922,3 +922,4 @@ TEST_F(BoxDefinitionsTest, TrackFragmentRun_NoSampleSize) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/box_reader.cc b/media/formats/mp4/box_reader.cc index cff08298e9..d350834dae 100644 --- a/media/formats/mp4/box_reader.cc +++ b/media/formats/mp4/box_reader.cc @@ -11,6 +11,7 @@ #include "base/strings/stringprintf.h" #include "media/formats/mp4/box.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -186,3 +187,4 @@ bool BoxReader::ReadHeader(bool* err) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/box_reader.h b/media/formats/mp4/box_reader.h index 91e6f26970..456c0826df 100644 --- a/media/formats/mp4/box_reader.h +++ b/media/formats/mp4/box_reader.h @@ -14,6 +14,7 @@ #include "media/formats/mp4/fourccs.h" #include "media/formats/mp4/rcheck.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -180,5 +181,6 @@ bool BoxReader::ReadAllChildren(std::vector* children) { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_BOX_READER_H_ diff --git a/media/formats/mp4/box_reader_unittest.cc b/media/formats/mp4/box_reader_unittest.cc index 8040b0e7db..53b9dac61d 100644 --- a/media/formats/mp4/box_reader_unittest.cc +++ b/media/formats/mp4/box_reader_unittest.cc @@ -11,6 +11,7 @@ #include "media/formats/mp4/box_buffer.h" #include "media/formats/mp4/rcheck.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -208,3 +209,4 @@ TEST_F(BoxReaderTest, SkippingBloc) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/cenc.cc b/media/formats/mp4/cenc.cc index 845681faca..54fec8e5ee 100644 --- a/media/formats/mp4/cenc.cc +++ b/media/formats/mp4/cenc.cc @@ -19,6 +19,7 @@ bool IsIvSizeValid(size_t iv_size) { return iv_size == 8 || iv_size == 16; } const size_t kSubsampleEntrySize = sizeof(uint16) + sizeof(uint32); } // namespace +namespace edash_packager { namespace media { namespace mp4 { @@ -88,3 +89,4 @@ size_t FrameCENCInfo::GetTotalSizeOfSubsamples() const { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/cenc.h b/media/formats/mp4/cenc.h index 70aaa9ecb0..24f2e1ee9e 100644 --- a/media/formats/mp4/cenc.h +++ b/media/formats/mp4/cenc.h @@ -10,6 +10,7 @@ #include "base/basictypes.h" #include "media/base/decrypt_config.h" +namespace edash_packager { namespace media { class BufferReader; @@ -45,5 +46,6 @@ class FrameCENCInfo { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_CENC_H_ diff --git a/media/formats/mp4/chunk_info_iterator.cc b/media/formats/mp4/chunk_info_iterator.cc index fac864e8e0..a48f2e3e01 100644 --- a/media/formats/mp4/chunk_info_iterator.cc +++ b/media/formats/mp4/chunk_info_iterator.cc @@ -11,6 +11,7 @@ #include "base/logging.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -71,3 +72,4 @@ uint32 ChunkInfoIterator::NumSamples(uint32 start_chunk, } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/chunk_info_iterator.h b/media/formats/mp4/chunk_info_iterator.h index 5cec7e2d2d..eee2d5af74 100644 --- a/media/formats/mp4/chunk_info_iterator.h +++ b/media/formats/mp4/chunk_info_iterator.h @@ -11,6 +11,7 @@ #include "media/formats/mp4/box_definitions.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -66,5 +67,6 @@ class ChunkInfoIterator { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_CHUNK_INFO_ITERATOR_H_ diff --git a/media/formats/mp4/chunk_info_iterator_unittest.cc b/media/formats/mp4/chunk_info_iterator_unittest.cc index 3a681a5d9c..695e463645 100644 --- a/media/formats/mp4/chunk_info_iterator_unittest.cc +++ b/media/formats/mp4/chunk_info_iterator_unittest.cc @@ -17,6 +17,7 @@ struct ChunkProperty { }; } // namespace +namespace edash_packager { namespace media { namespace mp4 { @@ -110,3 +111,4 @@ TEST_F(ChunkInfoIteratorTest, AdvanceSample) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/composition_offset_iterator.cc b/media/formats/mp4/composition_offset_iterator.cc index 90aad10d1d..448052278c 100644 --- a/media/formats/mp4/composition_offset_iterator.cc +++ b/media/formats/mp4/composition_offset_iterator.cc @@ -8,6 +8,7 @@ #include "base/logging.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -59,3 +60,4 @@ uint32 CompositionOffsetIterator::NumSamples() const { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/composition_offset_iterator.h b/media/formats/mp4/composition_offset_iterator.h index 550898bbeb..252eac2d9f 100644 --- a/media/formats/mp4/composition_offset_iterator.h +++ b/media/formats/mp4/composition_offset_iterator.h @@ -11,6 +11,7 @@ #include "media/formats/mp4/box_definitions.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -51,5 +52,6 @@ class CompositionOffsetIterator { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_COMPOSITION_OFFSET_ITERATOR_H_ diff --git a/media/formats/mp4/composition_offset_iterator_unittest.cc b/media/formats/mp4/composition_offset_iterator_unittest.cc index a684dc7c52..ea74e2db88 100644 --- a/media/formats/mp4/composition_offset_iterator_unittest.cc +++ b/media/formats/mp4/composition_offset_iterator_unittest.cc @@ -9,6 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "media/formats/mp4/composition_offset_iterator.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -76,3 +77,4 @@ TEST_F(CompositionOffsetIteratorTest, SampleOffset) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/decoding_time_iterator.cc b/media/formats/mp4/decoding_time_iterator.cc index c1a45d336a..50a43362e2 100644 --- a/media/formats/mp4/decoding_time_iterator.cc +++ b/media/formats/mp4/decoding_time_iterator.cc @@ -10,6 +10,7 @@ #include "base/logging.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -68,3 +69,4 @@ uint32 DecodingTimeIterator::NumSamples() const { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/decoding_time_iterator.h b/media/formats/mp4/decoding_time_iterator.h index dc1fe398af..ed1619352b 100644 --- a/media/formats/mp4/decoding_time_iterator.h +++ b/media/formats/mp4/decoding_time_iterator.h @@ -11,6 +11,7 @@ #include "media/formats/mp4/box_definitions.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -51,5 +52,6 @@ class DecodingTimeIterator { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_DECODING_TIME_ITERATOR_H_ diff --git a/media/formats/mp4/decoding_time_iterator_unittest.cc b/media/formats/mp4/decoding_time_iterator_unittest.cc index 62fb3a9695..4184684bc5 100644 --- a/media/formats/mp4/decoding_time_iterator_unittest.cc +++ b/media/formats/mp4/decoding_time_iterator_unittest.cc @@ -9,6 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "media/formats/mp4/decoding_time_iterator.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -78,3 +79,4 @@ TEST_F(DecodingTimeIteratorTest, Duration) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/encrypting_fragmenter.cc b/media/formats/mp4/encrypting_fragmenter.cc index 11d3c52de9..e88aa54371 100644 --- a/media/formats/mp4/encrypting_fragmenter.cc +++ b/media/formats/mp4/encrypting_fragmenter.cc @@ -18,6 +18,7 @@ namespace { const size_t kDefaultIvSize = 8u; } // namespace +namespace edash_packager { namespace media { namespace mp4 { @@ -166,3 +167,4 @@ Status EncryptingFragmenter::EncryptSample(scoped_refptr sample) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/encrypting_fragmenter.h b/media/formats/mp4/encrypting_fragmenter.h index acbb476bd1..fbe6f9efe6 100644 --- a/media/formats/mp4/encrypting_fragmenter.h +++ b/media/formats/mp4/encrypting_fragmenter.h @@ -9,6 +9,7 @@ #include "media/formats/mp4/fragmenter.h" +namespace edash_packager { namespace media { class AesCtrEncryptor; @@ -78,5 +79,6 @@ class EncryptingFragmenter : public Fragmenter { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_ENCRYPTING_FRAGMENTER_H_ diff --git a/media/formats/mp4/es_descriptor.cc b/media/formats/mp4/es_descriptor.cc index c0be0b27b5..b04a3f1bf8 100644 --- a/media/formats/mp4/es_descriptor.cc +++ b/media/formats/mp4/es_descriptor.cc @@ -8,6 +8,8 @@ #include "media/base/buffer_writer.h" #include "media/formats/mp4/rcheck.h" +namespace edash_packager { +namespace media { namespace { // ISO/IEC 14496-1:2004 Section 7.2.6.6 Table 6: StreamType values. @@ -34,7 +36,7 @@ enum SLPredefinedTags { // The elementary stream size is specific by up to 4 bytes. // The MSB of a byte indicates if there are more bytes for the size. -bool ReadESSize(media::BitReader* reader, uint32* size) { +bool ReadESSize(BitReader* reader, uint32* size) { uint8 msb; uint8 byte; @@ -59,8 +61,6 @@ const size_t kMaxDecoderSpecificInfoSize = 64; } // namespace -namespace media { - namespace mp4 { ESDescriptor::ESDescriptor() : esid_(0), object_type_(kForbidden) {} @@ -189,3 +189,4 @@ size_t ESDescriptor::ComputeSize() const { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/es_descriptor.h b/media/formats/mp4/es_descriptor.h index df8346e6d1..b44a261c64 100644 --- a/media/formats/mp4/es_descriptor.h +++ b/media/formats/mp4/es_descriptor.h @@ -9,6 +9,7 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { class BitReader; @@ -75,5 +76,6 @@ class ESDescriptor { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_ES_DESCRIPTOR_H_ diff --git a/media/formats/mp4/es_descriptor_unittest.cc b/media/formats/mp4/es_descriptor_unittest.cc index 24ce42eac0..00f769dde4 100644 --- a/media/formats/mp4/es_descriptor_unittest.cc +++ b/media/formats/mp4/es_descriptor_unittest.cc @@ -6,6 +6,7 @@ #include "media/formats/mp4/es_descriptor.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -90,3 +91,4 @@ TEST(ESDescriptorTest, FiveByteLengthTest) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/fourccs.h b/media/formats/mp4/fourccs.h index 8a56422a9f..f123b7370a 100644 --- a/media/formats/mp4/fourccs.h +++ b/media/formats/mp4/fourccs.h @@ -7,6 +7,7 @@ #include +namespace edash_packager { namespace media { namespace mp4 { @@ -106,5 +107,6 @@ const inline std::string FourCCToString(FourCC fourcc) { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_FOURCCS_H_ diff --git a/media/formats/mp4/fragmenter.cc b/media/formats/mp4/fragmenter.cc index caab6aecf6..51680d4efe 100644 --- a/media/formats/mp4/fragmenter.cc +++ b/media/formats/mp4/fragmenter.cc @@ -10,6 +10,7 @@ #include "media/base/media_sample.h" #include "media/formats/mp4/box_definitions.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -141,3 +142,4 @@ bool Fragmenter::StartsWithSAP() { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/fragmenter.h b/media/formats/mp4/fragmenter.h index 40faf79004..371b13fab7 100644 --- a/media/formats/mp4/fragmenter.h +++ b/media/formats/mp4/fragmenter.h @@ -13,6 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "media/base/status.h" +namespace edash_packager { namespace media { class BufferWriter; @@ -106,5 +107,6 @@ bool Fragmenter::OptimizeSampleEntries(std::vector* entries, } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_FRAGMENTER_H_ diff --git a/media/formats/mp4/key_rotation_fragmenter.cc b/media/formats/mp4/key_rotation_fragmenter.cc index c1c6ce5482..c2a1f20626 100644 --- a/media/formats/mp4/key_rotation_fragmenter.cc +++ b/media/formats/mp4/key_rotation_fragmenter.cc @@ -9,6 +9,7 @@ #include "media/base/aes_encryptor.h" #include "media/formats/mp4/box_definitions.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -105,5 +106,6 @@ void KeyRotationFragmenter::FinalizeFragmentForEncryption() { traf()->auxiliary_size.sample_count; } -} // namespace media } // namespace mp4 +} // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/key_rotation_fragmenter.h b/media/formats/mp4/key_rotation_fragmenter.h index be14910a21..1b46526271 100644 --- a/media/formats/mp4/key_rotation_fragmenter.h +++ b/media/formats/mp4/key_rotation_fragmenter.h @@ -10,6 +10,7 @@ #include "media/base/key_source.h" #include "media/formats/mp4/encrypting_fragmenter.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -60,5 +61,6 @@ class KeyRotationFragmenter : public EncryptingFragmenter { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_KEY_ROTATION_FRAGMENTER_H_ diff --git a/media/formats/mp4/mp4_media_parser.cc b/media/formats/mp4/mp4_media_parser.cc index 7085d09dbf..b61fba6fa0 100644 --- a/media/formats/mp4/mp4_media_parser.cc +++ b/media/formats/mp4/mp4_media_parser.cc @@ -32,6 +32,7 @@ const char kWidevineKeySystemId[] = "edef8ba979d64acea3c827dcd51d21ed"; } // namespace +namespace edash_packager { namespace media { namespace mp4 { @@ -533,3 +534,4 @@ void MP4MediaParser::ChangeState(State new_state) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/mp4_media_parser.h b/media/formats/mp4/mp4_media_parser.h index 0b7614d11f..e8236a6b24 100644 --- a/media/formats/mp4/mp4_media_parser.h +++ b/media/formats/mp4/mp4_media_parser.h @@ -19,6 +19,7 @@ #include "media/base/media_parser.h" #include "media/base/offset_byte_queue.h" +namespace edash_packager { namespace media { class AesCtrEncryptor; @@ -108,5 +109,6 @@ class MP4MediaParser : public MediaParser { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_MP4_MEDIA_PARSER_H_ diff --git a/media/formats/mp4/mp4_media_parser_unittest.cc b/media/formats/mp4/mp4_media_parser_unittest.cc index f567a7b96b..d2b6a0a328 100644 --- a/media/formats/mp4/mp4_media_parser_unittest.cc +++ b/media/formats/mp4/mp4_media_parser_unittest.cc @@ -12,6 +12,7 @@ #include "media/formats/mp4/mp4_media_parser.h" #include "media/test/test_data_util.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -129,3 +130,4 @@ TEST_F(MP4MediaParserTest, NON_FRAGMENTED_MP4) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/mp4_muxer.cc b/media/formats/mp4/mp4_muxer.cc index 3d2cdb690c..218b02b771 100644 --- a/media/formats/mp4/mp4_muxer.cc +++ b/media/formats/mp4/mp4_muxer.cc @@ -36,6 +36,7 @@ void SetStartAndEndFromOffsetAndSize(size_t offset, } } // namespace +namespace edash_packager { namespace media { namespace mp4 { @@ -287,3 +288,4 @@ uint64 MP4Muxer::IsoTimeNow() { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/mp4_muxer.h b/media/formats/mp4/mp4_muxer.h index 9c01c82539..050eaf5bfb 100644 --- a/media/formats/mp4/mp4_muxer.h +++ b/media/formats/mp4/mp4_muxer.h @@ -12,6 +12,7 @@ #include "media/base/muxer.h" #include "media/formats/mp4/fourccs.h" +namespace edash_packager { namespace media { class AudioStreamInfo; @@ -75,5 +76,6 @@ class MP4Muxer : public Muxer { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_MP4_MUXER_H_ diff --git a/media/formats/mp4/multi_segment_segmenter.cc b/media/formats/mp4/multi_segment_segmenter.cc index 76fbb06b81..064cc1c980 100644 --- a/media/formats/mp4/multi_segment_segmenter.cc +++ b/media/formats/mp4/multi_segment_segmenter.cc @@ -16,6 +16,7 @@ #include "media/file/file.h" #include "media/formats/mp4/box_definitions.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -188,3 +189,4 @@ Status MultiSegmentSegmenter::WriteSegment() { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/multi_segment_segmenter.h b/media/formats/mp4/multi_segment_segmenter.h index adb581a435..293a47a665 100644 --- a/media/formats/mp4/multi_segment_segmenter.h +++ b/media/formats/mp4/multi_segment_segmenter.h @@ -9,6 +9,7 @@ #include "media/formats/mp4/segmenter.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -57,5 +58,6 @@ class MultiSegmentSegmenter : public Segmenter { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_MULTI_SEGMENT_SEGMENTER_H_ diff --git a/media/formats/mp4/segmenter.cc b/media/formats/mp4/segmenter.cc index 1bafd359ea..956b13fb8f 100644 --- a/media/formats/mp4/segmenter.cc +++ b/media/formats/mp4/segmenter.cc @@ -18,6 +18,7 @@ #include "media/formats/mp4/box_definitions.h" #include "media/formats/mp4/key_rotation_fragmenter.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -374,3 +375,4 @@ Status Segmenter::FinalizeFragment(Fragmenter* fragmenter) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/segmenter.h b/media/formats/mp4/segmenter.h index d4eac1b66e..dbeb5bfae0 100644 --- a/media/formats/mp4/segmenter.h +++ b/media/formats/mp4/segmenter.h @@ -14,6 +14,7 @@ #include "base/memory/scoped_ptr.h" #include "media/base/status.h" +namespace edash_packager { namespace media { struct MuxerOptions; @@ -131,5 +132,6 @@ class Segmenter { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_SEGMENTER_H_ diff --git a/media/formats/mp4/single_segment_segmenter.cc b/media/formats/mp4/single_segment_segmenter.cc index 663b929c7c..a013a10f5b 100644 --- a/media/formats/mp4/single_segment_segmenter.cc +++ b/media/formats/mp4/single_segment_segmenter.cc @@ -13,6 +13,7 @@ #include "media/file/file.h" #include "media/formats/mp4/box_definitions.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -172,3 +173,4 @@ Status SingleSegmentSegmenter::DoFinalizeSegment() { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/single_segment_segmenter.h b/media/formats/mp4/single_segment_segmenter.h index 48de80aa65..9bbc4c890a 100644 --- a/media/formats/mp4/single_segment_segmenter.h +++ b/media/formats/mp4/single_segment_segmenter.h @@ -10,6 +10,7 @@ #include "media/file/file_closer.h" #include "media/formats/mp4/segmenter.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -52,5 +53,6 @@ class SingleSegmentSegmenter : public Segmenter { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_SINGLE_SEGMENT_SEGMENTER_H_ diff --git a/media/formats/mp4/sync_sample_iterator.cc b/media/formats/mp4/sync_sample_iterator.cc index 0c114da1d4..f60dbdbf3d 100644 --- a/media/formats/mp4/sync_sample_iterator.cc +++ b/media/formats/mp4/sync_sample_iterator.cc @@ -8,6 +8,7 @@ #include +namespace edash_packager { namespace media { namespace mp4 { @@ -42,3 +43,4 @@ bool SyncSampleIterator::IsSyncSample(uint32 sample) const { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/sync_sample_iterator.h b/media/formats/mp4/sync_sample_iterator.h index 00d7f8183f..e072bc8ca0 100644 --- a/media/formats/mp4/sync_sample_iterator.h +++ b/media/formats/mp4/sync_sample_iterator.h @@ -11,6 +11,7 @@ #include "media/formats/mp4/box_definitions.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -43,5 +44,6 @@ class SyncSampleIterator { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_SYNC_SAMPLE_ITERATOR_H_ diff --git a/media/formats/mp4/sync_sample_iterator_unittest.cc b/media/formats/mp4/sync_sample_iterator_unittest.cc index a3efae4034..8865f8b41e 100644 --- a/media/formats/mp4/sync_sample_iterator_unittest.cc +++ b/media/formats/mp4/sync_sample_iterator_unittest.cc @@ -22,6 +22,7 @@ bool InSyncSamples(uint32 sample) { } } // namespace +namespace edash_packager { namespace media { namespace mp4 { @@ -56,3 +57,4 @@ TEST(SyncSampleIteratorTest, SyncSample) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/track_run_iterator.cc b/media/formats/mp4/track_run_iterator.cc index f128fc3e77..b2c14abe95 100644 --- a/media/formats/mp4/track_run_iterator.cc +++ b/media/formats/mp4/track_run_iterator.cc @@ -13,6 +13,7 @@ #include "media/formats/mp4/rcheck.h" #include "media/formats/mp4/sync_sample_iterator.h" +namespace edash_packager { namespace media { namespace mp4 { @@ -550,3 +551,4 @@ scoped_ptr TrackRunIterator::GetDecryptConfig() { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mp4/track_run_iterator.h b/media/formats/mp4/track_run_iterator.h index 00b9992ac7..52e36c8a4e 100644 --- a/media/formats/mp4/track_run_iterator.h +++ b/media/formats/mp4/track_run_iterator.h @@ -11,6 +11,7 @@ #include "media/formats/mp4/box_definitions.h" #include "media/formats/mp4/cenc.h" +namespace edash_packager { namespace media { class DecryptConfig; @@ -120,5 +121,6 @@ class TrackRunIterator { } // namespace mp4 } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MP4_TRACK_RUN_ITERATOR_H_ diff --git a/media/formats/mp4/track_run_iterator_unittest.cc b/media/formats/mp4/track_run_iterator_unittest.cc index 4dfc6501d4..f57c0d4a08 100644 --- a/media/formats/mp4/track_run_iterator_unittest.cc +++ b/media/formats/mp4/track_run_iterator_unittest.cc @@ -35,6 +35,7 @@ static const char kIv1[] = {0x41, 0x54, 0x65, 0x73, 0x74, 0x49, 0x76, 0x31, }; static const uint8 kKeyId[] = {0x41, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x49, 0x44}; +namespace edash_packager { namespace media { namespace mp4 { @@ -421,3 +422,4 @@ TEST_F(TrackRunIteratorTest, UnexpectedOrderingTest) { } // namespace mp4 } // namespace media +} // namespace edash_packager diff --git a/media/formats/mpeg/adts_constants.cc b/media/formats/mpeg/adts_constants.cc index c692abba65..9fce78f4ae 100644 --- a/media/formats/mpeg/adts_constants.cc +++ b/media/formats/mpeg/adts_constants.cc @@ -6,6 +6,7 @@ #include "base/macros.h" +namespace edash_packager { namespace media { // The following conversion table is extracted from ISO 14496 Part 3 - @@ -22,3 +23,4 @@ const int kAdtsNumChannelsTable[] = { const size_t kAdtsNumChannelsTableSize = arraysize(kAdtsNumChannelsTable); } // namespace media +} // namespace edash_packager diff --git a/media/formats/mpeg/adts_constants.h b/media/formats/mpeg/adts_constants.h index 2f53b22944..98095ac6e3 100644 --- a/media/formats/mpeg/adts_constants.h +++ b/media/formats/mpeg/adts_constants.h @@ -7,6 +7,7 @@ #include +namespace edash_packager { namespace media { enum { @@ -21,5 +22,6 @@ extern const int kAdtsNumChannelsTable[]; extern const size_t kAdtsNumChannelsTableSize; } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_MPEG_ADTS_CONSTANTS_H_ diff --git a/media/formats/wvm/wvm_media_parser.cc b/media/formats/wvm/wvm_media_parser.cc index 395c4f5535..8b28ef0342 100644 --- a/media/formats/wvm/wvm_media_parser.cc +++ b/media/formats/wvm/wvm_media_parser.cc @@ -64,6 +64,7 @@ namespace { }; } +namespace edash_packager { namespace media { namespace wvm { @@ -912,3 +913,4 @@ void PrevSampleData::Reset() { } // namespace wvm } // namespace media +} // namespace edash_packager diff --git a/media/formats/wvm/wvm_media_parser.h b/media/formats/wvm/wvm_media_parser.h index 04159b15a6..5494cc792f 100644 --- a/media/formats/wvm/wvm_media_parser.h +++ b/media/formats/wvm/wvm_media_parser.h @@ -19,6 +19,7 @@ #include "media/filters/h264_byte_to_unit_stream_converter.h" #include "openssl/sha.h" +namespace edash_packager { namespace media { namespace wvm { @@ -256,5 +257,6 @@ class WvmMediaParser : public MediaParser { } // namespace wvm } // namespace media +} // namespace edash_packager #endif // MEDIA_FORMATS_WVM_WVM_MEDIA_PARSER_H_ diff --git a/media/formats/wvm/wvm_media_parser_unittest.cc b/media/formats/wvm/wvm_media_parser_unittest.cc index 4db853db9d..caf65bb917 100644 --- a/media/formats/wvm/wvm_media_parser_unittest.cc +++ b/media/formats/wvm/wvm_media_parser_unittest.cc @@ -26,6 +26,7 @@ const int kExpectedVideoFrameCount = 6665; const int kExpectedAudioFrameCount = 11964; } +namespace edash_packager { namespace media { namespace wvm { @@ -131,3 +132,4 @@ TEST_F(WvmMediaParserTest, AudioFrameCount) { } // namespace wvm } // namespace media +} // namespace edash_packager diff --git a/media/test/packager_test.cc b/media/test/packager_test.cc index 93f9eef818..be8e6df302 100644 --- a/media/test/packager_test.cc +++ b/media/test/packager_test.cc @@ -21,6 +21,7 @@ using ::testing::ValuesIn; +namespace edash_packager { namespace media { namespace { @@ -371,3 +372,4 @@ INSTANTIATE_TEST_CASE_P(PackagerEndToEnd, INSTANTIATE_TEST_CASE_P(PackagerEndToEnd, PackagerTest, ValuesIn(kMediaFiles)); } // namespace media +} // namespace edash_packager diff --git a/media/test/test_data_util.cc b/media/test/test_data_util.cc index 36b2dc28ee..653cf5f2e8 100644 --- a/media/test/test_data_util.cc +++ b/media/test/test_data_util.cc @@ -8,6 +8,7 @@ #include "base/logging.h" #include "base/path_service.h" +namespace edash_packager { namespace media { base::FilePath GetTestDataFilePath(const std::string& name) { @@ -28,3 +29,4 @@ std::vector ReadTestDataFile(const std::string& name) { } } // namespace media +} // namespace edash_packager diff --git a/media/test/test_data_util.h b/media/test/test_data_util.h index 7b998ac232..20e1dc4f24 100644 --- a/media/test/test_data_util.h +++ b/media/test/test_data_util.h @@ -10,6 +10,7 @@ #include "base/basictypes.h" #include "base/files/file_path.h" +namespace edash_packager { namespace media { // Returns a file path for a file in the media/test/data directory. @@ -19,5 +20,6 @@ base::FilePath GetTestDataFilePath(const std::string& name); std::vector ReadTestDataFile(const std::string& name); } // namespace media +} // namespace edash_packager #endif // MEDIA_TEST_TEST_DATA_UTIL_H_ diff --git a/mpd/base/bandwidth_estimator_test.cc b/mpd/base/bandwidth_estimator_test.cc index 7fd9c651ff..3eee8c464c 100644 --- a/mpd/base/bandwidth_estimator_test.cc +++ b/mpd/base/bandwidth_estimator_test.cc @@ -10,7 +10,7 @@ #include "mpd/base/bandwidth_estimator.h" -namespace dash_packager { +namespace edash_packager { namespace { const int kNumBlocksForEstimate = 5; @@ -92,4 +92,4 @@ TEST(BandwidthEstimatorTest, FirstOneBlock) { EXPECT_EQ(kExptectedEstimate, be.Estimate()); } -} // dash_packager +} // edash_packager diff --git a/mpd/base/content_protection_element.cc b/mpd/base/content_protection_element.cc index 1247284ad4..677f6d48d4 100644 --- a/mpd/base/content_protection_element.cc +++ b/mpd/base/content_protection_element.cc @@ -6,7 +6,7 @@ #include "mpd/base/content_protection_element.h" -namespace dash_packager { +namespace edash_packager { ContentProtectionElement::ContentProtectionElement() {} ContentProtectionElement::~ContentProtectionElement() {} -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/base/content_protection_element.h b/mpd/base/content_protection_element.h index 444e8b7540..da73e0b445 100644 --- a/mpd/base/content_protection_element.h +++ b/mpd/base/content_protection_element.h @@ -15,7 +15,7 @@ #include #include -namespace dash_packager { +namespace edash_packager { /// Structure to represent element in DASH MPD spec (ISO /// 23009-1:2012 MPD and Segment Formats). @@ -33,6 +33,6 @@ struct ContentProtectionElement { std::string subelements; }; -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_BASE_CONTENT_PROTECTION_ELEMENT_H_ diff --git a/mpd/base/media_info.proto b/mpd/base/media_info.proto index 2cee10ee99..76f4b63722 100644 --- a/mpd/base/media_info.proto +++ b/mpd/base/media_info.proto @@ -3,7 +3,7 @@ syntax = "proto2"; -package dash_packager; +package edash_packager; message Range { optional uint64 begin = 1; diff --git a/mpd/base/mpd_builder.cc b/mpd/base/mpd_builder.cc index 5d89327985..47420d20e8 100644 --- a/mpd/base/mpd_builder.cc +++ b/mpd/base/mpd_builder.cc @@ -23,7 +23,7 @@ #include "mpd/base/mpd_utils.h" #include "mpd/base/xml/xml_node.h" -namespace dash_packager { +namespace edash_packager { using xml::XmlNode; using xml::RepresentationXmlNode; @@ -788,4 +788,4 @@ bool Representation::GetEarliestTimestamp(double* timestamp_seconds) { return true; } -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/base/mpd_builder.h b/mpd/base/mpd_builder.h index 42f7d321bf..8dcb54c84f 100644 --- a/mpd/base/mpd_builder.h +++ b/mpd/base/mpd_builder.h @@ -25,14 +25,14 @@ #include "mpd/base/segment_info.h" #include "mpd/base/xml/scoped_xml_ptr.h" -namespace media { -class File; -} - // TODO(rkuroiwa): For classes with |id_|, consider removing the field and let // the MPD (XML) generation functions take care of assigning an ID to each // element. -namespace dash_packager { +namespace edash_packager { + +namespace media { +class File; +} // namespace media class AdaptationSet; class Representation; @@ -294,6 +294,6 @@ class Representation { DISALLOW_COPY_AND_ASSIGN(Representation); }; -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_BASE_MPD_BUILDER_H_ diff --git a/mpd/base/mpd_builder_unittest.cc b/mpd/base/mpd_builder_unittest.cc index d1e433a153..27d45f250c 100644 --- a/mpd/base/mpd_builder_unittest.cc +++ b/mpd/base/mpd_builder_unittest.cc @@ -19,7 +19,7 @@ #include "mpd/test/mpd_builder_test_helper.h" #include "mpd/test/xml_compare.h" -namespace dash_packager { +namespace edash_packager { namespace { const char kSElementTemplate[] = @@ -817,4 +817,4 @@ TEST_F(TimeShiftBufferDepthTest, ManySegments) { kDefaultStartNumber + kExpectedRemovedSegments)); } -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/base/mpd_notifier.h b/mpd/base/mpd_notifier.h index 0131abe505..18492717aa 100644 --- a/mpd/base/mpd_notifier.h +++ b/mpd/base/mpd_notifier.h @@ -12,7 +12,7 @@ #include "base/basictypes.h" -namespace dash_packager { +namespace edash_packager { class MediaInfo; struct ContentProtectionElement; @@ -80,6 +80,6 @@ class MpdNotifier { DISALLOW_COPY_AND_ASSIGN(MpdNotifier); }; -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_BASE_MPD_NOTIFIER_H_ diff --git a/mpd/base/mpd_utils.cc b/mpd/base/mpd_utils.cc index e1f6918067..abcde81de8 100644 --- a/mpd/base/mpd_utils.cc +++ b/mpd/base/mpd_utils.cc @@ -35,7 +35,7 @@ std::string CodecsString(const RepeatedStreamInfoType& repeated_stream_info) { } // namespace -namespace dash_packager { +namespace edash_packager { bool HasVODOnlyFields(const MediaInfo& media_info) { return media_info.has_init_range() || media_info.has_index_range() || @@ -116,4 +116,4 @@ bool OnlyOneTrue(bool b1, bool b2, bool b3) { return !MoreThanOneTrue(b1, b2, b3) && AtLeastOneTrue(b1, b2, b3); } -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/base/mpd_utils.h b/mpd/base/mpd_utils.h index c4a76c6f54..e8c295af29 100644 --- a/mpd/base/mpd_utils.h +++ b/mpd/base/mpd_utils.h @@ -15,7 +15,7 @@ #include "base/basictypes.h" -namespace dash_packager { +namespace edash_packager { class MediaInfo; struct ContentProtectionElement; @@ -44,6 +44,6 @@ bool MoreThanOneTrue(bool b1, bool b2, bool b3); bool AtLeastOneTrue(bool b1, bool b2, bool b3); bool OnlyOneTrue(bool b1, bool b2, bool b3); -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_BASE_MPD_UTILS_H_ diff --git a/mpd/base/segment_info.h b/mpd/base/segment_info.h index 1eecb47262..83adb2eb68 100644 --- a/mpd/base/segment_info.h +++ b/mpd/base/segment_info.h @@ -7,7 +7,7 @@ #ifndef MPD_BASE_SEGMENT_INFO_H_ #define MPD_BASE_SEGMENT_INFO_H_ -namespace dash_packager { +namespace edash_packager { /// Container for keeping track of information about a segment. /// Used for keeping track of all the segments used for generating MPD with /// dynamic profile. @@ -21,6 +21,6 @@ struct SegmentInfo { // in the DASH MPD spec. uint64 repeat; }; -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_BASE_SEGMENT_INFO_H_ diff --git a/mpd/base/simple_mpd_notifier.cc b/mpd/base/simple_mpd_notifier.cc index a13299b378..e712308e04 100644 --- a/mpd/base/simple_mpd_notifier.cc +++ b/mpd/base/simple_mpd_notifier.cc @@ -11,9 +11,9 @@ #include "mpd/base/mpd_builder.h" #include "mpd/base/mpd_utils.h" -using media::File; +using edash_packager::media::File; -namespace dash_packager { +namespace edash_packager { SimpleMpdNotifier::SimpleMpdNotifier(DashProfile dash_profile, const MpdOptions& mpd_options, @@ -137,4 +137,4 @@ bool SimpleMpdNotifier::WriteMpdToFile() { return file->Close(); } -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/base/simple_mpd_notifier.h b/mpd/base/simple_mpd_notifier.h index 16d9597f51..731e11353c 100644 --- a/mpd/base/simple_mpd_notifier.h +++ b/mpd/base/simple_mpd_notifier.h @@ -15,7 +15,7 @@ #include "base/synchronization/lock.h" #include "mpd/base/mpd_notifier.h" -namespace dash_packager { +namespace edash_packager { class AdaptationSet; class MpdBuilder; @@ -72,6 +72,6 @@ class SimpleMpdNotifier : public MpdNotifier { DISALLOW_COPY_AND_ASSIGN(SimpleMpdNotifier); }; -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_BASE_SIMPLE_MPD_NOTIFIER_H_ diff --git a/mpd/base/simple_vod_mpd_notifier.cc b/mpd/base/simple_vod_mpd_notifier.cc index f6a5123f75..b8ca972bfb 100644 --- a/mpd/base/simple_vod_mpd_notifier.cc +++ b/mpd/base/simple_vod_mpd_notifier.cc @@ -10,7 +10,7 @@ #include "mpd/base/content_protection_element.h" #include "mpd/base/media_info.pb.h" -namespace dash_packager { +namespace edash_packager { SimpleVodMpdNotifier::SimpleVodMpdNotifier(MpdBuilder* mpd_builder) : mpd_builder_(mpd_builder), @@ -103,4 +103,4 @@ bool SimpleVodMpdNotifier::AddNewRepresentation(ContainerType type, return true; } -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/base/simple_vod_mpd_notifier.h b/mpd/base/simple_vod_mpd_notifier.h index 4ea617725b..d0bce59428 100644 --- a/mpd/base/simple_vod_mpd_notifier.h +++ b/mpd/base/simple_vod_mpd_notifier.h @@ -14,7 +14,7 @@ #include "mpd/base/mpd_builder.h" -namespace dash_packager { +namespace edash_packager { // This assumes that MpdBuilder is for VOD. This class also assumes that all the // container is for an AdaptationSet. @@ -74,6 +74,6 @@ class SimpleVodMpdNotifier : public MpdNotifier { DISALLOW_COPY_AND_ASSIGN(SimpleVodMpdNotifier); }; -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_BASE_SIMPLE_MPD_NOTIFIER_H_ diff --git a/mpd/base/xml/scoped_xml_ptr.h b/mpd/base/xml/scoped_xml_ptr.h index c861c4ebdc..d47572b496 100644 --- a/mpd/base/xml/scoped_xml_ptr.h +++ b/mpd/base/xml/scoped_xml_ptr.h @@ -15,7 +15,7 @@ #include "base/memory/scoped_ptr.h" -namespace dash_packager { +namespace edash_packager { namespace xml { /// Deleter functor for deleting libxml2 pointers. This is used with @@ -43,5 +43,5 @@ struct ScopedXmlPtr { }; } // namespace xml -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_BASE_XML_SCOPED_XML_PTR_H_ diff --git a/mpd/base/xml/xml_node.cc b/mpd/base/xml/xml_node.cc index 89e2bf6456..7dfdce9056 100644 --- a/mpd/base/xml/xml_node.cc +++ b/mpd/base/xml/xml_node.cc @@ -14,17 +14,17 @@ #include "mpd/base/media_info.pb.h" #include "mpd/base/segment_info.h" -using dash_packager::xml::XmlNode; +using edash_packager::xml::XmlNode; -using dash_packager::MediaInfo; +using edash_packager::MediaInfo; typedef MediaInfo::ContentProtectionXml ContentProtectionXml; typedef ContentProtectionXml::AttributeNameValuePair AttributeNameValuePair; -namespace dash_packager { +namespace edash_packager { namespace { -std::string RangeToString(const dash_packager::Range& range) { +std::string RangeToString(const Range& range) { return base::Uint64ToString(range.begin()) + "-" + base::Uint64ToString(range.end()); } @@ -516,4 +516,4 @@ void RepresentationXmlNode::AddAudioSamplingRateInfo( } } // namespace xml -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/base/xml/xml_node.h b/mpd/base/xml/xml_node.h index 2b89ca11ac..77573cf91f 100644 --- a/mpd/base/xml/xml_node.h +++ b/mpd/base/xml/xml_node.h @@ -19,7 +19,7 @@ #include "mpd/base/media_info.pb.h" #include "mpd/base/xml/scoped_xml_ptr.h" -namespace dash_packager { +namespace edash_packager { struct SegmentInfo; @@ -172,5 +172,5 @@ class RepresentationXmlNode : public RepresentationBaseXmlNode { }; } // namespace xml -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_BASE_XML_XML_NODE_H_ diff --git a/mpd/base/xml/xml_node_unittest.cc b/mpd/base/xml/xml_node_unittest.cc index 314133e2ce..6222cbe23e 100644 --- a/mpd/base/xml/xml_node_unittest.cc +++ b/mpd/base/xml/xml_node_unittest.cc @@ -15,7 +15,7 @@ #include "mpd/base/xml/xml_node.h" #include "mpd/test/xml_compare.h" -namespace dash_packager { +namespace edash_packager { namespace xml { namespace { @@ -222,4 +222,4 @@ TEST_F(RepresentationTest, InvalidLiveInitSegmentName) { } } // namespace xml -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/test/mpd_builder_test_helper.cc b/mpd/test/mpd_builder_test_helper.cc index 896c575558..34abd38343 100644 --- a/mpd/test/mpd_builder_test_helper.cc +++ b/mpd/test/mpd_builder_test_helper.cc @@ -16,7 +16,7 @@ #include "mpd/base/xml/scoped_xml_ptr.h" #include "mpd/test/xml_compare.h" -namespace dash_packager { +namespace edash_packager { base::FilePath GetTestDataFilePath(const std::string& file_name) { base::FilePath file_path; @@ -111,4 +111,4 @@ void ExpectMpdToEqualExpectedOutputFile( << "Actual:" << std::endl << mpd_string; } -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/test/mpd_builder_test_helper.h b/mpd/test/mpd_builder_test_helper.h index fdf3b521da..8f6fdc0e96 100644 --- a/mpd/test/mpd_builder_test_helper.h +++ b/mpd/test/mpd_builder_test_helper.h @@ -13,7 +13,7 @@ namespace base { class FilePath; } -namespace dash_packager { +namespace edash_packager { class MediaInfo; @@ -70,6 +70,6 @@ void ExpectMpdToEqualExpectedOutputFile( const std::string& mpd_string, const std::string& expected_output_file); -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_TEST_MPD_BUILDER_TEST_HELPER_H_ diff --git a/mpd/test/xml_compare.cc b/mpd/test/xml_compare.cc index 53b10f4773..b42fdce4dd 100644 --- a/mpd/test/xml_compare.cc +++ b/mpd/test/xml_compare.cc @@ -10,7 +10,7 @@ #include "base/logging.h" #include "mpd/base/xml/scoped_xml_ptr.h" -namespace dash_packager { +namespace edash_packager { namespace { xml::ScopedXmlPtr::type GetDocFromString(const std::string& xml_str) { @@ -138,4 +138,4 @@ bool XmlEqual(xmlDocPtr xml1, xmlDocPtr xml2) { return CompareNodes(xml1_root_element, xml2_root_element); } -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/test/xml_compare.h b/mpd/test/xml_compare.h index 922d14ab22..d228dac79e 100644 --- a/mpd/test/xml_compare.h +++ b/mpd/test/xml_compare.h @@ -5,7 +5,7 @@ #include -namespace dash_packager { +namespace edash_packager { /// Checks whether the XMLs are equivalent. An XML schema can specify strict /// ordering of children and MPD does. These functions are currently tuned to @@ -19,6 +19,6 @@ bool XmlEqual(const std::string& xml1, const std::string& xml2); bool XmlEqual(const std::string& xml1, xmlDocPtr xml2); bool XmlEqual(xmlDocPtr xml1, xmlDocPtr xml2); -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_TEST_XML_COMPARE_H_ diff --git a/mpd/util/mpd_writer.cc b/mpd/util/mpd_writer.cc index 19739ed09b..0500eecbf6 100644 --- a/mpd/util/mpd_writer.cc +++ b/mpd/util/mpd_writer.cc @@ -12,9 +12,9 @@ #include "media/file/file.h" #include "mpd/base/mpd_builder.h" -using media::File; +using edash_packager::media::File; -namespace dash_packager { +namespace edash_packager { namespace { bool HasVideo(const MediaInfo& media_info) { @@ -211,4 +211,4 @@ bool MpdWriter::WriteMpdToFile(const char* file_name) { return file->Close(); } -} // namespace dash_packager +} // namespace edash_packager diff --git a/mpd/util/mpd_writer.h b/mpd/util/mpd_writer.h index 20d18016bb..26d3e3c694 100644 --- a/mpd/util/mpd_writer.h +++ b/mpd/util/mpd_writer.h @@ -14,13 +14,15 @@ #include "base/basictypes.h" +namespace edash_packager { namespace media { class File; } // namespace media +} // namespace edash_packager -namespace dash_packager { +namespace edash_packager { class MediaInfo; @@ -70,6 +72,6 @@ class MpdWriter { DISALLOW_COPY_AND_ASSIGN(MpdWriter); }; -} // namespace dash_packager +} // namespace edash_packager #endif // MPD_UTIL_MPD_WRITER_H_ diff --git a/mpd/util/mpd_writer_unittest.cc b/mpd/util/mpd_writer_unittest.cc index 25eb3a26a1..aa5c4a56f0 100644 --- a/mpd/util/mpd_writer_unittest.cc +++ b/mpd/util/mpd_writer_unittest.cc @@ -11,7 +11,7 @@ #include "mpd/test/mpd_builder_test_helper.h" #include "mpd/util/mpd_writer.h" -namespace dash_packager { +namespace edash_packager { // Note that these tests look very similar to MpdBuilder tests but these can // only handle MediaInfos with 1 stream in each file. @@ -96,4 +96,4 @@ TEST(MpdWriterTest, EncryptedAudioMediaInfo) { generated_mpd, kFileNameExpectedMpdOutputEncryptedAudio)); } -} // namespace dash_packager +} // namespace edash_packager