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

Add orientation to VideoFrame #840

Merged
merged 3 commits into from
Oct 31, 2024
Merged

Add orientation to VideoFrame #840

merged 3 commits into from
Oct 31, 2024

Conversation

sandersdan
Copy link
Contributor

@sandersdan sandersdan commented Oct 14, 2024

Adds rotation and flip to VideoFrame and VideoFrame constructor init dictionaries, as described in #351 (comment).

Does not include any changes to VideoDecoder, VideoEncoder, or ImageDecoder.

I do not allow buffer-initialized VideoFrames to end up with orientations other than requested, which differs from the proposal slightly, but is probably more obvious for developers.

I assume that Canvas and ImageBitmap sources do not have natural orientations. I do not know if this is reasonable.

There is handwaving around the natural orientation of ImageElement sources, as I did not find any spec text that describes how EXIF orientation is actually handled.


Preview | Diff

@padenot
Copy link
Collaborator

padenot commented Oct 15, 2024

I assume that Canvas and ImageBitmap sources do not have natural orientations. I do not know if this is reasonable.

It's a Big Mess, see #351 (comment): source and destination can decide to take the orientation into account, or disregard it. Sometimes the orientation is from the image, sometimes from style. Open the test case in Chromium/Gecko/WebKit browsers for extra fun.

Copy link
Collaborator

@padenot padenot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good modulo (ha!) a small comment that I'd like fixed before merging.

index.src.html Outdated Show resolved Hide resolved
@Djuffin
Copy link
Contributor

Djuffin commented Oct 18, 2024

I'd mention orientation and flip in "9.4.8. Rendering"

@sandersdan
Copy link
Contributor Author

I'd mention orientation and flip in "9.4.8. Rendering"

Done.

@sandersdan sandersdan merged commit 3d99c2b into main Oct 31, 2024
2 checks passed
@sandersdan sandersdan deleted the videoframe-orientation branch October 31, 2024 19:07
github-actions bot added a commit that referenced this pull request Oct 31, 2024
SHA: 3d99c2b
Reason: push, by sandersdan

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants