Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[GStreamer][Playbin3] Stream collection handling fixes
https://bugs.webkit.org/show_bug.cgi?id=222322 Patch by Philippe Normand <pnormand@igalia.com> on 2021-03-01 Reviewed by Xabier Rodriguez-Calvar. The track orphaning trying to avoid un-necessary track addition/removals was making the whole thing inconsistent with the final stream collection. Also stream-collection messages don't need to be handled from a synchronous GstBus handler, this should be needed for need-context messages only, so the corresponding code has been refactored. This patch also includes changes and cleanups for the mediastreamsrc element, needed after the stream collection handling fixes. Most notably the element now keeps an internal list of tracks, in addition to observing the MediaStreamPrivate for topology changes. Also it emits a new stream collection whenever a new source pad has been added. No new tests, but this patch fixes flakyness of http/tests/media/hls/hls-audio-tracks.html when the pipeline is driven by playbin3. * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): (WebCore::MediaPlayerPrivateGStreamer::updateTracks): (WebCore::MediaPlayerPrivateGStreamer::setPipeline): (WebCore::MediaPlayerPrivateGStreamer::handleStreamCollectionMessage): (WebCore::MediaPlayerPrivateGStreamer::handleNeedContextMessage): (WebCore::MediaPlayerPrivateGStreamer::handleMessage): (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/mse/AppendPipeline.cpp: (WebCore::AppendPipeline::handleNeedContextSyncMessage): * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: (stopObservingTracks): (webkitMediaStreamSrcDispose): (webkitMediaStreamSrcAddPad): (ProbeData::ProbeData): (webkitMediaStreamSrcPadProbeCb): (webkitMediaStreamSrcSetupSrc): (webkitMediaStreamSrcPostStreamCollection): (webkitMediaStreamSrcAddTrack): (webkitMediaStreamSrcSetStream): (webkitMediaStreamSrcTrackEnded): Canonical link: https://commits.webkit.org/234684@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
da3dd96
commit 65db70e
Showing
5 changed files
with
192 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.