<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false">Hi Team,</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I'm looking for info on GST-baseparse implementation, kindly please help with response.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Im playing a mp3 file which has no headers (XING/VBRI) information & duration is 1.4sec. Upon query of element_query_duration , pipeline is always returning -1. On analyzing logs found that baseparse is returning -1. <br></div><div><br></div><div dir="ltr" data-setdir="false">NOTE: baseparse is running is PUSH Mode.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">On code browsing, found that to configure duration in baseparse <br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">1) Subclass ( eg mpegaudioparse) can invoke prase_set_duration <a href="https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L3860" rel="nofollow" target="_blank" class="">https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L3860</a> . Since in my mp3 file there is no header information hence it failed to set duration. <div>Hitting this COL <a href="https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-good/gst/audioparsers/gstmpegaudioparse.c#L1382" rel="nofollow" target="_blank">https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-good/gst/audioparsers/gstmpegaudioparse.c#L1382</a> <br><div><br><br></div></div></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">2) Using update_interval . I see baseparse has configured update_interval to 1.5sec by default <a href="https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L3973" rel="nofollow" target="_blank" class="">https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L3973</a> . But my mp3 duration is < 1.5sec hence not hitting frames_count == 1.5sec worth of frames. <a href="https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L2512" rel="nofollow" target="_blank" class="">https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L2512</a> <br></div><div><br></div><div><br></div><div><br></div><div><br></div><div dir="ltr" data-setdir="false">Queries;</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">1) Am i missing anything in debugging step ?</div><div dir="ltr" data-setdir="false">2) Is my analysis correct ?</div><div dir="ltr" data-setdir="false">3) Why interval time is 1.5sec , normally notification /touch tones will be ~1sec duration, then how does gstreamer handles such contents ?</div><div dir="ltr" data-setdir="false">4) While checking logs found that query_duration call goes till source element in plugin , duration info is available in BYTES_FORMAT , but requested one is TIME_FORMAT . Basesrc is unable to convert to required format & in baseparse there is no code for conversion. QUERY_POSITION case in baseparse <a href="https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L4196" rel="nofollow" target="_blank" class="">https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L4196</a> has a code for conversion but same code/logic is not present in QUERY_DURATION case <a href="https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L4213" rel="nofollow" target="_blank" class="">https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/1.22/subprojects/gstreamer/libs/gst/base/gstbaseparse.c#L4213</a> . Any reason why conversion logic is not present ? <br></div><div dir="ltr" data-setdir="false">5) Do we have soln patch for such case ?</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Thank you,<br>Sachin<br></div><div><br></div><div> </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></body></html>