mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
mixer: Add ::get_mixer_type() vfunc and deprecate interface struct value
This commit is contained in:
parent
16c3946440
commit
dd2aca8753
2 changed files with 15 additions and 1 deletions
|
@ -134,7 +134,9 @@ gst_mixer_class_init (GstMixerClass * klass)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef GST_REMOVE_DEPRECATED
|
||||
klass->mixer_type = GST_MIXER_SOFTWARE;
|
||||
#endif
|
||||
|
||||
/* default virtual functions */
|
||||
klass->list_tracks = NULL;
|
||||
|
@ -355,7 +357,14 @@ gst_mixer_get_mixer_type (GstMixer * mixer)
|
|||
{
|
||||
GstMixerClass *klass = GST_MIXER_GET_CLASS (mixer);
|
||||
|
||||
if (klass->get_mixer_type)
|
||||
return klass->get_mixer_type (mixer);
|
||||
|
||||
#ifndef GST_REMOVE_DEPRECATED
|
||||
return klass->mixer_type;
|
||||
#else
|
||||
g_return_if_reached (GST_MIXER_TYPE_SOFTWARE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -117,7 +117,10 @@ typedef enum
|
|||
struct _GstMixerClass {
|
||||
GTypeInterface klass;
|
||||
|
||||
/* FIXME 0.11: Remove this */
|
||||
#ifndef GST_REMOVE_DEPRECATED
|
||||
GstMixerType mixer_type;
|
||||
#endif
|
||||
|
||||
/* virtual functions */
|
||||
const GList * (* list_tracks) (GstMixer *mixer);
|
||||
|
@ -166,8 +169,10 @@ struct _GstMixerClass {
|
|||
|
||||
GstMixerFlags (* get_mixer_flags) (GstMixer *mixer);
|
||||
|
||||
GstMixerType (* get_mixer_type) (GstMixer *mixer);
|
||||
|
||||
/*< private >*/
|
||||
gpointer _gst_reserved[GST_PADDING-1];
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GType gst_mixer_get_type (void);
|
||||
|
|
Loading…
Reference in a new issue