diff --git a/docs/reference/libs/libs-sections.txt b/docs/reference/libs/libs-sections.txt index bc0f2841c6..0b049f8710 100644 --- a/docs/reference/libs/libs-sections.txt +++ b/docs/reference/libs/libs-sections.txt @@ -159,6 +159,8 @@ GST_VAAPI_VIDEO_BUFFER_GET_CLASS gstvaapitypes Basic data structures GstVaapiID +GST_VAAPI_ID_FORMAT +GST_VAAPI_ID_ARGS gst_vaapi_value_get_id gst_vaapi_value_set_id GstVaapiPoint diff --git a/gst-libs/gst/vaapi/gstvaapitypes.h b/gst-libs/gst/vaapi/gstvaapitypes.h index 57b8a81316..48aadd38df 100644 --- a/gst-libs/gst/vaapi/gstvaapitypes.h +++ b/gst-libs/gst/vaapi/gstvaapitypes.h @@ -48,6 +48,28 @@ typedef guint64 GstVaapiID; # error "unsupported value for GST_VAAPI_TYPE_ID_SIZE" #endif +/** + * GST_VAAPI_ID_FORMAT: + * + * Can be used together with #GST_VAAPI_ID_ARGS to properly output an + * integer value in a printf()-style text message. + * + * + * printf("id: %" GST_VAAPI_ID_FORMAT "\n", GST_VAAPI_ID_ARGS(id)); + * + * + */ +#define GST_VAAPI_ID_FORMAT "p" + +/** + * GST_VAAPI_ID_ARGS: + * @id: a #GstVaapiID + * + * Can be used together with #GST_VAAPI_ID_FORMAT to properly output + * an integer value in a printf()-style text message. + */ +#define GST_VAAPI_ID_ARGS(id) GUINT_TO_POINTER(id) + /** * GST_VAAPI_TYPE_ID: *