mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
encoding: Use G_DECLARE_FINAL_TYPE
Note that we didn't do it for encodebin, as it has a class struct. We _could_ techincally use `G_DECLARE_DERIVABLE_TYPE()` for that one, but that would mean also using a private struct, which is even more work for no gain.
This commit is contained in:
parent
b7d123f1bd
commit
d297c4447d
4 changed files with 11 additions and 65 deletions
|
@ -23,19 +23,9 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_SMART_ENCODER \
|
||||
(gst_smart_encoder_get_type())
|
||||
#define GST_SMART_ENCODER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SMART_ENCODER,GstSmartEncoder))
|
||||
#define GST_SMART_ENCODER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SMART_ENCODER,GstSmartEncoderClass))
|
||||
#define GST_IS_SMART_ENCODER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SMART_ENCODER))
|
||||
#define GST_IS_SMART_ENCODER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SMART_ENCODER))
|
||||
|
||||
typedef struct _GstSmartEncoder GstSmartEncoder;
|
||||
typedef struct _GstSmartEncoderClass GstSmartEncoderClass;
|
||||
#define GST_TYPE_SMART_ENCODER (gst_smart_encoder_get_type())
|
||||
G_DECLARE_FINAL_TYPE (GstSmartEncoder, gst_smart_encoder, GST, SMART_ENCODER,
|
||||
GstElement)
|
||||
|
||||
struct _GstSmartEncoder {
|
||||
GstElement element;
|
||||
|
@ -60,12 +50,6 @@ struct _GstSmartEncoder {
|
|||
GstCaps *available_caps;
|
||||
};
|
||||
|
||||
struct _GstSmartEncoderClass {
|
||||
GstElementClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_smart_encoder_get_type(void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __SMART_ENCODER_H__ */
|
||||
|
|
|
@ -24,13 +24,8 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
#define GST_TYPE_STREAM_COMBINER (gst_stream_combiner_get_type())
|
||||
#define GST_STREAM_COMBINER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAM_COMBINER,GstStreamCombiner))
|
||||
#define GST_STREAM_COMBINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_STREAM_COMBINER,GstStreamCombinerClass))
|
||||
#define GST_IS_STREAM_COMBINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAM_COMBINER))
|
||||
#define GST_IS_STREAM_COMBINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAM_COMBINER))
|
||||
|
||||
typedef struct _GstStreamCombiner GstStreamCombiner;
|
||||
typedef struct _GstStreamCombinerClass GstStreamCombinerClass;
|
||||
G_DECLARE_FINAL_TYPE (GstStreamCombiner, gst_stream_combiner,
|
||||
GST, STREAM_COMBINER, GstElement)
|
||||
|
||||
struct _GstStreamCombiner {
|
||||
GstElement parent;
|
||||
|
@ -49,12 +44,6 @@ struct _GstStreamCombiner {
|
|||
|
||||
};
|
||||
|
||||
struct _GstStreamCombinerClass {
|
||||
GstElementClass parent;
|
||||
};
|
||||
|
||||
GType gst_stream_combiner_get_type(void);
|
||||
|
||||
GstElement *gst_stream_combiner_new (gchar *name);
|
||||
|
||||
#endif /* __GST_STREAMCOMBINER_H__ */
|
||||
|
|
|
@ -28,17 +28,8 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_STREAM_COMBINER_PAD (gst_stream_combiner_pad_get_type())
|
||||
#define GST_STREAM_COMBINER_PAD(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAM_COMBINER_PAD, GstStreamCombinerPad))
|
||||
#define GST_STREAM_COMBINER_PAD_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_MIXER_PAD, GstStreamCombinerPadClass))
|
||||
#define GST_IS_STREAM_COMBINER_PAD(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAM_COMBINER_PAD))
|
||||
#define GST_IS_STREAM_COMBINER_PAD_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAM_COMBINER_PAD))
|
||||
|
||||
typedef struct _GstStreamCombinerPad GstStreamCombinerPad;
|
||||
typedef struct _GstStreamCombinerPadClass GstStreamCombinerPadClass;
|
||||
G_DECLARE_FINAL_TYPE (GstStreamCombinerPad, gst_stream_combiner_pad,
|
||||
GST, STREAM_COMBINER_PAD, GstPad)
|
||||
|
||||
/**
|
||||
* GstStream_CombinerPad:
|
||||
|
@ -52,12 +43,5 @@ struct _GstStreamCombinerPad
|
|||
gboolean is_eos;
|
||||
};
|
||||
|
||||
struct _GstStreamCombinerPadClass
|
||||
{
|
||||
GstPadClass parent_class;
|
||||
};
|
||||
|
||||
GType gst_stream_combiner_pad_get_type (void);
|
||||
|
||||
G_END_DECLS
|
||||
#endif /* __GST_STREAM_COMBINER_PAD_H__ */
|
||||
|
|
|
@ -24,13 +24,8 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
#define GST_TYPE_STREAM_SPLITTER (gst_stream_splitter_get_type())
|
||||
#define GST_STREAM_SPLITTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_STREAM_SPLITTER,GstStreamSplitter))
|
||||
#define GST_STREAM_SPLITTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_STREAM_SPLITTER,GstStreamSplitterClass))
|
||||
#define GST_IS_STREAM_SPLITTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_STREAM_SPLITTER))
|
||||
#define GST_IS_STREAM_SPLITTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_STREAM_SPLITTER))
|
||||
|
||||
typedef struct _GstStreamSplitter GstStreamSplitter;
|
||||
typedef struct _GstStreamSplitterClass GstStreamSplitterClass;
|
||||
G_DECLARE_FINAL_TYPE (GstStreamSplitter, gst_stream_splitter,
|
||||
GST, STREAM_SPLITTER, GstElement)
|
||||
|
||||
struct _GstStreamSplitter {
|
||||
GstElement parent;
|
||||
|
@ -53,12 +48,6 @@ struct _GstStreamSplitter {
|
|||
guint32 keyunit_seqnum;
|
||||
};
|
||||
|
||||
struct _GstStreamSplitterClass {
|
||||
GstElementClass parent;
|
||||
};
|
||||
|
||||
GType gst_stream_splitter_get_type(void);
|
||||
|
||||
GstElement *gst_stream_splitter_new (gchar *name);
|
||||
|
||||
#endif /* __GST_STREAMSPLITTER_H__ */
|
||||
|
|
Loading…
Reference in a new issue