Age | Commit message (Collapse) | Author |
|
Unfortunately the nice event handler added previously doesn't work: we
may get multiple page-flip events, which would lead to unref'ing the
passed python object multiple times, leading to memory corruption.
I guess it's only possible to pass a plain int as user data to commit()
and page_flip().
|
|
|
|
The current event handling relies on the PageFlipHandlerBase class which
has to be implemented on the python side.
This patch implements a more versatile event handling, where any python
object can be passed as data to the commit or page flip, and it's up to
the python implementation to decide what to do with that data when
receiving the event.
Note that when doing the commit or page_flip, the ref count of the
given python object is incremented to keep it alive. The ref count is
decremented when reading the events with the new helper method
card.read_events(). This helper _has_ to be used to ensure the objects
get released properly.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
|
|
Instead of forcing applications to import the helpers manually, move
them to pykms by turning it into a python module.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|