[gst-devel] Fwd: pb avimux fixed
Ronald S. Bultje
rsbultje at gmail.com
Sat Aug 1 19:48:56 CEST 2009
Kind regards,
Ronald
Begin forwarded message:
> From: renardier philippe <philipperenardier at yahoo.fr>
> Date: August 1, 2009 1:19:01 PM EDT
> To: rsbultje at gmail.com
> Subject: pb avimux fixed
>
>
> Hi
>
> I have fixed the issue.
> I had a bug in the setting of the timestamps so in gstavimux.c the
> fonction
> ----------------------------------------
> gst_avi_mux_do_one_buffer (GstAviMux * avimux)
> {
> GstAviPad *avipad, *best_pad;
> GstClockTime time, best_time;
> GSList *node;
> GstBuffer *buffer;
>
> node = avimux->sinkpads;
> best_pad = NULL;
> best_time = GST_CLOCK_TIME_NONE;
> for (; node; node = node->next) {
> avipad = (GstAviPad *) node->data;
>
> if (!avipad->collect)
> continue;
>
> buffer = gst_collect_pads_peek (avimux->collect, avipad->collect);
> if (!buffer)
> continue;
> time = GST_BUFFER_TIMESTAMP (buffer);
> gst_buffer_unref (buffer);
>
> // invalid timestamp buffers pass first, these are probably
> initialization buffers
> if (best_pad == NULL || !GST_CLOCK_TIME_IS_VALID (time) ||
> (GST_CLOCK_TIME_IS_VALID (best_time) && time < best_time))
> {best_pad = avipad; best_time = time;}
> }
>
> if (best_pad) {
> GST_LOG_OBJECT (avimux, "selected pad %s with time %"
> GST_TIME_FORMAT,
> GST_PAD_NAME (best_pad->collect->pad), GST_TIME_ARGS
> (best_time));
>
> return gst_avi_mux_do_buffer (avimux, best_pad);
> } else {
> // simply finish off the file and send EOS
> gst_avi_mux_stop_file (avimux);
> gst_pad_push_event (avimux->srcpad, gst_event_new_eos ());
> return GST_FLOW_UNEXPECTED;
> }
> }
> ----------------------------------------------------
> finded always time > best_time for pad 2 and only one stream was
> recorded (the first of course).
> This bug was not apparent when i recorded only video or only audio.
> Now it's OK. GSreamer is a powerful tool and i think its use can be
> extended far beyond the scope of multimedia. Ten years ago i worked
> in the steel industry and we used a GSreamer-like custom framework
> to manage the process of rolling mills. We had plugins for locked
> loops, filters, IO and so on. Any kind of stream, physical or
> virtual can be managed with GStreamer.
> I am sorry for the disturbance i made for nothing.
>
> philipperenardier at yahoo.fr
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090801/f76c88a2/attachment.htm>
More information about the gstreamer-devel
mailing list