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

Handle single plane frames #101

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FrayxRulez
Copy link
Contributor

This is meant to fix #86

@osaghaso osaghaso requested a review from jlautman January 4, 2021 21:35
hr = bitmap_buffer->GetPlaneDescription(0, &bitmap_plane_description_y);
}

if (SUCCEEDED(hr)) {
if (SUCCEEDED(hr) && plane_count == 2) {
Copy link

Choose a reason for hiding this comment

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

Previously, plane_count == 3 would have set hr to E_FAIL. Is there a guarantee that plane_count is never any value other than 0, 1, or 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. It probably makes sense to fail if plane_count isn't 1 or 2.

}

if (SUCCEEDED(hr)) {
if (SUCCEEDED(hr) && plane_count >= 1) {
Copy link

Choose a reason for hiding this comment

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

This change treats 1 plane and 2 plane frames identically. Is that intentional or is there any different work that needs to be done in the 1 plane case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's intentional: pfn_incoming_frame_ is able to figure out the data format and to decode it correctly.

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.

VideoCaptureWinRTInternal fails to read frames
2 participants