Skip to content

Commit

Permalink
Add generate_dash_if_iop_compliant_mpd flag for the driver
Browse files Browse the repository at this point in the history
Change-Id: I0ad320848ad6eb36dfe358fe858a3d5f1f42dbcf
  • Loading branch information
Rintaro Kuroiwa committed Aug 18, 2015
1 parent bb8cf87 commit 869d7f4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions packager/app/mpd_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ DEFINE_double(suggested_presentation_delay,
0.0,
"Specifies a delay, in seconds, to be added to the media "
"presentation time. This value is used for live profile only.");
DEFINE_bool(generate_dash_if_iop_compliant_mpd,
false,
"Try to generate DASH-IF IOPv3 compliant MPD. This is best effort "
"and does not guarantee compliance. Off by default until players "
"support IOP MPDs.");
1 change: 1 addition & 0 deletions packager/app/mpd_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ DECLARE_double(minimum_update_period);
DECLARE_double(min_buffer_time);
DECLARE_double(time_shift_buffer_depth);
DECLARE_double(suggested_presentation_delay);
DECLARE_bool(generate_dash_if_iop_compliant_mpd);

#endif // APP_MPD_FLAGS_H_
10 changes: 8 additions & 2 deletions packager/app/packager_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "packager/media/event/mpd_notify_muxer_listener.h"
#include "packager/media/event/vod_media_info_dump_muxer_listener.h"
#include "packager/media/formats/mp4/mp4_muxer.h"
#include "packager/mpd/base/dash_iop_mpd_notifier.h"
#include "packager/mpd/base/mpd_builder.h"
#include "packager/mpd/base/simple_mpd_notifier.h"

Expand Down Expand Up @@ -258,8 +259,13 @@ bool RunPackager(const StreamDescriptorList& stream_descriptors) {
FLAGS_single_segment ? kOnDemandProfile : kLiveProfile;
std::vector<std::string> base_urls;
base::SplitString(FLAGS_base_urls, ',', &base_urls);
mpd_notifier.reset(new SimpleMpdNotifier(profile, mpd_options, base_urls,
FLAGS_mpd_output));
if (FLAGS_generate_dash_if_iop_compliant_mpd) {
mpd_notifier.reset(new DashIopMpdNotifier(profile, mpd_options, base_urls,
FLAGS_mpd_output));
} else {
mpd_notifier.reset(new SimpleMpdNotifier(profile, mpd_options, base_urls,
FLAGS_mpd_output));
}
if (!mpd_notifier->Init()) {
LOG(ERROR) << "MpdNotifier failed to initialize.";
return false;
Expand Down

0 comments on commit 869d7f4

Please sign in to comment.