|
1 | 1 | /*
|
2 |
| -* Copyright (c) 2009-2018, Intel Corporation |
| 2 | +* Copyright (c) 2009-2023, Intel Corporation |
3 | 3 | *
|
4 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a
|
5 | 5 | * copy of this software and associated documentation files (the "Software"),
|
@@ -1002,7 +1002,8 @@ video_frame_process(VASurfaceID in_surface_id,
|
1002 | 1002 | memset(&pipeline_param, 0, sizeof(pipeline_param));
|
1003 | 1003 | pipeline_param.surface = in_surface_id;
|
1004 | 1004 | pipeline_param.surface_region = &surface_region;
|
1005 |
| - pipeline_param.output_region = &output_region; |
| 1005 | + pipeline_param.output_region = &output_region; |
| 1006 | + pipeline_param.rotation_state = VA_ROTATION_90; |
1006 | 1007 |
|
1007 | 1008 | va_status = vaCreateBuffer(va_dpy,
|
1008 | 1009 | context_id,
|
@@ -1105,6 +1106,20 @@ vpp_context_create()
|
1105 | 1106 | 1,
|
1106 | 1107 | &context_id);
|
1107 | 1108 | CHECK_VASTATUS(va_status, "vaCreateContext");
|
| 1109 | + |
| 1110 | + VABufferID *filters = nullptr; |
| 1111 | + unsigned int num_filters = 0; |
| 1112 | + VAProcPipelineCaps pipeline_caps = {}; |
| 1113 | + va_status = vaQueryVideoProcPipelineCaps(va_dpy, |
| 1114 | + context_id, |
| 1115 | + filters, |
| 1116 | + num_filters, |
| 1117 | + &pipeline_caps); |
| 1118 | + CHECK_VASTATUS(va_status, "vaQueryVideoProcPipeineCaps"); |
| 1119 | + if (pipeline_caps.rotation_flags & (1 << VA_ROTATION_90)) { |
| 1120 | + printf("Clockwise rotation by 90 degrees is supported!\n"); |
| 1121 | + } |
| 1122 | + |
1108 | 1123 | return va_status;
|
1109 | 1124 | }
|
1110 | 1125 |
|
|
0 commit comments