GST_VIDEO_CODEC_FRAME_FLAG_SET (out_frame,
GST_VIDEO_CODEC_FRAME_FLAG_DECODE_ONLY);
+ if (GST_VAAPI_PICTURE_IS_MVC (picture)) {
+ if (picture->voc == 0)
+ flags |= GST_VAAPI_SURFACE_PROXY_FLAG_FFB;
+ GST_VAAPI_SURFACE_PROXY_VIEW_ID (proxy) = picture->view_id;
+ }
+
if (GST_VAAPI_PICTURE_IS_INTERLACED (picture)) {
flags |= GST_VAAPI_SURFACE_PROXY_FLAG_INTERLACED;
if (GST_VAAPI_PICTURE_IS_TFF (picture))
proxy->surface = gst_vaapi_video_pool_get_object(proxy->pool);
if (!proxy->surface)
goto error;
+ proxy->view_id = 0;
proxy->timestamp = GST_CLOCK_TIME_NONE;
proxy->duration = GST_CLOCK_TIME_NONE;
proxy->has_crop_rect = FALSE;
}
/**
+ * gst_vaapi_surface_proxy_get_view_id:
+ * @proxy: a #GstVaapiSurfaceProxy
+ *
+ * Returns the decoded view-id stored in the @proxy.
+ *
+ * Return value: the #GstVaapiID
+ */
+guintptr
+gst_vaapi_surface_proxy_get_view_id(GstVaapiSurfaceProxy *proxy)
+{
+ g_return_val_if_fail(proxy != NULL, 0);
+
+ return GST_VAAPI_SURFACE_PROXY_VIEW_ID(proxy);
+}
+
+/**
* gst_vaapi_surface_proxy_get_timestamp:
* @proxy: a #GstVaapiSurfaceProxy
*
* @GST_VAAPI_SURFACE_PROXY_FLAG_TFF: top-field-first
* @GST_VAAPI_SURFACE_PROXY_FLAG_RFF: repeat-field-first
* @GST_VAAPI_SURFACE_PROXY_FLAG_ONEFIELD: only one field is available
+ * @GST_VAAPI_SURFACE_PROXY_FLAG_FFB: first frame in bundle, e.g. the first
+ * view component of a MultiView Coded (MVC) frame
* @GST_VAAPI_SURFACE_PROXY_FLAG_LAST: first flag that can be used by subclasses
*
* Flags for #GstVaapiDecoderFrame.
GST_VAAPI_SURFACE_PROXY_FLAG_TFF = (1 << 1),
GST_VAAPI_SURFACE_PROXY_FLAG_RFF = (1 << 2),
GST_VAAPI_SURFACE_PROXY_FLAG_ONEFIELD = (1 << 3),
+ GST_VAAPI_SURFACE_PROXY_FLAG_FFB = (1 << 4),
GST_VAAPI_SURFACE_PROXY_FLAG_LAST = (1 << 8)
} GstVaapiSurfaceProxyFlags;
gst_vaapi_surface_proxy_get_surface_id(proxy)
/**
+ * GST_VAAPI_SURFACE_PROXY_VIEW_ID:
+ * @proxy: a #GstVaapiSurfaceProxy
+ *
+ * Macro that evaluates to the decoded view ID of the underlying @proxy
+ * surface.
+ */
+#define GST_VAAPI_SURFACE_PROXY_VIEW_ID(proxy) \
+ gst_vaapi_surface_proxy_get_view_id(proxy)
+
+/**
* GST_VAAPI_SURFACE_PROXY_TIMESTAMP:
* @proxy: a #GstVaapiSurfaceProxy
*
GstVaapiID
gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy);
+guintptr
+gst_vaapi_surface_proxy_get_view_id(GstVaapiSurfaceProxy *proxy);
+
GstClockTime
gst_vaapi_surface_proxy_get_timestamp(GstVaapiSurfaceProxy *proxy);
GstVaapiVideoPool *pool;
GstVaapiSurface *surface;
+ guintptr view_id;
GstClockTime timestamp;
GstClockTime duration;
GDestroyNotify destroy_func;
GST_VAAPI_OBJECT_ID(GST_VAAPI_SURFACE_PROXY(proxy)->surface)
/**
+ * GST_VAAPI_SURFACE_PROXY_VIEW_ID:
+ * @proxy: a #GstVaapiSurfaceProxy
+ *
+ * Macro that evaluates to the decoded view ID of the underlying @proxy
+ * surface.
+ *
+ * This is an internal macro that does not do any run-time type check.
+ */
+#undef GST_VAAPI_SURFACE_PROXY_VIEW_ID
+#define GST_VAAPI_SURFACE_PROXY_VIEW_ID(proxy) \
+ GST_VAAPI_SURFACE_PROXY(proxy)->view_id
+
+/**
* GST_VAAPI_SURFACE_PROXY_TIMESTAMP:
* @proxy: a #GstVaapiSurfaceProxy
*