2017-01-07 02:40:37 +00:00
|
|
|
// Copyright 2017 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
//
|
|
|
|
// Defines retired / deprecated flags. These flags will be removed in later
|
|
|
|
// versions.
|
|
|
|
|
|
|
|
#include "packager/app/retired_flags.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
DEFINE_string(profile, "", "This flag is deprecated. Do not use.");
|
|
|
|
DEFINE_bool(single_segment, true, "This flag is deprecated. Do not use.");
|
2017-03-28 15:19:15 +00:00
|
|
|
DEFINE_bool(webm_subsample_encryption,
|
|
|
|
true,
|
|
|
|
"This flag is deprecated. Use vp9_subsample_encryption instead.");
|
2017-05-12 21:46:24 +00:00
|
|
|
DEFINE_double(availability_time_offset,
|
2017-06-01 21:55:16 +00:00
|
|
|
0,
|
2017-05-12 21:46:24 +00:00
|
|
|
"This flag is deprecated. Use suggested_presentation_delay "
|
|
|
|
"instead which can achieve similar effect.");
|
2018-04-20 17:46:14 +00:00
|
|
|
DEFINE_string(playready_key_id,
|
|
|
|
"",
|
|
|
|
"This flag is deprecated. Use --enable_raw_key_encryption with "
|
|
|
|
"--generate_playready_pssh to generate PlayReady PSSH.");
|
|
|
|
DEFINE_string(playready_key,
|
|
|
|
"",
|
|
|
|
"This flag is deprecated. Use --enable_raw_key_encryption with "
|
|
|
|
"--generate_playready_pssh to generate PlayReady PSSH.");
|
2018-06-13 23:50:16 +00:00
|
|
|
DEFINE_bool(mp4_use_decoding_timestamp_in_timeline,
|
|
|
|
false,
|
|
|
|
"This flag is deprecated. Do not use.");
|
2018-06-15 18:59:02 +00:00
|
|
|
DEFINE_int32(
|
|
|
|
num_subsegments_per_sidx,
|
|
|
|
0,
|
|
|
|
"This flag is deprecated. Use --generate_sidx_in_media_segments instead.");
|
2018-08-10 20:31:17 +00:00
|
|
|
DEFINE_bool(generate_widevine_pssh,
|
|
|
|
false,
|
|
|
|
"This flag is deprecated. Use --protection_systems instead.");
|
|
|
|
DEFINE_bool(generate_playready_pssh,
|
|
|
|
false,
|
|
|
|
"This flag is deprecated. Use --protection_systems instead.");
|
|
|
|
DEFINE_bool(generate_common_pssh,
|
|
|
|
false,
|
|
|
|
"This flag is deprecated. Use --protection_systems instead.");
|
2019-11-15 19:53:47 +00:00
|
|
|
DEFINE_bool(generate_static_mpd,
|
|
|
|
false,
|
|
|
|
"This flag is deprecated. Use --generate_static_live_mpd instead.");
|
2017-01-07 02:40:37 +00:00
|
|
|
|
|
|
|
// The current gflags library does not provide a way to check whether a flag is
|
|
|
|
// set in command line. If a flag has a different value to its default value,
|
|
|
|
// the flag must have been set. It is possible that the flag is set to the same
|
|
|
|
// value as its default value though.
|
|
|
|
bool InformRetiredStringFlag(const char* flagname, const std::string& value) {
|
|
|
|
if (!value.empty())
|
|
|
|
fprintf(stderr, "WARNING: %s is deprecated and ignored.\n", flagname);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool InformRetiredDefaultTrueFlag(const char* flagname, bool value) {
|
|
|
|
if (!value)
|
|
|
|
fprintf(stderr, "WARNING: %s is deprecated and ignored.\n", flagname);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2018-06-13 23:50:16 +00:00
|
|
|
bool InformRetiredDefaultFalseFlag(const char* flagname, bool value) {
|
|
|
|
if (value)
|
|
|
|
fprintf(stderr, "WARNING: %s is deprecated and ignored.\n", flagname);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2017-05-12 21:46:24 +00:00
|
|
|
bool InformRetiredDefaultDoubleFlag(const char* flagname, double value) {
|
|
|
|
if (value != 0)
|
|
|
|
fprintf(stderr, "WARNING: %s is deprecated and ignored.\n", flagname);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2018-06-15 18:59:02 +00:00
|
|
|
bool InformRetiredDefaultInt32Flag(const char* flagname, int32_t value) {
|
|
|
|
if (value != 0)
|
|
|
|
fprintf(stderr, "WARNING: %s is deprecated and ignored.\n", flagname);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2018-08-06 23:12:19 +00:00
|
|
|
bool InformRetiredPsshGenerationFlag(const char* flagname, bool value) {
|
|
|
|
if (value) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"WARNING: %s is deprecated and ignored. Please switch to "
|
2018-08-10 20:31:17 +00:00
|
|
|
"--protection_systems.\n",
|
2018-08-06 23:12:19 +00:00
|
|
|
flagname);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2019-11-15 19:53:47 +00:00
|
|
|
bool InformRetiredGenerateStaticMpdFlag(const char* flagname, bool value) {
|
|
|
|
if (value) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"WARNING: %s is deprecated and ignored. Please switch to "
|
|
|
|
"--generate_static_live_mpd.\n",
|
|
|
|
flagname);
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2017-01-07 02:40:37 +00:00
|
|
|
DEFINE_validator(profile, &InformRetiredStringFlag);
|
|
|
|
DEFINE_validator(single_segment, &InformRetiredDefaultTrueFlag);
|
2017-03-28 15:19:15 +00:00
|
|
|
DEFINE_validator(webm_subsample_encryption, &InformRetiredDefaultTrueFlag);
|
2017-05-12 21:46:24 +00:00
|
|
|
DEFINE_validator(availability_time_offset, &InformRetiredDefaultDoubleFlag);
|
2018-04-20 17:46:14 +00:00
|
|
|
DEFINE_validator(playready_key_id, &InformRetiredStringFlag);
|
|
|
|
DEFINE_validator(playready_key, &InformRetiredStringFlag);
|
2018-06-13 23:50:16 +00:00
|
|
|
DEFINE_validator(mp4_use_decoding_timestamp_in_timeline,
|
|
|
|
&InformRetiredDefaultFalseFlag);
|
2018-06-15 18:59:02 +00:00
|
|
|
DEFINE_validator(num_subsegments_per_sidx, &InformRetiredDefaultInt32Flag);
|
2018-08-06 23:12:19 +00:00
|
|
|
DEFINE_validator(generate_widevine_pssh, &InformRetiredPsshGenerationFlag);
|
|
|
|
DEFINE_validator(generate_playready_pssh, &InformRetiredPsshGenerationFlag);
|
|
|
|
DEFINE_validator(generate_common_pssh, &InformRetiredPsshGenerationFlag);
|
2019-11-15 19:53:47 +00:00
|
|
|
DEFINE_validator(generate_static_mpd, &InformRetiredGenerateStaticMpdFlag);
|