[Qt-interest] QTimer on Windows in Unreliable for Small (16ms - 30ms) Delays

Josiah Bryan jbryan at productiveconcepts.com
Sat Sep 5 21:32:40 CEST 2009


André Somers wrote:
> Having said that: Linux should be easy in that respect. One quick route
> would be to just install a KDE based distribution. KDE uses Phonon
> everywhere (it was developed for KDE originally), so that should get you
> started on phonon!
> 
> Still, I am wondering a bit why you try to do this from scratch. I mean: why
> not take a look at existing Qt based video players and look how they do it,
> or even just modify them? Also displaying text over the video display should
> be a solved problem: video players that display subtitles do it all the
> time... I have never tried to build an application like this myself, so I
> don't know about the little pitfalls around videodisplay myself. It just
> sounds like you are trying to re-invent the wheel...

I must admit, I fight the NIH (Not Invented Here) syndrome as much as 
the next programmer, so I've been quite careful to examine my reasons 
for trying to play videos "on my own" in Qt, rather than just using 
someone else's code.  Truth be told, I would rather use a pre-built 
widget for that purpose, rather than roll my own. Problem is, I havn't 
found any code that is *easily* reusable (without having to incorporate 
*huge* chunks of some other programs API and GUI contentions, etc.)

Case in point - I've downloaded AVIDemux's source - svn checkout. They 
use a Qt (and GTK, and CLI) front end, so I thought it'd be a great 
example. Right? wrong. First of all, the front end is abstracted from 
the core logic. Secondly, they make *heavy* use of their own graphic 
contentions (their own video and image classes, etc) and only cast into 
Qt at the last possible second. So, to use their code to play back 
video, I'd have to pull in huge chunks of their project, understand 
their dependencies, their code structure, just to figure out what to 
"pull out" and what can be reused.

I need something that I can incorporate without having to spend (a) 
several days search for it, (b) several days learning their code, and 
(c) stripping their video code from their entire app just to play in a 
widget.

So, in lieu of a simple, easy to re-use Qt video playing widget, it has 
/seemed/ easier to roll my own.

I do appreciate your info and making sure I'm not just being an anal, 
stubborn guy who wants to do things his way and re-invent the wheel - 
I'd *gladly* use someone else's project or code, so long as its 
"cheaper" than spending the time to write my own. Right now, I havn't 
found any external code that is "cheaper," though I gladly welcome links.

Thanks!
-josiah




More information about the Qt-interest-old mailing list