summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@hotmail.com>2019-08-29 18:17:42 +0800
committerHe Junyan <junyan.he@hotmail.com>2019-08-30 21:21:04 +0800
commitadcb448276456115e36d2b4e3535266251397c42 (patch)
treef541df05e120b8903f654392f26155dee04e1fcc /gst-libs
parent25b6be1780bc4b3bc37a4b86d96f041853153014 (diff)
libs: encoder: delete EncoderPropInfo related functions
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder.c78
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder.h12
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_priv.h17
3 files changed, 0 insertions, 107 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c
index 87060542..b6ef77c5 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.c
@@ -34,84 +34,6 @@
#define DEBUG 1
#include "gstvaapidebug.h"
-/* Helper function to create a new encoder property object */
-static GstVaapiEncoderPropData *
-prop_new (gint id, GParamSpec * pspec)
-{
- GstVaapiEncoderPropData *prop;
-
- if (!id || !pspec)
- return NULL;
-
- prop = g_slice_new (GstVaapiEncoderPropData);
- if (!prop)
- return NULL;
-
- prop->prop = id;
- prop->pspec = g_param_spec_ref_sink (pspec);
- return prop;
-}
-
-/* Helper function to release a property object and any memory held herein */
-static void
-prop_free (GstVaapiEncoderPropData * prop)
-{
- if (!prop)
- return;
-
- if (prop->pspec) {
- g_param_spec_unref (prop->pspec);
- prop->pspec = NULL;
- }
- g_slice_free (GstVaapiEncoderPropData, prop);
-}
-
-/* Helper function to lookup the supplied property specification */
-__attribute__ ((unused))
- static GParamSpec *prop_find_pspec (GstVaapiEncoder * encoder,
- gint prop_id)
-{
- GPtrArray *const props = encoder->properties;
- guint i;
-
- if (props) {
- for (i = 0; i < props->len; i++) {
- GstVaapiEncoderPropInfo *const prop = g_ptr_array_index (props, i);
- if (prop->prop == prop_id)
- return prop->pspec;
- }
- }
- return NULL;
-}
-
-/* Create a new array of properties, or NULL on error */
-GPtrArray *
-gst_vaapi_encoder_properties_append (GPtrArray * props, gint prop_id,
- GParamSpec * pspec)
-{
- GstVaapiEncoderPropData *prop;
-
- if (!props) {
- props = g_ptr_array_new_with_free_func ((GDestroyNotify) prop_free);
- if (!props)
- return NULL;
- }
-
- prop = prop_new (prop_id, pspec);
- if (!prop)
- goto error_allocation_failed;
- g_ptr_array_add (props, prop);
- return props;
-
- /* ERRORS */
-error_allocation_failed:
- {
- GST_ERROR ("failed to allocate encoder property info structure");
- g_ptr_array_unref (props);
- return NULL;
- }
-}
-
gboolean
gst_vaapi_encoder_ensure_param_quality_level (GstVaapiEncoder * encoder,
GstVaapiEncPicture * picture)
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.h b/gst-libs/gst/vaapi/gstvaapiencoder.h
index 72254c39..71502239 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.h
@@ -122,18 +122,6 @@ typedef enum {
GST_VAAPI_ENCODER_MBBRC_OFF = 2,
} GstVaapiEncoderMbbrc;
-/**
- * GstVaapiEncoderPropInfo:
- * @prop: the #GstVaapiEncoderProp
- * @pspec: the #GParamSpec describing the associated configurable value
- *
- * A #GstVaapiEncoderProp descriptor.
- */
-typedef struct {
- const gint prop;
- GParamSpec *const pspec;
-} GstVaapiEncoderPropInfo;
-
GType
gst_vaapi_encoder_tune_get_type (void) G_GNUC_CONST;
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_priv.h b/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
index 19a03192..5cda1cde 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
@@ -221,23 +221,6 @@ G_BEGIN_DECLS
typedef struct _GstVaapiEncoderClass GstVaapiEncoderClass;
typedef struct _GstVaapiEncoderClassData GstVaapiEncoderClassData;
-/* Private GstVaapiEncoderPropInfo definition */
-typedef struct {
- gint prop;
- GParamSpec *pspec;
-} GstVaapiEncoderPropData;
-
-#define GST_VAAPI_ENCODER_PROPERTIES_APPEND(props, id, pspec) do { \
- props = gst_vaapi_encoder_properties_append (props, id, pspec); \
- if (!props) \
- return NULL; \
- } while (0)
-
-G_GNUC_INTERNAL
-GPtrArray *
-gst_vaapi_encoder_properties_append (GPtrArray * props, gint prop_id,
- GParamSpec *pspec);
-
struct _GstVaapiEncoder
{
/*< private >*/