mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
libs: drop obsolete function helpers and objects.
Drop obsolete GstVaapiID related function helpers for passing them as GValues.
This commit is contained in:
parent
915cef5e01
commit
4ffdc98ab4
6 changed files with 0 additions and 406 deletions
|
@ -60,7 +60,6 @@ libgstvaapi_source_c = \
|
|||
gstvaapiimagepool.c \
|
||||
gstvaapiminiobject.c \
|
||||
gstvaapiobject.c \
|
||||
gstvaapiparamspecs.c \
|
||||
gstvaapiparser_frame.c \
|
||||
gstvaapiprofile.c \
|
||||
gstvaapisubpicture.c \
|
||||
|
@ -86,7 +85,6 @@ libgstvaapi_source_h = \
|
|||
gstvaapiimageformat.h \
|
||||
gstvaapiimagepool.h \
|
||||
gstvaapiobject.h \
|
||||
gstvaapiparamspecs.h \
|
||||
gstvaapiprofile.h \
|
||||
gstvaapisubpicture.h \
|
||||
gstvaapisurface.h \
|
||||
|
@ -101,7 +99,6 @@ libgstvaapi_source_h = \
|
|||
libgstvaapi_source_priv_h = \
|
||||
glibcompat.h \
|
||||
gstcompat.h \
|
||||
gstvaapi_priv.h \
|
||||
gstvaapicodec_objects.h \
|
||||
gstvaapicompat.h \
|
||||
gstvaapidebug.h \
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* gstvaapi_priv.h - Helper to include all private headers
|
||||
*
|
||||
* Copyright (C) 2010-2011 Splitted-Desktop Systems
|
||||
*
|
||||
* 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_PRIV_H
|
||||
#define GST_VAAPI_PRIV_H
|
||||
|
||||
#include <gst/vaapi/gstvaapiobject_priv.h>
|
||||
#include <gst/vaapi/gstvaapidisplay_priv.h>
|
||||
|
||||
#endif /* GST_VAAPI_PRIV_H */
|
|
@ -1,141 +0,0 @@
|
|||
/*
|
||||
* gstvaapiparamspecs.c - GParamSpecs for some of our types
|
||||
*
|
||||
* Copyright (C) 2010-2011 Splitted-Desktop Systems
|
||||
* Copyright (C) 2012 Intel Corporation
|
||||
*
|
||||
* 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:gstvaapiparamspecs
|
||||
* @short_description: GParamSpecs for some of our types
|
||||
*/
|
||||
|
||||
#include "sysdeps.h"
|
||||
#include "gstvaapiparamspecs.h"
|
||||
#include "gstvaapivalue.h"
|
||||
|
||||
/* --- GstVaapiParamSpecID --- */
|
||||
|
||||
static void
|
||||
gst_vaapi_param_id_init(GParamSpec *pspec)
|
||||
{
|
||||
GST_VAAPI_PARAM_SPEC_ID(pspec)->default_value = GST_VAAPI_ID_NONE;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_vaapi_param_id_set_default(GParamSpec *pspec, GValue *value)
|
||||
{
|
||||
gst_vaapi_value_set_id(value, GST_VAAPI_PARAM_SPEC_ID(pspec)->default_value);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_vaapi_param_id_validate(GParamSpec *pspec, GValue *value)
|
||||
{
|
||||
/* Return FALSE if everything is OK, otherwise TRUE */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gint
|
||||
gst_vaapi_param_id_compare(
|
||||
GParamSpec *pspec,
|
||||
const GValue *value1,
|
||||
const GValue *value2
|
||||
)
|
||||
{
|
||||
const GstVaapiID v1 = gst_vaapi_value_get_id(value1);
|
||||
const GstVaapiID v2 = gst_vaapi_value_get_id(value2);
|
||||
|
||||
return (v1 < v2 ? -1 : (v1 > v2 ? 1 : 0));
|
||||
}
|
||||
|
||||
GType
|
||||
gst_vaapi_param_spec_id_get_type(void)
|
||||
{
|
||||
static GType type;
|
||||
|
||||
if (G_UNLIKELY(type == 0)) {
|
||||
static GParamSpecTypeInfo pspec_info = {
|
||||
sizeof(GstVaapiParamSpecID), /* instance_size */
|
||||
0, /* n_preallocs */
|
||||
gst_vaapi_param_id_init, /* instance_init */
|
||||
G_TYPE_INVALID, /* value_type */
|
||||
NULL, /* finalize */
|
||||
gst_vaapi_param_id_set_default, /* value_set_default */
|
||||
gst_vaapi_param_id_validate, /* value_validate */
|
||||
gst_vaapi_param_id_compare, /* values_cmp */
|
||||
};
|
||||
pspec_info.value_type = GST_VAAPI_TYPE_ID;
|
||||
type = g_param_type_register_static("GstVaapiParamSpecID", &pspec_info);
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_param_spec_id:
|
||||
* @name: canonical name of the property specified
|
||||
* @nick: nick name for the property specified
|
||||
* @blurb: description of the property specified
|
||||
* @default_value: default value
|
||||
* @flags: flags for the property specified
|
||||
*
|
||||
* This function creates an ID GParamSpec for use by #GstVaapiObject
|
||||
* objects. This function is typically used in connection with
|
||||
* g_object_class_install_property() in a GObjects's instance_init
|
||||
* function.
|
||||
*
|
||||
* Return value: a newly created parameter specification
|
||||
*/
|
||||
GParamSpec *
|
||||
gst_vaapi_param_spec_id(
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GstVaapiID default_value,
|
||||
GParamFlags flags
|
||||
)
|
||||
{
|
||||
GstVaapiParamSpecID *ispec;
|
||||
GParamSpec *pspec;
|
||||
GValue value = { 0, };
|
||||
|
||||
ispec = g_param_spec_internal(
|
||||
GST_VAAPI_TYPE_PARAM_ID,
|
||||
name,
|
||||
nick,
|
||||
blurb,
|
||||
flags
|
||||
);
|
||||
if (!ispec)
|
||||
return NULL;
|
||||
|
||||
ispec->default_value = default_value;
|
||||
pspec = G_PARAM_SPEC(ispec);
|
||||
|
||||
/* Validate default value */
|
||||
g_value_init(&value, GST_VAAPI_TYPE_ID);
|
||||
gst_vaapi_value_set_id(&value, default_value);
|
||||
if (gst_vaapi_param_id_validate(pspec, &value)) {
|
||||
g_param_spec_ref(pspec);
|
||||
g_param_spec_sink(pspec);
|
||||
g_param_spec_unref(pspec);
|
||||
pspec = NULL;
|
||||
}
|
||||
g_value_unset(&value);
|
||||
|
||||
return pspec;
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
* gstvaapiparamspecs.h - GParamSpecs for some of our types
|
||||
*
|
||||
* Copyright (C) 2010-2011 Splitted-Desktop Systems
|
||||
* Copyright (C) 2012 Intel Corporation
|
||||
*
|
||||
* 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_PARAM_SPECS_H
|
||||
#define GST_VAAPI_PARAM_SPECS_H
|
||||
|
||||
#include <gst/vaapi/gstvaapitypes.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GstVaapiParamSpecID:
|
||||
* @parent_instance: super class
|
||||
* @default_value: default value
|
||||
*
|
||||
* A GParamSpec derived structure that contains the meta data for
|
||||
* #GstVaapiID properties.
|
||||
*/
|
||||
typedef struct _GstVaapiParamSpecID GstVaapiParamSpecID;
|
||||
struct _GstVaapiParamSpecID {
|
||||
GParamSpec parent_instance;
|
||||
|
||||
GstVaapiID default_value;
|
||||
};
|
||||
|
||||
#define GST_VAAPI_TYPE_PARAM_ID \
|
||||
(gst_vaapi_param_spec_id_get_type())
|
||||
|
||||
#define GST_VAAPI_IS_PARAM_SPEC_ID(pspec) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((pspec), \
|
||||
GST_VAAPI_TYPE_PARAM_ID))
|
||||
|
||||
#define GST_VAAPI_PARAM_SPEC_ID(pspec) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((pspec), \
|
||||
GST_VAAPI_TYPE_PARAM_ID, \
|
||||
GstVaapiParamSpecID))
|
||||
|
||||
GType
|
||||
gst_vaapi_param_spec_id_get_type(void) G_GNUC_CONST;
|
||||
|
||||
GParamSpec *
|
||||
gst_vaapi_param_spec_id(
|
||||
const gchar *name,
|
||||
const gchar *nick,
|
||||
const gchar *blurb,
|
||||
GstVaapiID default_value,
|
||||
GParamFlags flags
|
||||
);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* GST_VAAPI_PARAM_SPECS_H */
|
|
@ -29,142 +29,6 @@
|
|||
#include <gobject/gvaluecollector.h>
|
||||
#include "gstvaapivalue.h"
|
||||
|
||||
static GTypeInfo gst_vaapi_type_info = {
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static GTypeFundamentalInfo gst_vaapi_type_finfo = {
|
||||
0
|
||||
};
|
||||
|
||||
#define GST_VAAPI_TYPE_DEFINE(type, name) \
|
||||
GType gst_vaapi_ ## type ## _get_type(void) \
|
||||
{ \
|
||||
static GType gst_vaapi_ ## type ## _type = 0; \
|
||||
\
|
||||
if (G_UNLIKELY(gst_vaapi_ ## type ## _type == 0)) { \
|
||||
gst_vaapi_type_info.value_table = \
|
||||
&gst_vaapi_ ## type ## _value_table; \
|
||||
gst_vaapi_ ## type ## _type = g_type_register_fundamental( \
|
||||
g_type_fundamental_next(), \
|
||||
name, \
|
||||
&gst_vaapi_type_info, \
|
||||
&gst_vaapi_type_finfo, \
|
||||
0 \
|
||||
); \
|
||||
} \
|
||||
return gst_vaapi_ ## type ## _type; \
|
||||
}
|
||||
|
||||
/* --- GstVaapiID --- */
|
||||
|
||||
#if GST_VAAPI_TYPE_ID_SIZE == 4
|
||||
# define GST_VAAPI_VALUE_ID_(cvalue) ((cvalue).v_int)
|
||||
# define GST_VAAPI_VALUE_ID_CFORMAT "i"
|
||||
#elif GST_VAAPI_TYPE_ID_SIZE == 8
|
||||
# define GST_VAAPI_VALUE_ID_(cvalue) ((cvalue).v_int64)
|
||||
# define GST_VAAPI_VALUE_ID_CFORMAT "q"
|
||||
#else
|
||||
# error "unsupported GstVaapiID size"
|
||||
#endif
|
||||
#define GST_VAAPI_VALUE_ID(value) GST_VAAPI_VALUE_ID_((value)->data[0])
|
||||
|
||||
static void
|
||||
gst_vaapi_value_id_init(GValue *value)
|
||||
{
|
||||
GST_VAAPI_VALUE_ID(value) = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_vaapi_value_id_copy(const GValue *src_value, GValue *dst_value)
|
||||
{
|
||||
GST_VAAPI_VALUE_ID(dst_value) = GST_VAAPI_VALUE_ID(src_value);
|
||||
}
|
||||
|
||||
static gchar *
|
||||
gst_vaapi_value_id_collect(
|
||||
GValue *value,
|
||||
guint n_collect_values,
|
||||
GTypeCValue *collect_values,
|
||||
guint collect_flags
|
||||
)
|
||||
{
|
||||
GST_VAAPI_VALUE_ID(value) = GST_VAAPI_VALUE_ID_(collect_values[0]);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
gst_vaapi_value_id_lcopy(
|
||||
const GValue *value,
|
||||
guint n_collect_values,
|
||||
GTypeCValue *collect_values,
|
||||
guint collect_flags
|
||||
)
|
||||
{
|
||||
GstVaapiID *id_p = collect_values[0].v_pointer;
|
||||
|
||||
if (!id_p)
|
||||
return g_strdup_printf("value location for `%s' passed as NULL",
|
||||
G_VALUE_TYPE_NAME(value));
|
||||
|
||||
*id_p = GST_VAAPI_VALUE_ID(value);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const GTypeValueTable gst_vaapi_id_value_table = {
|
||||
gst_vaapi_value_id_init,
|
||||
NULL,
|
||||
gst_vaapi_value_id_copy,
|
||||
NULL,
|
||||
GST_VAAPI_VALUE_ID_CFORMAT,
|
||||
gst_vaapi_value_id_collect,
|
||||
"p",
|
||||
gst_vaapi_value_id_lcopy
|
||||
};
|
||||
|
||||
GST_VAAPI_TYPE_DEFINE(id, "GstVaapiID")
|
||||
|
||||
/**
|
||||
* gst_vaapi_value_get_id:
|
||||
* @value: a GValue initialized to #GstVaapiID
|
||||
*
|
||||
* Gets the integer contained in @value.
|
||||
*
|
||||
* Return value: the integer contained in @value
|
||||
*/
|
||||
GstVaapiID
|
||||
gst_vaapi_value_get_id(const GValue *value)
|
||||
{
|
||||
g_return_val_if_fail(GST_VAAPI_VALUE_HOLDS_ID(value), 0);
|
||||
|
||||
return GST_VAAPI_VALUE_ID(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_vaapi_value_set_id:
|
||||
* @value: a GValue initialized to #GstVaapiID
|
||||
* @id: a #GstVaapiID
|
||||
*
|
||||
* Sets the integer contained in @id to @value.
|
||||
*/
|
||||
void
|
||||
gst_vaapi_value_set_id(GValue *value, GstVaapiID id)
|
||||
{
|
||||
g_return_if_fail(GST_VAAPI_VALUE_HOLDS_ID(value));
|
||||
|
||||
GST_VAAPI_VALUE_ID(value) = id;
|
||||
}
|
||||
|
||||
/* --- GstVaapiRenderMode --- */
|
||||
|
||||
GType
|
||||
|
|
|
@ -28,23 +28,6 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* GST_VAAPI_TYPE_ID:
|
||||
*
|
||||
* A #GValue type that represents a VA identifier.
|
||||
*
|
||||
* Return value: the #GType of GstVaapiID
|
||||
*/
|
||||
#define GST_VAAPI_TYPE_ID gst_vaapi_id_get_type()
|
||||
|
||||
/**
|
||||
* GST_VAAPI_VALUE_HOLDS_ID:
|
||||
* @x: the #GValue to check
|
||||
*
|
||||
* Checks if the given #GValue contains a #GstVaapiID value.
|
||||
*/
|
||||
#define GST_VAAPI_VALUE_HOLDS_ID(x) (G_VALUE_HOLDS((x), GST_VAAPI_TYPE_ID))
|
||||
|
||||
/**
|
||||
* GST_VAAPI_TYPE_RENDER_MODE:
|
||||
*
|
||||
|
@ -64,15 +47,6 @@ G_BEGIN_DECLS
|
|||
*/
|
||||
#define GST_VAAPI_TYPE_ROTATION gst_vaapi_rotation_get_type()
|
||||
|
||||
GType
|
||||
gst_vaapi_id_get_type(void) G_GNUC_CONST;
|
||||
|
||||
GstVaapiID
|
||||
gst_vaapi_value_get_id(const GValue *value);
|
||||
|
||||
void
|
||||
gst_vaapi_value_set_id(GValue *value, GstVaapiID id);
|
||||
|
||||
GType
|
||||
gst_vaapi_render_mode_get_type(void) G_GNUC_CONST;
|
||||
|
||||
|
|
Loading…
Reference in a new issue