decoder: add OUTPUT flag to pictures.

Allow pictures to be marked as output gst_vaapi_picture_output().
This commit is contained in:
Gwenole Beauchesne 2012-03-28 14:28:26 +02:00
parent a7ec623279
commit e8756ae427
2 changed files with 7 additions and 1 deletions

View file

@ -255,6 +255,7 @@ gst_vaapi_picture_output(GstVaapiPicture *picture)
gst_vaapi_surface_proxy_set_timestamp(proxy, picture->pts);
gst_vaapi_decoder_push_surface_proxy(GET_DECODER(picture), proxy);
}
GST_VAAPI_PICTURE_FLAG_SET(picture, GST_VAAPI_PICTURE_FLAG_OUTPUT);
return TRUE;
}

View file

@ -81,6 +81,7 @@ enum _GstVaapiPictureType {
* @GST_VAAPI_PICTURE_FLAG_REFERENCE: reference frame
* @GST_VAAPI_PICTURE_FLAG_BOTTOM_FIELD: bottom field
* @GST_VAAPI_PICTURE_FLAG_TOP_FIELD: top field
* @GST_VAAPI_PICTURE_FLAG_OUTPUT: frame was output
* @GST_VAAPI_PICTURE_FLAG_LAST: first flag that can be used by subclasses
*
* Enum values used for #GstVaapiPicture flags.
@ -90,7 +91,8 @@ enum {
GST_VAAPI_PICTURE_FLAG_REFERENCE = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 1),
GST_VAAPI_PICTURE_FLAG_BOTTOM_FIELD = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 2),
GST_VAAPI_PICTURE_FLAG_TOP_FIELD = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 3),
GST_VAAPI_PICTURE_FLAG_LAST = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 4),
GST_VAAPI_PICTURE_FLAG_OUTPUT = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 4),
GST_VAAPI_PICTURE_FLAG_LAST = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 5),
GST_VAAPI_PICTURE_MASK_STRUCTURE = (GST_VAAPI_PICTURE_FLAG_TOP_FIELD |
GST_VAAPI_PICTURE_FLAG_BOTTOM_FIELD)
@ -107,6 +109,9 @@ enum {
#define GST_VAAPI_PICTURE_IS_REFERENCE(picture) \
GST_VAAPI_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_PICTURE_FLAG_REFERENCE)
#define GST_VAAPI_PICTURE_IS_OUTPUT(picture) \
GST_VAAPI_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_PICTURE_FLAG_OUTPUT)
#define GST_VAAPI_PICTURE_IS_TOP_FIELD(picture) \
GST_VAAPI_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_PICTURE_FLAG_TOP_FIELD)