Rename top level namespace to shaka

Issue #103

Change-Id: I67945c8ec6d2c178494d3b5400e5ec0170e9d115
This commit is contained in:
Kongqun Yang 2016-05-20 14:19:33 -07:00 committed by KongQun Yang
parent 72c3a76699
commit 4f9c8ea781
410 changed files with 820 additions and 820 deletions

View File

@ -28,7 +28,7 @@ DEFINE_string(pssh,
"will generate a v1 common PSSH box according to "
"https://goo.gl/507mKp.");
namespace edash_packager {
namespace shaka {
bool ValidateFixedCryptoFlags() {
bool success = true;
@ -70,4 +70,4 @@ bool ValidateFixedCryptoFlags() {
return success;
}
} // namespace edash_packager
} // namespace shaka

View File

@ -18,12 +18,12 @@ DECLARE_string(key);
DECLARE_string(iv);
DECLARE_string(pssh);
namespace edash_packager {
namespace shaka {
/// Validate fixed encryption/decryption flags.
/// @return true on success, false otherwise.
bool ValidateFixedCryptoFlags();
} // namespace edash_packager
} // namespace shaka
#endif // APP_FIXED_KEY_ENCRYPTION_FLAGS_H_

View File

@ -15,7 +15,7 @@
#include "packager/base/synchronization/lock.h"
#include "packager/base/threading/platform_thread.h"
namespace edash_packager {
namespace shaka {
namespace media {
namespace {
@ -50,4 +50,4 @@ LibcryptoThreading::~LibcryptoThreading() {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -9,7 +9,7 @@
#include "packager/base/macros.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// Convenience class which initializes and terminates libcrypto threading.
@ -23,6 +23,6 @@ class LibcryptoThreading {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // APP_LIBCRYPTO_THREADING_H_

View File

@ -14,7 +14,7 @@
#include "packager/mpd/util/mpd_writer.h"
#include "packager/version/version.h"
namespace edash_packager {
namespace shaka {
namespace {
const char kUsage[] =
"MPD generation driver program.\n"
@ -101,8 +101,8 @@ int MpdMain(int argc, char** argv) {
}
} // namespace
} // namespace edash_packager
} // namespace shaka
int main(int argc, char** argv) {
return edash_packager::MpdMain(argc, argv);
return shaka::MpdMain(argc, argv);
}

View File

@ -47,7 +47,7 @@ DEFINE_bool(use_fake_clock_for_muxer,
"creation time and modification time in outputs are set to 0. "
"Should only be used for testing.");
namespace edash_packager {
namespace shaka {
namespace media {
namespace {
@ -483,8 +483,8 @@ int PackagerMain(int argc, char** argv) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka
int main(int argc, char** argv) {
return edash_packager::media::PackagerMain(argc, argv);
return shaka::media::PackagerMain(argc, argv);
}

View File

@ -37,7 +37,7 @@ DEFINE_string(test_version_string,
"--override_version_string is false. Should be used for testing "
"only.");
namespace edash_packager {
namespace shaka {
namespace media {
void DumpStreamInfo(const std::vector<MediaStream*>& streams) {
@ -235,4 +235,4 @@ bool AddStreamToMuxer(const std::vector<MediaStream*>& streams,
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -17,7 +17,7 @@
DECLARE_bool(dump_stream_info);
namespace edash_packager {
namespace shaka {
struct MpdOptions;
@ -67,6 +67,6 @@ bool AddStreamToMuxer(const std::vector<MediaStream*>& streams,
Muxer* muxer);
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // APP_PACKAGER_UTIL_H_

View File

@ -12,7 +12,7 @@
#include "packager/base/strings/string_split.h"
#include "packager/mpd/base/language_utils.h"
namespace edash_packager {
namespace shaka {
namespace media {
namespace {
@ -149,4 +149,4 @@ bool InsertStreamDescriptor(const std::string& descriptor_string,
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -14,7 +14,7 @@
#include "packager/media/base/container_names.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// Defines a single input/output stream, it's input source, output destination,
@ -54,6 +54,6 @@ bool InsertStreamDescriptor(const std::string& descriptor_string,
StreamDescriptorList* descriptor_list);
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // APP_STREAM_DESCRIPTOR_H_

View File

@ -12,7 +12,7 @@
#include "packager/base/strings/stringprintf.h"
namespace edash_packager {
namespace shaka {
bool ValidateFlag(const char* flag_name,
const std::string& flag_value,
@ -37,4 +37,4 @@ void PrintError(const std::string& error_message) {
fprintf(stderr, "ERROR: %s\n", error_message.c_str());
}
} // namespace edash_packager
} // namespace shaka

View File

@ -11,7 +11,7 @@
#include <string>
namespace edash_packager {
namespace shaka {
/// Validate a flag against the given condition.
/// @param flag_name is the name of the flag.
@ -33,6 +33,6 @@ bool ValidateFlag(const char* flag_name,
/// @param error_message specifies the error message.
void PrintError(const std::string& error_message);
} // namespace edash_packager
} // namespace shaka
#endif // APP_VALIDATE_FLAG_H_

View File

@ -64,7 +64,7 @@ DEFINE_string(protection_scheme,
"non-pattern-based protection schemes, i.e. 'cenc' for 'cens', "
"'cbc1' for 'cbcs'.");
namespace edash_packager {
namespace shaka {
bool ValidateWidevineCryptoFlags() {
bool success = true;
@ -166,4 +166,4 @@ bool ValidateWidevineCryptoFlags() {
return success;
}
} // namespace edash_packager
} // namespace shaka

View File

@ -25,12 +25,12 @@ DECLARE_string(rsa_signing_key_path);
DECLARE_int32(crypto_period_duration);
DECLARE_string(protection_scheme);
namespace edash_packager {
namespace shaka {
/// Validate widevine encryption/decryption flags.
/// @return true on success, false otherwise.
bool ValidateWidevineCryptoFlags();
} // namespace edash_packager
} // namespace shaka
#endif // APP_WIDEVINE_ENCRYPTION_FLAGS_H_

View File

@ -12,7 +12,7 @@
#include "packager/mpd/base/media_info.pb.h"
namespace edash_packager {
namespace shaka {
namespace hls {
// TODO(rkuroiwa): Consider merging this with MpdNotifier.
@ -84,5 +84,5 @@ class HlsNotifier {
};
} // namespace hls
} // namespace edash_packager
} // namespace shaka
#endif // PACKAGER_HLS_BASE_HLS_NOTIFIER_H_

View File

@ -19,7 +19,7 @@
#include "packager/media/file/file.h"
#include "packager/media/file/file_closer.h"
namespace edash_packager {
namespace shaka {
namespace hls {
MasterPlaylist::MasterPlaylist(const std::string& file_name)
@ -163,4 +163,4 @@ bool MasterPlaylist::WriteMasterPlaylist(const std::string& base_url,
}
} // namespace hls
} // namespace edash_packager
} // namespace shaka

View File

@ -12,7 +12,7 @@
#include "packager/base/macros.h"
namespace edash_packager {
namespace shaka {
namespace hls {
class MediaPlaylist;
@ -63,6 +63,6 @@ class MasterPlaylist {
};
} // namespace hls
} // namespace edash_packager
} // namespace shaka
#endif // PACKAGER_HLS_BASE_MASTER_PLAYLIST_H_

View File

@ -14,7 +14,7 @@
#include "packager/hls/base/mock_media_playlist.h"
#include "packager/media/file/file.h"
namespace edash_packager {
namespace shaka {
namespace hls {
using ::testing::AtLeast;
@ -272,4 +272,4 @@ TEST_F(MasterPlaylistTest, WriteAllPlaylists) {
}
} // namespace hls
} // namespace edash_packager
} // namespace shaka

View File

@ -13,7 +13,7 @@
#include "packager/base/strings/stringprintf.h"
#include "packager/media/file/file.h"
namespace edash_packager {
namespace shaka {
namespace hls {
namespace {
@ -337,4 +337,4 @@ bool MediaPlaylist::SetTargetDuration(uint32_t target_duration) {
}
} // namespace hls
} // namespace edash_packager
} // namespace shaka

View File

@ -15,7 +15,7 @@
#include "packager/base/stl_util.h"
#include "packager/mpd/base/media_info.pb.h"
namespace edash_packager {
namespace shaka {
namespace media {
class File;
@ -181,6 +181,6 @@ class MediaPlaylist {
};
} // namespace hls
} // namespace edash_packager
} // namespace shaka
#endif // PACKAGER_HLS_BASE_MEDIA_PLAYLIST_H_

View File

@ -10,7 +10,7 @@
#include "packager/media/file/file.h"
#include "packager/hls/base/media_playlist.h"
namespace edash_packager {
namespace shaka {
namespace hls {
using ::testing::_;
@ -303,4 +303,4 @@ TEST_F(MediaPlaylistTest, RemoveOldestSegment) {
}
} // namespace hls
} // namespace edash_packager
} // namespace shaka

View File

@ -6,7 +6,7 @@
#include "packager/hls/base/mock_media_playlist.h"
namespace edash_packager {
namespace shaka {
namespace hls {
MockMediaPlaylist::MockMediaPlaylist(MediaPlaylistType type,
@ -17,4 +17,4 @@ MockMediaPlaylist::MockMediaPlaylist(MediaPlaylistType type,
MockMediaPlaylist::~MockMediaPlaylist() {}
} // namespace hls
} // namespace edash_packager
} // namespace shaka

View File

@ -11,7 +11,7 @@
#include "packager/hls/base/media_playlist.h"
namespace edash_packager {
namespace shaka {
namespace hls {
class MockMediaPlaylist : public MediaPlaylist {
@ -43,6 +43,6 @@ class MockMediaPlaylist : public MediaPlaylist {
};
} // namespace hls
} // namespace edash_packager
} // namespace shaka
#endif // PACKAGER_HLS_BASE_MOCK_MEDIA_PLAYLIST_H_

View File

@ -13,7 +13,7 @@
#include "packager/hls/base/media_playlist.h"
#include "packager/media/base/widevine_pssh_data.pb.h"
namespace edash_packager {
namespace shaka {
namespace hls {
namespace {
@ -173,4 +173,4 @@ bool SimpleHlsNotifier::Flush() {
}
} // namespace hls
} // namespace edash_packager
} // namespace shaka

View File

@ -16,7 +16,7 @@
#include "packager/hls/base/master_playlist.h"
#include "packager/hls/base/media_playlist.h"
namespace edash_packager {
namespace shaka {
namespace hls {
/// For testing.
@ -89,6 +89,6 @@ class SimpleHlsNotifier : public HlsNotifier {
};
} // namespace hls
} // namespace edash_packager
} // namespace shaka
#endif // PACKAGER_HLS_BASE_SIMPLE_HLS_NOTIFIER_H_

View File

@ -12,7 +12,7 @@
#include "packager/hls/base/simple_hls_notifier.h"
#include "packager/media/base/widevine_pssh_data.pb.h"
namespace edash_packager {
namespace shaka {
namespace hls {
using ::testing::Return;
@ -369,4 +369,4 @@ TEST_F(SimpleHlsNotifierTest, Flush) {
}
} // namespace hls
} // namespace edash_packager
} // namespace shaka

View File

@ -26,7 +26,7 @@ bool IsIvSizeValid(size_t iv_size) {
} // namespace
namespace edash_packager {
namespace shaka {
namespace media {
AesCryptor::AesCryptor(ConstantIvFlag constant_iv_flag)
@ -131,6 +131,6 @@ size_t AesCryptor::NumPaddingBytes(size_t size) const {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -17,7 +17,7 @@
struct aes_key_st;
typedef struct aes_key_st AES_KEY;
namespace edash_packager {
namespace shaka {
namespace media {
// AES cryptor interface. Inherited by various AES encryptor and decryptor
@ -132,7 +132,7 @@ class AesCryptor {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // PACKAGER_MEDIA_BASE_AES_CRYPTOR_H_

View File

@ -131,7 +131,7 @@ const uint8_t kInvalidIv[] = {0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
} // namespace
namespace edash_packager {
namespace shaka {
namespace media {
class AesCtrEncryptorTest : public testing::Test {
@ -620,4 +620,4 @@ INSTANTIATE_TEST_CASE_P(CbcTestCases,
::testing::ValuesIn(kCbcTestCases));
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -19,7 +19,7 @@ bool IsKeySizeValidForAes(size_t key_size) {
} // namespace
namespace edash_packager {
namespace shaka {
namespace media {
AesCbcDecryptor::AesCbcDecryptor(CbcPaddingScheme padding_scheme)
@ -159,4 +159,4 @@ void AesCbcDecryptor::SetIvInternal() {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -15,7 +15,7 @@
#include "packager/media/base/aes_cryptor.h"
#include "packager/media/base/aes_encryptor.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// For AES-CTR, encryption and decryption are identical.
@ -63,6 +63,6 @@ class AesCbcDecryptor : public AesCryptor {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // PACKAGER_MEDIA_BASE_AES_DECRYPTOR_H_

View File

@ -29,7 +29,7 @@ bool IsKeySizeValidForAes(size_t key_size) {
} // namespace
namespace edash_packager {
namespace shaka {
namespace media {
AesEncryptor::AesEncryptor(ConstantIvFlag constant_iv_flag)
@ -196,4 +196,4 @@ size_t AesCbcEncryptor::NumPaddingBytes(size_t size) const {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -16,7 +16,7 @@
#include "packager/base/memory/scoped_ptr.h"
#include "packager/media/base/aes_cryptor.h"
namespace edash_packager {
namespace shaka {
namespace media {
class AesEncryptor : public AesCryptor {
@ -111,6 +111,6 @@ class AesCbcEncryptor : public AesEncryptor {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_AES_ENCRYPTOR_H_

View File

@ -10,7 +10,7 @@
#include <algorithm>
#include "packager/base/logging.h"
namespace edash_packager {
namespace shaka {
namespace media {
AesPatternCryptor::AesPatternCryptor(uint8_t crypt_byte_block,
@ -81,4 +81,4 @@ bool AesPatternCryptor::NeedEncrypt(size_t input_size,
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -9,7 +9,7 @@
#include "packager/base/macros.h"
#include "packager/base/memory/scoped_ptr.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// Implements pattern-based encryption/decryption.
@ -79,4 +79,4 @@ class AesPatternCryptor : public AesCryptor {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -19,7 +19,7 @@ const uint8_t kCryptByteBlock = 2u;
const uint8_t kSkipByteBlock = 1u;
} // namespace
namespace edash_packager {
namespace shaka {
namespace media {
class MockAesCryptor : public AesCryptor {
@ -220,4 +220,4 @@ TEST(SampleAesPatternCryptor, MoreThan16Bytes) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -13,7 +13,7 @@
#include "packager/base/strings/stringprintf.h"
#include "packager/media/base/limits.h"
namespace edash_packager {
namespace shaka {
namespace media {
namespace {
@ -141,4 +141,4 @@ std::string AudioStreamInfo::GetCodecString(AudioCodec codec,
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -11,7 +11,7 @@
#include "packager/media/base/stream_info.h"
namespace edash_packager {
namespace shaka {
namespace media {
enum AudioCodec {
@ -99,6 +99,6 @@ class AudioStreamInfo : public StreamInfo {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_AUDIO_STREAM_INFO_H_

View File

@ -7,7 +7,7 @@
#include "packager/base/logging.h"
#include "packager/media/base/timestamp.h"
namespace edash_packager {
namespace shaka {
namespace media {
AudioTimestampHelper::AudioTimestampHelper(uint32_t timescale,
@ -72,4 +72,4 @@ int64_t AudioTimestampHelper::ComputeTimestamp(int64_t frame_count) const {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -9,7 +9,7 @@
#include "packager/base/macros.h"
namespace edash_packager {
namespace shaka {
namespace media {
// Generates timestamps for a sequence of audio sample frames. This class should
@ -71,6 +71,6 @@ class AudioTimestampHelper {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif

View File

@ -7,7 +7,7 @@
#include "packager/media/base/audio_timestamp_helper.h"
#include "packager/media/base/timestamp.h"
namespace edash_packager {
namespace shaka {
namespace media {
static const uint32_t kDefaultSampleRate = 44100;
@ -122,4 +122,4 @@ TEST_F(AudioTimestampHelperTest, GetFramesToTarget) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -6,7 +6,7 @@
#include <algorithm>
namespace edash_packager {
namespace shaka {
namespace media {
BitReader::BitReader(const uint8_t* data, off_t size)
@ -103,4 +103,4 @@ void BitReader::UpdateCurrByte() {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -10,7 +10,7 @@
#include "packager/base/logging.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// A class to read bit streams.
@ -111,6 +111,6 @@ class BitReader {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_BIT_READER_H_

View File

@ -6,7 +6,7 @@
#include "packager/media/base/bit_reader.h"
namespace edash_packager {
namespace shaka {
namespace media {
TEST(BitReaderTest, NormalOperationTest) {
@ -89,4 +89,4 @@ TEST(BitReaderTest, SkipBitsConditionalTest) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -8,7 +8,7 @@
#include "packager/base/logging.h"
namespace edash_packager {
namespace shaka {
namespace media {
bool BufferReader::Read1(uint8_t* v) {
@ -99,4 +99,4 @@ bool BufferReader::ReadNBytes(T* v, size_t num_bytes) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -15,7 +15,7 @@
#include "packager/base/compiler_specific.h"
#include "packager/base/macros.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// A simple buffer reader implementation, which reads data of various types
@ -80,6 +80,6 @@ class BufferReader {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_BUFFER_READER_H_

View File

@ -10,7 +10,7 @@
#include "packager/base/sys_byteorder.h"
#include "packager/media/file/file.h"
namespace edash_packager {
namespace shaka {
namespace media {
BufferWriter::BufferWriter() {
@ -88,4 +88,4 @@ void BufferWriter::AppendInternal(T v) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -12,7 +12,7 @@
#include "packager/base/macros.h"
#include "packager/media/base/status.h"
namespace edash_packager {
namespace shaka {
namespace media {
class File;
@ -75,6 +75,6 @@ class BufferWriter {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_BUFFER_WRITER_H_

View File

@ -26,7 +26,7 @@ const int64_t kint64 = -10000000000LL;
const uint8_t kuint8Array[] = {10, 1, 100, 5, 3, 60};
} // namespace
namespace edash_packager {
namespace shaka {
namespace media {
class BufferWriterTest : public testing::Test {
@ -185,4 +185,4 @@ TEST_F(BufferWriterTest, WriteToFile) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -6,7 +6,7 @@
#include "packager/base/logging.h"
namespace edash_packager {
namespace shaka {
namespace media {
// Default starting size for the queue.
@ -85,4 +85,4 @@ uint8_t* ByteQueue::front() const {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -9,7 +9,7 @@
#include "packager/base/memory/scoped_ptr.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// Represents a queue of bytes.
@ -55,6 +55,6 @@ class ByteQueue {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_BYTE_QUEUE_H_

View File

@ -6,7 +6,7 @@
#include "packager/media/base/closure_thread.h"
namespace edash_packager {
namespace shaka {
namespace media {
ClosureThread::ClosureThread(
@ -22,4 +22,4 @@ ClosureThread::~ClosureThread() {
void ClosureThread::Run() { task_.Run(); }
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -10,7 +10,7 @@
#include "packager/base/callback.h"
#include "packager/base/threading/simple_thread.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// Class for creating a thread which invokes a closure.
@ -44,6 +44,6 @@ class ClosureThread : public base::SimpleThread {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_CLOSURE_THREAD_H_

View File

@ -28,7 +28,7 @@ class MockOperation {
} // namespace
namespace edash_packager {
namespace shaka {
namespace media {
class ClosureThreadTest : public ::testing::Test {
@ -121,4 +121,4 @@ TEST_F(ClosureThreadTest, DISABLED_NotStarted) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -16,7 +16,7 @@
#include "packager/media/base/bit_reader.h"
#include "packager/mpd/base/xml/scoped_xml_ptr.h"
namespace edash_packager {
namespace shaka {
namespace media {
#define TAG(a, b, c, d) \
@ -1751,4 +1751,4 @@ MediaContainerName DetermineContainerFromFileName(
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -9,7 +9,7 @@
#include <string>
namespace edash_packager {
namespace shaka {
namespace media {
/// Container formats supported by this utility function. New formats should be
@ -71,6 +71,6 @@ MediaContainerName DetermineContainerFromFormatName(
MediaContainerName DetermineContainerFromFileName(const std::string& file_name);
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_CONTAINER_NAMES_H_

View File

@ -8,7 +8,7 @@
#include "packager/media/base/container_names.h"
#include "packager/media/test/test_data_util.h"
namespace edash_packager {
namespace shaka {
namespace media {
// Using a macros to simplify tests. Since EXPECT_EQ outputs the second argument
@ -283,4 +283,4 @@ TEST(ContainerNamesTest, FileCheckUNKNOWN) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -6,7 +6,7 @@
#include "packager/base/logging.h"
namespace edash_packager {
namespace shaka {
namespace media {
DecryptConfig::DecryptConfig(const std::vector<uint8_t>& key_id,
@ -32,4 +32,4 @@ DecryptConfig::DecryptConfig(const std::vector<uint8_t>& key_id,
DecryptConfig::~DecryptConfig() {}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -13,7 +13,7 @@
#include "packager/base/memory/scoped_ptr.h"
#include "packager/media/base/fourccs.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// The Common Encryption spec provides for subsample encryption, where portions
@ -99,6 +99,6 @@ class DecryptConfig {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_DECRYPT_CONFIG_H_

View File

@ -11,7 +11,7 @@
#include "packager/media/base/aes_decryptor.h"
#include "packager/media/base/aes_pattern_cryptor.h"
namespace edash_packager {
namespace shaka {
namespace media {
DecryptorSource::DecryptorSource(KeySource* key_source)
@ -114,4 +114,4 @@ bool DecryptorSource::DecryptSampleBuffer(const DecryptConfig* decrypt_config,
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -14,7 +14,7 @@
#include "packager/media/base/decrypt_config.h"
#include "packager/media/base/key_source.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// DecryptorSource wraps KeySource and is responsible for decryptor management.
@ -35,6 +35,6 @@ class DecryptorSource {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_DECRYPTOR_SOURCE_H_

View File

@ -18,7 +18,7 @@ using ::testing::StrictMock;
using ::testing::Mock;
using ::testing::_;
namespace edash_packager {
namespace shaka {
namespace media {
namespace {
@ -170,4 +170,4 @@ TEST_F(DecryptorSourceTest, DecryptFailedIfGetKeyFailed) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -31,7 +31,7 @@ const size_t kBufSize = 0x200000; // 2MB
const size_t kQueuedSamplesLimit = 10000;
}
namespace edash_packager {
namespace shaka {
namespace media {
Demuxer::Demuxer(const std::string& file_name)
@ -234,4 +234,4 @@ void Demuxer::Cancel() {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -16,7 +16,7 @@
#include "packager/media/base/container_names.h"
#include "packager/media/base/status.h"
namespace edash_packager {
namespace shaka {
namespace media {
class Decryptor;
@ -107,6 +107,6 @@ class Demuxer {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_DEMUXER_H_

View File

@ -9,7 +9,7 @@
#include "packager/base/logging.h"
#include "packager/base/strings/string_number_conversions.h"
namespace edash_packager {
namespace shaka {
namespace media {
FixedKeySource::~FixedKeySource() {}
@ -141,4 +141,4 @@ FixedKeySource::FixedKeySource(scoped_ptr<EncryptionKey> key)
: encryption_key_(key.Pass()) {}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -13,7 +13,7 @@
#include "packager/base/memory/scoped_ptr.h"
#include "packager/media/base/key_source.h"
namespace edash_packager {
namespace shaka {
namespace media {
// Common SystemID defined by EME, which requires Key System implementations
@ -70,6 +70,6 @@ class FixedKeySource : public KeySource {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_FIXED_KEY_SOURCE_H_

View File

@ -18,7 +18,7 @@
EXPECT_EQ(decoded_, (actual)); \
} while (false)
namespace edash_packager {
namespace shaka {
namespace media {
namespace {
@ -96,4 +96,4 @@ TEST(FixedKeySourceTest, CreateFromHexStrings_Failure) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -7,7 +7,7 @@
#include <string>
namespace edash_packager {
namespace shaka {
namespace media {
enum FourCC : uint32_t {
@ -153,6 +153,6 @@ const inline std::string FourCCToString(FourCC fourcc) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // PACKAGER_MEDIA_BASE_FOURCCS_H_

View File

@ -12,7 +12,7 @@
#include "packager/base/strings/stringprintf.h"
#include "packager/base/synchronization/lock.h"
namespace edash_packager {
namespace shaka {
namespace {
const char kUserAgentString[] = "shaka-packager-http_fetcher/1.0";
@ -140,4 +140,4 @@ Status HttpKeyFetcher::FetchInternal(HttpMethod method,
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -15,7 +15,7 @@
#include "packager/media/base/key_fetcher.h"
#include "packager/media/base/status.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// A KeyFetcher implementation that retrieves keys over HTTP(s).
@ -70,6 +70,6 @@ class HttpKeyFetcher : public KeyFetcher {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_HTTP_KEY_FETCHER_H_

View File

@ -24,7 +24,7 @@ const char kExpectedPostResponse[] =
const char kDelayTwoSecs[] = "delay=2"; // This causes host to delay 2 seconds.
} // namespace
namespace edash_packager {
namespace shaka {
namespace media {
static void CheckHttpGet(const std::string& url,
@ -96,5 +96,5 @@ TEST(DISABLED_HttpKeyFetcherTest, BigTimeout) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -6,11 +6,11 @@
#include "packager/media/base/key_fetcher.h"
namespace edash_packager {
namespace shaka {
namespace media {
KeyFetcher::KeyFetcher() {}
KeyFetcher::~KeyFetcher() {}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -10,7 +10,7 @@
#include "base/macros.h"
#include "packager/media/base/status.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// Base class for fetching keys from the license service.
@ -34,7 +34,7 @@ class KeyFetcher {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_KEY_FETCHER_H_

View File

@ -8,7 +8,7 @@
#include "packager/base/logging.h"
namespace edash_packager {
namespace shaka {
namespace media {
EncryptionKey::EncryptionKey() {}
@ -47,4 +47,4 @@ std::string KeySource::TrackTypeToString(TrackType track_type) {
KeySource::KeySource() {}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -14,7 +14,7 @@
#include "packager/media/base/protection_system_specific_info.h"
#include "packager/media/base/status.h"
namespace edash_packager {
namespace shaka {
namespace media {
struct EncryptionKey {
@ -96,6 +96,6 @@ class KeySource {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_KEY_SOURCE_H_

View File

@ -7,7 +7,7 @@
#ifndef MEDIA_BASE_LIMITS_H_
#define MEDIA_BASE_LIMITS_H_
namespace edash_packager {
namespace shaka {
namespace media {
namespace limits {
@ -46,6 +46,6 @@ enum {
} // namespace limits
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_LIMITS_H_

View File

@ -16,7 +16,7 @@
#include "packager/base/memory/scoped_ptr.h"
#include "packager/media/base/container_names.h"
namespace edash_packager {
namespace shaka {
namespace media {
class KeySource;
@ -68,6 +68,6 @@ class MediaParser {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_MEDIA_PARSER_H_

View File

@ -11,7 +11,7 @@
#include "packager/base/logging.h"
#include "packager/base/strings/stringprintf.h"
namespace edash_packager {
namespace shaka {
namespace media {
MediaSample::MediaSample(const uint8_t* data,
@ -96,4 +96,4 @@ std::string MediaSample::ToString() const {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -15,7 +15,7 @@
#include "packager/base/memory/ref_counted.h"
#include "packager/base/memory/scoped_ptr.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// Class to hold a media sample.
@ -185,6 +185,6 @@ class MediaSample : public base::RefCountedThreadSafe<MediaSample> {
typedef std::deque<scoped_refptr<MediaSample> > BufferQueue;
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_MEDIA_SAMPLE_H_

View File

@ -13,7 +13,7 @@
#include "packager/media/base/muxer.h"
#include "packager/media/base/stream_info.h"
namespace edash_packager {
namespace shaka {
namespace media {
MediaStream::MediaStream(scoped_refptr<StreamInfo> info, Demuxer* demuxer)
@ -106,4 +106,4 @@ std::string MediaStream::ToString() const {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -13,7 +13,7 @@
#include "packager/base/memory/scoped_ptr.h"
#include "packager/media/base/status.h"
namespace edash_packager {
namespace shaka {
namespace media {
class Demuxer;
@ -75,6 +75,6 @@ class MediaStream {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_MEDIA_STREAM_H_

View File

@ -10,7 +10,7 @@
#include "packager/media/base/media_sample.h"
#include "packager/media/base/media_stream.h"
namespace edash_packager {
namespace shaka {
namespace media {
Muxer::Muxer(const MuxerOptions& options)
@ -115,4 +115,4 @@ Status Muxer::AddSample(const MediaStream* stream,
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -20,7 +20,7 @@
#include "packager/media/event/muxer_listener.h"
#include "packager/media/event/progress_listener.h"
namespace edash_packager {
namespace shaka {
namespace media {
class KeySource;
@ -134,6 +134,6 @@ class Muxer {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_MUXER_H_

View File

@ -7,7 +7,7 @@
#include "packager/media/base/muxer_options.h"
#include "packager/version/version.h"
namespace edash_packager {
namespace shaka {
namespace media {
MuxerOptions::MuxerOptions()
@ -22,4 +22,4 @@ MuxerOptions::MuxerOptions()
MuxerOptions::~MuxerOptions() {}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -11,7 +11,7 @@
#include <string>
namespace edash_packager {
namespace shaka {
namespace media {
/// This structure contains the list of configuration options for Muxer.
@ -83,6 +83,6 @@ struct MuxerOptions {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_MUXER_OPTIONS_H_

View File

@ -17,7 +17,7 @@
#include "packager/base/strings/stringprintf.h"
#include "packager/media/base/video_stream_info.h"
namespace edash_packager {
namespace shaka {
namespace {
bool ValidateFormatTag(const std::string& format_tag) {
DCHECK(!format_tag.empty());
@ -171,4 +171,4 @@ KeySource::TrackType GetTrackTypeForEncryption(const StreamInfo& stream_info,
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -15,7 +15,7 @@
#include "packager/media/base/key_source.h"
namespace edash_packager {
namespace shaka {
namespace media {
class StreamInfo;
@ -48,6 +48,6 @@ KeySource::TrackType GetTrackTypeForEncryption(const StreamInfo& stream_info,
uint32_t max_sd_pixels);
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_MUXER_UTIL_H_

View File

@ -8,7 +8,7 @@
#include "packager/media/base/muxer_util.h"
namespace edash_packager {
namespace shaka {
namespace media {
TEST(MuxerUtilTest, ValidateSegmentTemplate) {
@ -154,4 +154,4 @@ TEST(MuxerUtilTest, GetSegmentNameLargeTime) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -4,7 +4,7 @@
#include "packager/media/base/network_util.h"
namespace edash_packager {
namespace shaka {
namespace media {
uint32_t ntohlFromBuffer(const unsigned char* buf) {
@ -28,5 +28,5 @@ uint64_t ntohllFromBuffer(const unsigned char* buf) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -7,7 +7,7 @@
#include <stdint.h>
namespace edash_packager {
namespace shaka {
namespace media {
uint32_t ntohlFromBuffer(const unsigned char* buf);
@ -15,6 +15,6 @@ uint16_t ntohsFromBuffer(const unsigned char* buf);
uint64_t ntohllFromBuffer(const unsigned char* buf);
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_NETWORK_UTIL_H_

View File

@ -8,7 +8,7 @@
#include "packager/base/logging.h"
namespace edash_packager {
namespace shaka {
namespace media {
OffsetByteQueue::OffsetByteQueue() : buf_(NULL), size_(0), head_(0) {}
@ -63,4 +63,4 @@ void OffsetByteQueue::Sync() {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -9,7 +9,7 @@
#include "packager/media/base/byte_queue.h"
namespace edash_packager {
namespace shaka {
namespace media {
/// Wrapper around ByteQueue, which encapsulates the notion of a
@ -67,6 +67,6 @@ class OffsetByteQueue {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_OFFSET_BYTE_QUEUE_H_

View File

@ -9,7 +9,7 @@
#include "packager/base/memory/scoped_ptr.h"
#include "packager/media/base/offset_byte_queue.h"
namespace edash_packager {
namespace shaka {
namespace media {
class OffsetByteQueueTest : public testing::Test {
@ -91,4 +91,4 @@ TEST_F(OffsetByteQueueTest, Trim) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -15,7 +15,7 @@
#include "packager/base/timer/elapsed_timer.h"
#include "packager/media/base/status.h"
namespace edash_packager {
namespace shaka {
namespace media {
static const size_t kUnlimitedCapacity = 0u;
@ -315,6 +315,6 @@ void ProducerConsumerQueue<T>::SlideHeadOnCenter(size_t pos) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_PRODUCER_CONSUMER_QUEUE_H_

View File

@ -12,7 +12,7 @@
#include "packager/media/base/producer_consumer_queue.h"
#include "packager/media/base/test/status_test_util.h"
namespace edash_packager {
namespace shaka {
namespace {
const size_t kCapacity = 10u;
const int64_t kTimeout = 100; // 0.1s.
@ -364,4 +364,4 @@ INSTANTIATE_TEST_CASE_P(Operations,
::testing::Values(kPush, kPop, kPeek));
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -10,7 +10,7 @@
#include "packager/media/base/fourccs.h"
#include "packager/media/base/rcheck.h"
namespace edash_packager {
namespace shaka {
namespace media {
namespace {
@ -116,4 +116,4 @@ std::vector<uint8_t> ProtectionSystemSpecificInfo::CreateBox() const {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -13,7 +13,7 @@
#include "packager/base/logging.h"
#include "packager/media/base/buffer_reader.h"
namespace edash_packager {
namespace shaka {
namespace media {
class ProtectionSystemSpecificInfo {
@ -69,7 +69,7 @@ class ProtectionSystemSpecificInfo {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_PSSH_H_

View File

@ -9,7 +9,7 @@
#include "packager/base/macros.h"
#include "packager/media/base/protection_system_specific_info.h"
namespace edash_packager {
namespace shaka {
namespace media {
namespace {
@ -137,4 +137,4 @@ TEST_F(PsshTest, CreateBox_MakesV1Boxes) {
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -12,7 +12,7 @@
#include "packager/media/base/aes_encryptor.h"
#include "packager/media/base/rsa_key.h"
namespace edash_packager {
namespace shaka {
namespace media {
RequestSigner::RequestSigner(const std::string& signer_name)
@ -76,4 +76,4 @@ bool RsaRequestSigner::GenerateSignature(const std::string& message,
}
} // namespace media
} // namespace edash_packager
} // namespace shaka

View File

@ -11,7 +11,7 @@
#include "packager/base/memory/scoped_ptr.h"
namespace edash_packager {
namespace shaka {
namespace media {
class AesCbcEncryptor;
@ -87,6 +87,6 @@ class RsaRequestSigner : public RequestSigner {
};
} // namespace media
} // namespace edash_packager
} // namespace shaka
#endif // MEDIA_BASE_REQUEST_SIGNER_H_

Some files were not shown because too many files have changed in this diff Show More