<div dir="ltr">Hello,<div><br></div><div>But that will end up rounding the ticks to milliseconds/seconds</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 1 Jun 2019 at 12:58, Alexandre Janniaux <<a href="mailto:ajanni@videolabs.io">ajanni@videolabs.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
vlc_tick doesn't really have meaning in the GUI world.<br>
<br>
Instead of adding a scale function on vlctick for UI purpose,<br>
you should wrap conversion methods to units that have meaning<br>
like seconds or milliseconds, matching the existing vlctick<br>
API. Then the computation can be done in primitive type.<br>
<br>
Greats,<br>
<br>
--<br>
Alexandre Janniaux<br>
VideoLabs<br>
<br>
On Fri, May 31, 2019 at 02:00:52PM +0300, Abel Tesfaye wrote:<br>
> From: Abel Tesfaye <<a href="mailto:Abeltesfaye45@gmail.com" target="_blank">Abeltesfaye45@gmail.com</a>><br>
><br>
> ---<br>
> modules/gui/qt/util/vlctick.cpp | 5 +++++<br>
> modules/gui/qt/util/vlctick.hpp | 1 +<br>
> 2 files changed, 6 insertions(+)<br>
><br>
> diff --git a/modules/gui/qt/util/vlctick.cpp b/modules/gui/qt/util/vlctick.cpp<br>
> index bd0074da54..6cbf6f553a 100644<br>
> --- a/modules/gui/qt/util/vlctick.cpp<br>
> +++ b/modules/gui/qt/util/vlctick.cpp<br>
> @@ -49,3 +49,8 @@ QString VLCTick::toString() const<br>
> .arg(min, 2, 10, QChar('0'))<br>
> .arg(sec, 2, 10, QChar('0'));<br>
> }<br>
> +<br>
> +VLCTick VLCTick::scale(float scalar) const<br>
> +{<br>
> + return VLCTick(m_ticks*scalar);<br>
> +}<br>
> \ No newline at end of file<br>
> diff --git a/modules/gui/qt/util/vlctick.hpp b/modules/gui/qt/util/vlctick.hpp<br>
> index 19ea5d1db5..e6f8f2b2aa 100644<br>
> --- a/modules/gui/qt/util/vlctick.hpp<br>
> +++ b/modules/gui/qt/util/vlctick.hpp<br>
> @@ -39,6 +39,7 @@ public:<br>
> * @return time as HH:MM:SS<br>
> */<br>
> Q_INVOKABLE QString toString() const;<br>
> + Q_INVOKABLE VLCTick scale(float) const;<br>
><br>
> private:<br>
> vlc_tick_t m_ticks;<br>
> --<br>
> 2.21.0<br>
><br>
> _______________________________________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a></blockquote></div>