[Phonon][Patch] add a method to get the current frame number

Sylvain "Skarsnik" Colinet scolinet at gmail.com
Thu Mar 20 15:59:39 GMT 2008


Hi,
Here a patch that add a method to the mediaObject class
for getting the current frame number.

qint64 currentFrameNumber(), return -1 on failure

Why a method for that?
I like karaoke, and I need to write a multios Lyrics timer,
the format of time's file is frame based so I need the frame number.


I make the method in mediaobjectinterface not pure to don't break
compilation of backends, but if you prefer I can add the method in all
backend (return -1 when unimplanted)

Attached also the patch for xine backend, It herits the currentTime bug
(when no tickinterval is set) because the only way I found in xine to get
the frame number is calculate it with the frame duration.

I have a quick look at gstreamer, and It seems also the way to get it.
It very unaccurate with stream with variable FPS

Also attached a small use case that just print the frame number on mouse
click and release event.

-- 
Sylvain "Skarsnik" Colinet

Victory was near but the power of the ring couldn't be undone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20080320/d538faf9/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mediaobject-currentframenumber.patch
Type: text/x-diff
Size: 2536 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20080320/d538faf9/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xine-currentframenumber.patch
Type: text/x-diff
Size: 3441 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20080320/d538faf9/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timefrm.cpp
Type: text/x-c++src
Size: 1386 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-multimedia/attachments/20080320/d538faf9/attachment.cpp>
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia


More information about the kde-multimedia mailing list