mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
gst-libs: remove GstImplementsInterface usage
Will need to add replacement API for some of these.
This commit is contained in:
parent
ac6c07a955
commit
56df7800a0
10 changed files with 37 additions and 22 deletions
|
@ -41,6 +41,11 @@
|
|||
* </refsect2>
|
||||
*/
|
||||
|
||||
/* FIXME 0.11: check if we need to add API for sometimes-supportedness
|
||||
* (aka making up for GstImplementsInterface removal) */
|
||||
|
||||
/* FIXME 0.11: replace signals with messages (+ make API thread-safe) */
|
||||
|
||||
enum
|
||||
{
|
||||
VALUE_CHANGED,
|
||||
|
@ -71,8 +76,6 @@ gst_color_balance_get_type (void)
|
|||
|
||||
gst_color_balance_type = g_type_register_static (G_TYPE_INTERFACE,
|
||||
"GstColorBalance", &gst_color_balance_info, 0);
|
||||
g_type_interface_add_prerequisite (gst_color_balance_type,
|
||||
GST_TYPE_IMPLEMENTS_INTERFACE);
|
||||
}
|
||||
|
||||
return gst_color_balance_type;
|
||||
|
|
|
@ -28,16 +28,16 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* FIXME 0.11: remove all CLASS bits, this is an interface */
|
||||
#define GST_TYPE_COLOR_BALANCE \
|
||||
(gst_color_balance_get_type ())
|
||||
#define GST_COLOR_BALANCE(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_COLOR_BALANCE, \
|
||||
GstColorBalance))
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_COLOR_BALANCE, GstColorBalance))
|
||||
#define GST_COLOR_BALANCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_COLOR_BALANCE, \
|
||||
GstColorBalanceClass))
|
||||
#define GST_IS_COLOR_BALANCE(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE))
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_COLOR_BALANCE))
|
||||
#define GST_IS_COLOR_BALANCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_COLOR_BALANCE))
|
||||
#define GST_COLOR_BALANCE_GET_CLASS(inst) \
|
||||
|
|
|
@ -50,6 +50,9 @@
|
|||
* macro (in C) and the mixer API can be used.
|
||||
*/
|
||||
|
||||
/* FIXME 0.11: check if we need to add API for sometimes-supportedness
|
||||
* (aka making up for GstImplementsInterface removal) */
|
||||
|
||||
#ifndef GST_DISABLE_DEPRECATED
|
||||
enum
|
||||
{
|
||||
|
@ -86,8 +89,6 @@ gst_mixer_get_type (void)
|
|||
|
||||
gst_mixer_type = g_type_register_static (G_TYPE_INTERFACE,
|
||||
"GstMixer", &gst_mixer_info, 0);
|
||||
g_type_interface_add_prerequisite (gst_mixer_type,
|
||||
GST_TYPE_IMPLEMENTS_INTERFACE);
|
||||
}
|
||||
|
||||
return gst_mixer_type;
|
||||
|
|
|
@ -29,14 +29,16 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* FIXME 0.11: remove all CLASS bits, this is an interface */
|
||||
|
||||
#define GST_TYPE_MIXER \
|
||||
(gst_mixer_get_type ())
|
||||
#define GST_MIXER(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER, GstMixer))
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER, GstMixer))
|
||||
#define GST_MIXER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER, GstMixerClass))
|
||||
#define GST_IS_MIXER(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER))
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER))
|
||||
#define GST_IS_MIXER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER))
|
||||
#define GST_MIXER_GET_CLASS(inst) \
|
||||
|
|
|
@ -69,6 +69,11 @@
|
|||
* </refsect2>
|
||||
*/
|
||||
|
||||
/* FIXME 0.11: check if we need to add API for sometimes-supportedness
|
||||
* (aka making up for GstImplementsInterface removal) */
|
||||
|
||||
/* FIXME 0.11: replace signals with messages (+ make API thread-safe) */
|
||||
|
||||
enum
|
||||
{
|
||||
NORM_CHANGED,
|
||||
|
@ -102,8 +107,6 @@ gst_tuner_get_type (void)
|
|||
|
||||
gst_tuner_type = g_type_register_static (G_TYPE_INTERFACE,
|
||||
"GstTuner", &gst_tuner_info, 0);
|
||||
g_type_interface_add_prerequisite (gst_tuner_type,
|
||||
GST_TYPE_IMPLEMENTS_INTERFACE);
|
||||
}
|
||||
|
||||
return gst_tuner_type;
|
||||
|
|
|
@ -29,14 +29,16 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* FIXME 0.11: remove all CLASS bits, this is an interface */
|
||||
|
||||
#define GST_TYPE_TUNER \
|
||||
(gst_tuner_get_type ())
|
||||
#define GST_TUNER(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TUNER, GstTuner))
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TUNER, GstTuner))
|
||||
#define GST_TUNER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TUNER, GstTunerClass))
|
||||
#define GST_IS_TUNER(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER))
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER))
|
||||
#define GST_IS_TUNER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER))
|
||||
#define GST_TUNER_GET_CLASS(inst) \
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
* Since: 0.10.11
|
||||
*/
|
||||
|
||||
/* FIXME 0.11: check if we need to add API for sometimes-supportedness
|
||||
* (aka making up for GstImplementsInterface removal) (probably yes) */
|
||||
|
||||
static void gst_video_orientation_iface_init (GstVideoOrientationInterface *
|
||||
iface);
|
||||
|
||||
|
@ -62,8 +65,6 @@ gst_video_orientation_get_type (void)
|
|||
|
||||
gst_video_orientation_type = g_type_register_static (G_TYPE_INTERFACE,
|
||||
"GstVideoOrientation", &gst_video_orientation_info, 0);
|
||||
g_type_interface_add_prerequisite (gst_video_orientation_type,
|
||||
GST_TYPE_IMPLEMENTS_INTERFACE);
|
||||
}
|
||||
|
||||
return gst_video_orientation_type;
|
||||
|
|
|
@ -30,9 +30,9 @@ G_BEGIN_DECLS
|
|||
#define GST_TYPE_VIDEO_ORIENTATION \
|
||||
(gst_video_orientation_get_type ())
|
||||
#define GST_VIDEO_ORIENTATION(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEO_ORIENTATION, GstVideoOrientation))
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VIDEO_ORIENTATION, GstVideoOrientation))
|
||||
#define GST_IS_VIDEO_ORIENTATION(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VIDEO_ORIENTATION))
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VIDEO_ORIENTATION))
|
||||
#define GST_VIDEO_ORIENTATION_GET_IFACE(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_VIDEO_ORIENTATION, GstVideoOrientationInterface))
|
||||
|
||||
|
@ -61,6 +61,10 @@ typedef struct _GstVideoOrientationInterface GstVideoOrientationInterface;
|
|||
struct _GstVideoOrientationInterface {
|
||||
GTypeInterface parent;
|
||||
|
||||
/* FIXME 0.11: fix awkward API? add some kind of get_supported flags thing
|
||||
* and then just return booleans/int from all vfuncs requiring the caller
|
||||
* to check the flags first */
|
||||
|
||||
/* virtual functions */
|
||||
gboolean (* get_hflip) (GstVideoOrientation *video_orientation, gboolean *flip);
|
||||
gboolean (* get_vflip) (GstVideoOrientation *video_orientation, gboolean *flip);
|
||||
|
|
|
@ -318,8 +318,6 @@ gst_x_overlay_get_type (void)
|
|||
|
||||
gst_x_overlay_type = g_type_register_static (G_TYPE_INTERFACE,
|
||||
"GstXOverlay", &gst_x_overlay_info, 0);
|
||||
g_type_interface_add_prerequisite (gst_x_overlay_type,
|
||||
GST_TYPE_IMPLEMENTS_INTERFACE);
|
||||
}
|
||||
|
||||
return gst_x_overlay_type;
|
||||
|
|
|
@ -27,15 +27,16 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* FIXME 0.11: remove all CLASS bits, this is an interface */
|
||||
|
||||
#define GST_TYPE_X_OVERLAY \
|
||||
(gst_x_overlay_get_type ())
|
||||
#define GST_X_OVERLAY(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_X_OVERLAY, \
|
||||
GstXOverlay))
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_X_OVERLAY, GstXOverlay))
|
||||
#define GST_X_OVERLAY_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_X_OVERLAY, GstXOverlayClass))
|
||||
#define GST_IS_X_OVERLAY(obj) \
|
||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_X_OVERLAY))
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_X_OVERLAY))
|
||||
#define GST_IS_X_OVERLAY_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_X_OVERLAY))
|
||||
#define GST_X_OVERLAY_GET_CLASS(inst) \
|
||||
|
|
Loading…
Reference in a new issue