<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">Le 6 août 2018 04:30, "Darshan b" <<a href="mailto:darshandak7347@gmail.com">darshandak7347@gmail.com</a>> a écrit :<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have an AC3 file which is a valid file(Do not have any corrupted data but<br>
a VBR file). I have constructed the pipeline for this file using ac3parser.<br>
The playback works fine. The problem here is I am setting the pipeline to<br>
play state. The pipeline has prerolled and is in pause state. If I now<br>
request the duration using gst_element_query_duration, The duration query<br>
fails. I have gone through the baseparse and I have found out that the base<br>
parse uses the below formula to determine the number of frames required to<br>
calculate the duration.<br>
<br>
update_interval = (fps_num/fps_den)*1.5.<br>
<br>
The comment for the formula says that it is estimated after receiving 1.5<br>
seconds of data which is about 50 buffers.<br>
<br>
My questions are<br>
1. What are the side effects of reducing this number? The duration will not<br>
be accurate and anything apart from that?<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">The duration is estimated from the file size and an estimate of the bitrate. A lot of files have a relatively large period of silence at the start, so lower value will indeed lead to less precise estimates (likely duration will be longer then the reality).</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. Is there any particular reason to set the number as 1.5?<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">I don't know any reason, it was probably left to the contributor discretion. Hopefully it is a value that performs well.</div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div></div></div>