mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
tagmux: const-ify GstTagList argument of render vfuncs
This commit is contained in:
parent
1c3229307e
commit
f054eab77e
4 changed files with 38 additions and 40 deletions
|
@ -79,9 +79,9 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_BOILERPLATE (GstId3Mux, gst_id3_mux, GstTagMux, GST_TYPE_TAG_MUX);
|
GST_BOILERPLATE (GstId3Mux, gst_id3_mux, GstTagMux, GST_TYPE_TAG_MUX);
|
||||||
|
|
||||||
static GstBuffer *gst_id3_mux_render_v2_tag (GstTagMux * mux,
|
static GstBuffer *gst_id3_mux_render_v2_tag (GstTagMux * mux,
|
||||||
GstTagList * taglist);
|
const GstTagList * taglist);
|
||||||
static GstBuffer *gst_id3_mux_render_v1_tag (GstTagMux * mux,
|
static GstBuffer *gst_id3_mux_render_v1_tag (GstTagMux * mux,
|
||||||
GstTagList * taglist);
|
const GstTagList * taglist);
|
||||||
|
|
||||||
static void gst_id3_mux_set_property (GObject * object, guint prop_id,
|
static void gst_id3_mux_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
|
@ -129,8 +129,8 @@ gst_id3_mux_class_init (GstId3MuxClass * klass)
|
||||||
|
|
||||||
GST_TAG_MUX_CLASS (klass)->render_start_tag =
|
GST_TAG_MUX_CLASS (klass)->render_start_tag =
|
||||||
GST_DEBUG_FUNCPTR (gst_id3_mux_render_v2_tag);
|
GST_DEBUG_FUNCPTR (gst_id3_mux_render_v2_tag);
|
||||||
|
GST_TAG_MUX_CLASS (klass)->render_end_tag =
|
||||||
GST_TAG_MUX_CLASS (klass)->render_end_tag = gst_id3_mux_render_v1_tag;
|
GST_DEBUG_FUNCPTR (gst_id3_mux_render_v1_tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -187,7 +187,7 @@ gst_id3_mux_get_property (GObject * object, guint prop_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstBuffer *
|
static GstBuffer *
|
||||||
gst_id3_mux_render_v2_tag (GstTagMux * mux, GstTagList * taglist)
|
gst_id3_mux_render_v2_tag (GstTagMux * mux, const GstTagList * taglist)
|
||||||
{
|
{
|
||||||
GstId3Mux *id3mux = GST_ID3_MUX (mux);
|
GstId3Mux *id3mux = GST_ID3_MUX (mux);
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ gst_id3_mux_render_v2_tag (GstTagMux * mux, GstTagList * taglist)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstBuffer *
|
static GstBuffer *
|
||||||
gst_id3_mux_render_v1_tag (GstTagMux * mux, GstTagList * taglist)
|
gst_id3_mux_render_v1_tag (GstTagMux * mux, const GstTagList * taglist)
|
||||||
{
|
{
|
||||||
GstId3Mux *id3mux = GST_ID3_MUX (mux);
|
GstId3Mux *id3mux = GST_ID3_MUX (mux);
|
||||||
|
|
||||||
|
|
|
@ -27,33 +27,6 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
typedef struct _GstTagMux GstTagMux;
|
|
||||||
typedef struct _GstTagMuxClass GstTagMuxClass;
|
|
||||||
typedef struct _GstTagMuxPrivate GstTagMuxPrivate;
|
|
||||||
|
|
||||||
/* Definition of structure storing data for this element. */
|
|
||||||
struct _GstTagMux {
|
|
||||||
GstElement element;
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
GstTagMuxPrivate *priv;
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Standard definition defining a class for this element. */
|
|
||||||
struct _GstTagMuxClass {
|
|
||||||
GstElementClass parent_class;
|
|
||||||
|
|
||||||
/* vfuncs */
|
|
||||||
GstBuffer * (*render_start_tag) (GstTagMux * mux, GstTagList * tag_list);
|
|
||||||
GstBuffer * (*render_end_tag) (GstTagMux * mux, GstTagList * tag_list);
|
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Standard macros for defining types for this element. */
|
|
||||||
#define GST_TYPE_TAG_MUX \
|
#define GST_TYPE_TAG_MUX \
|
||||||
(gst_tag_mux_get_type())
|
(gst_tag_mux_get_type())
|
||||||
#define GST_TAG_MUX(obj) \
|
#define GST_TAG_MUX(obj) \
|
||||||
|
@ -65,7 +38,30 @@ struct _GstTagMuxClass {
|
||||||
#define GST_IS_TAG_MUX_CLASS(klass) \
|
#define GST_IS_TAG_MUX_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TAG_MUX))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_TAG_MUX))
|
||||||
|
|
||||||
/* Standard function returning type information. */
|
typedef struct _GstTagMux GstTagMux;
|
||||||
|
typedef struct _GstTagMuxClass GstTagMuxClass;
|
||||||
|
typedef struct _GstTagMuxPrivate GstTagMuxPrivate;
|
||||||
|
|
||||||
|
struct _GstTagMux {
|
||||||
|
GstElement element;
|
||||||
|
|
||||||
|
/*< private >*/
|
||||||
|
GstTagMuxPrivate *priv;
|
||||||
|
|
||||||
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _GstTagMuxClass {
|
||||||
|
GstElementClass parent_class;
|
||||||
|
|
||||||
|
/* vfuncs */
|
||||||
|
GstBuffer * (*render_start_tag) (GstTagMux * mux, const GstTagList * tag_list);
|
||||||
|
GstBuffer * (*render_end_tag) (GstTagMux * mux, const GstTagList * tag_list);
|
||||||
|
|
||||||
|
/*< private >*/
|
||||||
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
|
};
|
||||||
|
|
||||||
GType gst_tag_mux_get_type (void);
|
GType gst_tag_mux_get_type (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
@ -1132,7 +1132,7 @@ foreach_add_tag (const GstTagList * list, const gchar * tag, gpointer userdata)
|
||||||
}
|
}
|
||||||
|
|
||||||
GstBuffer *
|
GstBuffer *
|
||||||
id3_mux_render_v2_tag (GstTagMux * mux, GstTagList * taglist, int version)
|
id3_mux_render_v2_tag (GstTagMux * mux, const GstTagList * taglist, int version)
|
||||||
{
|
{
|
||||||
GstId3v2Tag tag;
|
GstId3v2Tag tag;
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
|
@ -1284,7 +1284,7 @@ static const struct
|
||||||
};
|
};
|
||||||
|
|
||||||
GstBuffer *
|
GstBuffer *
|
||||||
id3_mux_render_v1_tag (GstTagMux * mux, GstTagList * taglist)
|
id3_mux_render_v1_tag (GstTagMux * mux, const GstTagList * taglist)
|
||||||
{
|
{
|
||||||
GstBuffer *buf = gst_buffer_new_and_alloc (ID3_V1_TAG_SIZE);
|
GstBuffer *buf = gst_buffer_new_and_alloc (ID3_V1_TAG_SIZE);
|
||||||
guint8 *data = GST_BUFFER_DATA (buf);
|
guint8 *data = GST_BUFFER_DATA (buf);
|
||||||
|
|
|
@ -24,9 +24,11 @@ G_BEGIN_DECLS
|
||||||
#define ID3_VERSION_2_3 3
|
#define ID3_VERSION_2_3 3
|
||||||
#define ID3_VERSION_2_4 4
|
#define ID3_VERSION_2_4 4
|
||||||
|
|
||||||
GstBuffer * id3_mux_render_v2_tag (GstTagMux * mux, GstTagList * taglist,
|
GstBuffer * id3_mux_render_v2_tag (GstTagMux * mux,
|
||||||
int version);
|
const GstTagList * taglist,
|
||||||
GstBuffer * id3_mux_render_v1_tag (GstTagMux * mux, GstTagList * taglist);
|
int version);
|
||||||
|
|
||||||
|
GstBuffer * id3_mux_render_v1_tag (GstTagMux * mux,
|
||||||
|
const GstTagList * taglist);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue