Changeset 257977 in webkit
- Timestamp:
- Mar 6, 2020 4:41:27 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r257971 r257977 1 2020-03-06 Enrique Ocaña González <eocanha@igalia.com> 2 3 [GStreamer] Streaming aac/mp3 audio doesn't always work 4 https://bugs.webkit.org/show_bug.cgi?id=205801 5 6 Reviewed by Philippe Normand. 7 8 The new test checks that end-of-stream (thus, end of playback) isn't triggered when a live 9 audio stream is being played. Live streams don't have Content-Length and are loaded as 10 they are generated (no future data is available immediately). This is simulated by omitting 11 Content-Length and artificially stalling the stream at a given offset. 12 13 * http/tests/media/resources/serve-video.php: Now the file continues to be served after 14 the stall when stallOffset/stallDuration are used. 15 * http/tests/media/video-no-content-length-stall-expected.txt: Added. 16 * http/tests/media/video-no-content-length-stall.html: Added. 17 1 18 2020-03-06 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/LayoutTests/http/tests/media/resources/serve-video.php
r188686 r257977 145 145 set_time_limit(0); 146 146 147 $stalledOnce = false; 147 148 while (!feof($fn) && $offset <= $end && connection_status() == 0) { 148 149 $readSize = min($settings["chunkSize"], ($end - $offset) + 1); 149 150 $stallNow = false; 150 if ( $settings["stallOffset"] && $settings["stallOffset"] >= $offset && $settings["stallOffset"] < $offset + $readSize) {151 if (!$stalledOnce && $settings["stallOffset"] && $settings["stallOffset"] >= $offset && $settings["stallOffset"] < $offset + $readSize) { 151 152 $readSize = min($settings["chunkSize"], $settings["stallOffset"] - $offset); 152 153 $stallNow = true; … … 154 155 155 156 $buffer = fread($fn, $readSize); 157 $readLength = strlen($buffer); 158 156 159 print($buffer); 157 160 flush(); 158 $offset += $ settings["chunkSize"];161 $offset += $readLength; 159 162 160 if ($stallNow) 163 if ($stallNow) { 161 164 sleep($settings["stallDuration"]); 165 $stalledOnce = true; 166 } 162 167 } 163 168 fclose($fn); -
trunk/Source/WebCore/ChangeLog
r257976 r257977 1 2020-03-06 Enrique Ocaña González <eocanha@igalia.com> 2 3 [GStreamer] Streaming aac/mp3 audio doesn't always work 4 https://bugs.webkit.org/show_bug.cgi?id=205801 5 6 Reviewed by Philippe Normand. 7 8 Don't rely on response size to replace Content-Length. This may break streaming videos, 9 which should always have an Infinite duration. 10 11 This patch is based on the fix found by Philippe Normand <pnormand@igalia.com> 12 13 Test: http/tests/media/video-no-content-length-stall.html 14 15 * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: 16 (CachedResourceStreamingClient::dataReceived): 17 1 18 2020-03-06 Frederic Wang <fwang@igalia.com> 2 19 -
trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
r257635 r257977 1172 1172 GST_DEBUG_OBJECT(src, "Got position previous estimated content size (%" G_GINT64_FORMAT " > %" G_GINT64_FORMAT ")", newPosition, priv->size); 1173 1173 newSize = newPosition; 1174 } else if (!priv->haveSize) {1175 GST_DEBUG_OBJECT(src, "Got initial response without Content-Length, assuming response size as duration.");1176 newSize = length;1177 priv->haveSize = true;1178 1174 } 1179 1175
Note: See TracChangeset
for help on using the changeset viewer.