raw1394: Use G_DECLARE_FINAL_TYPE

This commit is contained in:
Niels De Graef 2020-03-15 19:11:52 +01:00
parent 91c55bd920
commit 59ac993a91
4 changed files with 10 additions and 63 deletions

View file

@ -31,21 +31,10 @@
G_BEGIN_DECLS
#define GST_TYPE_1394_CLOCK \
(gst_1394_clock_get_type())
#define GST_1394_CLOCK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_1394_CLOCK,Gst1394Clock))
#define GST_1394_CLOCK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_1394_CLOCK,Gst1394ClockClass))
#define GST_IS_1394_CLOCK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_1394_CLOCK))
#define GST_IS_1394_CLOCK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_1394_CLOCK))
#define GST_1394_CLOCK_CAST(obj) \
((Gst1394Clock*)(obj))
typedef struct _Gst1394Clock Gst1394Clock;
typedef struct _Gst1394ClockClass Gst1394ClockClass;
#define GST_TYPE_1394_CLOCK (gst_1394_clock_get_type())
G_DECLARE_FINAL_TYPE (Gst1394Clock, gst_1394_clock, GST, 1394_CLOCK,
GstSystemClock)
#define GST_1394_CLOCK_CAST(obj) ((Gst1394Clock*)(obj))
/**
* Gst1394Clock:
@ -62,11 +51,6 @@ struct _Gst1394Clock {
guint32 cycle_timer_hi;
};
struct _Gst1394ClockClass {
GstSystemClockClass parent_class;
};
GType gst_1394_clock_get_type (void);
Gst1394Clock* gst_1394_clock_new (const gchar *name);
void gst_1394_clock_set_handle (Gst1394Clock *clock,
raw1394handle_t handle);

View file

@ -171,8 +171,7 @@ gst_dv1394src_class_init (GstDV1394SrcClass * klass)
gst_dv1394src_signals[SIGNAL_FRAME_DROPPED] =
g_signal_new ("frame-dropped", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDV1394SrcClass, frame_dropped),
NULL, NULL, NULL, G_TYPE_NONE, 0);
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0);
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT,
g_param_spec_int ("port", "Port", "Port number (-1 automatic)",

View file

@ -33,19 +33,8 @@
G_BEGIN_DECLS
#define GST_TYPE_DV1394SRC \
(gst_dv1394src_get_type())
#define GST_DV1394SRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_DV1394SRC,GstDV1394Src))
#define GST_DV1394SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DV1394SRC,GstDV1394SrcClass))
#define GST_IS_DV1394SRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DV1394SRC))
#define GST_IS_DV1394SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DV1394SRC))
typedef struct _GstDV1394Src GstDV1394Src;
typedef struct _GstDV1394SrcClass GstDV1394SrcClass;
#define GST_TYPE_DV1394SRC (gst_dv1394src_get_type())
G_DECLARE_FINAL_TYPE (GstDV1394Src, gst_dv1394src, GST, DV1394SRC, GstPushSrc)
struct _GstDV1394Src {
GstPushSrc element;
@ -87,15 +76,6 @@ struct _GstDV1394Src {
Gst1394Clock *provided_clock;
};
struct _GstDV1394SrcClass {
GstPushSrcClass parent_class;
/* signal */
void (*frame_dropped) (GstElement *elem);
};
GType gst_dv1394src_get_type(void);
G_END_DECLS
#endif /* __GST_GST1394_H__ */

View file

@ -32,19 +32,9 @@
G_BEGIN_DECLS
#define GST_TYPE_HDV1394SRC \
(gst_hdv1394src_get_type())
#define GST_HDV1394SRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_HDV1394SRC,GstHDV1394Src))
#define GST_HDV1394SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_HDV1394SRC,GstHDV1394SrcClass))
#define GST_IS_HDV1394SRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_HDV1394SRC))
#define GST_IS_HDV1394SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_HDV1394SRC))
typedef struct _GstHDV1394Src GstHDV1394Src;
typedef struct _GstHDV1394SrcClass GstHDV1394SrcClass;
#define GST_TYPE_HDV1394SRC (gst_hdv1394src_get_type())
G_DECLARE_FINAL_TYPE (GstHDV1394Src, gst_hdv1394src, GST, HDV1394SRC,
GstPushSrc)
struct _GstHDV1394Src {
GstPushSrc element;
@ -74,12 +64,6 @@ struct _GstHDV1394Src {
iec61883_mpeg2_t iec61883mpeg2;
};
struct _GstHDV1394SrcClass {
GstPushSrcClass parent_class;
};
GType gst_hdv1394src_get_type(void);
G_END_DECLS
#endif /* __GST_GST1394_H__ */