On Sat, Mar 29, 2008 at 12:15 PM, Matthias Kretz <<a href="mailto:kretz@kde.org">kretz@kde.org</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Friday 28 March 2008, Tanguy Krotoff wrote:<br>
> On Thu, Mar 20, 2008 at 7:40 PM, Matthias Kretz <<a href="mailto:kretz@kde.org">kretz@kde.org</a>> wrote:<br>
> >  Perhaps it should be called currentVideoFrame() since there are also<br>
> > audio frames (just 48000 per second instead of ~25). And I omitted<br>
> > "Number" to not make the function name too long.<br>
><br>
> I think term Number is good since currentVideoFrame() can "mean" something<br>
> else like:<br>
> qint64 videoFrameId = obj->currentVideoFrame();<br>
> or<br>
> VideoFrame videoFrame = obj->currentVideoFrame();<br>
> videoFrame->size();</div></blockquote><div><br>Yes that why I choose this long name<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
> Why not Nb?<br>
> Number is used by Qt API, not Nb<br>
> cf <a href="http://doc.trolltech.com/main-snapshot/functions.html" target="_blank">http://doc.trolltech.com/main-snapshot/functions.html</a><br>
><br>
> >  Other functions that could be added later are:<br>
> >  qint64 videoFrameCount()<br>
> >  void seekToVideoFrame(qint64)<br>
><br>
> seekToVideoFrameNumber()<br>
> to make it symmetric, even a longer name :/<br>
<br>
</div>The rule is to not use abreviations in class/function names. And with 'Number'<br>
it really gets long. More general idea:<br>
<br>
enum Timecode<br>
{<br>
    SmpteTimecode,<br>
    VideoFrameNumber,<br>
    AudioFrameNumber,<br>
    Microseconds,<br>
    Milliseconds,<br>
    Seconds<br>
};<br>
<br>
ok, that's pushing it a bit, but I just tried to come up with a little more<br>
than two entries :-)<br>
<br>
class MediaObject<br>
{<br>
...<br>
    <some type> currentTime(Timecode) const;<br>
    <some type> totalTime(Timecode) const;<br>
    void seek(Timecode, <some type>);<br>
    <some type> convertTimecodeTo(Timecode, <some type>);<br>
...<br>
};<br>
<br>
Where <some type> could either be quint64, QVariant or a more<br>
specialized/simple class (don't know SMPTE well enough).<br>
<div><div></div><div class="Wj3C7c"><br><br></div></div></blockquote></div><br>I like the enum idea.I will try to rewrite the pos thing like this. maybe a setDefaultTimecode()<br>can be usefull?<br>For the binary compatibiliy prob, is there a document that explain thing to do or not, to keep<br>
compatibility?<br><br>Thanks for comment.<br clear="all"><br>-- <br>Sylvain "Skarsnik" Colinet<br><br>Victory was near but the power of the ring couldn't be undone