Skip to content

Commit

Permalink
fix: Iris Xe Graphicsx图形处理器不支持vaapi, 导致相机录视频闪退
Browse files Browse the repository at this point in the history
Iris Xe Graphicsx图形处理器不支持vaapi, 导致相机录视频闪退

Log: Iris Xe Graphicsx图形处理器不支持vaapi, 导致相机录视频闪退
Bug: https://pms.uniontech.com/bug-view-256235.html
  • Loading branch information
Tanghongyao committed May 29, 2024
1 parent 8b423d8 commit 84d0685
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libcam/libcam_encoder/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -2198,6 +2198,11 @@ static encoder_video_context_t *encoder_video_init_vaapi(encoder_context_t *enco
dev->device_id);

if (0x8086 == dev->vendor_id) { // intel gpu support vaapi, vendor_id :0x8086 can find from file pci.ids

Check warning on line 2200 in libcam/libcam_encoder/encoder.c

View workflow job for this annotation

GitHub Actions / cppcheck

Condition 'dev->vendor_id==0x8086' is always true
//Iris Xe Graphics don't suppot vaapi, so softening coding.
if (dev->vendor_id == 0x8086 && dev->device_id == 0xa7a0) {
is_vaapi = HW_VAAPI_FAIL1;
return NULL;
}
fprintf(stderr, "try this gpu card for vaapi\n");
break;
}
Expand Down

0 comments on commit 84d0685

Please sign in to comment.