Skip to content
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

The gstreamer plugin should resize when it's presented with frames to fill #24863

Merged
merged 1 commit into from Nov 26, 2019

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Nov 25, 2019

This is a workaround for race conditions in the embedder.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix #24835
  • These changes do not require tests because it's fixing a bug with an embedding
… fill, not when caps are set
@asajeffrey
Copy link
Member Author

asajeffrey commented Nov 25, 2019

OK, I think what's going on is this...

The embedder API uses push for some things (WindowEvents being pushed from the embedder to servo) and pull for others (the WindowMethods trait implemented by the embedder), with the result that it's easy for things to get out of sync. In this case, it was the get_coordinates method, I think what was happening was:

  • Embedder gets a Start message, and sends a NewBrowser event to Servo
  • Embedder gets a Resize message, and resizes itself, then sends a Resize event to Servo
  • Servo (still processing NewBrowser) calls get_coordinates and gets the new size
  • When Servo processes Resize, there's nothing to do, since the size hasn't changed, and as a result script is never informed of the new size.

This PR is a workaround for that, by delaying sending the Resize.

A better fix is to revisit the embedding API to make it all push rather than mixed push/pull (or all async).

@paulrouget does my analysis sound right?

@ferjm r?

@paulrouget
Copy link
Contributor

paulrouget commented Nov 26, 2019

I know nothing about gstplugin. But

When Servo processes Resize, there's nothing to do, since the size hasn't changed, and as a result script is never informed of the new size.

Right. But in the first place script should have had the new size.

A better fix is to revisit the embedding API to make it all push rather than mixed push/pull (or all async).

One day :)

@ferjm
ferjm approved these changes Nov 26, 2019
@ferjm
Copy link
Member

ferjm commented Nov 26, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2019

📌 Commit 2356f3e has been approved by ferjm

@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2019

Testing commit 2356f3e with merge 9440c73...

bors-servo added a commit that referenced this pull request Nov 26, 2019
The gstreamer plugin should resize when it's presented with frames to fill

<!-- Please describe your changes on the following line: -->

This is a workaround for race conditions in the embedder.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24835
- [x] These changes do not require tests because it's fixing a bug with an embedding

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2019

💔 Test failed - status-taskcluster

@ferjm
Copy link
Member

ferjm commented Nov 26, 2019

@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2019

Testing commit 2356f3e with merge 799057f...

bors-servo added a commit that referenced this pull request Nov 26, 2019
The gstreamer plugin should resize when it's presented with frames to fill

<!-- Please describe your changes on the following line: -->

This is a workaround for race conditions in the embedder.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #24835
- [x] These changes do not require tests because it's fixing a bug with an embedding

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 26, 2019

☀️ Test successful - status-taskcluster
Approved by: ferjm
Pushing 799057f to master...

@bors-servo bors-servo merged commit 2356f3e into servo:master Nov 26, 2019
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants
You can’t perform that action at this time.