mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
decoder: drop obsolete functions.
Drop the following functions that are now obsolete: - gst_vaapi_context_get_surface() - gst_vaapi_context_put_surface() - gst_vaapi_context_find_surface_by_id() - gst_vaapi_surface_proxy_new() - gst_vaapi_surface_proxy_get_context() - gst_vaapi_surface_proxy_set_context() - gst_vaapi_surface_proxy_set_surface() This is an API change.
This commit is contained in:
parent
6e82da1e93
commit
e65726de8d
5 changed files with 7 additions and 204 deletions
|
@ -402,10 +402,7 @@ gst_vaapi_context_set_profile
|
||||||
gst_vaapi_context_get_entrypoint
|
gst_vaapi_context_get_entrypoint
|
||||||
gst_vaapi_context_get_size
|
gst_vaapi_context_get_size
|
||||||
gst_vaapi_context_get_surface_proxy
|
gst_vaapi_context_get_surface_proxy
|
||||||
gst_vaapi_context_get_surface
|
|
||||||
gst_vaapi_context_get_surface_count
|
gst_vaapi_context_get_surface_count
|
||||||
gst_vaapi_context_put_surface
|
|
||||||
gst_vaapi_context_find_surface_by_id
|
|
||||||
gst_vaapi_context_apply_composition
|
gst_vaapi_context_apply_composition
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_VAAPI_CONTEXT
|
GST_VAAPI_CONTEXT
|
||||||
|
@ -524,16 +521,12 @@ GST_VAAPI_DECODER_VC1_GET_CLASS
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>gstvaapisurfaceproxy</FILE>
|
<FILE>gstvaapisurfaceproxy</FILE>
|
||||||
<TITLE>GstVaapiSurfaceProxy</TITLE>
|
<TITLE>GstVaapiSurfaceProxy</TITLE>
|
||||||
gst_vaapi_surface_proxy_get_context
|
|
||||||
gst_vaapi_surface_proxy_get_surface
|
gst_vaapi_surface_proxy_get_surface
|
||||||
gst_vaapi_surface_proxy_get_surface_id
|
gst_vaapi_surface_proxy_get_surface_id
|
||||||
gst_vaapi_surface_proxy_get_user_data
|
gst_vaapi_surface_proxy_get_user_data
|
||||||
gst_vaapi_surface_proxy_new
|
|
||||||
gst_vaapi_surface_proxy_new_from_pool
|
gst_vaapi_surface_proxy_new_from_pool
|
||||||
gst_vaapi_surface_proxy_ref
|
gst_vaapi_surface_proxy_ref
|
||||||
gst_vaapi_surface_proxy_replace
|
gst_vaapi_surface_proxy_replace
|
||||||
gst_vaapi_surface_proxy_set_context
|
|
||||||
gst_vaapi_surface_proxy_set_surface
|
|
||||||
gst_vaapi_surface_proxy_set_user_data
|
gst_vaapi_surface_proxy_set_user_data
|
||||||
gst_vaapi_surface_proxy_unref
|
gst_vaapi_surface_proxy_unref
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
|
|
|
@ -1024,25 +1024,6 @@ gst_vaapi_context_get_surface_proxy(GstVaapiContext *context)
|
||||||
GST_VAAPI_SURFACE_POOL(context->priv->surfaces_pool));
|
GST_VAAPI_SURFACE_POOL(context->priv->surfaces_pool));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_vaapi_context_get_surface:
|
|
||||||
* @context: a #GstVaapiContext
|
|
||||||
*
|
|
||||||
* Acquires a free surface. The returned surface but be released with
|
|
||||||
* gst_vaapi_context_put_surface(). This function returns %NULL if
|
|
||||||
* there is no free surface available in the pool. The surfaces are
|
|
||||||
* pre-allocated during context creation though.
|
|
||||||
*
|
|
||||||
* Return value: a free surface, or %NULL if none is available
|
|
||||||
*/
|
|
||||||
GstVaapiSurface *
|
|
||||||
gst_vaapi_context_get_surface(GstVaapiContext *context)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), NULL);
|
|
||||||
|
|
||||||
return gst_vaapi_video_pool_get_object(context->priv->surfaces_pool);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_vaapi_context_get_surface_count:
|
* gst_vaapi_context_get_surface_count:
|
||||||
* @context: a #GstVaapiContext
|
* @context: a #GstVaapiContext
|
||||||
|
@ -1059,52 +1040,6 @@ gst_vaapi_context_get_surface_count(GstVaapiContext *context)
|
||||||
return gst_vaapi_video_pool_get_size(context->priv->surfaces_pool);
|
return gst_vaapi_video_pool_get_size(context->priv->surfaces_pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_vaapi_context_put_surface:
|
|
||||||
* @context: a #GstVaapiContext
|
|
||||||
* @surface: the #GstVaapiSurface to release
|
|
||||||
*
|
|
||||||
* Releases a surface acquired by gst_vaapi_context_get_surface().
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_vaapi_context_put_surface(GstVaapiContext *context, GstVaapiSurface *surface)
|
|
||||||
{
|
|
||||||
g_return_if_fail(GST_VAAPI_IS_CONTEXT(context));
|
|
||||||
g_return_if_fail(GST_VAAPI_IS_SURFACE(surface));
|
|
||||||
|
|
||||||
gst_vaapi_video_pool_put_object(context->priv->surfaces_pool, surface);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_vaapi_context_find_surface_by_id:
|
|
||||||
* @context: a #GstVaapiContext
|
|
||||||
* @id: the VA surface id to find
|
|
||||||
*
|
|
||||||
* Finds VA surface by @id in the list of surfaces attached to the @context.
|
|
||||||
*
|
|
||||||
* Return value: the matching #GstVaapiSurface object, or %NULL if
|
|
||||||
* none was found
|
|
||||||
*/
|
|
||||||
GstVaapiSurface *
|
|
||||||
gst_vaapi_context_find_surface_by_id(GstVaapiContext *context, GstVaapiID id)
|
|
||||||
{
|
|
||||||
GstVaapiContextPrivate *priv;
|
|
||||||
GstVaapiSurface *surface;
|
|
||||||
guint i;
|
|
||||||
|
|
||||||
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), NULL);
|
|
||||||
|
|
||||||
priv = context->priv;
|
|
||||||
g_return_val_if_fail(priv->surfaces, NULL);
|
|
||||||
|
|
||||||
for (i = 0; i < priv->surfaces->len; i++) {
|
|
||||||
surface = g_ptr_array_index(priv->surfaces, i);
|
|
||||||
if (GST_VAAPI_OBJECT_ID(surface) == id)
|
|
||||||
return surface;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_vaapi_context_apply_composition:
|
* gst_vaapi_context_apply_composition:
|
||||||
* @context: a #GstVaapiContext
|
* @context: a #GstVaapiContext
|
||||||
|
|
|
@ -146,18 +146,9 @@ gst_vaapi_context_get_size(
|
||||||
GstVaapiSurfaceProxy *
|
GstVaapiSurfaceProxy *
|
||||||
gst_vaapi_context_get_surface_proxy(GstVaapiContext *context);
|
gst_vaapi_context_get_surface_proxy(GstVaapiContext *context);
|
||||||
|
|
||||||
GstVaapiSurface *
|
|
||||||
gst_vaapi_context_get_surface(GstVaapiContext *context);
|
|
||||||
|
|
||||||
guint
|
guint
|
||||||
gst_vaapi_context_get_surface_count(GstVaapiContext *context);
|
gst_vaapi_context_get_surface_count(GstVaapiContext *context);
|
||||||
|
|
||||||
void
|
|
||||||
gst_vaapi_context_put_surface(GstVaapiContext *context, GstVaapiSurface *surface);
|
|
||||||
|
|
||||||
GstVaapiSurface *
|
|
||||||
gst_vaapi_context_find_surface_by_id(GstVaapiContext *context, GstVaapiID id);
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_vaapi_context_apply_composition(
|
gst_vaapi_context_apply_composition(
|
||||||
GstVaapiContext *context,
|
GstVaapiContext *context,
|
||||||
|
|
|
@ -44,15 +44,19 @@ struct _GstVaapiSurfaceProxy {
|
||||||
GstVaapiMiniObject parent_instance;
|
GstVaapiMiniObject parent_instance;
|
||||||
|
|
||||||
GstVaapiVideoPool *pool;
|
GstVaapiVideoPool *pool;
|
||||||
GstVaapiContext *context;
|
|
||||||
GstVaapiSurface *surface;
|
GstVaapiSurface *surface;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_vaapi_surface_proxy_finalize(GstVaapiSurfaceProxy *proxy)
|
gst_vaapi_surface_proxy_finalize(GstVaapiSurfaceProxy *proxy)
|
||||||
{
|
{
|
||||||
gst_vaapi_surface_proxy_set_surface(proxy, NULL);
|
if (proxy->surface) {
|
||||||
gst_vaapi_surface_proxy_set_context(proxy, NULL);
|
if (proxy->pool)
|
||||||
|
gst_vaapi_video_pool_put_object(proxy->pool, proxy->surface);
|
||||||
|
g_object_unref(proxy->surface);
|
||||||
|
proxy->surface = NULL;
|
||||||
|
}
|
||||||
|
g_clear_object(&proxy->pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const GstVaapiMiniObjectClass *
|
static inline const GstVaapiMiniObjectClass *
|
||||||
|
@ -65,35 +69,6 @@ gst_vaapi_surface_proxy_class(void)
|
||||||
return &GstVaapiSurfaceProxyClass;
|
return &GstVaapiSurfaceProxyClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_vaapi_surface_proxy_new:
|
|
||||||
* @context: a #GstVaapiContext
|
|
||||||
* @surface: a #GstVaapiSurface
|
|
||||||
*
|
|
||||||
* Creates a new #GstVaapiSurfaceProxy with the specified context and
|
|
||||||
* surface.
|
|
||||||
*
|
|
||||||
* Return value: the newly allocated #GstVaapiSurfaceProxy object
|
|
||||||
*/
|
|
||||||
GstVaapiSurfaceProxy *
|
|
||||||
gst_vaapi_surface_proxy_new(GstVaapiContext *context, GstVaapiSurface *surface)
|
|
||||||
{
|
|
||||||
GstVaapiSurfaceProxy *proxy;
|
|
||||||
|
|
||||||
g_return_val_if_fail(GST_VAAPI_IS_CONTEXT(context), NULL);
|
|
||||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE(surface), NULL);
|
|
||||||
|
|
||||||
proxy = (GstVaapiSurfaceProxy *)
|
|
||||||
gst_vaapi_mini_object_new(gst_vaapi_surface_proxy_class());
|
|
||||||
if (!proxy)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
proxy->pool = NULL;
|
|
||||||
proxy->context = g_object_ref(context);
|
|
||||||
proxy->surface = g_object_ref(surface);
|
|
||||||
return proxy;
|
|
||||||
}
|
|
||||||
|
|
||||||
GstVaapiSurfaceProxy *
|
GstVaapiSurfaceProxy *
|
||||||
gst_vaapi_surface_proxy_new_from_pool(GstVaapiSurfacePool *pool)
|
gst_vaapi_surface_proxy_new_from_pool(GstVaapiSurfacePool *pool)
|
||||||
{
|
{
|
||||||
|
@ -107,7 +82,6 @@ gst_vaapi_surface_proxy_new_from_pool(GstVaapiSurfacePool *pool)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
proxy->pool = g_object_ref(pool);
|
proxy->pool = g_object_ref(pool);
|
||||||
proxy->context = NULL;
|
|
||||||
proxy->surface = gst_vaapi_video_pool_get_object(proxy->pool);
|
proxy->surface = gst_vaapi_video_pool_get_object(proxy->pool);
|
||||||
if (!proxy->surface)
|
if (!proxy->surface)
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -209,45 +183,6 @@ gst_vaapi_surface_proxy_set_user_data(GstVaapiSurfaceProxy *proxy,
|
||||||
user_data, destroy_notify);
|
user_data, destroy_notify);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_vaapi_surface_proxy_get_context:
|
|
||||||
* @proxy: a #GstVaapiSurfaceProxy
|
|
||||||
*
|
|
||||||
* Returns the #GstVaapiContext stored in the @proxy.
|
|
||||||
*
|
|
||||||
* Return value: the #GstVaapiContext
|
|
||||||
*/
|
|
||||||
GstVaapiContext *
|
|
||||||
gst_vaapi_surface_proxy_get_context(GstVaapiSurfaceProxy *proxy)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy), NULL);
|
|
||||||
|
|
||||||
return proxy->context;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_vaapi_surface_proxy_set_context:
|
|
||||||
* @proxy: a #GstVaapiSurfaceProxy
|
|
||||||
* @context: the new #GstVaapiContext to be stored in @proxy
|
|
||||||
*
|
|
||||||
* Stores a new @context into the @proxy. The proxy releases the
|
|
||||||
* previous reference, if any, and then holds a reference to the new
|
|
||||||
* @context.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_vaapi_surface_proxy_set_context(
|
|
||||||
GstVaapiSurfaceProxy *proxy,
|
|
||||||
GstVaapiContext *context
|
|
||||||
)
|
|
||||||
{
|
|
||||||
g_return_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy));
|
|
||||||
|
|
||||||
g_clear_object(&proxy->context);
|
|
||||||
|
|
||||||
if (context)
|
|
||||||
proxy->context = g_object_ref(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_vaapi_surface_proxy_get_surface:
|
* gst_vaapi_surface_proxy_get_surface:
|
||||||
* @proxy: a #GstVaapiSurfaceProxy
|
* @proxy: a #GstVaapiSurfaceProxy
|
||||||
|
@ -280,35 +215,3 @@ gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy)
|
||||||
|
|
||||||
return GST_VAAPI_OBJECT_ID(proxy->surface);
|
return GST_VAAPI_OBJECT_ID(proxy->surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_vaapi_surface_proxy_set_surface:
|
|
||||||
* @proxy: a #GstVaapiSurfaceProxy
|
|
||||||
* @surface: the new #GstVaapiSurface to be stored in @proxy
|
|
||||||
*
|
|
||||||
* Stores a new @surface into the @proxy. The proxy releases the
|
|
||||||
* previous reference, if any, and then holds a reference to the new
|
|
||||||
* @surface.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_vaapi_surface_proxy_set_surface(
|
|
||||||
GstVaapiSurfaceProxy *proxy,
|
|
||||||
GstVaapiSurface *surface
|
|
||||||
)
|
|
||||||
{
|
|
||||||
g_return_if_fail(GST_VAAPI_IS_SURFACE_PROXY(proxy));
|
|
||||||
|
|
||||||
if (proxy->surface) {
|
|
||||||
if (proxy->pool)
|
|
||||||
gst_vaapi_video_pool_put_object(proxy->pool, proxy->surface);
|
|
||||||
else if (proxy->context)
|
|
||||||
gst_vaapi_context_put_surface(proxy->context, proxy->surface);
|
|
||||||
g_object_unref(proxy->surface);
|
|
||||||
proxy->surface = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_clear_object(&proxy->pool);
|
|
||||||
|
|
||||||
if (surface)
|
|
||||||
proxy->surface = g_object_ref(surface);
|
|
||||||
}
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#ifndef GST_VAAPI_SURFACE_PROXY_H
|
#ifndef GST_VAAPI_SURFACE_PROXY_H
|
||||||
#define GST_VAAPI_SURFACE_PROXY_H
|
#define GST_VAAPI_SURFACE_PROXY_H
|
||||||
|
|
||||||
#include <gst/vaapi/gstvaapicontext.h>
|
|
||||||
#include <gst/vaapi/gstvaapisurface.h>
|
#include <gst/vaapi/gstvaapisurface.h>
|
||||||
#include <gst/vaapi/gstvaapisurfacepool.h>
|
#include <gst/vaapi/gstvaapisurfacepool.h>
|
||||||
|
|
||||||
|
@ -38,9 +37,6 @@ G_BEGIN_DECLS
|
||||||
#define GST_VAAPI_SURFACE_PROXY_SURFACE(surface) \
|
#define GST_VAAPI_SURFACE_PROXY_SURFACE(surface) \
|
||||||
gst_vaapi_surface_proxy_get_surface(surface)
|
gst_vaapi_surface_proxy_get_surface(surface)
|
||||||
|
|
||||||
GstVaapiSurfaceProxy *
|
|
||||||
gst_vaapi_surface_proxy_new(GstVaapiContext *context, GstVaapiSurface *surface);
|
|
||||||
|
|
||||||
GstVaapiSurfaceProxy *
|
GstVaapiSurfaceProxy *
|
||||||
gst_vaapi_surface_proxy_new_from_pool(GstVaapiSurfacePool *pool);
|
gst_vaapi_surface_proxy_new_from_pool(GstVaapiSurfacePool *pool);
|
||||||
|
|
||||||
|
@ -61,27 +57,12 @@ void
|
||||||
gst_vaapi_surface_proxy_set_user_data(GstVaapiSurfaceProxy *proxy,
|
gst_vaapi_surface_proxy_set_user_data(GstVaapiSurfaceProxy *proxy,
|
||||||
gpointer user_data, GDestroyNotify destroy_notify);
|
gpointer user_data, GDestroyNotify destroy_notify);
|
||||||
|
|
||||||
GstVaapiContext *
|
|
||||||
gst_vaapi_surface_proxy_get_context(GstVaapiSurfaceProxy *proxy);
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_vaapi_surface_proxy_set_context(
|
|
||||||
GstVaapiSurfaceProxy *proxy,
|
|
||||||
GstVaapiContext *context
|
|
||||||
);
|
|
||||||
|
|
||||||
GstVaapiSurface *
|
GstVaapiSurface *
|
||||||
gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy);
|
gst_vaapi_surface_proxy_get_surface(GstVaapiSurfaceProxy *proxy);
|
||||||
|
|
||||||
GstVaapiID
|
GstVaapiID
|
||||||
gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy);
|
gst_vaapi_surface_proxy_get_surface_id(GstVaapiSurfaceProxy *proxy);
|
||||||
|
|
||||||
void
|
|
||||||
gst_vaapi_surface_proxy_set_surface(
|
|
||||||
GstVaapiSurfaceProxy *proxy,
|
|
||||||
GstVaapiSurface *surface
|
|
||||||
);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* GST_VAAPI_SURFACE_PROXY_H */
|
#endif /* GST_VAAPI_SURFACE_PROXY_H */
|
||||||
|
|
Loading…
Reference in a new issue