forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 136
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
[wpe-2.38] [HTMLMediaElement] Reschedule timeupdate
event if fired too early
#1392
Closed
asurdej-comcast
wants to merge
1
commit into
WebPlatformForEmbedded:wpe-2.38
from
asurdej-comcast:timeupdate
Closed
[wpe-2.38] [HTMLMediaElement] Reschedule timeupdate
event if fired too early
#1392
asurdej-comcast
wants to merge
1
commit into
WebPlatformForEmbedded:wpe-2.38
from
asurdej-comcast:timeupdate
Conversation
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
HTMLMediaElement fires `timeupdate` every 250ms in repeating timer. If timer is fired before 250ms from the last occurance it is silently skipped and needs to wait for another 250ms. As a result the gap between two following timeupdate events may vary 250-500ms. This may happen in two cases: 1) Non-periodic timeupdate event is scheduled for any reason 2) When the difference between two timer calls is lower than 250ms. The second may happen when there are multiple timers to handle at the same time in ThreadTimers (maxDurationOfFiringTimers)
eocanha
added a commit
to eocanha/WebKit
that referenced
this pull request
Sep 3, 2024
https://bugs.webkit.org/show_bug.cgi?id=279055 Reviewed by NOBODY (OOPS!). HTMLMediaElement fires 'timeupdate' every 250ms in repeating timer. If the timer is fired before 250ms from the last occurrence, it is silently skipped and needs to wait for another 250ms. As a result, the gap between two following timeupdate events may vary 250-500ms. This may happen in two cases: 1) Non-periodic timeupdate event is scheduled for any reason. 2) When the difference between two timer calls is lower than 250ms. This may happen when there are multiple timers to handle at the same time in ThreadTimers (maxDurationOfFiringTimers). Original author: Andrzej Surdej <[email protected]> See: WebPlatformForEmbedded/WPEWebKit#1392 * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Schedule next event on the remaining time difference so that maxTimeupdateEventFrequency is honored, instead of waiting a full cycle.
I'll study this and upstream it if need it. |
I have already submitted it upstream for review as https://bugs.webkit.org/show_bug.cgi?id=279055 / WebKit/WebKit#33060. Sorry for not mentioning it earlier. |
webkit-commit-queue
pushed a commit
to eocanha/WebKit
that referenced
this pull request
Sep 6, 2024
https://bugs.webkit.org/show_bug.cgi?id=279055 Reviewed by Xabier Rodriguez-Calvar. HTMLMediaElement fires 'timeupdate' every 250ms in repeating timer. If the timer is fired before 250ms from the last occurrence, it is silently skipped and needs to wait for another 250ms. As a result, the gap between two following timeupdate events may vary 250-500ms. This may happen in two cases: 1) Non-periodic timeupdate event is scheduled for any reason. 2) When the difference between two timer calls is lower than 250ms. This may happen when there are multiple timers to handle at the same time in ThreadTimers (maxDurationOfFiringTimers). Original author: Andrzej Surdej <[email protected]> See: WebPlatformForEmbedded/WPEWebKit#1392 * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Schedule next event on the remaining time difference so that maxTimeupdateEventFrequency is honored, instead of waiting a full cycle. Canonical link: https://commits.webkit.org/283264@main
eocanha
pushed a commit
that referenced
this pull request
Sep 6, 2024
https://bugs.webkit.org/show_bug.cgi?id=279055 Reviewed by Xabier Rodriguez-Calvar. HTMLMediaElement fires 'timeupdate' every 250ms in repeating timer. If the timer is fired before 250ms from the last occurrence, it is silently skipped and needs to wait for another 250ms. As a result, the gap between two following timeupdate events may vary 250-500ms. This may happen in two cases: 1) Non-periodic timeupdate event is scheduled for any reason. 2) When the difference between two timer calls is lower than 250ms. This may happen when there are multiple timers to handle at the same time in ThreadTimers (maxDurationOfFiringTimers). Original author: Andrzej Surdej <[email protected]> See: #1392 * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::scheduleTimeupdateEvent): Schedule next event on the remaining time difference so that maxTimeupdateEventFrequency is honored, instead of waiting a full cycle. Canonical link: https://commits.webkit.org/283264@main
eocanha
added
the
upstream
Related to an upstream bug (or should be at some point)
label
Sep 6, 2024
Patch landed upstream as WebKit/WebKit@fb9b613 and backported to wpe-2.38 as 28f3cb5. Closing this PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
HTMLMediaElement fires
timeupdate
every 250ms in repeating timer. If timer is fired before 250ms from the last occurance it is silently skipped and needs to wait for another 250ms. As a result the gap between two following timeupdate events may vary 250-500ms. This may happen in two cases:The second may happen when there are multiple timers to handle at the same time in ThreadTimers (maxDurationOfFiringTimers)
Reproduced with https://ytlr-cert.appspot.com/latest/main.html?&test_type=progressive-test#1724678529990 maxGranularity tests