Also rename the relevant API so we mirror the public API more closely, and
switch to CoreFoundation CFTypeRef style typedefs. We still support the old
private CoreMedia in order to not break OS X support.
This means that vtenc and vtdec are now compatible with iOS 4.x, and in
theory also future versions of OS X, where this API may turn public like
it has on iOS.
Fixes detection for images with a width that's not a multiple of four.
Based on patch by: Kaj-Michael Lang <milang@tal.org>
Based on patch by: Stefan Kost <ensonic@users.sf.net>
https://bugzilla.gnome.org/show_bug.cgi?id=630830
When switching between video/still modes the pre-night-mode fps
should be reset to prevent it being used in the incorrect mode, causing
the videosource to fail configuring itself
Store width/height/fps for video captures in a separate variable
than the one that stores the currently used value.
This prevents the user preferences to be lost when resetting
the currently used dimensions for night mode, for example
Resets used caps so that camerabin doesn't try to use them
when restarting, where elements/properties might have changed
and the old caps be incompatible
Adds a higher priority to the idle_add function for when
the image bin finished the image capture. This reduces the
delay for the application to be notified about this.
GetOverlappedResult() might never return with some drivers. Time out
after 1000 ms. We cannot really fix this without either:
1) Controlling the streaming thread so we can do CancelIo() from that
thread.
2) Switch to using IO completion ports.
Turns out that the reference implementation does this, hence we need to
mirror this behaviour. This typically happens with hardware that takes
some time to initialize.
Most important part here is special-casing "device busy" so the application
is able to provide better feedback when another application is using the
device.
* Make the driver write directly into each GstBuffer to avoid memcpy().
* Don't memset() the buffer before reusing it.
* Recycle memory by keeping two spare buffers. Two because the sink
downstream may keep a ref to the previous buffer.
Note that we align buffers on highest possible byte boundary (4096) so we
don't have to take into account what kind of alignment the driver requires.