2011-09-07 11:14:38 +00:00
|
|
|
/* GStreamer - GParamSpecs for some of our types
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
* Copyright (C) 2007 Tim-Philipp Müller <tim centricular net>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_PARAMSPECS_H__
|
|
|
|
#define __GST_PARAMSPECS_H__
|
|
|
|
|
|
|
|
#include <gst/gstvalue.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2008-04-15 06:16:33 +00:00
|
|
|
/* --- paramspec flags */
|
|
|
|
|
|
|
|
/**
|
2018-03-21 08:13:44 +00:00
|
|
|
* GST_PARAM_CONTROLLABLE: (value 512)
|
2008-04-15 06:16:33 +00:00
|
|
|
*
|
|
|
|
* Use this flag on GObject properties to signal they can make sense to be.
|
|
|
|
* controlled over time. This hint is used by the GstController.
|
|
|
|
*/
|
|
|
|
#define GST_PARAM_CONTROLLABLE (1 << (G_PARAM_USER_SHIFT + 1))
|
|
|
|
|
2009-02-20 19:09:19 +00:00
|
|
|
/**
|
2018-03-21 08:13:44 +00:00
|
|
|
* GST_PARAM_MUTABLE_READY: (value 1024)
|
2009-02-20 19:09:19 +00:00
|
|
|
*
|
|
|
|
* Use this flag on GObject properties of GstElements to indicate that
|
|
|
|
* they can be changed when the element is in the READY or lower state.
|
|
|
|
*/
|
|
|
|
#define GST_PARAM_MUTABLE_READY (1 << (G_PARAM_USER_SHIFT + 2))
|
|
|
|
|
|
|
|
/**
|
2018-03-21 08:13:44 +00:00
|
|
|
* GST_PARAM_MUTABLE_PAUSED: (value 2048)
|
2009-02-20 19:09:19 +00:00
|
|
|
*
|
|
|
|
* Use this flag on GObject properties of GstElements to indicate that
|
|
|
|
* they can be changed when the element is in the PAUSED or lower state.
|
|
|
|
* This flag implies GST_PARAM_MUTABLE_READY.
|
|
|
|
*/
|
|
|
|
#define GST_PARAM_MUTABLE_PAUSED (1 << (G_PARAM_USER_SHIFT + 3))
|
|
|
|
|
|
|
|
/**
|
2018-03-21 08:13:44 +00:00
|
|
|
* GST_PARAM_MUTABLE_PLAYING: (value 4096)
|
2009-02-20 19:09:19 +00:00
|
|
|
*
|
|
|
|
* Use this flag on GObject properties of GstElements to indicate that
|
|
|
|
* they can be changed when the element is in the PLAYING or lower state.
|
|
|
|
* This flag implies GST_PARAM_MUTABLE_PAUSED.
|
|
|
|
*/
|
|
|
|
#define GST_PARAM_MUTABLE_PLAYING (1 << (G_PARAM_USER_SHIFT + 4))
|
|
|
|
|
2018-08-11 14:12:27 +00:00
|
|
|
/**
|
|
|
|
* GST_PARAM_DOC_SHOW_DEFAULT: (value 8192)
|
|
|
|
*
|
|
|
|
* Use this flag on GObject properties of GstObject to indicate that
|
|
|
|
* during `gst-inspect` and friends, the default value should be used
|
|
|
|
* as default instead of the current value.
|
|
|
|
*/
|
|
|
|
#define GST_PARAM_DOC_SHOW_DEFAULT (1 << (G_PARAM_USER_SHIFT + 5))
|
|
|
|
|
2008-04-15 06:16:33 +00:00
|
|
|
/**
|
2018-03-21 08:13:44 +00:00
|
|
|
* GST_PARAM_USER_SHIFT: (value 65536)
|
2008-04-15 06:16:33 +00:00
|
|
|
*
|
|
|
|
* Bits based on GST_PARAM_USER_SHIFT can be used by 3rd party applications.
|
|
|
|
*/
|
|
|
|
#define GST_PARAM_USER_SHIFT (1 << (G_PARAM_USER_SHIFT + 8))
|
|
|
|
|
|
|
|
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
/* --- type macros --- */
|
|
|
|
|
|
|
|
#define GST_TYPE_PARAM_FRACTION (gst_param_spec_fraction_get_type ())
|
|
|
|
#define GST_IS_PARAM_SPEC_FRACTION(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GST_TYPE_PARAM_FRACTION))
|
|
|
|
#define GST_PARAM_SPEC_FRACTION(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GST_TYPE_PARAM_FRACTION, GstParamSpecFraction))
|
|
|
|
|
|
|
|
|
2017-02-23 18:16:17 +00:00
|
|
|
#define GST_TYPE_PARAM_ARRAY_LIST (gst_param_spec_array_get_type ())
|
|
|
|
#define GST_IS_PARAM_SPEC_ARRAY_LIST(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GST_TYPE_PARAM_ARRAY_LIST))
|
|
|
|
#define GST_PARAM_SPEC_ARRAY_LIST(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), GST_TYPE_PARAM_ARRAY_LIST, GstParamSpecArray))
|
|
|
|
|
|
|
|
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
/* --- get_type functions --- */
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
GType gst_param_spec_fraction_get_type (void);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-02-23 18:16:17 +00:00
|
|
|
GType gst_param_spec_array_get_type (void);
|
|
|
|
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
|
|
|
|
/* --- typedefs & structures --- */
|
|
|
|
|
|
|
|
typedef struct _GstParamSpecFraction GstParamSpecFraction;
|
2017-02-23 18:16:17 +00:00
|
|
|
typedef struct _GstParamSpecArray GstParamSpecArray;
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
|
2007-07-25 13:00:23 +00:00
|
|
|
/**
|
|
|
|
* GstParamSpecFraction:
|
|
|
|
* @parent_instance: super class
|
|
|
|
* @min_num: minimal numerator
|
|
|
|
* @min_den: minimal denominator
|
|
|
|
* @max_num: maximal numerator
|
|
|
|
* @max_den: maximal denominator
|
|
|
|
* @def_num: default numerator
|
|
|
|
* @def_den: default denominator
|
|
|
|
*
|
|
|
|
* A GParamSpec derived structure that contains the meta data for fractional
|
|
|
|
* properties.
|
|
|
|
*/
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
struct _GstParamSpecFraction {
|
|
|
|
GParamSpec parent_instance;
|
2011-11-11 15:52:41 +00:00
|
|
|
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
gint min_num, min_den;
|
|
|
|
gint max_num, max_den;
|
|
|
|
gint def_num, def_den;
|
|
|
|
};
|
|
|
|
|
2017-02-23 18:16:17 +00:00
|
|
|
/**
|
|
|
|
* GstParamSpecArray:
|
|
|
|
* @parent_instance: super class
|
2018-04-02 10:42:30 +00:00
|
|
|
* @element_spec: the #GParamSpec of the type of values in the array
|
2017-02-23 18:16:17 +00:00
|
|
|
*
|
2018-04-02 10:42:30 +00:00
|
|
|
* A GParamSpec derived structure for arrays of values.
|
2017-02-23 18:16:17 +00:00
|
|
|
*/
|
|
|
|
struct _GstParamSpecArray {
|
|
|
|
GParamSpec parent_instance;
|
|
|
|
|
|
|
|
GParamSpec * element_spec;
|
|
|
|
};
|
|
|
|
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
|
|
|
|
/* --- GParamSpec prototypes --- */
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
GParamSpec * gst_param_spec_fraction (const gchar * name,
|
|
|
|
const gchar * nick,
|
|
|
|
const gchar * blurb,
|
|
|
|
gint min_num, gint min_denom,
|
|
|
|
gint max_num, gint max_denom,
|
|
|
|
gint default_num, gint default_denom,
|
2011-11-26 18:57:44 +00:00
|
|
|
GParamFlags flags) G_GNUC_MALLOC;
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_API
|
2017-02-23 18:16:17 +00:00
|
|
|
GParamSpec * gst_param_spec_array (const gchar * name,
|
|
|
|
const gchar * nick,
|
|
|
|
const gchar * blurb,
|
|
|
|
GParamSpec * element_spec,
|
|
|
|
GParamFlags flags) G_GNUC_MALLOC;
|
|
|
|
|
API: add GstParamSpecFraction, so elements can have fraction properties without lots of painful string parsing (#4446...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/Makefile.am:
* gst/gst.c:
* gst/gst.h:
* gst/gstparamspecs.c: (_gst_param_fraction_init),
(_gst_param_fraction_set_default), (_gst_param_fraction_validate),
(_gst_param_fraction_values_cmp),
(gst_param_spec_fraction_get_type), (gst_param_spec_fraction):
* gst/gstparamspecs.h:
* gst/gstvalue.c:
* tests/check/Makefile.am:
* tests/check/gst/.cvsignore:
* tests/check/gst/gstparamspecs.c: (gst_dummy_obj_base_init),
(gst_dummy_obj_class_init), (gst_dummy_obj_init),
(gst_dummy_obj_set_property), (gst_dummy_obj_get_property),
(GST_START_TEST), (gst_param_spec_suite):
API: add GstParamSpecFraction, so elements can have fraction
properties without lots of painful string parsing (#444648).
2007-06-06 11:18:12 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_PARAMSPECS_H__ */
|
|
|
|
|