Move common manifest flags out of mpd_flags.cc

Also updated documentations.

Fixes #304

Change-Id: I5e8e87b005ebfa9dc78d47e2501585b083120f6c
This commit is contained in:
KongQun Yang 2018-01-18 11:26:47 -08:00
parent 3c30ec3a11
commit d9871330e7
8 changed files with 54 additions and 20 deletions

View File

@ -28,18 +28,18 @@ DASH options
Indicates to the player how often to refresh the media presentation Indicates to the player how often to refresh the media presentation
description in seconds. This value is used for dynamic MPD only. description in seconds. This value is used for dynamic MPD only.
--time_shift_buffer_depth <seconds>
Guaranteed duration of the time shifting buffer for dynamic media
presentations, in seconds.
--suggested_presentation_delay <seconds> --suggested_presentation_delay <seconds>
Specifies a delay, in seconds, to be added to the media presentation time. Specifies a delay, in seconds, to be added to the media presentation time.
This value is used for dynamic MPD only. This value is used for dynamic MPD only.
--time_shift_buffer_depth <seconds>
Guaranteed duration of the time shifting buffer for dynamic media
presentations, in seconds.
--default_language <language> --default_language <language>
Any tracks tagged with this language will have <Role ... value=\"main\" /> Any audio/text tracks tagged with this language will have
in the manifest. This allows the player to choose the correct default <Role ... value=\"main\" /> in the manifest. This allows the player to
language for the content. choose the correct default language for the content.

View File

@ -24,5 +24,11 @@ HLS options
--time_shift_buffer_depth <seconds> --time_shift_buffer_depth <seconds>
Guaranteed duration of the time shifting buffer for LIVE playlist, in Guaranteed duration of the time shifting buffer for LIVE playlists, in
seconds. seconds.
--default_language <language>
The first audio/text rendition in a group tagged with this language will
have 'DEFAULT' attribute set to 'YES'. This allows the player to choose the
correct default language for the content.

View File

@ -0,0 +1,19 @@
// Copyright 2018 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
#include "packager/app/manifest_flags.h"
DEFINE_double(time_shift_buffer_depth,
1800.0,
"Guaranteed duration of the time shifting buffer for HLS LIVE "
"playlists and DASH dynamic media presentations, in seconds.");
DEFINE_string(default_language,
"",
"For DASH, any audio/text tracks tagged with this language will "
"have <Role ... value=\"main\" /> in the manifest; For HLS, the "
"first audio/text rendition in a group tagged with this language "
"will have 'DEFAULT' attribute set to 'YES'. This allows the "
"player to choose the correct default language for the content.");

View File

@ -0,0 +1,17 @@
// Copyright 2018 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
//
// Common flags applicable to both DASH and HLS.
#ifndef PACKAGER_APP_MANIFEST_FLAGS_H_
#define PACKAGER_APP_MANIFEST_FLAGS_H_
#include <gflags/gflags.h>
DECLARE_double(time_shift_buffer_depth);
DECLARE_string(default_language);
#endif // PACKAGER_APP_MANIFEST_FLAGS_H_

View File

@ -39,19 +39,10 @@ DEFINE_double(minimum_update_period,
"Indicates to the player how often to refresh the media " "Indicates to the player how often to refresh the media "
"presentation description in seconds. This value is used for " "presentation description in seconds. This value is used for "
"dynamic MPD only."); "dynamic MPD only.");
DEFINE_double(time_shift_buffer_depth,
1800.0,
"Guaranteed duration of the time shifting buffer for dynamic "
"media presentations, in seconds.");
DEFINE_double(suggested_presentation_delay, DEFINE_double(suggested_presentation_delay,
0.0, 0.0,
"Specifies a delay, in seconds, to be added to the media " "Specifies a delay, in seconds, to be added to the media "
"presentation time. This value is used for dynamic MPD only."); "presentation time. This value is used for dynamic MPD only.");
DEFINE_string(default_language,
"",
"Any tracks tagged with this language will have "
"<Role ... value=\"main\" /> in the manifest. This allows the "
"player to choose the correct default language for the content.");
DEFINE_bool(generate_dash_if_iop_compliant_mpd, DEFINE_bool(generate_dash_if_iop_compliant_mpd,
true, true,
"Try to generate DASH-IF IOP compliant MPD. This is best effort " "Try to generate DASH-IF IOP compliant MPD. This is best effort "

View File

@ -17,9 +17,7 @@ DECLARE_string(mpd_output);
DECLARE_string(base_urls); DECLARE_string(base_urls);
DECLARE_double(minimum_update_period); DECLARE_double(minimum_update_period);
DECLARE_double(min_buffer_time); DECLARE_double(min_buffer_time);
DECLARE_double(time_shift_buffer_depth);
DECLARE_double(suggested_presentation_delay); DECLARE_double(suggested_presentation_delay);
DECLARE_string(default_language);
DECLARE_bool(generate_dash_if_iop_compliant_mpd); DECLARE_bool(generate_dash_if_iop_compliant_mpd);
#endif // APP_MPD_FLAGS_H_ #endif // APP_MPD_FLAGS_H_

View File

@ -10,6 +10,7 @@
#include "packager/app/ad_cue_generator_flags.h" #include "packager/app/ad_cue_generator_flags.h"
#include "packager/app/crypto_flags.h" #include "packager/app/crypto_flags.h"
#include "packager/app/hls_flags.h" #include "packager/app/hls_flags.h"
#include "packager/app/manifest_flags.h"
#include "packager/app/mpd_flags.h" #include "packager/app/mpd_flags.h"
#include "packager/app/muxer_flags.h" #include "packager/app/muxer_flags.h"
#include "packager/app/packager_util.h" #include "packager/app/packager_util.h"

View File

@ -70,6 +70,8 @@
'app/gflags_hex_bytes.h', 'app/gflags_hex_bytes.h',
'app/hls_flags.cc', 'app/hls_flags.cc',
'app/hls_flags.h', 'app/hls_flags.h',
'app/manifest_flags.cc',
'app/manifest_flags.h',
'app/mpd_flags.cc', 'app/mpd_flags.cc',
'app/mpd_flags.h', 'app/mpd_flags.h',
'app/muxer_flags.cc', 'app/muxer_flags.cc',