mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
interfaces: clean up
Remove deprecated bits Fix FIXMES Indent Add padding
This commit is contained in:
parent
40be2eec9f
commit
7fb914d5b6
14 changed files with 107 additions and 197 deletions
|
@ -28,7 +28,6 @@
|
|||
|
||||
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) \
|
||||
|
@ -38,7 +37,7 @@ G_BEGIN_DECLS
|
|||
#define GST_COLOR_BALANCE_GET_INTERFACE(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_COLOR_BALANCE, GstColorBalanceInterface))
|
||||
|
||||
#define GST_COLOR_BALANCE_TYPE(klass) (klass->balance_type)
|
||||
#define GST_COLOR_BALANCE_TYPE(iface) (iface->balance_type)
|
||||
|
||||
typedef struct _GstColorBalance GstColorBalance;
|
||||
typedef struct _GstColorBalanceInterface GstColorBalanceInterface;
|
||||
|
@ -63,7 +62,7 @@ typedef enum
|
|||
|
||||
/**
|
||||
* GstColorBalanceInterface:
|
||||
* @klass: the parent interface
|
||||
* @iface: the parent interface
|
||||
* @balance_type: implementation type
|
||||
* @list_channels: list handled channels
|
||||
* @set_value: set a channel value
|
||||
|
@ -73,7 +72,7 @@ typedef enum
|
|||
* Color-balance interface.
|
||||
*/
|
||||
struct _GstColorBalanceInterface {
|
||||
GTypeInterface klass;
|
||||
GTypeInterface iface;
|
||||
|
||||
GstColorBalanceType balance_type;
|
||||
|
||||
|
|
|
@ -55,11 +55,14 @@ struct _GstColorBalanceChannel {
|
|||
gchar *label;
|
||||
gint min_value;
|
||||
gint max_value;
|
||||
|
||||
/*< private >*/
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
/**
|
||||
* GstColorBalanceChannelClass:
|
||||
* @parent: the parent interface
|
||||
* @parent: the parent class
|
||||
* @value_changed: default handler for value changed notification
|
||||
*
|
||||
* Color-balance channel class.
|
||||
|
|
|
@ -53,20 +53,6 @@
|
|||
/* FIXME 0.11: check if we need to add API for sometimes-supportedness
|
||||
* (aka making up for GstImplementsInterface removal) */
|
||||
|
||||
#ifndef GST_DISABLE_DEPRECATED
|
||||
enum
|
||||
{
|
||||
SIGNAL_MUTE_TOGGLED,
|
||||
SIGNAL_RECORD_TOGGLED,
|
||||
SIGNAL_VOLUME_CHANGED,
|
||||
SIGNAL_OPTION_CHANGED,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint gst_mixer_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
#endif
|
||||
|
||||
static void gst_mixer_class_init (GstMixerInterface * iface);
|
||||
|
||||
GType
|
||||
|
@ -97,44 +83,6 @@ gst_mixer_get_type (void)
|
|||
static void
|
||||
gst_mixer_class_init (GstMixerInterface * iface)
|
||||
{
|
||||
#ifndef GST_DISABLE_DEPRECATED
|
||||
static gboolean initialized = FALSE;
|
||||
|
||||
/* signals (deprecated) */
|
||||
if (!initialized) {
|
||||
gst_mixer_signals[SIGNAL_RECORD_TOGGLED] =
|
||||
g_signal_new ("record-toggled",
|
||||
GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstMixerInterface, record_toggled),
|
||||
NULL, NULL,
|
||||
gst_interfaces_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2,
|
||||
GST_TYPE_MIXER_TRACK, G_TYPE_BOOLEAN);
|
||||
gst_mixer_signals[SIGNAL_MUTE_TOGGLED] =
|
||||
g_signal_new ("mute-toggled",
|
||||
GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstMixerInterface, mute_toggled),
|
||||
NULL, NULL,
|
||||
gst_interfaces_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2,
|
||||
GST_TYPE_MIXER_TRACK, G_TYPE_BOOLEAN);
|
||||
gst_mixer_signals[SIGNAL_VOLUME_CHANGED] =
|
||||
g_signal_new ("volume-changed",
|
||||
GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstMixerInterface, volume_changed),
|
||||
NULL, NULL,
|
||||
gst_interfaces_marshal_VOID__OBJECT_POINTER, G_TYPE_NONE, 2,
|
||||
GST_TYPE_MIXER_TRACK, G_TYPE_POINTER);
|
||||
gst_mixer_signals[SIGNAL_OPTION_CHANGED] =
|
||||
g_signal_new ("option-changed",
|
||||
GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstMixerInterface, option_changed),
|
||||
NULL, NULL,
|
||||
gst_interfaces_marshal_VOID__OBJECT_STRING, G_TYPE_NONE, 2,
|
||||
GST_TYPE_MIXER_OPTIONS, G_TYPE_STRING);
|
||||
|
||||
initialized = TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
iface->mixer_type = GST_MIXER_SOFTWARE;
|
||||
|
||||
/* default virtual functions */
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
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) \
|
||||
|
@ -40,7 +38,7 @@ G_BEGIN_DECLS
|
|||
#define GST_MIXER_GET_INTERFACE(inst) \
|
||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_MIXER, GstMixerInterface))
|
||||
|
||||
#define GST_MIXER_TYPE(klass) (klass->mixer_type)
|
||||
#define GST_MIXER_TYPE(iface) (iface->mixer_type)
|
||||
|
||||
typedef struct _GstMixer GstMixer;
|
||||
typedef struct _GstMixerInterface GstMixerInterface;
|
||||
|
@ -113,7 +111,7 @@ typedef enum
|
|||
} GstMixerFlags;
|
||||
|
||||
struct _GstMixerInterface {
|
||||
GTypeInterface klass;
|
||||
GTypeInterface iface;
|
||||
|
||||
GstMixerType mixer_type;
|
||||
|
||||
|
@ -133,39 +131,16 @@ struct _GstMixerInterface {
|
|||
void (* set_record) (GstMixer *mixer,
|
||||
GstMixerTrack *track,
|
||||
gboolean record);
|
||||
#ifndef GST_DISABLE_DEPRECATED
|
||||
/* signals (deprecated) */
|
||||
void (* mute_toggled) (GstMixer *mixer,
|
||||
GstMixerTrack *channel,
|
||||
gboolean mute);
|
||||
void (* record_toggled) (GstMixer *mixer,
|
||||
GstMixerTrack *channel,
|
||||
gboolean record);
|
||||
void (* volume_changed) (GstMixer *mixer,
|
||||
GstMixerTrack *channel,
|
||||
gint *volumes);
|
||||
#else
|
||||
gpointer padding1[3];
|
||||
#endif /* not GST_DISABLE_DEPRECATED */
|
||||
|
||||
void (* set_option) (GstMixer *mixer,
|
||||
GstMixerOptions *opts,
|
||||
gchar *value);
|
||||
const gchar * (* get_option) (GstMixer *mixer,
|
||||
GstMixerOptions *opts);
|
||||
|
||||
#ifndef GST_DISABLE_DEPRECATED
|
||||
void (* option_changed) (GstMixer *mixer,
|
||||
GstMixerOptions *opts,
|
||||
gchar *option);
|
||||
#else
|
||||
gpointer padding2;
|
||||
#endif /* not GST_DISABLE_DEPRECATED */
|
||||
|
||||
GstMixerFlags (* get_mixer_flags) (GstMixer *mixer);
|
||||
|
||||
/*< private >*/
|
||||
gpointer _gst_reserved[GST_PADDING-1];
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GType gst_mixer_get_type (void);
|
||||
|
|
|
@ -67,22 +67,16 @@ struct _GstMixerOptions {
|
|||
|
||||
/**
|
||||
* GstMixerOptionsClass:
|
||||
* @parent: the parent interface
|
||||
* @parent: the parent class
|
||||
* @get_values: Optional implementation of gst_mixer_options_get_values().
|
||||
* (Since: 0.10.18)
|
||||
*/
|
||||
struct _GstMixerOptionsClass {
|
||||
GstMixerTrackClass parent;
|
||||
|
||||
#ifdef GST_MIXER_NEED_DEPRECATED
|
||||
/* signals */
|
||||
void (* option_changed) (GstMixerOptions *opts,
|
||||
gchar *value);
|
||||
#endif /* GST_MIXER_NEED_DEPRECATED */
|
||||
|
||||
GList * (* get_values) (GstMixerOptions *opts);
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING-1];
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
GType gst_mixer_options_get_type (void);
|
||||
|
|
|
@ -75,21 +75,19 @@ G_BEGIN_DECLS
|
|||
* Mixer track flags.
|
||||
*/
|
||||
typedef enum {
|
||||
GST_MIXER_TRACK_INPUT = (1<<0),
|
||||
GST_MIXER_TRACK_OUTPUT = (1<<1),
|
||||
GST_MIXER_TRACK_MUTE = (1<<2),
|
||||
GST_MIXER_TRACK_RECORD = (1<<3),
|
||||
GST_MIXER_TRACK_MASTER = (1<<4),
|
||||
GST_MIXER_TRACK_SOFTWARE = (1<<5),
|
||||
GST_MIXER_TRACK_NO_RECORD = (1<<6),
|
||||
GST_MIXER_TRACK_NO_MUTE = (1<<7),
|
||||
GST_MIXER_TRACK_WHITELIST = (1<<8),
|
||||
GST_MIXER_TRACK_READONLY = (1<<9),
|
||||
GST_MIXER_TRACK_WRITEONLY = (1<<10)
|
||||
GST_MIXER_TRACK_INPUT = (1 << 0),
|
||||
GST_MIXER_TRACK_OUTPUT = (1 << 1),
|
||||
GST_MIXER_TRACK_MUTE = (1 << 2),
|
||||
GST_MIXER_TRACK_RECORD = (1 << 3),
|
||||
GST_MIXER_TRACK_MASTER = (1 << 4),
|
||||
GST_MIXER_TRACK_SOFTWARE = (1 << 5),
|
||||
GST_MIXER_TRACK_NO_RECORD = (1 << 6),
|
||||
GST_MIXER_TRACK_NO_MUTE = (1 << 7),
|
||||
GST_MIXER_TRACK_WHITELIST = (1 << 8),
|
||||
GST_MIXER_TRACK_READABLE = (1 << 9),
|
||||
GST_MIXER_TRACK_WRITABLE = (1 << 10)
|
||||
} GstMixerTrackFlags;
|
||||
|
||||
/* FIXME 0.11: READONLY/WRITEONLY -> READABLE/WRITABLE etc. */
|
||||
|
||||
#define GST_MIXER_TRACK_HAS_FLAG(channel, flag) \
|
||||
((channel)->flags & flag)
|
||||
|
||||
|
@ -101,29 +99,18 @@ struct _GstMixerTrack {
|
|||
|
||||
gchar *label;
|
||||
|
||||
/* FIXME 0.11: flags should be guint32 */
|
||||
GstMixerTrackFlags flags;
|
||||
|
||||
gint num_channels;
|
||||
gint min_volume;
|
||||
gint max_volume;
|
||||
|
||||
/* FIXME 0.11: add padding */
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstMixerTrackClass {
|
||||
GObjectClass parent;
|
||||
|
||||
#ifdef GST_MIXER_NEED_DEPRECATED
|
||||
/* signals (deprecated) */
|
||||
void (* mute_toggled) (GstMixerTrack *channel,
|
||||
gboolean mute);
|
||||
void (* record_toggled) (GstMixerTrack *channel,
|
||||
gboolean record);
|
||||
void (* volume_changed) (GstMixerTrack *channel,
|
||||
gint *volumes);
|
||||
#endif /* GST_MIXER_NEED_DEPRECATED */
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
|
|
|
@ -41,13 +41,13 @@ typedef struct _GstNavigationInterface GstNavigationInterface;
|
|||
|
||||
/**
|
||||
* GstNavigationInterface:
|
||||
* @g_iface: the parent interface
|
||||
* @iface: the parent interface
|
||||
* @send_event: sending a navigation event
|
||||
*
|
||||
* Color-balance interface.
|
||||
*/
|
||||
struct _GstNavigationInterface {
|
||||
GTypeInterface g_iface;
|
||||
GTypeInterface iface;
|
||||
|
||||
/* virtual functions */
|
||||
void (*send_event) (GstNavigation *navigation, GstStructure *structure);
|
||||
|
@ -155,7 +155,7 @@ typedef enum
|
|||
|
||||
GstNavigationQueryType gst_navigation_query_get_type (GstQuery *query);
|
||||
|
||||
GstQuery *gst_navigation_query_new_commands (void);
|
||||
GstQuery * gst_navigation_query_new_commands (void);
|
||||
void gst_navigation_query_set_commands (GstQuery *query, gint n_cmds, ...);
|
||||
void gst_navigation_query_set_commandsv (GstQuery *query, gint n_cmds,
|
||||
GstNavigationCommand *cmds);
|
||||
|
@ -164,7 +164,7 @@ gboolean gst_navigation_query_parse_commands_length (GstQuery *query,
|
|||
gboolean gst_navigation_query_parse_commands_nth (GstQuery *query, guint nth,
|
||||
GstNavigationCommand *cmd);
|
||||
|
||||
GstQuery *gst_navigation_query_new_angles (void);
|
||||
GstQuery * gst_navigation_query_new_angles (void);
|
||||
void gst_navigation_query_set_angles (GstQuery *query, guint cur_angle,
|
||||
guint n_angles);
|
||||
gboolean gst_navigation_query_parse_angles (GstQuery *query, guint *cur_angle,
|
||||
|
@ -198,14 +198,14 @@ typedef enum {
|
|||
|
||||
GstNavigationMessageType gst_navigation_message_get_type (GstMessage *message);
|
||||
|
||||
GstMessage *gst_navigation_message_new_mouse_over (GstObject *src,
|
||||
GstMessage * gst_navigation_message_new_mouse_over (GstObject *src,
|
||||
gboolean active);
|
||||
gboolean gst_navigation_message_parse_mouse_over (GstMessage *message,
|
||||
gboolean *active);
|
||||
|
||||
GstMessage *gst_navigation_message_new_commands_changed (GstObject *src);
|
||||
GstMessage * gst_navigation_message_new_commands_changed (GstObject *src);
|
||||
|
||||
GstMessage *gst_navigation_message_new_angles_changed (GstObject *src,
|
||||
GstMessage * gst_navigation_message_new_angles_changed (GstObject *src,
|
||||
guint cur_angle,
|
||||
guint n_angles);
|
||||
gboolean gst_navigation_message_parse_angles_changed (GstMessage *message,
|
||||
|
@ -249,6 +249,7 @@ typedef enum {
|
|||
} GstNavigationEventType;
|
||||
|
||||
GstNavigationEventType gst_navigation_event_get_type (GstEvent *event);
|
||||
|
||||
gboolean gst_navigation_event_parse_key_event (GstEvent *event,
|
||||
const gchar **key);
|
||||
gboolean gst_navigation_event_parse_mouse_button_event (GstEvent *event,
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct _GstPropertyProbeInterface GstPropertyProbeInterface;
|
|||
|
||||
/**
|
||||
* GstPropertyProbeInterface:
|
||||
* @klass: parent interface type.
|
||||
* @iface: parent interface type.
|
||||
* @probe_needed: default signal handler
|
||||
* @get_properties: virtual method to get list of probable properties
|
||||
* @needs_probe: virtual method to tell if probe need update
|
||||
|
@ -55,7 +55,7 @@ typedef struct _GstPropertyProbeInterface GstPropertyProbeInterface;
|
|||
* #GstPropertyProbe interface.
|
||||
*/
|
||||
struct _GstPropertyProbeInterface {
|
||||
GTypeInterface klass;
|
||||
GTypeInterface iface;
|
||||
|
||||
/* signals */
|
||||
void (*probe_needed) (GstPropertyProbe *probe,
|
||||
|
|
|
@ -41,7 +41,7 @@ typedef struct _GstStreamVolume GstStreamVolume;
|
|||
typedef struct _GstStreamVolumeInterface GstStreamVolumeInterface;
|
||||
|
||||
struct _GstStreamVolumeInterface {
|
||||
GTypeInterface parent;
|
||||
GTypeInterface iface;
|
||||
|
||||
/*< private >*/
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
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) \
|
||||
|
@ -45,7 +43,7 @@ typedef struct _GstTunerInterface GstTunerInterface;
|
|||
|
||||
/**
|
||||
* GstTunerInterface:
|
||||
* @klass: the parent interface
|
||||
* @iface: the parent interface
|
||||
* @list_channels: list available channels
|
||||
* @set_channel: set to a channel
|
||||
* @get_channel: return the current channel
|
||||
|
@ -63,7 +61,7 @@ typedef struct _GstTunerInterface GstTunerInterface;
|
|||
* Tuner interface.
|
||||
*/
|
||||
struct _GstTunerInterface {
|
||||
GTypeInterface klass;
|
||||
GTypeInterface iface;
|
||||
|
||||
/* virtual functions */
|
||||
const GList * (* list_channels) (GstTuner *tuner);
|
||||
|
|
|
@ -91,6 +91,9 @@ struct _GstTunerChannel {
|
|||
gulong max_frequency;
|
||||
gint min_signal;
|
||||
gint max_signal;
|
||||
|
||||
/*< private >*/
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstTunerChannelClass {
|
||||
|
|
|
@ -52,6 +52,8 @@ struct _GstTunerNorm {
|
|||
/*< public >*/
|
||||
gchar *label;
|
||||
GValue framerate;
|
||||
|
||||
gpointer _gst_reserved[GST_PADDING];
|
||||
};
|
||||
|
||||
struct _GstTunerNormClass {
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef struct _GstVideoOrientationInterface GstVideoOrientationInterface;
|
|||
|
||||
/**
|
||||
* GstVideoOrientationInterface:
|
||||
* @parent: parent interface type.
|
||||
* @iface: parent interface type.
|
||||
* @get_hflip: virtual method to get horizontal flipping state
|
||||
* @get_vflip: virtual method to get vertical flipping state
|
||||
* @get_hcenter: virtual method to get horizontal centering state
|
||||
|
@ -59,7 +59,7 @@ typedef struct _GstVideoOrientationInterface GstVideoOrientationInterface;
|
|||
* #GstVideoOrientationInterface interface.
|
||||
*/
|
||||
struct _GstVideoOrientationInterface {
|
||||
GTypeInterface parent;
|
||||
GTypeInterface iface;
|
||||
|
||||
/* 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
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct _GstVideoOverlayInterface GstVideoOverlayInterface;
|
|||
|
||||
/**
|
||||
* GstVideoOverlayInterface:
|
||||
* @interface: parent interface type.
|
||||
* @iface: parent interface type.
|
||||
* @expose: virtual method to handle expose events
|
||||
* @handle_events: virtual method to handle events
|
||||
* @set_render_rectangle: virtual method to set the render rectangle
|
||||
|
@ -54,18 +54,18 @@ typedef struct _GstVideoOverlayInterface GstVideoOverlayInterface;
|
|||
* #GstVideoOverlay interface
|
||||
*/
|
||||
struct _GstVideoOverlayInterface {
|
||||
GTypeInterface interface;
|
||||
GTypeInterface iface;
|
||||
|
||||
/* virtual functions */
|
||||
void (* expose) (GstVideoOverlay *overlay);
|
||||
void (*expose) (GstVideoOverlay *overlay);
|
||||
|
||||
void (* handle_events) (GstVideoOverlay *overlay, gboolean handle_events);
|
||||
void (*handle_events) (GstVideoOverlay *overlay, gboolean handle_events);
|
||||
|
||||
void (* set_render_rectangle) (GstVideoOverlay *overlay,
|
||||
void (*set_render_rectangle) (GstVideoOverlay *overlay,
|
||||
gint x, gint y,
|
||||
gint width, gint height);
|
||||
|
||||
void (* set_window_handle) (GstVideoOverlay *overlay, guintptr handle);
|
||||
void (*set_window_handle) (GstVideoOverlay *overlay, guintptr handle);
|
||||
};
|
||||
|
||||
GType gst_video_overlay_get_type (void);
|
||||
|
|
Loading…
Reference in a new issue