Ingvar Stepanyan
51d5d4a083
Fix GP_UNKNOWN_EVENT leaks in examples ( #833 )
...
Most of the examples give wrong impression that `GP_UNKNOWN_EVENT` data does not need to be freed / is not heap allocated, however it's not the case - those messages are always `malloc`'d by corresponding drivers.
2022-09-21 09:28:25 +02:00
Siim Meerits
4d161b4647
Fix examples compilation warnings.
...
* best-iso.c: Remove or comment out unused variables.
* sample-afl.c: Remove or comment out unused variables.
* sample-capture.c: Fix signed-unsigned compare issue.
* sample-trigger-capture.c: Fix signed-unsigned compare issue.
2020-08-03 08:50:12 +02:00
Siim Meerits
456a1d598b
Remove trailing whitespace from all *.h and *.c files.
2020-07-27 17:37:00 +03:00
Marcus Meissner
88df661051
added unistd.h include for older systems
2019-03-09 14:12:25 +01:00
Marcus Meissner
76bfee1646
free various event data
...
added GP_EVENT_FILE_CHANGED
2018-04-16 19:25:28 +02:00
Marcus Meissner
3afe07dbfd
wait_for_Event needs to be run multiple times to drain
...
the event queue better. otherwise e.g. Nikon DSLR will
never get to the fileadded event.
2016-12-20 08:43:11 +01:00
Marcus Meissner
eae8a13ac2
adjusted code to handled errors and use buffer and file better
...
fixes https://github.com/gphoto/libgphoto2/issues/118
2016-12-20 07:10:52 +01:00
Marcus Meissner
14041e1af9
trigger capture: do not use file_read, api does not handle sdram capture currently ... :/
2016-12-18 21:25:55 +01:00
peterbud
230e2554f8
add O_BINARY flag for open() calls to write images in binary mode on Windows
2016-11-19 23:47:21 +01:00
Marcus Meissner
14aab4929c
remove probably unistd.h include , or protected by ifdef for
...
building better with Visual C
https://github.com/gphoto/libgphoto2/issues/33
2016-01-03 18:25:33 +01:00
Marcus Meissner
a3b9afebf0
handle an error (coverity)
...
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14984 67ed7778-7388-44ab-90cf-0a291f65f57c
2014-06-01 17:15:21 +00:00
Marcus Meissner
c1ddde0315
From: "Daniel P. Berrange" <berrange@redhat.com>
...
A great many functions have variables which are set to some
value, but never read thereafter. All these variables can be
removed with no functional impact.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14896 67ed7778-7388-44ab-90cf-0a291f65f57c
2014-04-11 20:10:32 +00:00
Marcus Meissner
d52d005932
updated trigger sample test
...
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12909 67ed7778-7388-44ab-90cf-0a291f65f57c
2010-04-05 20:44:46 +00:00
Marcus Meissner
1f9373e771
added new trigger capture sample program (not fully working yet)
...
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12885 67ed7778-7388-44ab-90cf-0a291f65f57c
2010-04-01 21:28:56 +00:00