<div dir="ltr"><div><div><div>Angel, Thank for the post. SEI messages are indeed tough.<br><br></div>What I actually found was 2 problems. The first was a GStreamer error (could still be in the 1.2 code, I haven't checked) and one introduced by me.<br>
<br>The first problem was that the RTP timestamp assigned to the SEI messages was the same as the previous RTP packet. That is absolutely wrong because it signals that the SEI is associated with the wrong frame. It must be assigned a timestamp of the proper (probably next) RTP packet. I added code the to h264parse code to temporarily hold SEI messages until a NAL type of 1 or 5, assign the same timestamp to both and send the SEI first. Due to my pipeline, I think that I have lost the original association so that is about all that I could do. If I got a stream with a complicated decoding order, my code would simply fall apart.<br>
<br></div>The second problem was that my buffer accumulation code in h264parse was keeping the GstBuffer timestamp at the very first value ever assigned, which was also wrong. I have added code that accumulates buffers in the adapter until a start code prefix has been found following a NAL because the h264 RTP payloader wasn't working well without that. I was confused by the buffer timestamps in the adapter and did that wrong. A single buffer that is received by h264parse (at least in my situation) can have data bytes from 2 or more NALUs. Which timestamp do you use??? Now I assign the timestamp of the last buffer fragment that is added. That allows GstBuffer timestamps to increase through the session and all timestamps work properly, as does video. Hurrah!<br>
<br></div>I wimped out and only addressed the problem of time progressing forward. Finding the 'right' SEI message and generating the proper timestamp would be 'interesting' for the rewind case! I'll leave that as an exercise to the industrious reader.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Feb 4, 2014 at 11:07 AM, Angel Martin <span dir="ltr"><<a href="mailto:amartin@vicomtech.org" target="_blank">amartin@vicomtech.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This post could be interesting for you.<div><br></div><div><a href="https://forum.videolan.org/viewtopic.php?f=14&t=104760" target="_blank">https://forum.videolan.org/viewtopic.php?f=14&t=104760</a><br>


</div><div><br>
</div></div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>