Only 200 bytes are peeked but FromCharset was being called with 512.
The char * returned by FromCharset was not being freed, and
strstr was being called on a buffer that was not NULL terminated
(in the non utf-8 case).
filter_chain: introduce dedicated filter_chain_NewVideo() for video filters
Also remove the filter chain buffer functions update hack, keep constant
callbacks for video filters in the filter chain, remove now useless
parameters from filter_chain_New(), and inline
filter_chain_AppendFilterInternal().
Martin Storsjö [Mon, 28 Jul 2014 07:33:13 +0000 (10:33 +0300)]
iomx: Adjust ANDROID_API ifdefs to work with honeycomb 11, 12 and 13
This would allow building libiomx-hc.so with -DANDROID_API=13
instead of =11 as right now - using 13 would probably be more
correct as the headers match 3.2.
Martin Storsjö [Fri, 25 Jul 2014 21:11:33 +0000 (00:11 +0300)]
omxil: Retry getting an output buffer while waiting for a free input buffer
As soon as either the input packet has been written, or an output
buffer is available, we return from the function, allowing passing
the output frames down the pipeline as soon as possible. (For
direct rendering, a new output buffer only become available for
the codec to use once the picture is rendered or discarded.)
This fixes playback with IOMX direct rendering on Nexus S, which
only uses 2 output buffers in this mode (min_undequeued = 1,
nBufferCountMin = 1), and probably also for other devices with
a small number of output buffers.
(On the Nexus S, the number of output buffers can't be increased,
since this leads to blinking.)
This is similar to how available input/output buffers are checked
in the MediaCodec plugin.
This still isn't completely foolproof with respect to the case when
an input packet needs to be split up over multiple input buffers
though, but it wasn't completely correct previously either.
Also make sure we don't return from the function without consuming
the input packet or returning an output frame, which earlier would
lead to a skipped input packet and leaked memory. (This could
previously happen on reconfiguration, or on timeout while waiting for
an input buffer.)
Finally, make sure we don't block indefinitely in case the playback
is paused (causing the decoder to block while waiting for a free
output buffer). The same solution as in the android mediacodec
decoder is used here.
Thomas Guillem [Fri, 25 Jul 2014 14:58:54 +0000 (16:58 +0200)]
iomx-dr: split IOMXHWBuffer_Setup function
In HwBuffer, split Setup into Setup, GetMinUndequeued and SetBufferCount since
we want to control the buffer count logic from omxil.c.
Some OMX components (like OMX.TI.*.Decoder) may have nBufferCountActual that is
greater than nBufferCountMin + min_undequeued. In that case we decreased the
number of buffer wanted by the component and had an undefined behavior.
In order to fix it, we need to increase nBufferCountActual value from the
component only when it's smaller than nBufferCountMin + min_undequeued.
Thomas Guillem [Fri, 25 Jul 2014 14:50:54 +0000 (16:50 +0200)]
iomx-dr: don't always lock buffers from dequeue
According to OMXCodec.cpp, we shouldn't call lockBuffer when we first allocate
all buffers, since we may cancel some of them (the min_undequeued ones).
We should call lockBuffer only before giving a buffer to OMX.
Antti Ajanki [Fri, 25 Jul 2014 09:05:01 +0000 (12:05 +0300)]
access/http: Improved cookie handling
* Moved cookie code to a separate file.
* Implemented domain and path matching algorithms from RFC 6265.
* Generates a single Cookie header consisting of a concatenation of all
matching cookie values.
* Sends Secure cookies only on https streams.
Thomas Guillem [Thu, 24 Jul 2014 13:11:26 +0000 (15:11 +0200)]
iomx: add android GraphicBuffers functions.
- OMXAndroid_EnableGraphicBuffers: activate GraphicBuffers.
Next call of OMX_GetParameter(OMX_IndexParamPortDefinition) will return a
private eColorFormat compatible with android hal_format.
- OMXAndroid_GetGraphicBufferUsage: return hw_usage that will be used to
allocate android hw buffers.
Thomas Guillem [Thu, 24 Jul 2014 13:11:25 +0000 (15:11 +0200)]
iomx: add iomx_hwbuffer
Wrapper to android native window api located in aosp system/window.h.
Allow to queue/dequeue hw buffers (ANativeWindowBuffer_t) allocated with a
speficied hal_format and hw_usage.
This requires changes to the android build project to include
iomx_hwbuffer.c when building libiomx-*.so.