Commit graph

24 commits

Author SHA1 Message Date
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