Change --generate_static_mpd to --generate_static_live_mpd (#672)
This commit is contained in:
parent
981515e6c8
commit
0b53b40428
|
@ -1,7 +1,7 @@
|
|||
DASH options
|
||||
^^^^^^^^^^^^
|
||||
|
||||
--generate_static_mpd
|
||||
--generate_static_live_mpd
|
||||
|
||||
If enabled, generates static mpd. If segment_template is specified in
|
||||
stream descriptors, shaka-packager generates dynamic mpd by default; if
|
||||
|
|
|
@ -34,7 +34,7 @@ respectively.
|
|||
'in=h264_main_720p_3000.mp4,stream=video,init_segment=h264_720p/init.mp4,segment_template=h264_720p/$Number$.m4s' \
|
||||
'in=h264_high_1080p_6000.mp4,stream=video,init_segment=h264_1080p/init.mp4,segment_template=h264_1080p/$Number$.m4s' \
|
||||
--ad_cues 600;1800;3000 \
|
||||
--generate_static_mpd --mpd_output h264.mpd
|
||||
--generate_static_live_mpd --mpd_output h264.mpd
|
||||
|
||||
* DASH with on-demand profile::
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ genereated with the previous command.
|
|||
'in=h264_main_480p_1000.mp4,stream=video,init_segment=h264_480p/init.mp4,segment_template=h264_480p/$Number$.m4s' \
|
||||
'in=h264_main_720p_3000.mp4,stream=video,init_segment=h264_720p/init.mp4,segment_template=h264_720p/$Number$.m4s' \
|
||||
'in=h264_high_1080p_6000.mp4,stream=video,init_segment=h264_1080p/init.mp4,segment_template=h264_1080p/$Number$.m4s' \
|
||||
--generate_static_mpd --mpd_output h264.mpd
|
||||
--generate_static_live_mpd --mpd_output h264.mpd
|
||||
|
||||
The above packaging command creates five groups of segments (each with an init
|
||||
segment and a series of media segments) for the five streams and a manifest,
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
|
||||
#include "packager/app/mpd_flags.h"
|
||||
|
||||
// TODO(kqyang): Rename to generate_static_live_mpd.
|
||||
DEFINE_bool(generate_static_mpd,
|
||||
DEFINE_bool(generate_static_live_mpd,
|
||||
false,
|
||||
"Set to true to generate static mpd. If segment_template is "
|
||||
"specified in stream descriptors, shaka-packager generates dynamic "
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include <gflags/gflags.h>
|
||||
|
||||
DECLARE_bool(generate_static_mpd);
|
||||
DECLARE_bool(generate_static_live_mpd);
|
||||
DECLARE_bool(output_media_info);
|
||||
DECLARE_string(mpd_output);
|
||||
DECLARE_string(base_urls);
|
||||
|
|
|
@ -452,7 +452,7 @@ base::Optional<PackagingParams> GetPackagingParams() {
|
|||
|
||||
mpd_params.default_language = FLAGS_default_language;
|
||||
mpd_params.default_text_language = FLAGS_default_text_language;
|
||||
mpd_params.generate_static_live_mpd = FLAGS_generate_static_mpd;
|
||||
mpd_params.generate_static_live_mpd = FLAGS_generate_static_live_mpd;
|
||||
mpd_params.generate_dash_if_iop_compliant_mpd =
|
||||
FLAGS_generate_dash_if_iop_compliant_mpd;
|
||||
mpd_params.allow_approximate_segment_timeline =
|
||||
|
|
|
@ -44,6 +44,9 @@ DEFINE_bool(generate_playready_pssh,
|
|||
DEFINE_bool(generate_common_pssh,
|
||||
false,
|
||||
"This flag is deprecated. Use --protection_systems instead.");
|
||||
DEFINE_bool(generate_static_mpd,
|
||||
false,
|
||||
"This flag is deprecated. Use --generate_static_live_mpd instead.");
|
||||
|
||||
// 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,
|
||||
|
@ -89,6 +92,16 @@ bool InformRetiredPsshGenerationFlag(const char* flagname, bool value) {
|
|||
return true;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
DEFINE_validator(profile, &InformRetiredStringFlag);
|
||||
DEFINE_validator(single_segment, &InformRetiredDefaultTrueFlag);
|
||||
DEFINE_validator(webm_subsample_encryption, &InformRetiredDefaultTrueFlag);
|
||||
|
@ -101,3 +114,4 @@ DEFINE_validator(num_subsegments_per_sidx, &InformRetiredDefaultInt32Flag);
|
|||
DEFINE_validator(generate_widevine_pssh, &InformRetiredPsshGenerationFlag);
|
||||
DEFINE_validator(generate_playready_pssh, &InformRetiredPsshGenerationFlag);
|
||||
DEFINE_validator(generate_common_pssh, &InformRetiredPsshGenerationFlag);
|
||||
DEFINE_validator(generate_static_mpd, &InformRetiredGenerateStaticMpdFlag);
|
||||
|
|
|
@ -431,7 +431,7 @@ class PackagerAppTest(unittest.TestCase):
|
|||
time_shift_buffer_depth=0.0,
|
||||
preserved_segments_outside_live_window=0,
|
||||
utc_timings=None,
|
||||
generate_static_mpd=False,
|
||||
generate_static_live_mpd=False,
|
||||
ad_cues=None,
|
||||
default_language=None,
|
||||
segment_duration=1.0,
|
||||
|
@ -508,8 +508,8 @@ class PackagerAppTest(unittest.TestCase):
|
|||
if utc_timings:
|
||||
flags += ['--utc_timings', utc_timings]
|
||||
|
||||
if generate_static_mpd:
|
||||
flags += ['--generate_static_mpd']
|
||||
if generate_static_live_mpd:
|
||||
flags += ['--generate_static_live_mpd']
|
||||
|
||||
if ad_cues:
|
||||
flags += ['--ad_cues', ad_cues]
|
||||
|
@ -1091,7 +1091,7 @@ class PackagerFunctionalTest(PackagerAppTest):
|
|||
output_format='mp4')
|
||||
]
|
||||
flags = self._GetFlags(output_dash=True, output_hls=True,
|
||||
generate_static_mpd=True, ad_cues='1.5')
|
||||
generate_static_live_mpd=True, ad_cues='1.5')
|
||||
self.assertPackageSuccess(streams, flags)
|
||||
# Mpd cannot be validated right now since we don't generate determinstic
|
||||
# mpd with multiple inputs due to thread racing.
|
||||
|
@ -1442,7 +1442,7 @@ class PackagerFunctionalTest(PackagerAppTest):
|
|||
def testLiveStaticProfile(self):
|
||||
self.assertPackageSuccess(
|
||||
self._GetStreams(['audio', 'video'], segmented=True),
|
||||
self._GetFlags(output_dash=True, generate_static_mpd=True))
|
||||
self._GetFlags(output_dash=True, generate_static_live_mpd=True))
|
||||
self._CheckTestResults('live-static-profile')
|
||||
|
||||
def testLiveStaticProfileWithTimeInSegmentName(self):
|
||||
|
@ -1450,7 +1450,7 @@ class PackagerFunctionalTest(PackagerAppTest):
|
|||
self._GetStreams(['audio', 'video'],
|
||||
segmented=True,
|
||||
using_time_specifier=True),
|
||||
self._GetFlags(output_dash=True, generate_static_mpd=True))
|
||||
self._GetFlags(output_dash=True, generate_static_live_mpd=True))
|
||||
self._CheckTestResults('live-static-profile-with-time-in-segment-name')
|
||||
|
||||
def testLiveProfileAndEncryption(self):
|
||||
|
|
Loading…
Reference in New Issue