28 Commits
Author SHA1 Message Date
wang-bin d938cc5bd7 move setupQuality to handlePaintEvent 2013-06-16 20:17:33 +08:00
wang-bin cef7a3dc57 video quality support for gl, d2d and qpainter
TODO:
1. more levels? opengl has many combinations. d2d has 4 levels
2. move setupQuality() to handlePaintEvent()
3. gdi+, xv
4. text quality api
5. keep last renderer's quality when renderer changed
6. MIPMAP?
2013-06-02 00:59:25 +08:00
wang-bin b382535283 enable d2d factory with multi-thread support. no crash now with the same
logic as renderers

TODO: compare cpu usage with single thread with manual lock
2013-06-01 23:23:08 +08:00
wang-bin d0d3d69d18 d2d: use handlePaintEvent without crash(lock EndDraw()) 2013-05-13 22:31:16 +08:00
wang-bin f158f6dd8b less warnings 2013-05-13 00:41:21 +08:00
wang-bin 4022ccce40 use VideoRenderer::handlePaintEvent() for the render logic
TODO:
1. needUpdateBackground() not virtual. use widget_holder &&
widget_hoder.rect() etc.
2. needDrawFrame() not pure, always !data.isEmpty()
3. handlePaintEvent() parameter can be empty
4. mutex scope. d2d need a larger scope
2013-05-12 15:16:45 +08:00
wang-bin 3c44dbc3a1 remove VideoRenderer::drawXXX(). Use Filter instead 2013-05-08 23:54:48 +08:00
wang-bin a35cca0ce6 move vo private classes to private headers to be reused in subclasses
developers may create a subclass of existing VideoRenderer, for example,
Direct2DRenderer, want to reimplement drawXXX functions. Then private
class may be used.
TODO: how to make sure binary compatible
2013-04-04 11:37:11 +08:00
wang-bin 0702a4e6db new api drawXXX() to support custom osd/subtitle drawing on renderer.
subclass the existing renderer. logic is clear
TODO:
0. add constructor for with private class parameter
1. what if QPainter is needed
2. unifine the painting logic logic
3. set as pure virtual when other renderers done(gl, graphicsitem)
4. add final vo template
2013-04-04 10:34:51 +08:00
wang-bin 99cafdaefa Qt5 compile error fix: WID=>HWND 2013-03-16 13:22:01 +08:00
wang-bin 4645f05751 remove unnecessary includes 2013-03-07 20:14:59 +08:00
wang-bin eab3811212 direct2d is dynamic loaded, supports mingw
The headers are from https://github.com/2of1/d2d1headers
But many compile error even simply include d2d1.h. So now that project
is not a submodule of QtAV.
2013-03-04 20:10:24 +08:00
wang-bin 3448410859 remove usePainter() and fix Qt5 build error
DO NOT use QPainter for native painting by default.
QPaintEngine::getDC() is removed in Qt5
build error: Wid cast to HWND in Qt5
2013-03-03 17:26:47 +08:00
wang-bin 080322fefd fix d2d compile error and wrong background
TODO:
for direct2d, why background is white if return after clear color and
data is null?
2013-03-02 03:13:28 +08:00
wang-bin c168f0bd60 optimize background color. gdi renderer supports now
TODO: is it necessary to set the color?
2013-03-01 19:24:26 +08:00
wang-bin 15070ea70c direct2d: crash fixed. always lock is easier, and will not forget to
unlock
2013-03-01 01:18:40 +08:00
wang-bin cf5bab30fd let all renderers support aspect ratio 2013-03-01 01:09:28 +08:00
wang-bin dfe8fd24c8 correct var name 2013-02-28 23:55:58 +08:00
wang-bin 731d5e3422 move useQPainter() to base class VideoRenderer 2013-02-28 23:50:00 +08:00
wang-bin 11e04f5947 names change, warning fix, move some public members to private
I think QtAV is not used widely today, so api change does not matter
2013-02-28 22:43:49 +08:00
wang-bin b28d29cf17 d2d: unlock before return etc 2013-02-26 22:47:25 +08:00
wang-bin 62bcc71e7f direct2d: showEvent instead of changeEvent to avoid flicker when active
state changed
2013-02-24 00:49:01 +08:00
wang-bin dcd7b9705d direct2d: check ptr
BUG:
sometimes windows give this error: "D3D11: Removing Device"
even the user will logout the system!
2013-02-24 00:11:07 +08:00
wang-bin afe5077442 direct2d: inherit VideoRenderer to avoid QImage construct
TODO:
1. need a function call when setSourceSize() called
2. try QPainter::beginNativePaint()
3. try to implement other QPaintEngine. What Qt has?
2013-02-23 23:29:50 +08:00
wang-bin e25c66ca9a code style, var names etc. 2013-02-23 02:25:49 +08:00
wang-bin 79cb77c67c direct2d: do not always create bitmap
have not compared the performance
TODO:
1. how to update bitmap when setSource called and size changes
2. change base class from ImageRenderer to VideoRenderer to avoid QImage
constructing
2013-02-23 02:14:28 +08:00
wang-bin 6cdaa7cddf direct2d works. default is disabled. use qmake argument CONFIG+=direct2d
picture quality is ok. performance is not good enough on my pc
TODO: use dynamic load
2013-02-22 22:02:15 +08:00
wang-bin ff9e9e193c add Direct2DRenderer class. empty now 2013-02-22 00:38:16 +08:00