Rename shaka::ShakaPackager to shaka::Packager
Change-Id: I493d3a6cf4c27615d1515de7c43dc3c5b8e3224e
This commit is contained in:
parent
26d39db0e7
commit
096c22ee63
|
@ -308,7 +308,7 @@ int PackagerMain(int argc, char** argv) {
|
|||
log_settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
|
||||
CHECK(logging::InitLogging(log_settings));
|
||||
|
||||
google::SetVersionString(shaka::ShakaPackager::GetLibraryVersion());
|
||||
google::SetVersionString(shaka::Packager::GetLibraryVersion());
|
||||
google::SetUsageMessage(base::StringPrintf(kUsage, argv[0]));
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
if (argc < 2) {
|
||||
|
@ -333,7 +333,7 @@ int PackagerMain(int argc, char** argv) {
|
|||
return kArgumentValidationFailed;
|
||||
stream_descriptors.push_back(stream_descriptor.value());
|
||||
}
|
||||
ShakaPackager packager;
|
||||
Packager packager;
|
||||
media::Status status =
|
||||
packager.Initialize(packaging_params.value(), stream_descriptors);
|
||||
if (!status.ok()) {
|
||||
|
|
|
@ -557,7 +557,7 @@ std::string EncryptionParams::DefaultStreamLabelFunction(
|
|||
return "";
|
||||
}
|
||||
|
||||
struct ShakaPackager::PackagerInternal {
|
||||
struct Packager::PackagerInternal {
|
||||
media::FakeClock fake_clock;
|
||||
std::unique_ptr<KeySource> encryption_key_source;
|
||||
std::unique_ptr<MpdNotifier> mpd_notifier;
|
||||
|
@ -565,11 +565,11 @@ struct ShakaPackager::PackagerInternal {
|
|||
std::vector<std::unique_ptr<media::RemuxJob>> remux_jobs;
|
||||
};
|
||||
|
||||
ShakaPackager::ShakaPackager() {}
|
||||
Packager::Packager() {}
|
||||
|
||||
ShakaPackager::~ShakaPackager() {}
|
||||
Packager::~Packager() {}
|
||||
|
||||
Status ShakaPackager::Initialize(
|
||||
Status Packager::Initialize(
|
||||
const PackagingParams& packaging_params,
|
||||
const std::vector<StreamDescriptor>& stream_descriptors) {
|
||||
// Needed by base::WorkedPool used in ThreadedIoFile.
|
||||
|
@ -654,7 +654,7 @@ Status ShakaPackager::Initialize(
|
|||
return Status::OK;
|
||||
}
|
||||
|
||||
Status ShakaPackager::Run() {
|
||||
Status Packager::Run() {
|
||||
if (!internal_)
|
||||
return Status(error::INVALID_ARGUMENT, "Not yet initialized.");
|
||||
Status status = media::RunRemuxJobs(internal_->remux_jobs);
|
||||
|
@ -672,7 +672,7 @@ Status ShakaPackager::Run() {
|
|||
return Status::OK;
|
||||
}
|
||||
|
||||
void ShakaPackager::Cancel() {
|
||||
void Packager::Cancel() {
|
||||
if (!internal_) {
|
||||
LOG(INFO) << "Not yet initialized. Return directly.";
|
||||
return;
|
||||
|
@ -681,7 +681,7 @@ void ShakaPackager::Cancel() {
|
|||
job->demuxer()->Cancel();
|
||||
}
|
||||
|
||||
std::string ShakaPackager::GetLibraryVersion() {
|
||||
std::string Packager::GetLibraryVersion() {
|
||||
return GetPackagerVersion();
|
||||
}
|
||||
|
||||
|
|
|
@ -432,10 +432,10 @@ struct StreamDescriptor {
|
|||
std::string hls_playlist_name;
|
||||
};
|
||||
|
||||
class SHAKA_EXPORT ShakaPackager {
|
||||
class SHAKA_EXPORT Packager {
|
||||
public:
|
||||
ShakaPackager();
|
||||
~ShakaPackager();
|
||||
Packager();
|
||||
~Packager();
|
||||
|
||||
/// Initialize packaging pipeline.
|
||||
/// @param packaging_params contains the packaging parameters.
|
||||
|
@ -457,8 +457,8 @@ class SHAKA_EXPORT ShakaPackager {
|
|||
static std::string GetLibraryVersion();
|
||||
|
||||
private:
|
||||
ShakaPackager(const ShakaPackager&) = delete;
|
||||
ShakaPackager& operator=(const ShakaPackager&) = delete;
|
||||
Packager(const Packager&) = delete;
|
||||
Packager& operator=(const Packager&) = delete;
|
||||
|
||||
struct PackagerInternal;
|
||||
std::unique_ptr<PackagerInternal> internal_;
|
||||
|
|
|
@ -94,11 +94,11 @@ class PackagerTest : public ::testing::Test {
|
|||
};
|
||||
|
||||
TEST_F(PackagerTest, Version) {
|
||||
EXPECT_FALSE(ShakaPackager::GetLibraryVersion().empty());
|
||||
EXPECT_FALSE(Packager::GetLibraryVersion().empty());
|
||||
}
|
||||
|
||||
TEST_F(PackagerTest, Success) {
|
||||
ShakaPackager packager;
|
||||
Packager packager;
|
||||
ASSERT_TRUE(
|
||||
packager.Initialize(SetupPackagingParams(), SetupStreamDescriptors())
|
||||
.ok());
|
||||
|
@ -107,7 +107,7 @@ TEST_F(PackagerTest, Success) {
|
|||
|
||||
TEST_F(PackagerTest, MissingStreamDescriptors) {
|
||||
std::vector<StreamDescriptor> stream_descriptors;
|
||||
ShakaPackager packager;
|
||||
Packager packager;
|
||||
auto status = packager.Initialize(SetupPackagingParams(), stream_descriptors);
|
||||
ASSERT_EQ(media::error::INVALID_ARGUMENT, status.error_code());
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ TEST_F(PackagerTest, MixingSegmentTemplateAndSingleSegment) {
|
|||
stream_descriptor.segment_template.clear();
|
||||
stream_descriptors.push_back(stream_descriptor);
|
||||
|
||||
ShakaPackager packager;
|
||||
Packager packager;
|
||||
auto status = packager.Initialize(SetupPackagingParams(), stream_descriptors);
|
||||
ASSERT_EQ(media::error::INVALID_ARGUMENT, status.error_code());
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ TEST_F(PackagerTest, SegmentAlignedAndSubsegmentNotAligned) {
|
|||
auto packaging_params = SetupPackagingParams();
|
||||
packaging_params.chunking_params.segment_sap_aligned = true;
|
||||
packaging_params.chunking_params.subsegment_sap_aligned = false;
|
||||
ShakaPackager packager;
|
||||
Packager packager;
|
||||
ASSERT_TRUE(
|
||||
packager.Initialize(packaging_params, SetupStreamDescriptors()).ok());
|
||||
ASSERT_TRUE(packager.Run().ok());
|
||||
|
@ -147,7 +147,7 @@ TEST_F(PackagerTest, SegmentNotAlignedButSubsegmentAligned) {
|
|||
auto packaging_params = SetupPackagingParams();
|
||||
packaging_params.chunking_params.segment_sap_aligned = false;
|
||||
packaging_params.chunking_params.subsegment_sap_aligned = true;
|
||||
ShakaPackager packager;
|
||||
Packager packager;
|
||||
auto status = packager.Initialize(packaging_params, SetupStreamDescriptors());
|
||||
ASSERT_EQ(media::error::INVALID_ARGUMENT, status.error_code());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue