Commit e41c6bd2 authored by He Junyan's avatar He Junyan

libs: delete all gstvaapiobject related files.

Part-of: <!331>
parent 2515d4dd
Pipeline #152243 waiting for manual action with stages
in 17 seconds
......@@ -26,7 +26,6 @@
#include "gstvaapibufferproxy_priv.h"
#include "gstvaapisurface_priv.h"
#include "gstvaapiutils.h"
#include "gstvaapiobject_priv.h"
#define DEBUG 1
#include "gstvaapidebug.h"
......
......@@ -24,7 +24,6 @@
#define GST_VAAPI_BUFFER_PROXY_PRIV_H
#include "gstvaapibufferproxy.h"
#include "gstvaapiobject.h"
#include "gstvaapiminiobject.h"
G_BEGIN_DECLS
......
......@@ -25,8 +25,6 @@
#ifndef GST_VAAPI_CONTEXT_H
#define GST_VAAPI_CONTEXT_H
#include "gstvaapiobject.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapiprofile.h"
#include "gstvaapidisplay.h"
#include "gstvaapisurface.h"
......
......@@ -32,7 +32,6 @@
#include "gstvaapidecoder_objects.h"
#include "gstvaapidecoder_priv.h"
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapiutils_h264_priv.h"
#define DEBUG 1
......
......@@ -34,7 +34,6 @@
#include "gstvaapidecoder_objects.h"
#include "gstvaapidecoder_priv.h"
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapiutils_h265_priv.h"
#define DEBUG 1
......
......@@ -33,7 +33,6 @@
#include "gstvaapidecoder_objects.h"
#include "gstvaapidecoder_priv.h"
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
#define DEBUG 1
#include "gstvaapidebug.h"
......
......@@ -33,7 +33,6 @@
#include "gstvaapidecoder_dpb.h"
#include "gstvaapidecoder_priv.h"
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
#define DEBUG 1
#include "gstvaapidebug.h"
......
......@@ -32,7 +32,6 @@
#include "gstvaapidecoder_objects.h"
#include "gstvaapidecoder_priv.h"
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
#define DEBUG 1
#include "gstvaapidebug.h"
......
......@@ -33,7 +33,6 @@
#include "gstvaapidecoder_unit.h"
#include "gstvaapidecoder_priv.h"
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
#define DEBUG 1
#include "gstvaapidebug.h"
......
......@@ -32,7 +32,6 @@
#include "gstvaapidecoder_objects.h"
#include "gstvaapidecoder_priv.h"
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapicompat.h"
......
......@@ -31,7 +31,6 @@
#include "gstvaapidecoder_objects.h"
#include "gstvaapidecoder_priv.h"
#include "gstvaapidisplay_priv.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapicompat.h"
......
......@@ -26,7 +26,6 @@
#define GST_VAAPI_IMAGE_H
#include <gst/gstbuffer.h>
#include <gst/vaapi/gstvaapiobject.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/video-format.h>
......
/*
* gstvaapiobject.c - Base VA object
*
* Copyright (C) 2010-2011 Splitted-Desktop Systems
* Author: Gwenole Beauchesne <gwenole.beauchesne@splitted-desktop.com>
* Copyright (C) 2012-2013 Intel Corporation
* Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
/**
* SECTION:gstvaapiobject
* @short_description: Base VA object
*/
#include "sysdeps.h"
#include "gstvaapiobject.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapiminiobject.h"
#include "gstvaapidisplay_priv.h"
#define DEBUG 1
#include "gstvaapidebug.h"
static void
gst_vaapi_object_finalize (GstVaapiObject * object)
{
const GstVaapiObjectClass *const klass = GST_VAAPI_OBJECT_GET_CLASS (object);
if (klass->finalize)
klass->finalize (object);
gst_vaapi_display_replace (&object->display, NULL);
}
void
gst_vaapi_object_class_init (GstVaapiObjectClass * klass, guint size)
{
GstVaapiMiniObjectClass *const object_class =
GST_VAAPI_MINI_OBJECT_CLASS (klass);
object_class->size = size;
object_class->finalize = (GDestroyNotify) gst_vaapi_object_finalize;
}
/**
* gst_vaapi_object_new:
* @klass: The object class
* @display: The #GstVaapiDisplay
*
* Creates a new #GstVaapiObject. The @klass argument shall not be
* %NULL, and it must reference a statically allocated descriptor.
*
* This function zero-initializes the derived object data. Also note
* that this is an internal function that shall not be used outside of
* libgstvaapi libraries.
*
* Returns: The newly allocated #GstVaapiObject
*/
gpointer
gst_vaapi_object_new (const GstVaapiObjectClass * klass,
GstVaapiDisplay * display)
{
const GstVaapiMiniObjectClass *const object_class =
GST_VAAPI_MINI_OBJECT_CLASS (klass);
GstVaapiObject *object;
guint sub_size;
g_return_val_if_fail (klass != NULL, NULL);
g_return_val_if_fail (display != NULL, NULL);
object = (GstVaapiObject *) gst_vaapi_mini_object_new (object_class);
if (!object)
return NULL;
object->display = gst_object_ref (display);
object->object_id = VA_INVALID_ID;
sub_size = object_class->size - sizeof (*object);
if (sub_size > 0)
memset (((guchar *) object) + sizeof (*object), 0, sub_size);
if (klass->init)
klass->init (object);
return object;
}
/**
* gst_vaapi_object_ref:
* @object: a #GstVaapiObject
*
* Atomically increases the reference count of the given @object by one.
*
* Returns: The same @object argument
*/
gpointer
gst_vaapi_object_ref (gpointer object)
{
return gst_vaapi_mini_object_ref (object);
}
/**
* gst_vaapi_object_unref:
* @object: a #GstVaapiObject
*
* Atomically decreases the reference count of the @object by one. If
* the reference count reaches zero, the object will be free'd.
*/
void
gst_vaapi_object_unref (gpointer object)
{
gst_vaapi_mini_object_unref (object);
}
/**
* gst_vaapi_object_replace:
* @old_object_ptr: a pointer to a #GstVaapiObject
* @new_object: a #GstVaapiObject
*
* Atomically replaces the object object held in @old_object_ptr with
* @new_object. This means that @old_object_ptr shall reference a
* valid object. However, @new_object can be NULL.
*/
void
gst_vaapi_object_replace (gpointer old_object_ptr, gpointer new_object)
{
gst_vaapi_mini_object_replace ((GstVaapiMiniObject **) old_object_ptr,
new_object);
}
/**
* gst_vaapi_object_get_display:
* @object: a #GstVaapiObject
*
* Returns the #GstVaapiDisplay this @object is bound to.
*
* Return value: the parent #GstVaapiDisplay object
*/
GstVaapiDisplay *
gst_vaapi_object_get_display (GstVaapiObject * object)
{
g_return_val_if_fail (object != NULL, NULL);
return GST_VAAPI_OBJECT_DISPLAY (object);
}
/**
* gst_vaapi_object_lock_display:
* @object: a #GstVaapiObject
*
* Locks @object parent display. If display is already locked by
* another thread, the current thread will block until display is
* unlocked by the other thread.
*/
void
gst_vaapi_object_lock_display (GstVaapiObject * object)
{
g_return_if_fail (object != NULL);
GST_VAAPI_OBJECT_LOCK_DISPLAY (object);
}
/**
* gst_vaapi_object_unlock_display:
* @object: a #GstVaapiObject
*
* Unlocks @object parent display. If another thread is blocked in a
* gst_vaapi_object_lock_display() call, it will be woken and can lock
* display itself.
*/
void
gst_vaapi_object_unlock_display (GstVaapiObject * object)
{
g_return_if_fail (object != NULL);
GST_VAAPI_OBJECT_UNLOCK_DISPLAY (object);
}
/**
* gst_vaapi_object_get_id:
* @object: a #GstVaapiObject
*
* Returns the #GstVaapiID contained in the @object.
*
* Return value: the #GstVaapiID of the @object
*/
GstVaapiID
gst_vaapi_object_get_id (GstVaapiObject * object)
{
g_return_val_if_fail (object != NULL, 0);
return GST_VAAPI_OBJECT_ID (object);
}
/*
* gstvaapiobject.h - Base VA object
*
* Copyright (C) 2010-2011 Splitted-Desktop Systems
* Author: Gwenole Beauchesne <gwenole.beauchesne@splitted-desktop.com>
* Copyright (C) 2012-2013 Intel Corporation
* Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef GST_VAAPI_OBJECT_H
#define GST_VAAPI_OBJECT_H
#include <gst/vaapi/gstvaapitypes.h>
#include <gst/vaapi/gstvaapidisplay.h>
G_BEGIN_DECLS
#define GST_VAAPI_OBJECT(obj) \
((GstVaapiObject *) (obj))
typedef struct _GstVaapiObject GstVaapiObject;
gpointer
gst_vaapi_object_ref (gpointer object);
void
gst_vaapi_object_unref (gpointer object);
void
gst_vaapi_object_replace (gpointer old_object_ptr, gpointer new_object);
GstVaapiDisplay *
gst_vaapi_object_get_display (GstVaapiObject * object);
void
gst_vaapi_object_lock_display (GstVaapiObject * object);
void
gst_vaapi_object_unlock_display (GstVaapiObject * object);
GstVaapiID
gst_vaapi_object_get_id (GstVaapiObject * object);
G_END_DECLS
#endif /* GST_VAAPI_OBJECT_H */
/*
* gstvaapiobject_priv.h - Base VA object (private definitions)
*
* Copyright (C) 2010-2011 Splitted-Desktop Systems
* Author: Gwenole Beauchesne <gwenole.beauchesne@splitted-desktop.com>
* Copyright (C) 2012-2013 Intel Corporation
* Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef GST_VAAPI_OBJECT_PRIV_H
#define GST_VAAPI_OBJECT_PRIV_H
#include <gst/vaapi/gstvaapiobject.h>
#include "gstvaapiminiobject.h"
#include "gstvaapidisplay_priv.h"
G_BEGIN_DECLS
#define GST_VAAPI_OBJECT_CLASS(klass) \
((GstVaapiObjectClass *) (klass))
#define GST_VAAPI_IS_OBJECT_CLASS(klass) \
((klass) != NULL)
#define GST_VAAPI_OBJECT_GET_CLASS(object) \
GST_VAAPI_OBJECT_CLASS (GST_VAAPI_MINI_OBJECT_GET_CLASS (object))
typedef struct _GstVaapiObjectClass GstVaapiObjectClass;
typedef void (*GstVaapiObjectInitFunc) (GstVaapiObject * object);
typedef void (*GstVaapiObjectFinalizeFunc) (GstVaapiObject * object);
#define GST_VAAPI_OBJECT_DEFINE_CLASS_WITH_CODE(TN, t_n, code) \
static inline const GstVaapiObjectClass * \
G_PASTE(t_n,_class) (void) \
{ \
static G_PASTE(TN,Class) g_class; \
static gsize g_class_init = FALSE; \
\
if (g_once_init_enter (&g_class_init)) { \
GstVaapiObjectClass * const klass = \
GST_VAAPI_OBJECT_CLASS (&g_class); \
gst_vaapi_object_class_init (klass, sizeof(TN)); \
code; \
klass->finalize = (GstVaapiObjectFinalizeFunc) \
G_PASTE(t_n,_finalize); \
g_once_init_leave (&g_class_init, TRUE); \
} \
return GST_VAAPI_OBJECT_CLASS (&g_class); \
}
#define GST_VAAPI_OBJECT_DEFINE_CLASS(TN, t_n) \
GST_VAAPI_OBJECT_DEFINE_CLASS_WITH_CODE (TN, t_n, /**/)
/**
* GST_VAAPI_OBJECT_ID:
* @object: a #GstVaapiObject
*
* Macro that evaluates to the #GstVaapiID contained in @object.
* This is an internal macro that does not do any run-time type checks.
*/
#define GST_VAAPI_OBJECT_ID(object) \
(GST_VAAPI_OBJECT (object)->object_id)
/**
* GST_VAAPI_OBJECT_DISPLAY:
* @object: a #GstVaapiObject
*
* Macro that evaluates to the #GstVaapiDisplay the @object is bound to.
* This is an internal macro that does not do any run-time type check.
*/
#define GST_VAAPI_OBJECT_DISPLAY(object) \
(GST_VAAPI_OBJECT (object)->display)
/**
* GST_VAAPI_OBJECT_DISPLAY_X11:
* @object: a #GstVaapiObject
*
* Macro that evaluates to the #GstVaapiDisplayX11 the @object is bound to.
* This is an internal macro that does not do any run-time type check
* and requires #include "gstvaapidisplay_x11_priv.h"
*/
#define GST_VAAPI_OBJECT_DISPLAY_X11(object) \
GST_VAAPI_DISPLAY_X11_CAST (GST_VAAPI_OBJECT_DISPLAY (object))
/**
* GST_VAAPI_OBJECT_DISPLAY_GLX:
* @object: a #GstVaapiObject
*
* Macro that evaluates to the #GstVaapiDisplayGLX the @object is bound to.
* This is an internal macro that does not do any run-time type check
* and requires #include "gstvaapidisplay_glx_priv.h".
*/
#define GST_VAAPI_OBJECT_DISPLAY_GLX(object) \
GST_VAAPI_DISPLAY_GLX_CAST (GST_VAAPI_OBJECT_DISPLAY (object))
/**
* GST_VAAPI_OBJECT_DISPLAY_WAYLAND:
* @object: a #GstVaapiObject
*
* Macro that evaluates to the #GstVaapiDisplayWayland the @object is
* bound to. This is an internal macro that does not do any run-time
* type check and requires #include "gstvaapidisplay_wayland_priv.h"
*/
#define GST_VAAPI_OBJECT_DISPLAY_WAYLAND(object) \
GST_VAAPI_DISPLAY_WAYLAND_CAST (GST_VAAPI_OBJECT_DISPLAY (object))
/**
* GST_VAAPI_OBJECT_VADISPLAY:
* @object: a #GstVaapiObject
*
* Macro that evaluates to the #VADisplay of @display.
* This is an internal macro that does not do any run-time type check
* and requires #include "gstvaapidisplay_priv.h".
*/
#define GST_VAAPI_OBJECT_VADISPLAY(object) \
GST_VAAPI_DISPLAY_VADISPLAY (GST_VAAPI_OBJECT_DISPLAY (object))
/**
* GST_VAAPI_OBJECT_NATIVE_DISPLAY:
* @object: a #GstVaapiObject
*
* Macro that evaluates to the underlying native @display object.
* This is an internal macro that does not do any run-time type check.
*/
#define GST_VAAPI_OBJECT_NATIVE_DISPLAY(object) \
GST_VAAPI_DISPLAY_NATIVE (GST_VAAPI_OBJECT_DISPLAY (object))
/**
* GST_VAAPI_OBJECT_LOCK_DISPLAY:
* @object: a #GstVaapiObject
*
* Macro that locks the #GstVaapiDisplay contained in the @object.
* This is an internal macro that does not do any run-time type check.
*/
#define GST_VAAPI_OBJECT_LOCK_DISPLAY(object) \
GST_VAAPI_DISPLAY_LOCK (GST_VAAPI_OBJECT_DISPLAY (object))
/**
* GST_VAAPI_OBJECT_UNLOCK_DISPLAY:
* @object: a #GstVaapiObject
*
* Macro that unlocks the #GstVaapiDisplay contained in the @object.
* This is an internal macro that does not do any run-time type check.
*/
#define GST_VAAPI_OBJECT_UNLOCK_DISPLAY(object) \
GST_VAAPI_DISPLAY_UNLOCK (GST_VAAPI_OBJECT_DISPLAY (object))
/**
* GstVaapiObject:
*
* VA object base.
*/
struct _GstVaapiObject
{
/*< private >*/
GstVaapiMiniObject parent_instance;
GstVaapiDisplay *display;
GstVaapiID object_id;
};
/**
* GstVaapiObjectClass:
*
* VA object base class.
*/
struct _GstVaapiObjectClass
{
/*< private >*/
GstVaapiMiniObjectClass parent_class;
GstVaapiObjectInitFunc init;
GstVaapiObjectFinalizeFunc finalize;
};
void
gst_vaapi_object_class_init (GstVaapiObjectClass * klass, guint size);
gpointer
gst_vaapi_object_new (const GstVaapiObjectClass * klass,
GstVaapiDisplay * display);
G_END_DECLS
#endif /* GST_VAAPI_OBJECT_PRIV_H */
......@@ -25,6 +25,7 @@
#ifndef GST_VAAPI_PROFILE_H
#define GST_VAAPI_PROFILE_H
#include <va/va.h>
#include <gst/gstvalue.h>
G_BEGIN_DECLS
......
......@@ -31,7 +31,6 @@
#include "gstvaapicompat.h"
#include "gstvaapiutils.h"
#include "gstvaapisubpicture.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapiimage_priv.h"
#define DEBUG 1
......
......@@ -25,7 +25,6 @@
#ifndef GST_VAAPI_SUBPICTURE_H
#define GST_VAAPI_SUBPICTURE_H
#include <gst/vaapi/gstvaapiobject.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapiimage.h>
#include <gst/video/video-overlay-composition.h>
......
......@@ -25,7 +25,6 @@
#ifndef GST_VAAPI_SURFACE_H
#define GST_VAAPI_SURFACE_H
#include <gst/vaapi/gstvaapiobject.h>
#include <gst/vaapi/gstvaapidisplay.h>
#include <gst/vaapi/gstvaapiimage.h>
#include <gst/vaapi/gstvaapisubpicture.h>
......
......@@ -27,7 +27,6 @@
#include "gstvaapiminiobject.h"
#include "gstvaapisurfaceproxy.h"
#include "gstvaapiobject_priv.h"
#include "gstvaapisurface_priv.h"
#define GST_VAAPI_SURFACE_PROXY(obj) \
......
......@@ -30,7 +30,6 @@
#include "sysdeps.h"
#include "gstvaapivideopool.h"
#include "gstvaapivideopool_priv.h"
#include "gstvaapiobject.h"
#define DEBUG 1
#include "gstvaapidebug.h"
......
......@@ -20,7 +20,6 @@ gstlibvaapi_sources = [
'gstvaapiimage.c',
'gstvaapiimagepool.c',
'gstvaapiminiobject.c',
'gstvaapiobject.c',
'gstvaapiparser_frame.c',
'gstvaapiprofile.c',
'gstvaapiprofilecaps.c',
......@@ -59,7 +58,6 @@ gstlibvaapi_headers = [
'gstvaapifilter.h',
'gstvaapiimage.h',
'gstvaapiimagepool.h',
'gstvaapiobject.h',
'gstvaapiprofile.h',
'gstvaapiprofilecaps.h',
'gstvaapisubpicture.h',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment