Commit graph

39 commits

Author SHA1 Message Date
Youness Alaoui
0a2530ef79 androidcamera: Store GParamSpec for properties and use that for the PropertyProbe comparison 2016-01-21 13:48:42 -05:00
Youness Alaoui
dd78e052ae androidcamera: Handle zoom comparison better, and avoid float precision issue 2016-01-21 13:48:41 -05:00
Youness Alaoui
5975d396e0 androidcamera: Fix EV compensation support 2016-01-21 13:48:41 -05:00
Youness Alaoui
08298ef7f5 androidcamera: Implement new GstPhotography enums 2016-01-21 13:48:41 -05:00
Youness Alaoui
01d6df438d androidcamera: Do not advertise zoom capabilities if camera doesn't support zoom 2016-01-21 13:48:41 -05:00
Youness Alaoui
dae0337d91 androidcamera: Use strcmp on the GParamSpec property name
Use strcmp instead of using the property_id because it's overriden
2016-01-21 13:48:12 -05:00
Youness Alaoui
49a40edae9 androidmedia: Implement property probe for zoom and ev_compensation 2016-01-21 13:48:03 -05:00
Youness Alaoui
1ef65636d1 androidcamera: Add autofocus support 2016-01-21 13:47:53 -05:00
Youness Alaoui
24b29d4266 androidcamera: Override properties 2016-01-21 13:47:52 -05:00
Youness Alaoui
2d45a878b4 anroidcamera: Add support for the GstPhotography interface 2016-01-21 13:47:52 -05:00
Youness Alaoui
2e745fa1b1 androidcamera: Send proper error when unable to open camera 2016-01-21 13:47:52 -05:00
Youness Alaoui
02f36d92bc androidcamera: Adding device-orientation and device-facing properties 2016-01-21 13:47:49 -05:00
Youness Alaoui
a08c895303 androidcamera: Add device property and property probe it 2016-01-21 13:47:27 -05:00
Youness Alaoui
0552bb1b2a androidcamera: Fix memleak and lose of buffer if the data queue is flushing 2016-01-21 13:47:03 -05:00
Youness Alaoui
122083eadb androidcamera: Calling set_preview_callback with NULL frees all the buffers in the queue.
We must not do it at the stop otherwise we lose all our buffers. It's best to do
it during the close, so we free up the resources.
2016-01-21 13:47:03 -05:00
Youness Alaoui
acb15e4178 androidcamera: Drop frames if we don't have a clock and var rename 2016-01-21 13:47:02 -05:00
Youness Alaoui
691ab727b0 androicamera: if buffer size increases, then readd new buffers to the queue and drop old ones
The on_preview callback gets called with NULL if the buffer in the queue is
too small, so we need to handle the case where the array is NULL. Also
there is a bug in the android source which makes it drop one of the buffers
so if we had 5 buffers, and we renegotiate to a higher resolution, then we'd
only get 4 calls to on_preview_frame with NULL, with one being dropped.
This means we can't reallocate the buffers in the if (data == NULL) case
because we might end up with 0 buffers in the end.
2016-01-21 13:47:02 -05:00
Nicolas Dufresne
e3ba219494 androidcamera: Fix debug output 2016-01-21 13:46:52 -05:00
Sebastian Dröge
19e5238379 androidcamera: Chose the smallest range that contains the target framerate 2016-01-21 12:44:43 -05:00
Sebastian Dröge
c633ecc3be androidcamera: Improve negotiation
And make sure we set an FPS range from the supported ones
now instead of a potentially unsupported range.
2016-01-21 12:44:42 -05:00
Sebastian Dröge
08db4f267d androidcamera: Implement LATENCY query 2016-01-21 12:44:42 -05:00
Sebastian Dröge
6cdd4745fe androidcamera: Make sure we always have a valid camera source instance in the buffer free function 2016-01-21 12:44:42 -05:00
Sebastian Dröge
f43897e839 androidcamera: Make sure to not call any callbacks after stopping the camera
Fixes segfaults when rotating the device for example.
2016-01-21 12:44:41 -05:00
Youness Alaoui
1a2bcc769c androidcamera: Fix timestamping issue 2016-01-21 12:44:41 -05:00
Youness Alaoui
25896c5ab7 androidcamera: Add caps negotiation support 2016-01-21 12:44:41 -05:00
Youness Alaoui
bb83c54a87 Add support for getcaps that probes the camera for capabilities 2016-01-21 12:44:41 -05:00
Youness Alaoui
4856d22b9f androidmedia: Drop the first buffer to have proper timestamping 2016-01-21 12:44:40 -05:00
Youness Alaoui
0083adbbed androidmedia: Flush the queue when the source is stopped 2016-01-21 12:44:40 -05:00
Youness Alaoui
dd27b89e95 androidmedia: Allocate/free texture when camera is open/closed 2016-01-21 12:44:40 -05:00
Youness Alaoui
d4717a9639 androidmedia: add a gst_ahc_src_close function 2016-01-21 12:44:39 -05:00
Youness Alaoui
54f3337bd1 androidmedia: Fix small indentation issues 2016-01-21 12:44:39 -05:00
Youness Alaoui
91219adaf2 Free the buffers and readd the arrays when the queue is cleared 2016-01-21 12:44:38 -05:00
Youness Alaoui
7b8dbd32db Calculate timestamp at reception of the buffer, not when pushing it out 2016-01-21 12:44:37 -05:00
Youness Alaoui
fff14b255c Make the number of callback buffers configurable, and delete their local ref 2016-01-21 12:44:37 -05:00
Youness Alaoui
3c78395e31 Use GstDataQueue instead of GAsyncQueue for storing buffers 2016-01-21 12:44:37 -05:00
Youness Alaoui
4cbfe6fa13 Use the buffer's free_func to map byteArray data without making a copy 2016-01-21 12:11:16 -05:00
Youness Alaoui
af47c1ebdc Remove open failure test code and debug log 2016-01-21 12:11:16 -05:00
Youness Alaoui
666eda11d6 Use YV12 as the default format 2016-01-21 12:11:16 -05:00
Youness Alaoui
484b0ae658 Add ahcsrc Camera source element prototype 2016-01-21 12:11:15 -05:00