GstVaapiContext *context;
GstVaapiSurface *surface;
GstClockTime timestamp;
+ gboolean tff;
};
enum {
PROP_CONTEXT,
PROP_SURFACE,
- PROP_TIMESTAMP
+ PROP_TIMESTAMP,
+ PROP_TFF
};
static void
case PROP_TIMESTAMP:
gst_vaapi_surface_proxy_set_timestamp(proxy, g_value_get_uint64(value));
break;
+ case PROP_TFF:
+ gst_vaapi_surface_proxy_set_tff(proxy, g_value_get_boolean(value));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
case PROP_TIMESTAMP:
g_value_set_uint64(value, gst_vaapi_surface_proxy_get_timestamp(proxy));
break;
+ case PROP_TFF:
+ g_value_set_boolean(value, gst_vaapi_surface_proxy_get_tff(proxy));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
"The presentation time of the surface",
0, G_MAXUINT64, GST_CLOCK_TIME_NONE,
G_PARAM_READWRITE));
+
+ g_object_class_install_property
+ (object_class,
+ PROP_TFF,
+ g_param_spec_boolean("tff",
+ "Top-Field-First",
+ "Flag indicating for interlaced surfaces whether Top Field is First",
+ FALSE,
+ G_PARAM_READWRITE));
}
static void
priv->context = NULL;
priv->surface = NULL;
priv->timestamp = GST_CLOCK_TIME_NONE;
+ priv->tff = FALSE;
}
/**
proxy->priv->timestamp = timestamp;
}
+
+/**
+ * gst_vaapi_surface_proxy_get_tff:
+ * @proxy: a #GstVaapiSurfaceProxy
+ *
+ * Returns the TFF flag of the #GstVaapiSurface held by @proxy.
+ *
+ * Return value: the TFF flag of the surface
+ */
+gboolean
+gst_vaapi_surface_proxy_get_tff(GstVaapiSurfaceProxy *proxy)
+{
+ g_return_val_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy), FALSE);
+
+ return proxy->priv->tff;
+}
+
+/**
+ * gst_vaapi_surface_proxy_set_tff:
+ * @proxy: a #GstVaapiSurfaceProxy
+ * @tff: the new value of the TFF flag
+ *
+ * Sets the TFF flag of the @proxy surface to @tff.
+ */
+void
+gst_vaapi_surface_proxy_set_tff(GstVaapiSurfaceProxy *proxy, gboolean tff)
+{
+ g_return_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy));
+
+ proxy->priv->tff = tff;
+}
#define GST_VAAPI_SURFACE_PROXY_TIMESTAMP(surface) \
gst_vaapi_surface_proxy_get_timestamp(surface)
+/**
+ * GST_VAAPI_SURFACE_PROXY_TFF:
+ * @surface: a #GstVaapiSurfaceProxy
+ *
+ * Macro that evaluates to the tff flag of the @surface
+ */
+#define GST_VAAPI_SURFACE_PROXY_TFF(surface) \
+ gst_vaapi_surface_proxy_get_tff(surface)
+
typedef struct _GstVaapiSurfaceProxy GstVaapiSurfaceProxy;
typedef struct _GstVaapiSurfaceProxyPrivate GstVaapiSurfaceProxyPrivate;
typedef struct _GstVaapiSurfaceProxyClass GstVaapiSurfaceProxyClass;
GstClockTime timestamp
);
+gboolean
+gst_vaapi_surface_proxy_get_tff(GstVaapiSurfaceProxy *proxy);
+
+void
+gst_vaapi_surface_proxy_set_tff(GstVaapiSurfaceProxy *proxy, gboolean tff);
+
G_END_DECLS
#endif /* GST_VAAPI_SURFACE_PROXY_H */