summarylogtreecommitdiffstats
path: root/implement-vaquerysurfaceattributes.patch
diff options
context:
space:
mode:
authorsL1pKn072019-03-08 21:32:14 +0100
committersL1pKn072019-03-08 21:32:14 +0100
commitd2135e8d7f50f236d88760c699b7cd616b7bdac1 (patch)
tree784053ac17d78e6731ed55abe99030496c2b6cdf /implement-vaquerysurfaceattributes.patch
parent3a4835f0add18fc0ea60cdf57c6f47274c17d991 (diff)
downloadaur-d2135e8d7f50f236d88760c699b7cd616b7bdac1.tar.gz
update patches(?)
Diffstat (limited to 'implement-vaquerysurfaceattributes.patch')
-rw-r--r--implement-vaquerysurfaceattributes.patch105
1 files changed, 105 insertions, 0 deletions
diff --git a/implement-vaquerysurfaceattributes.patch b/implement-vaquerysurfaceattributes.patch
new file mode 100644
index 000000000000..d3267495cf16
--- /dev/null
+++ b/implement-vaquerysurfaceattributes.patch
@@ -0,0 +1,105 @@
+Index: vdpau-video-0.7.4/src/vdpau_driver_template.h
+===================================================================
+--- vdpau-video-0.7.4.orig/src/vdpau_driver_template.h
++++ vdpau-video-0.7.4/src/vdpau_driver_template.h
+@@ -115,6 +115,13 @@ struct VA_DRIVER_VTABLE {
+ int *num_attribs /* out */
+ );
+
++ VAStatus (*vaQuerySurfaceAttributes) (
++ VADisplay dpy,
++ VAConfigID config_id,
++ VASurfaceAttrib *attrib_list, /* out */
++ unsigned int *num_attribs /* out */
++ );
++
+ VAStatus (*vaCreateSurfaces) (
+ VADriverContextP ctx,
+ int width,
+@@ -589,6 +596,7 @@ static VAStatus FUNC(Initialize)(VA_DRIV
+ vtable->vaCreateConfig = vdpau_CreateConfig;
+ vtable->vaDestroyConfig = vdpau_DestroyConfig;
+ vtable->vaGetConfigAttributes = vdpau_GetConfigAttributes;
++ vtable->vaQuerySurfaceAttributes = vdpau_QuerySurfaceAttributes;
+ vtable->vaCreateSurfaces = vdpau_CreateSurfaces;
+ vtable->vaDestroySurfaces = vdpau_DestroySurfaces;
+ vtable->vaCreateContext = vdpau_CreateContext;
+Index: vdpau-video-0.7.4/src/vdpau_video.c
+===================================================================
+--- vdpau-video-0.7.4.orig/src/vdpau_video.c
++++ vdpau-video-0.7.4/src/vdpau_video.c
+@@ -309,6 +309,54 @@ int surface_remove_association(
+ return -1;
+ }
+
++// vaQuerySurfaceAttributes
++VAStatus
++vdpau_QuerySurfaceAttributes(
++ VADriverContextP ctx,
++ VAConfigID config_id,
++ VASurfaceAttrib *attrib_list,
++ unsigned int *num_attribs
++)
++{
++ VDPAU_DRIVER_DATA_INIT;
++
++ object_config_p obj_config;
++ if ((obj_config = VDPAU_CONFIG(config_id)) == NULL)
++ return VA_STATUS_ERROR_INVALID_CONFIG;
++
++ if (!attrib_list && !num_attribs)
++ return VA_STATUS_ERROR_INVALID_PARAMETER;
++
++ if (!attrib_list) {
++ *num_attribs = 2;
++ return VA_STATUS_SUCCESS;
++ }
++
++ if (*num_attribs < 2) {
++ *num_attribs = 2;
++ return VA_STATUS_ERROR_MAX_NUM_EXCEEDED;
++ }
++
++ VdpDecoderProfile vdp_profile;
++ uint32_t max_width, max_height;
++ vdp_profile = get_VdpDecoderProfile(obj_config->profile);
++ if (!get_max_surface_size(driver_data, vdp_profile, &max_width, &max_height))
++ return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
++
++ if (attrib_list) {
++ attrib_list[0].type = VASurfaceAttribMaxWidth;
++ attrib_list[0].flags = VA_SURFACE_ATTRIB_GETTABLE;
++ attrib_list[0].value.type = VAGenericValueTypeInteger;
++ attrib_list[0].value.value.i = max_width;
++ attrib_list[1].type = VASurfaceAttribMaxHeight;
++ attrib_list[1].flags = VA_SURFACE_ATTRIB_GETTABLE;
++ attrib_list[1].value.type = VAGenericValueTypeInteger;
++ attrib_list[1].value.value.i = max_height;
++ }
++
++ return VA_STATUS_SUCCESS;
++}
++
+ // vaDestroySurfaces
+ VAStatus
+ vdpau_DestroySurfaces(
+Index: vdpau-video-0.7.4/src/vdpau_video.h
+===================================================================
+--- vdpau-video-0.7.4.orig/src/vdpau_video.h
++++ vdpau-video-0.7.4/src/vdpau_video.h
+@@ -165,6 +165,15 @@ vdpau_QueryConfigAttributes(
+ int *num_attribs
+ ) attribute_hidden;
+
++// vaQuerySurfaceAttributes
++VAStatus
++vdpau_QuerySurfaceAttributes(
++ VADriverContextP ctx,
++ VAConfigID config_id,
++ VASurfaceAttrib *attrib_list,
++ unsigned int *num_attribs
++) attribute_hidden;
++
+ // vaCreateSurfaces
+ VAStatus
+ vdpau_CreateSurfaces(