Fix TTML codec string in HLS.
Issue #903 Change-Id: I1f73d16ad79c2593996d7d50f9556984302fe21e
This commit is contained in:
parent
025e10de69
commit
f0a52cbbf2
|
@ -85,6 +85,13 @@ std::set<std::string> GetGroupCodecString(
|
||||||
if (wvtt != codecs.end()) {
|
if (wvtt != codecs.end()) {
|
||||||
codecs.erase(wvtt);
|
codecs.erase(wvtt);
|
||||||
}
|
}
|
||||||
|
// TTML is specified using 'stpp.ttml.im1t'; see section 5.10 of
|
||||||
|
// https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices
|
||||||
|
auto ttml = codecs.find("ttml");
|
||||||
|
if (ttml != codecs.end()) {
|
||||||
|
codecs.erase(ttml);
|
||||||
|
codecs.insert("stpp.ttml.im1t");
|
||||||
|
}
|
||||||
|
|
||||||
return codecs;
|
return codecs;
|
||||||
}
|
}
|
||||||
|
@ -225,8 +232,9 @@ void BuildStreamInfTag(const MediaPlaylist& playlist,
|
||||||
|
|
||||||
// Right now the frame-rate returned may not be accurate in some scenarios.
|
// Right now the frame-rate returned may not be accurate in some scenarios.
|
||||||
// TODO(kqyang): Fix frame-rate computation.
|
// TODO(kqyang): Fix frame-rate computation.
|
||||||
const bool is_iframe_playlist = playlist.stream_type() ==
|
const bool is_iframe_playlist =
|
||||||
MediaPlaylist::MediaPlaylistStreamType::kVideoIFramesOnly;
|
playlist.stream_type() ==
|
||||||
|
MediaPlaylist::MediaPlaylistStreamType::kVideoIFramesOnly;
|
||||||
if (!is_iframe_playlist) {
|
if (!is_iframe_playlist) {
|
||||||
const double frame_rate = playlist.GetFrameRate();
|
const double frame_rate = playlist.GetFrameRate();
|
||||||
if (frame_rate > 0)
|
if (frame_rate > 0)
|
||||||
|
@ -486,7 +494,7 @@ bool MasterPlaylist::WriteMasterPlaylist(
|
||||||
const std::list<MediaPlaylist*>& playlists) {
|
const std::list<MediaPlaylist*>& playlists) {
|
||||||
std::string content = "#EXTM3U\n";
|
std::string content = "#EXTM3U\n";
|
||||||
AppendVersionString(&content);
|
AppendVersionString(&content);
|
||||||
|
|
||||||
if (is_independent_segments_) {
|
if (is_independent_segments_) {
|
||||||
content.append("\n#EXT-X-INDEPENDENT-SEGMENTS\n");
|
content.append("\n#EXT-X-INDEPENDENT-SEGMENTS\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue