[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    Re: How can i force to end all streams (or pipeline) at a specific timestamp
From:       Nicolas Dufresne <nicolas.dufresne () gmail ! com>
Date:       2016-02-26 20:50:07
Message-ID: 1456519807.9405.4.camel () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Le jeudi 25 f=C3=A9vrier 2016 =C3=A0 13:00 -0800, hammerwerfer a =C3=A9crit=
=C2=A0:
> The to_stream_time() function (and the others) returned strange
> values (max
> long or something, and always the same values). So i gave up.=C2=A0
> Now i am using a pad probe for type buffer (Gst.PadProbeType.BUFFER)
> and
> added it to my muxer (matroskamux). The value buffer.pts was a
> realistic
> timestamp for my audio stream So when buffer.pts reaches my final
> timestamp
> i send an eos event to my audioconverter element and the pipelines
> stops
> streaming. The resulting video file has the correct length now.

That's fine, may work for your case. Note that in GStreamer, PTS may
start at any point in time. So to be complete, you actually need two
pad probes, one that saves the GstSegment, and then in your BUFFER
probe, you can convert the PTS to stream time using that segment
information. This should work, if it returns TIME_NONE (max uint), it
would mean this buffer is outside the segment, and should be ignored
(like decode only buffers).

cheers,
Nicolas
["signature.asc" (application/pgp-signature)]
[Attachment #6 (text/plain)]

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic