blob: 7e5c117f1e906feb2e3de30f98289514bd4dfaa9 [file] [log] [blame]
RUN(video.src = URL.createObjectURL(source))
EVENT(sourceopen)
RUN(sourceBuffer = source.addSourceBuffer("video/mock; codecs=mock"))
First segment has normal, monotonically increasing samples.
RUN(sourceBuffer.appendBuffer(mediaSegment))
EVENT(updateend)
EXPECTED (bufferedSamples.length == '3') OK
{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
{PTS({3/1 = 3.000000}), DTS({3/1 = 3.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
Second, overlapping segment has out-of-display-order samples. This append should replace the last sample from the previous append.
RUN(sourceBuffer.appendBuffer(mediaSegment))
EVENT(updateend)
EXPECTED (bufferedSamples.length == '3') OK
{PTS({1/1 = 1.000000}), DTS({1/1 = 1.000000}), duration({1/1 = 1.000000}), flags(1), generation(0)}
{PTS({2/1 = 2.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(0), generation(0)}
{PTS({4/1 = 4.000000}), DTS({2/1 = 2.000000}), duration({1/1 = 1.000000}), flags(1), generation(1)}
END OF TEST