gralloc: Add timed rendering support
Add timed rendering support which allow users to pass
timed rendering metadata in buffer.
Change-Id: I100afecd084c7803f97f524832bf034f6698d2f4
diff --git a/gralloc/QtiGralloc.cpp b/gralloc/QtiGralloc.cpp
index 831163a..954c46d 100644
--- a/gralloc/QtiGralloc.cpp
+++ b/gralloc/QtiGralloc.cpp
@@ -251,6 +251,8 @@
return MetadataType_ColorSpace;
case QTI_YUV_PLANE_INFO:
return MetadataType_YuvPlaneInfo;
+ case QTI_TIMED_RENDERING:
+ return MetadataType_TimedRendering;
default:
return MetadataType_Invalid;
}
@@ -375,6 +377,10 @@
case QTI_YUV_PLANE_INFO:
err = decodeYUVPlaneInfoMetadata(bytestream, reinterpret_cast<qti_ycbcr *>(param));
break;
+ case QTI_TIMED_RENDERING:
+ err = static_cast<Error>(android::gralloc4::decodeUint32(
+ qtigralloc::MetadataType_TimedRendering, bytestream, reinterpret_cast<uint32_t *>(param)));
+ break;
default:
param = nullptr;
return Error::UNSUPPORTED;
@@ -446,6 +452,11 @@
case QTI_VIDEO_TS_INFO:
err = encodeVideoTimestampInfo(*reinterpret_cast<VideoTimestampInfo *>(param), &bytestream);
break;
+ case QTI_TIMED_RENDERING:
+ err = static_cast<Error>(
+ android::gralloc4::encodeUint32(qtigralloc::MetadataType_TimedRendering,
+ *reinterpret_cast<uint32_t *>(param), &bytestream));
+ break;
default:
param = nullptr;
return Error::UNSUPPORTED;