Commit cbe001da authored by Thomas Guillem's avatar Thomas Guillem Committed by Martin Storsjö

omxil: add android hw buffers support (zero copy)

Activated if cfg "omxil-dr" is true. If extra android symbols are not found or
if HwBuffer_init() fails: fall back to non direct buffer mode
Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent a72ed50c
This diff is collapsed.
......@@ -36,6 +36,16 @@
#include "omxil_utils.h"
#include "omxil_core.h"
#if defined(USE_IOMX)
#include "../../video_output/android/utils.h"
#endif
enum
{
BUF_STATE_NOT_OWNED = 0,
BUF_STATE_OWNED,
};
/*****************************************************************************
* decoder_sys_t : omxil decoder descriptor
*****************************************************************************/
......@@ -51,6 +61,27 @@ typedef struct OmxFifo
} OmxFifo;
typedef struct HwBuffer
{
vlc_thread_t dequeue_thread;
bool b_run;
vlc_cond_t wait;
picture_t** inflight_picture; /**< stores the inflight picture for each output buffer or NULL */
unsigned int i_buffers;
void **pp_handles;
int *i_states;
unsigned int i_max_owned;
unsigned int i_owned;
void *p_library;
void *window;
#if defined(USE_IOMX)
native_window_api_t native_window;
#endif
} HwBuffer;
typedef struct OmxPort
{
bool b_valid;
......@@ -75,6 +106,8 @@ typedef struct OmxPort
OMX_BOOL b_direct;
OMX_BOOL b_flushed;
HwBuffer *p_hwbuf;
} OmxPort;
struct decoder_sys_t
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment