<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="markdown-here-wrapper" data-md-url="" style="">
<p style="margin: 0px 0px 1.2em !important;">Hi,</p>
<p style="margin: 0px 0px 1.2em !important;">gst_element_seek_simple()
is just a wrapper around a call to:</p>
<p style="margin: 0px 0px 1.2em !important;"> <code
style="font-family: Consolas, Inconsolata, Courier, monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; font-weight: 550; background-color: rgba(119, 119, 119, 0.3); border-radius: 3px; display: inline;"> gst_element_seek (element, 1.0, format, seek_flags, GST_SEEK_TYPE_SET, seek_pos, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE);</code></p>
<p style="margin: 0px 0px 1.2em !important;">Use the full version,
and you can replace the hard-coded 1.0 rate with the current
rate (you’ll need to store that based on the rate you last
requested). I assume you’re already using the full seek function
elsewhere, or you wouldn’t have been able to modify the playback
rate in the first place.</p>
<p style="margin: 0px 0px 1.2em !important;">Cheers,</p>
<p style="margin: 0px 0px 1.2em !important;">Jan.</p>
<p style="margin: 0px 0px 1.2em !important;"></p>
<div class="markdown-here-exclude">
<div class="moz-cite-prefix">On 8/1/24 06:45, Kenneth Feingold
via gstreamer-devel wrote:<br>
</div>
</div>
<p style="margin: 0px 0px 1.2em !important;"></p>
<p style="margin: 0px 0px 1.2em !important;"></p>
<div class="markdown-here-exclude">
<blockquote type="cite"
cite="mid:CAMF_QKsfoUfMS7N3+oUi_5t-tL1PKTAkG-fwfdAuRTkWAba4YA@mail.gmail.com">
<meta http-equiv="content-type"
content="text/html; charset=UTF-8">
<div dir="ltr">I am trying to grab the speed at which video is
playing at the moment it reaches the end (or start, if
playing in reverse) of a video stream, I have implemented
the ability to have the stream jump to where I want it to go
(here, 1 second from the start) when it reaches the end or
start of the stream, but no matter what the playback rate is
at the moment it reaches the eos the rate resets to normal
forward. I am working in C.
<div><br>
</div>
<div>
<div
style="color:rgb(204,204,204);background-color:rgb(31,31,31);font-family:"Droid Sans Mono","monospace",monospace;font-size:14px;line-height:19px;white-space:pre"><div><span
style="color:rgb(86,156,214)">static</span> <span
style="color:rgb(86,156,214)">void</span> <span
style="color:rgb(220,220,170)">eos_cb</span> (<span
style="color:rgb(78,201,176)">GstBus</span> <span
style="color:rgb(212,212,212)">*</span><span
style="color:rgb(156,220,254)">bus</span>, <span
style="color:rgb(78,201,176)">GstMessage</span> <span
style="color:rgb(212,212,212)">*</span><span
style="color:rgb(156,220,254)">msg</span>, <span
style="color:rgb(78,201,176)">CustomData</span> <span
style="color:rgb(212,212,212)">*</span><span
style="color:rgb(156,220,254)">data</span>) {</div><div> <span
style="color:rgb(220,220,170)">g_print</span> (<span
style="color:rgb(206,145,120)">"End-Of-Stream reached.</span><span
style="color:rgb(215,186,125)">\n</span><span
style="color:rgb(206,145,120)">"</span>); </div><div> <span
style="color:rgb(220,220,170)">gst_element_seek_simple</span> (<span
style="color:rgb(156,220,254)">data</span>-><span
style="color:rgb(156,220,254)">playbin</span>, <span
style="color:rgb(79,193,255)">GST_FORMAT_TIME</span>,</div><div> <span
style="color:rgb(79,193,255)">GST_SEEK_FLAG_FLUSH</span> <span
style="color:rgb(212,212,212)">|</span> <span
style="color:rgb(79,193,255)">GST_SEEK_FLAG_KEY_UNIT</span>, <span
style="color:rgb(181,206,168)">1</span> <span
style="color:rgb(212,212,212)">*</span> <span
style="color:rgb(86,156,214)">GST_SECOND</span>); </div><div> <span
style="color:rgb(220,220,170)">send_seek_event</span> (<span
style="color:rgb(156,220,254)">data</span>); </div><div>}</div><div>
</div></div>
</div>
<div>Thanks for any advice.</div>
</div>
</blockquote>
</div>
<p style="margin: 0px 0px 1.2em !important;"></p>
<div
title="MDH:PHA+SGksPC9wPjxwPmdzdF9lbGVtZW50X3NlZWtfc2ltcGxlKCkgaXMganVzdCBhIHdyYXBwZXIg
YXJvdW5kIGEgY2FsbCB0bzo8L3A+PHA+Jm5ic3A7YCBnc3RfZWxlbWVudF9zZW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