Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3ae8ab127a94eb5a0e874cc41f4d353cfcdbda22
      
https://github.com/WebKit/WebKit/commit/3ae8ab127a94eb5a0e874cc41f4d353cfcdbda22
  Author: Xabier Rodriguez-Calvar <[email protected]>
  Date:   2022-09-23 (Fri, 23 Sep 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    A 
LayoutTests/media/encrypted-media/encrypted-media-append-encrypted-unencrypted-expected.txt
    A 
LayoutTests/media/encrypted-media/encrypted-media-append-encrypted-unencrypted.html
    M LayoutTests/media/encrypted-media/medias-enc.js
    M LayoutTests/media/media-source/media-source-loader-simple.js
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
    M Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h

  Log Message:
  -----------
  [GStreamer][MSE] Parser should be replaced when caps change in the append 
pipeline
https://bugs.webkit.org/show_bug.cgi?id=245518

Reviewed by Philippe Normand.

In the cases of some transitions, for example from unencrypted to encrypted 
content,
the demuxer creates a new pad that we try to link to the the existing track
but the parser won't link with those new caps so we need to replace it.
This patch ensures that, when unlinking and relinking, we have the right parser 
by
removing the old one and creating a new one for the given caps.

Test: media/encrypted-media/encrypted-media-append-encrypted-unencrypted.html.

For the test we are using the media-source-loader-simple but it was needed to 
enhance it
to be able to apply timestamp offsets and so to be able to wait until
all appends are done before checking the final result. In this case, it's the 
duration.

* LayoutTests/TestExpectations:
* 
LayoutTests/media/encrypted-media/encrypted-media-append-encrypted-unencrypted-expected.txt:
 Added.
* 
LayoutTests/media/encrypted-media/encrypted-media-append-encrypted-unencrypted.html:
 Added.
* LayoutTests/media/encrypted-media/medias-enc.js:
* LayoutTests/media/media-source/media-source-loader-simple.js:
(SourceBufferLoaderSimple):
(SourceBufferLoaderSimple.prototype.appendSegment):
(SourceBufferLoaderSimple.prototype.onupdateend):
(SourceBufferLoaderSimple.prototype.start):
(MediaSourceLoaderSimple.prototype.createSourceBuffer):
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::recycleTrackForPad):
(WebCore::AppendPipeline::Track::emplaceOptionalParserForFormat):
(WebCore::AppendPipeline::Track::initializeElements):
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h:

Canonical link: https://commits.webkit.org/254788@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to