10 #include <packager/app/retired_flags.h>
14 ABSL_FLAG(std::string, profile,
"",
"This flag is deprecated. Do not use.");
15 ABSL_FLAG(
bool, single_segment,
true,
"This flag is deprecated. Do not use.");
17 webm_subsample_encryption,
19 "This flag is deprecated. Use vp9_subsample_encryption instead.");
21 availability_time_offset,
23 "This flag is deprecated. Use suggested_presentation_delay "
24 "instead which can achieve similar effect.");
25 ABSL_FLAG(std::string,
28 "This flag is deprecated. Use --enable_raw_key_encryption with "
29 "--generate_playready_pssh to generate PlayReady PSSH.");
30 ABSL_FLAG(std::string,
33 "This flag is deprecated. Use --enable_raw_key_encryption with "
34 "--generate_playready_pssh to generate PlayReady PSSH.");
36 mp4_use_decoding_timestamp_in_timeline,
38 "This flag is deprecated. Do not use.");
41 num_subsegments_per_sidx,
43 "This flag is deprecated. Use --generate_sidx_in_media_segments instead.");
45 generate_widevine_pssh,
47 "This flag is deprecated. Use --protection_systems instead.");
49 generate_playready_pssh,
51 "This flag is deprecated. Use --protection_systems instead.");
55 "This flag is deprecated. Use --protection_systems instead.");
59 "This flag is deprecated. Use --generate_static_live_mpd instead.");
65 bool InformRetiredStringFlag(
const char* flagname,
const std::string& value) {
67 fprintf(stderr,
"WARNING: %s is deprecated and ignored.\n", flagname);
71 bool InformRetiredDefaultTrueFlag(
const char* flagname,
bool value) {
73 fprintf(stderr,
"WARNING: %s is deprecated and ignored.\n", flagname);
77 bool InformRetiredDefaultFalseFlag(
const char* flagname,
bool value) {
79 fprintf(stderr,
"WARNING: %s is deprecated and ignored.\n", flagname);
83 bool InformRetiredDefaultDoubleFlag(
const char* flagname,
double value) {
85 fprintf(stderr,
"WARNING: %s is deprecated and ignored.\n", flagname);
89 bool InformRetiredDefaultInt32Flag(
const char* flagname, int32_t value) {
91 fprintf(stderr,
"WARNING: %s is deprecated and ignored.\n", flagname);
95 bool InformRetiredPsshGenerationFlag(
const char* flagname,
bool value) {
98 "WARNING: %s is deprecated and ignored. Please switch to "
99 "--protection_systems.\n",
105 bool InformRetiredGenerateStaticMpdFlag(
const char* flagname,
bool value) {
108 "WARNING: %s is deprecated and ignored. Please switch to "
109 "--generate_static_live_mpd.\n",
116 bool ValidateRetiredFlags() {
119 auto profile = absl::GetFlag(FLAGS_profile);
120 if (!InformRetiredStringFlag(
"profile", profile)) {
124 auto single_segment = absl::GetFlag(FLAGS_single_segment);
125 if (!InformRetiredDefaultTrueFlag(
"single_segment", single_segment)) {
128 auto webm_subsample_encryption =
129 absl::GetFlag(FLAGS_webm_subsample_encryption);
130 if (!InformRetiredDefaultTrueFlag(
"webm_subsample_encryption",
131 webm_subsample_encryption)) {
134 auto availability_time_offset = absl::GetFlag(FLAGS_availability_time_offset);
135 if (!InformRetiredDefaultDoubleFlag(
"availability_time_offset",
136 availability_time_offset)) {
139 auto playready_key_id = absl::GetFlag(FLAGS_playready_key_id);
140 if (!InformRetiredStringFlag(
"playready_key_id", playready_key_id)) {
143 auto playready_key = absl::GetFlag(FLAGS_playready_key);
144 if (!InformRetiredStringFlag(
"playready_key", playready_key)) {
147 auto mp4_use_decoding_timestamp_in_timeline =
148 absl::GetFlag(FLAGS_mp4_use_decoding_timestamp_in_timeline);
149 if (!InformRetiredDefaultFalseFlag(
"mp4_use_decoding_timestamp_in_timeline",
150 mp4_use_decoding_timestamp_in_timeline)) {
153 auto num_subsegments_per_sidx = absl::GetFlag(FLAGS_num_subsegments_per_sidx);
154 if (!InformRetiredDefaultInt32Flag(
"num_subsegments_per_sidx",
155 num_subsegments_per_sidx)) {
158 auto generate_widevine_pssh = absl::GetFlag(FLAGS_generate_widevine_pssh);
159 if (!InformRetiredPsshGenerationFlag(
"generate_widevine_pssh",
160 generate_widevine_pssh)) {
163 auto generate_playready_pssh = absl::GetFlag(FLAGS_generate_playready_pssh);
164 if (!InformRetiredPsshGenerationFlag(
"generate_playready_pssh",
165 generate_playready_pssh)) {
168 auto generate_common_pssh = absl::GetFlag(FLAGS_generate_common_pssh);
169 if (!InformRetiredPsshGenerationFlag(
"generate_common_pssh",
170 generate_common_pssh)) {
173 auto generate_static_mpd = absl::GetFlag(FLAGS_generate_static_mpd);
174 if (!InformRetiredGenerateStaticMpdFlag(
"generate_static_mpd",
175 generate_static_mpd)) {
All the methods that are virtual are virtual for mocking.