How to push a new-segment event for mp4mux?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to push a new-segment event for mp4mux?

Gregoire Gentil
Hello,


I'm doing a gst_seek event in a pipeline containing a mp4mux and the
resulting mp4 file is broken  (obviously, if I don't do the seek event,
the file is OK). I think that the problem is that I need a new segment
event pushed to the mp4mux element.

gst_element_seek(gstPipeline, 1.0f, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH
| GST_SEEK_FLAG_KEY_UNIT, GST_SEEK_TYPE_SET, extractStart,
GST_SEEK_TYPE_SET, extractEnd);

so I have added this:

GstSegment segment;
gst_segment_init(&segment, GST_FORMAT_TIME);
GstIterator *iter = gst_element_iterate_src_pads(gstMp4muxElement);
gst_iterator_foreach (iter,
(GstIteratorForeachFunction)gst_mp4_push_event, &segment);
gst_iterator_free (iter);

with this function:

static void gst_mp4_push_event(const GValue *vpad, GstSegment *pseg) {
        GstPad *pad = g_value_get_object(vpad);
        gst_pad_push_event(pad, gst_event_new_segment(pseg));
}

so that all the src pads of the mp4mux element are getting the
new-segment event.

The mp4 file is still broken. What am I doing wrong? Many thanks in advance,

Grégoire

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to push a new-segment event for mp4mux?

killerrats
Administrator
you might look at this code in the gstsplitmuxsink.c. You'll find it there i believe.
------------------------------
Gstreamer 1.14.1
------------------------------
Windows


Sent from the GStreamer-devel mailing list archive at Nabble.com.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2
------------------------------
Windows