Skip to content

[MSE][GStreamer] Support Google Dynamic Ad Insertion (DAI) #893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 0 commits into from
May 25, 2022

Conversation

philn
Copy link
Member

@philn philn commented May 22, 2022

296d132

[MSE][GStreamer] Support Google Dynamic Ad Insertion (DAI)
https://bugs.webkit.org/show_bug.cgi?id=216039
<rdar://problem/68638316 >

Patch by Philippe Normand <philn@igalia.com > on 2022-05-25
Reviewed by Alicia Boya Garcia.

The "simple DAI" demo was not working as expected because the new source pad of the demuxer in the append
pipeline was sinking buffers to a "black hole". That was happening because the second time the
no-more-pads signal was emitted, the previous source pad was still linked to a track, and there was
no code to unlink/relink demuxer pads. This is now handled...

The specific "simple DAI" demo generates 2 AAC streams, with different tkhd track-id fields, we had
no layout test reproducing this use-case, so this patch provides one.

Test: media-source/media-source-audio-track-id-switch.html

* LayoutTests/media/media-source/content/test-48kHz-new-track-id.m4a: Added.
* LayoutTests/media/media-source/content/test-48khz-new-track-id-manifest.json: Added.
* LayoutTests/media/media-source/media-source-audio-track-id-switch-expected.txt: Added.
* LayoutTests/media/media-source/media-source-audio-track-id-switch.html: Added.
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::handleErrorSyncMessage):
(WebCore::AppendPipeline::didReceiveInitializationSegment):
(WebCore::createOptionalParserForFormat):
(WebCore::AppendPipeline::recycleTrackForPad):
(WebCore::AppendPipeline::linkPadWithTrack):
(WebCore::AppendPipeline::tryMatchPadToExistingTrack): Deleted.
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.h:
(WebCore::AppendPipeline::Track::isLinked const):

Canonical link: https://commits.webkit.org/250950@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294791 268f45cc-cd09-0410-ab3c-d52691b4dbfc

@philn philn self-assigned this May 22, 2022
@philn philn added Media Bugs related to the HTML 5 Media elements. WebKit Nightly Build labels May 22, 2022
@webkit-early-warning-system webkit-early-warning-system added the merging-blocked Applied to prevent a change from being merged label May 22, 2022
@philn philn requested a review from ntrrgc May 23, 2022 18:18
Copy link
Contributor

@ntrrgc ntrrgc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@philn philn added merge-queue Applied to send a pull request to merge-queue unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed merging-blocked Applied to prevent a change from being merged merge-queue Applied to send a pull request to merge-queue labels May 24, 2022
@webkit-early-warning-system webkit-early-warning-system merged commit 296d132 into WebKit:main May 25, 2022
@webkit-early-warning-system
Copy link
Collaborator

Committed r294791 (250950@main): https://commits.webkit.org/250950@main

Reviewed commits have been landed. Closing PR #893 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label May 25, 2022
@philn philn deleted the eng/216039 branch May 25, 2022 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants