Commit 646639aa authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

android/utils: add ChromaToAndroidHal

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 327323e2
......@@ -51,6 +51,25 @@ typedef struct
void *LoadNativeWindowAPI(native_window_api_t *native);
void Manage(vout_display_t *);
#define PRIV_WINDOW_FORMAT_YV12 0x32315659
static inline int ChromaToAndroidHal(vlc_fourcc_t i_chroma)
{
switch (i_chroma) {
case VLC_CODEC_YV12:
case VLC_CODEC_I420:
return PRIV_WINDOW_FORMAT_YV12;
case VLC_CODEC_RGB16:
return WINDOW_FORMAT_RGB_565;
case VLC_CODEC_RGB32:
return WINDOW_FORMAT_RGBX_8888;
case VLC_CODEC_RGBA:
return WINDOW_FORMAT_RGBA_8888;
default:
return -1;
}
}
typedef struct native_window_priv native_window_priv;
typedef native_window_priv *(*ptr_ANativeWindowPriv_connect) (void *);
typedef int (*ptr_ANativeWindowPriv_disconnect) (native_window_priv *);
......
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