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

Set viewPort for QVideoFrameFormat #506

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

vladyslav-arzhanov
Copy link
Contributor

If we, for example, did not apply cropping, then for the correct display of the frame, we should set viewPort. Here is a real example of when these changes make sense:
When decoding a video stream with HW MediaCodec, the frame parameters change from 1280x720 to 1280x736 at startup. We opened an issue on ffmpeg regarding the fact that this information should be sent to us in the frame https://trac.ffmpeg.org/ticket/11317 (a patch has been prepared and I hope it will be merged soon). With their patch and apply_cropping 0, we get a frame with the following parameters at the output: width=1280 height=736 crops top=0 bottom=16 left=0 right=0, so I think it would be good to set viewPort for this case, in other cases this will not affect the stream since the crops will be zero.

Signed-off-by: Vladyslav Arzhanov <vladarzhanov2001@gmail.com>
@valbok
Copy link
Owner

valbok commented Dec 9, 2024

Amazing, thanks

@valbok valbok merged commit ea5be8e into valbok:master Dec 9, 2024
7 checks passed
@vladyslav-arzhanov vladyslav-arzhanov deleted the viewport branch December 9, 2024 13:05
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.

2 participants