mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 19:18:31 +00:00
libs: encoder: delete EncoderPropInfo related functions
This commit is contained in:
parent
25b6be1780
commit
adcb448276
3 changed files with 0 additions and 107 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 >*/
|
||||
|
|
Loading…
Reference in a new issue