WebKit Bugzilla
Attachment 340280 Details for
Bug 185592
: [MSE][GStreamer] Before deleting the stream from WebKitMediaSource we should unlink its elements and flush the appsrc.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185592-20180514030424.patch (text/plain), 3.95 KB, created by
Yacine Bandou
on 2018-05-13 18:04:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yacine Bandou
Created:
2018-05-13 18:04:24 PDT
Size:
3.95 KB
patch
obsolete
>Subversion Revision: 231637 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 5b64ca863c11ceaa6671109508b8ce6fbb0ce6bb..df485fd27165158032d83158aa6658122647f1e2 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,23 @@ >+2018-05-13 Yacine Bandou <yacine.bandou_ext@softathome.com> >+ >+ [MSE][GStreamer] Before deleting the stream from WebKitMediaSource we should unlink its elements and flush the appsrc. >+ https://bugs.webkit.org/show_bug.cgi?id=185592 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We need to unlink the appsrc and the parser and flush the appsrc before setting its state to NULL, >+ otherwise we'll block in appsrc when we go from paused state to ready state. >+ >+ Without this patch the following WPT encrypred-media tests timeout >+ >+ imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-destroy-persistent-license.https.html >+ imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events.https.html >+ imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license.https.html >+ imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources.https.html >+ >+ * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp: >+ (webKitMediaSrcFreeStream): >+ > 2018-05-10 Yacine Bandou <yacine.bandou_ext@softathome.com> > > [EME][GStreamer] Handle the protection event in MediaPlayerPrivate >diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp >index bb14f2bce8cdedf6be86726d23209ace0b99cf05..05d292ffbbc53d6855138f1672ea8191602143f8 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp >@@ -513,6 +513,37 @@ void webKitMediaSrcFreeStream(WebKitMediaSrc* source, Stream* stream) > // Don't trigger callbacks from this appsrc to avoid using the stream anymore. > gst_app_src_set_callbacks(GST_APP_SRC(stream->appsrc), &disabledAppsrcCallbacks, nullptr, nullptr); > gst_app_src_end_of_stream(GST_APP_SRC(stream->appsrc)); >+ GRefPtr<GstPad> sinkPad; >+ GRefPtr<GstPad> sourcePad; >+ if (stream->parser) { >+ sourcePad = adoptGRef(gst_element_get_static_pad(stream->appsrc, "src")); >+ if (gst_pad_is_linked(sourcePad.get())) { >+ sinkPad = adoptGRef(gst_element_get_static_pad(stream->parser, "sink")); >+ gst_pad_unlink(sourcePad.get(), sinkPad.get()); >+ } >+ sourcePad = adoptGRef(gst_element_get_static_pad(stream->parser, "src")); >+ if (gst_pad_is_linked(sourcePad.get())) { >+ sinkPad = adoptGRef(gst_pad_get_peer(sourcePad.get())); >+ gst_pad_unlink(sourcePad.get(), sinkPad.get()); >+ } >+ } else { >+ sourcePad = adoptGRef(gst_element_get_static_pad(stream->appsrc, "src")); >+ if (gst_pad_is_linked(sourcePad.get())) { >+ sinkPad = adoptGRef(gst_pad_get_peer(sourcePad.get())); >+ gst_pad_unlink(sourcePad.get(), sinkPad.get()); >+ } >+ } >+ >+ // Flush the appsrc before change the state to null. >+ if (!gst_element_send_event(GST_ELEMENT(stream->appsrc), gst_event_new_flush_start())) { >+ GST_WARNING("Failed to send flush-start event for stream=%p", stream); >+ return; >+ } >+ if (!gst_element_send_event(GST_ELEMENT(stream->appsrc), gst_event_new_flush_stop(false))) { >+ GST_WARNING("Failed to send flush-stop event for stream=%p", stream); >+ return; >+ } >+ > gst_element_set_state(stream->appsrc, GST_STATE_NULL); > gst_bin_remove(GST_BIN(source), stream->appsrc); > stream->appsrc = nullptr;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
aboya
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185592
: 340280 |
340305