[prev in list] [next in list] [prev in thread] [next in thread]
List: gstreamer-cvs
Subject: [gst-cvs] qt-gstreamer: Reimplement the way GValues are handled.
From: gkiagia () kemper ! freedesktop ! org (George Kiagiadakis)
Date: 2010-11-26 15:18:04
Message-ID: 20101126151804.9939D10057 () kemper ! freedesktop ! org
[Download RAW message or body]
Module: qt-gstreamer
Branch: master
Commit: 25585873f89e69b63bd040b2d91411a0090e6a2f
URL: http://cgit.freedesktop.org/gstreamer/qt-gstreamer/commit/?id=25585873f89e69b63bd040b2d91411a0090e6a2f
Author: George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
Date: Fri Nov 26 10:17:37 2010 +0200
Reimplement the way GValues are handled.
With this new design, things are not so much dependent on templates anymore.
Every type is converted into a void* and is handled internally in
setData/getData, which use the GType of this type to determine if it
can be directly assigned to the GValue or if it needs conversion.
If a conversion is required, it is handled by g_value_transform, which
should handle all the cases that we want to support.
Internally, there is a dispatcher that holds set/get methods for the various
GTypes. Each of these methods knows how to convert void* back to the
original type and handle it. A method is provided to register additional
such methods from client code, if necessary.
ValueImpl<T> still stays around to handle conversion of C++ types in
some cases where the default implementation doesn't work as we want it
(RefPointer, QFlags, strings, Message/Query/Event subclasses)
As a bonus, ValueBase::set/get no longer throw exceptions, but they
behave like the QVariant equivalents (i.e. get returns a default-constructed
value if it cannot get the actual underlying value).
---
src/QGlib/value.cpp | 208 +++++++++++++++++++++++++++++++------------
src/QGlib/value.h | 248 +++++++++++++++++++++++++--------------------------
2 files changed, 273 insertions(+), 183 deletions(-)
Diff: http://cgit.freedesktop.org/gstreamer/qt-gstreamer/diff/?id=25585873f89e69b63bd040b2d91411a0090e6a2f
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-cvs mailing list
gstreamer-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic