Commit Graph

19 Commits

Author SHA1 Message Date
Carsten Haitzler 030ef36c72 emotion - webcam - fix segv on webcam plug/unplug and clean
well hunting was fun... custom webcams i just cant see being used. no
api to add them - have to hand craft a config file .. and udev/eeze
provide info on webcam devices anyway at runtime with plug/unplug etc.
... so this should be the only ay (for now) and it keesp the code
simpler and less bug-prone

now issue was some nasty skipping unref as opposed to destroy. in
chasing i simplified the code to help me narrow it down and not chase
the same logic in multiple places. shorter cleaere, simpler and minux
one bug.

@fix
2020-03-25 17:11:28 +00:00
Carsten Haitzler 239ebbbc2c emotion - webcam fix deletion of webcam still left in webcam list
we may destroy webcams but leave them in the list. this fixes that by
removing them from our global list when we do unref to 0.

@fix
2019-08-22 19:53:03 +01:00
Jean-Philippe Andre ff24ac2d6d efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would
become invalid, since they are now stored in a dynamic array rather than
a statically stored array.

The risk here is that if a module of EFL tends to init/shutdown in a
"normal" scenario then the event type array will grow in a leaking
manner. This could be fixed by resetting those event ID's only when the
loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using
EFL_EVENT_DEL in this patch as this would add too many event callbacks
to the main loop object, which may result in slightly slower event calls
to it, affecting the overall performance.
2017-12-19 11:14:37 +09:00
Cedric BAIL 99142090b4 emotion: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Stefan Schmidt 6e7db171ad emotion webcam: fix check for v4l2 video capture device capability
The negation should be uses after checking the capability bit with the &.
Better use parenthesis  to make this work.

Thankls to the sparse sematic parser for spotting this.
2015-11-13 14:05:25 +01:00
Guillaume Friloux 4f7bab2134 Fix unused var warning in emotion. 2014-05-30 14:37:42 +02:00
Cedric BAIL e131580aba emotion: fix Windows compilation. 2013-12-16 17:03:10 +09:00
Carsten Haitzler 6d5058ee1c emotion - webcam - don't access after free and ensure it is not in list
this should fix CID 1137853 and CID 1137854
2013-12-15 11:31:28 +09:00
Carsten Haitzler 5d6e30fae0 fix fd leak in emotion webcam where fd of value 0 never closed
fixes CID 1039175
2013-12-13 21:26:05 +09:00
Cedric BAIL ca2f9571ab emotion: make webcam initialization lazy and non blocking.
This should fix T648.
2013-12-13 12:44:19 +09:00
Cedric BAIL 96c1d15ac0 emotion: fix potential memory leak when webcam register fail. 2013-12-13 12:22:06 +09:00
Cedric BAIL d55164c5a2 emotion: lower warning on webcam access error to information (Not critical anyway). 2013-12-13 11:30:46 +09:00
Michaël Bouchaud (yoz) 4ce3e1e72f emotion: add two events to trigger when a webcam is plugged or unplugged 2013-10-09 12:29:04 +02:00
Stefan Schmidt d54bfd7e1d emotion: Avoid leak by also checking for fd being null.
If fd would be null here we would leak the fd handle. Fix the check.

CID: 1039175
2013-09-12 15:26:34 +01:00
Chris Michael 3fb6ef5a83 Fix compiler warnings
- include unistd.h for close function.
- initialize fd to -1 so we can check error condition.

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-07-09 16:13:12 +01:00
Chris Michael 5f3a2dd5f6 Don't leak fd handles (ie: leave files open) when checking devices
NB: Fixes Coverity CID1039175

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-09 13:29:32 +01:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Jérémy Zurcher 5b885ea931 fix segv in emotion_webcam_init and leak in emotion_webcam_config_load
SVN revision: 82650
2013-01-11 17:20:22 +00:00
Gustavo Sverzut Barbieri d1341cc826 efl/emotion: move webcam stuff out of main file.
SVN revision: 82591
2013-01-10 21:50:02 +00:00