rawparse: rename 'set_buffer_flags' vfunc to 'pre_push_buffer'

to allow subclass to change other fields of the buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=760270
This commit is contained in:
Aurélien Zanelli 2016-01-08 15:21:28 +01:00 committed by Nicolas Dufresne
parent cf25e09b1a
commit 04d59ffd4d
3 changed files with 6 additions and 6 deletions

View file

@ -257,8 +257,8 @@ gst_raw_parse_push_buffer (GstRawParse * rp, GstBuffer * buffer)
GST_BUFFER_DURATION (buffer) = GST_CLOCK_TIME_NONE; GST_BUFFER_DURATION (buffer) = GST_CLOCK_TIME_NONE;
} }
if (rpclass->set_buffer_flags) { if (rpclass->pre_push_buffer) {
rpclass->set_buffer_flags (rp, buffer); rpclass->pre_push_buffer (rp, buffer);
} }
if (rp->discont) { if (rp->discont) {

View file

@ -77,7 +77,7 @@ struct _GstRawParseClass
GstElementClass parent_class; GstElementClass parent_class;
GstCaps * (*get_caps) (GstRawParse *rp); GstCaps * (*get_caps) (GstRawParse *rp);
void (*set_buffer_flags) (GstRawParse *rp, GstBuffer *buffer); void (*pre_push_buffer) (GstRawParse *rp, GstBuffer *buffer);
gboolean multiple_frames_per_buffer; gboolean multiple_frames_per_buffer;
}; };

View file

@ -37,7 +37,7 @@ static void gst_video_parse_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec); GValue * value, GParamSpec * pspec);
static GstCaps *gst_video_parse_get_caps (GstRawParse * rp); static GstCaps *gst_video_parse_get_caps (GstRawParse * rp);
static void gst_video_parse_set_buffer_flags (GstRawParse * rp, static void gst_video_parse_pre_push_buffer (GstRawParse * rp,
GstBuffer * buffer); GstBuffer * buffer);
static void gst_video_parse_update_info (GstVideoParse * vp); static void gst_video_parse_update_info (GstVideoParse * vp);
@ -72,7 +72,7 @@ gst_video_parse_class_init (GstVideoParseClass * klass)
gobject_class->get_property = gst_video_parse_get_property; gobject_class->get_property = gst_video_parse_get_property;
rp_class->get_caps = gst_video_parse_get_caps; rp_class->get_caps = gst_video_parse_get_caps;
rp_class->set_buffer_flags = gst_video_parse_set_buffer_flags; rp_class->pre_push_buffer = gst_video_parse_pre_push_buffer;
g_object_class_install_property (gobject_class, PROP_FORMAT, g_object_class_install_property (gobject_class, PROP_FORMAT,
g_param_spec_enum ("format", "Format", "Format of images in raw stream", g_param_spec_enum ("format", "Format", "Format of images in raw stream",
@ -242,7 +242,7 @@ gst_video_parse_get_caps (GstRawParse * rp)
} }
static void static void
gst_video_parse_set_buffer_flags (GstRawParse * rp, GstBuffer * buffer) gst_video_parse_pre_push_buffer (GstRawParse * rp, GstBuffer * buffer)
{ {
GstVideoParse *vp = GST_VIDEO_PARSE (rp); GstVideoParse *vp = GST_VIDEO_PARSE (rp);