parent
caa47e374d
commit
5c91e54b8b
|
@ -6,4 +6,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=1106817,AVERAGE-BANDWIDTH=1004632,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=1106817,AVERAGE-BANDWIDTH=1004632,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
||||||
bear-640x360-video.m3u8
|
bear-640x360-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=29.970,URI="bear-640x360-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8"
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=1106817,AVERAGE-BANDWIDTH=1004632,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=1106817,AVERAGE-BANDWIDTH=1004632,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
||||||
bear-640x360-video.m3u8
|
bear-640x360-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=29.970,URI="bear-640x360-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8"
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=1168321,AVERAGE-BANDWIDTH=1074156,CODECS="avc1.64001e,ac-3",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=1168321,AVERAGE-BANDWIDTH=1074156,CODECS="avc1.64001e,ac-3",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
||||||
bear-640x360-ac3-video.m3u8
|
bear-640x360-ac3-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=29.970,URI="bear-640x360-ac3-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-ac3-video-iframe.m3u8"
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=55555,AVERAGE-BANDWIDTH=1004632,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=55555,AVERAGE-BANDWIDTH=1004632,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
||||||
bear-640x360-video.m3u8
|
bear-640x360-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=44444,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=29.970,URI="bear-640x360-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=44444,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8"
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=1174214,AVERAGE-BANDWIDTH=1061802,CODECS="avc1.64001e,ec-3",RESOLUTION=640x360,FRAME-RATE=9.990,AUDIO="default-audio-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=1174214,AVERAGE-BANDWIDTH=1061802,CODECS="avc1.64001e,ec-3",RESOLUTION=640x360,FRAME-RATE=9.990,AUDIO="default-audio-group"
|
||||||
bear-640x360-ec3-video.m3u8
|
bear-640x360-ec3-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=218705,AVERAGE-BANDWIDTH=159315,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=9.990,URI="bear-640x360-ec3-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=218705,AVERAGE-BANDWIDTH=159315,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-ec3-video-iframe.m3u8"
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=1111200,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=1111200,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
||||||
bear-640x360-video.m3u8
|
bear-640x360-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=218705,AVERAGE-BANDWIDTH=159070,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=29.970,URI="bear-640x360-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=218705,AVERAGE-BANDWIDTH=159070,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8"
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=1111200,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=1111200,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
||||||
bear-640x360-video.m3u8
|
bear-640x360-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=218705,AVERAGE-BANDWIDTH=159070,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=29.970,URI="bear-640x360-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=218705,AVERAGE-BANDWIDTH=159070,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8"
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=1108051,AVERAGE-BANDWIDTH=1005999,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=1108051,AVERAGE-BANDWIDTH=1005999,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group"
|
||||||
bear-640x360-video.m3u8
|
bear-640x360-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=29.970,URI="bear-640x360-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8"
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=1111406,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=1111406,AVERAGE-BANDWIDTH=1009412,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group"
|
||||||
bear-640x360-video.m3u8
|
bear-640x360-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=218705,AVERAGE-BANDWIDTH=159070,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=29.970,URI="bear-640x360-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=218705,AVERAGE-BANDWIDTH=159070,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8"
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
#EXT-X-STREAM-INF:BANDWIDTH=1108051,AVERAGE-BANDWIDTH=1005999,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group"
|
#EXT-X-STREAM-INF:BANDWIDTH=1108051,AVERAGE-BANDWIDTH=1005999,CODECS="avc1.64001e,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970,AUDIO="default-audio-group",SUBTITLES="default-text-group"
|
||||||
bear-640x360-video.m3u8
|
bear-640x360-video.m3u8
|
||||||
|
|
||||||
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,FRAME-RATE=29.970,URI="bear-640x360-video-iframe.m3u8"
|
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=214292,AVERAGE-BANDWIDTH=156327,CODECS="avc1.64001e",RESOLUTION=640x360,URI="bear-640x360-video-iframe.m3u8"
|
||||||
|
|
|
@ -225,9 +225,13 @@ 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() ==
|
||||||
|
MediaPlaylist::MediaPlaylistStreamType::kVideoIFramesOnly;
|
||||||
|
if (!is_iframe_playlist) {
|
||||||
const double frame_rate = playlist.GetFrameRate();
|
const double frame_rate = playlist.GetFrameRate();
|
||||||
if (frame_rate > 0)
|
if (frame_rate > 0)
|
||||||
tag.AddFloat("FRAME-RATE", frame_rate);
|
tag.AddFloat("FRAME-RATE", frame_rate);
|
||||||
|
}
|
||||||
|
|
||||||
const std::string video_range = playlist.GetVideoRange();
|
const std::string video_range = playlist.GetVideoRange();
|
||||||
if (!video_range.empty())
|
if (!video_range.empty())
|
||||||
|
|
|
@ -212,6 +212,7 @@ TEST_F(MasterPlaylistTest, WriteMasterPlaylistOneIframePlaylist) {
|
||||||
|
|
||||||
std::unique_ptr<MockMediaPlaylist> mock_playlist =
|
std::unique_ptr<MockMediaPlaylist> mock_playlist =
|
||||||
CreateIframePlaylist("media1.m3u8", "avc1", kMaxBitrate, kAvgBitrate);
|
CreateIframePlaylist("media1.m3u8", "avc1", kMaxBitrate, kAvgBitrate);
|
||||||
|
EXPECT_CALL(*mock_playlist, GetFrameRate()).Times(0);
|
||||||
|
|
||||||
const char kBaseUrl[] = "http://myplaylistdomain.com/";
|
const char kBaseUrl[] = "http://myplaylistdomain.com/";
|
||||||
EXPECT_TRUE(master_playlist_.WriteMasterPlaylist(kBaseUrl, test_output_dir_,
|
EXPECT_TRUE(master_playlist_.WriteMasterPlaylist(kBaseUrl, test_output_dir_,
|
||||||
|
|
Loading…
Reference in New Issue