<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span class="x_elementToProof x_ContentPasted0 ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">Hello
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<div class="x_elementToProof x_ContentPasted0 ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">I am using gstreamer 1.20.3 for my mobile app.</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">My current problem is that I can't get a proper duration after seeing.</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">To seeken I use:</div>
<div>
<p class="x_ContentPasted1" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:rgba(0,0,0,0.85);background-color:#ffffff">
<span class="x_Apple-converted-space x_ContentPasted1"></span></p>
<p class="x_ContentPasted3 ContentPasted0" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:#326d74;background-color:#ffffff">
<span style="color:rgba(0,0,0,0.85)"><span class="x_Apple-converted-space x_ContentPasted3 ContentPasted0">   
</span></span><span style="color:#9b2393"><b class="x_ContentPasted3 ContentPasted0">if</b></span><span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">(!</span>gst_element_seek_simple<span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">(customData-></span>pipeline<span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">,
</span>GST_FORMAT_TIME<span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">, (</span><span class="x_ContentPasted3 ContentPasted0" style="color:#1c464a">GstSeekFlags</span><span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">)(</span>GST_SEEK_FLAG_FLUSH<span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">
 | </span>GST_SEEK_FLAG_KEY_UNIT<span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">),customData-></span>seekToPos<span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">))</span></p>
<p style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;background-color:#ffffff;min-height:15.0px">
<span class="x_Apple-converted-space x_ContentPasted3 ContentPasted0">    </span></p>
<p class="x_ContentPasted3 ContentPasted0" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;background-color:#ffffff">
<span class="x_Apple-converted-space x_ContentPasted3 ContentPasted0">    </span>
{</p>
<p class="x_ContentPasted3 x_elementToProof ContentPasted0" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:#c41a16;background-color:#ffffff">
<span style="color:rgba(0,0,0,0.85)"><span class="x_Apple-converted-space x_ContentPasted3 ContentPasted0">       
</span></span><span class="x_ContentPasted3 ContentPasted0" style="color:#643820">LOGW</span><span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)"> (</span>"Seek failed!\n"<span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">);</span></p>
<p class="x_ContentPasted3 x_elementToProof" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:#c41a16;background-color:#ffffff">
<span class="x_ContentPasted3 ContentPasted0" style="color:rgba(0,0,0,0.85)">        ...</span></p>
<p class="x_ContentPasted1 ContentPasted0" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:rgba(0,0,0,0.85);background-color:#ffffff">
</p>
</div>
<div><span class="ContentPasted0">      </span><br class="x_ContentPasted0 ContentPasted0">
</div>
<div><br class="x_ContentPasted0 ContentPasted0">
</div>
<div class="x_ContentPasted0 ContentPasted0">to query the duration:</div>
<div>
<p class="x_ContentPasted2 ContentPasted0" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:rgba(0,0,0,0.85);background-color:#ffffff">
<span class="x_Apple-converted-space x_ContentPasted2 ContentPasted0">           
</span><span class="x_ContentPasted2 ContentPasted0" style="color:#1c464a">gint64</span> duration =
<span class="x_ContentPasted2 ContentPasted0" style="color:#1c00cf">0</span>;</p>
<p class="x_ContentPasted2 x_elementToProof ContentPasted0" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:#326d74;background-color:#ffffff">
<span style="color:rgba(0,0,0,0.85)"><span class="x_Apple-converted-space x_ContentPasted2 ContentPasted0">           
</span></span><span style="color:#9b2393"><b class="x_ContentPasted2 ContentPasted0">if</b></span><span class="x_ContentPasted2 ContentPasted0" style="color:rgba(0,0,0,0.85)"> (!</span>gst_element_query_duration<span class="x_ContentPasted2 ContentPasted0" style="color:rgba(0,0,0,0.85)">
 (</span>mCustomData<span class="x_ContentPasted2 ContentPasted0" style="color:rgba(0,0,0,0.85)">.</span>pipeline<span class="x_ContentPasted2 ContentPasted0" style="color:rgba(0,0,0,0.85)">,
</span>GST_FORMAT_TIME<span class="x_ContentPasted2 ContentPasted0" style="color:rgba(0,0,0,0.85)">, &duration)) {</span></p>
<p class="x_ContentPasted2 x_elementToProof ContentPasted0" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:#c41a16;background-color:#ffffff">
<span style="color:rgba(0,0,0,0.85)"><span class="x_Apple-converted-space x_ContentPasted2 ContentPasted0">               
</span></span><span class="x_ContentPasted2 ContentPasted0" style="color:#326d74">g_print</span><span class="x_ContentPasted2 ContentPasted0" style="color:rgba(0,0,0,0.85)">(</span>"Could not query current duration.\n"<span class="x_ContentPasted2 ContentPasted0" style="color:rgba(0,0,0,0.85)">);</span></p>
<p class="x_ContentPasted2 ContentPasted0" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:rgba(0,0,0,0.85);background-color:#ffffff">
<span class="x_Apple-converted-space x_ContentPasted2 ContentPasted0">               
</span><span style="color:#9b2393"><b class="x_ContentPasted2 ContentPasted0">return</b></span>
<span class="x_ContentPasted2 ContentPasted0" style="color:#1c00cf">0</span>;</p>
<p class="x_ContentPasted2 ContentPasted0" style="margin-top:0px;margin-bottom:0px;margin:0.0px 0.0px 0.0px 0.0px;font:13.0px Menlo;color:rgba(0,0,0,0.85);background-color:#ffffff">
<span class="x_Apple-converted-space x_ContentPasted2 ContentPasted0">           
</span>}</p>
<br class="x_ContentPasted0 ContentPasted0">
</div>
Source of the video is a http stream mpegts (aac/h264)<br class="ContentPasted0">
</div>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br class="ContentPasted0">
</div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted4 x_ContentPasted5 ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The problem is that I often get a duration of 0 or very small values (e.g. 37) back after the seeken. Even if I query more often.
<div><br class="x_ContentPasted4 ContentPasted0">
</div>
does anyone have an idea what this could be?<br class="ContentPasted0">
</div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted4 x_ContentPasted5" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br class="ContentPasted0">
</div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted4 x_ContentPasted5 ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
regards</div>
<span class="x_elementToProof x_ContentPasted0 x_ContentPasted4 x_ContentPasted5 ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">Patrick</span><br>
</div>
<div dir="ltr" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:100%;direction:ltr;"><table cellpadding="0" cellspacing="0" border="0" style="width:100%;"><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;"><tr style="font-size:0;"><td align="left" style="background-color:#FFFFFF;padding:11px 0 0;vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;"><tr style="font-size:0;"><td align="center" style="padding:0 10px 0 0;border-top:none;border-right:solid 2px #19368B;border-bottom:none;border-left:none;vertical-align:middle;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;"><tr style="font-size:0;"><td align="center" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;line-height:normal;"><tr style="font-size:0;"><td align="center" style="padding:0 0 25px;vertical-align:top;"><a href="https://www.vitec.com/" target="_blank" id="LPlnk689713" style="text-decoration:none;"><img src="https://www.vitec.com/fileadmin/_permanent/signature/VITEC_RGB_logo@160px.jpg" border="0" alt="" style="font-size:0;" /></a></td></tr></table></td></tr><tr style="font-size:0;"><td align="center" style="vertical-align:bottom;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;"><tr style="font-size:0;"><td align="left" style="vertical-align:bottom;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;line-height:normal;"><tr style="font-size:0;"><td align="left" style="padding:4px;vertical-align:bottom;"><a href="https://www.linkedin.com/company/vitec-multimedia" target="_blank" id="LPlnk689713" style="text-decoration:none;"><img src="https://www.vitec.com/fileadmin/_permanent/signature/icons/Linkedin-v3_40.png" border="0" alt="" style="font-size:0;" /></a></td></tr></table></td><td align="left" style="vertical-align:bottom;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;line-height:normal;"><tr style="font-size:0;"><td align="left" style="padding:4px;vertical-align:bottom;"><a href="https://www.youtube.com/vitecmm" target="_blank" id="LPlnk689713" style="text-decoration:none;"><img src="https://www.vitec.com/fileadmin/_permanent/signature/icons/Youtube-v3_40.png" border="0" alt="" style="font-size:0;" /></a></td></tr></table></td><td align="left" style="vertical-align:bottom;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;line-height:normal;"><tr style="font-size:0;"><td align="left" style="padding:4px;vertical-align:bottom;"><a href="https://www.twitter.com/vitec_mm" target="_blank" id="LPlnk689713" style="text-decoration:none;"><img src="https://www.vitec.com/fileadmin/_permanent/signature/icons/Twitter-v3_40.png" border="0" alt="" style="font-size:0;" /></a></td></tr></table></td></tr></table></td></tr></table></td><td align="left" style="padding:0 10px;vertical-align:middle;"><table cellpadding="0" cellspacing="0" border="0" style="width:100%;font-size:0;"><tr style="font-size:18.67px;color:#26358C;font-style:normal;font-weight:700;white-space:nowrap;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;">Patrick Fischer</td></tr><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;color:#000001;font-style:normal;font-weight:400;white-space:nowrap;"><tr style="font-size:14.67px;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;">Software Developer</td></tr></table></td></tr><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;"><tr style="font-size:14.67px;color:#000001;font-style:normal;font-weight:400;white-space:nowrap;"><td align="left" style="padding:0;vertical-align:top;font-family:Calibri,Arial,sans-serif;">o: <br /></td><td align="left" style="padding:0;vertical-align:top;font-family:Calibri,Arial,sans-serif;"><a href="tel:+49%204307%208358%200" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;"><strong style="font-weight:400;">+49 4307 8358 0</strong></a></td></tr><tr style="font-size:0;"><td align="left" style="padding:0;vertical-align:top;"></td><td align="left" style="padding:0;vertical-align:top;"></td></tr><tr style="font-size:0;"><td align="left" style="padding:0;vertical-align:top;"></td><td align="left" style="padding:0;vertical-align:top;"></td></tr></table></td></tr><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;color:#1F419A;font-style:normal;font-weight:400;white-space:nowrap;"><tr style="font-size:14.67px;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><a href="mailto:patrick.fischer@vitec.com" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#1F419A;"><strong style="font-weight:400;">patrick.fischer@vitec.com</strong></a></td></tr></table></td></tr><tr style="font-size:14.67px;color:#26358C;font-style:normal;font-weight:400;white-space:nowrap;"><td align="left" style="vertical-align:top;font-family:Calibri,Arial,sans-serif;"><a href="https://www.vitec.com/" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#26358C;"><strong style="font-weight:400;">www.vitec.com</strong></a></td></tr></table></td></tr></table></td></tr></table></td></tr></table></div><div dir="ltr" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:100%;direction:ltr;"><table cellpadding="0" cellspacing="0" border="0" style="width:100%;"><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="font-size:0;line-height:normal;"><tr style="font-size:0;"><td align="left" style="padding:10px 0;vertical-align:top;"><a href="https://www.vitec.com/" target="_blank" id="LPlnk689713" style="text-decoration:none;"><img src="cid:image035332.png@F7DB0436.12C512BF" border="0" title="www.vitec.com" alt="www.vitec.com" style="font-size:12px;" /></a></td></tr></table></td></tr></table></div><div dir="ltr" style="mso-line-height-rule:exactly;-webkit-text-size-adjust:100%;direction:ltr;"><table cellpadding="0" cellspacing="0" border="0" style="width:100%;"><tr style="font-size:0;"><td align="left" style="vertical-align:top;"><table cellpadding="0" cellspacing="0" border="0" style="white-space:normal;color:#767171;font-size:14.67px;font-family:Calibri,Arial,sans-serif;font-weight:400;font-style:normal;text-align:justify;width:100%;"><tr style="font-size:9px;"><td style="font-family:Calibri,sans-serif;">Legal Notice<span style="font-family:remialcxesans;font-size:1px;color:#FFFFFF;line-height:1px;">​</span><br /> Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. Neither VITEC S.A. (66 Avenue des Champs Elysées – 75008 Paris - France) nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. VITEC GmbH, Lise-Meitner-Str. 15, 24223 Schwentinental<br /> Geschäftsführer/Managing Director: Philippe Wetzel<br /> HRB Plön 1584 / Steuernummer: 2029706365 / VATnumber: DE134878603</td></tr></table></td></tr></table></div></body>
</html>