Separate Rendering and Dsiplaying surface status
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
This commit is contained in:
+7
-2
@@ -111,8 +111,13 @@ VAStatus SunxiCedrusDeriveImage(VADriverContextP context,
|
|||||||
if (surface_object == NULL)
|
if (surface_object == NULL)
|
||||||
return VA_STATUS_ERROR_INVALID_SURFACE;
|
return VA_STATUS_ERROR_INVALID_SURFACE;
|
||||||
|
|
||||||
if (surface_object->status == VASurfaceRendering)
|
if (surface_object->status == VASurfaceRendering) {
|
||||||
SunxiCedrusSyncSurface(context, surface_id);
|
status = SunxiCedrusSyncSurface(context, surface_id);
|
||||||
|
if (status != VA_STATUS_SUCCESS)
|
||||||
|
return status;
|
||||||
|
} else if (surface_object->status == VASurfaceReady) {
|
||||||
|
return VA_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
format.fourcc = VA_FOURCC_NV12;
|
format.fourcc = VA_FOURCC_NV12;
|
||||||
|
|
||||||
|
|||||||
+2
-5
@@ -153,12 +153,9 @@ VAStatus SunxiCedrusSyncSurface(VADriverContextP context,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (surface_object->status == VASurfaceReady) {
|
if (surface_object->status != VASurfaceRendering) {
|
||||||
status = VA_STATUS_SUCCESS;
|
status = VA_STATUS_SUCCESS;
|
||||||
goto complete;
|
goto complete;
|
||||||
} else if (surface_object->status == VASurfaceSkipped) {
|
|
||||||
status = VA_STATUS_ERROR_UNKNOWN;
|
|
||||||
goto error;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
request_fd = surface_object->request_fd;
|
request_fd = surface_object->request_fd;
|
||||||
@@ -197,7 +194,7 @@ VAStatus SunxiCedrusSyncSurface(VADriverContextP context,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
surface_object->status = VASurfaceReady;
|
surface_object->status = VASurfaceDisplaying;
|
||||||
|
|
||||||
status = VA_STATUS_SUCCESS;
|
status = VA_STATUS_SUCCESS;
|
||||||
goto complete;
|
goto complete;
|
||||||
|
|||||||
Reference in New Issue
Block a user