[vlc-devel] [PATCH 00/19] add a new android vout module

Thomas Guillem thomas at gllm.fr
Fri Nov 14 17:09:51 CET 2014

This set of patches add a new android vout module called: android_window.
It replace the android_opaque module.

Now, there is 2 android vout modules:

    - android_surface: that don't use native_window anymore and use pre
      gingerbread specific surfaces.

    - android_window: that is used after gingerbread for direct and non direct

Both modules configure the surface (ie, the color and the size) from native and

Before, android_surface was setting the surface asynchronously, and the pool
was not able to lock a buffer until the surface size was set.

android_vout use nativewindowpriv that allows more control than the public api,
since you can set orientation, crop, cancel a buffer without displaying it and
allocate more than one buffers.

Ideally, I should remove all nativewindowpriv calls from omxil.c (for iomx-dr)
and use android_window for direct rendering via nativewindowpriv (but it's for
an other day).

nativewindowpriv is only used after HoneyComb, and there is a fallback to
public native_window when nativewindowpriv fails (never saw it failing, on lot
of devices on my previous player I worked on);

Now, there is only one way to display subtitles: by using a separate android
surface. I also fixed subtitles display when video has an aspect ratio != 1.

This set of patches goes with my other set of patches on the android mailing

Thomas Guillem (19):
  native_window: add setBuffersGeometry
  nativewindowpriv: use native_window_priv as a handle
  nativewindowpriv: add is_hw arg in setup
  nativewindowpriv: add lock/unlock Data
  nativewindowpriv: fix connect before ics
  android: rename jni_SetAndroidSurfaceSize
  android/utils: add ChromaToAndroidHal
  modules: add android_window vout
  android/surface: remove single_instance
  android/surface: fix leaks if Open fails
  android/surface: use calloc
  android/surface: don't use native_window
  android/surface: use native_surface from jni
  android/surface: drop YV12 support
  android/surface: configure surface synchronously
  omx-dr: remove jni_SetAndroidSurfaceSize call
  mediacodec: remove unused code/variables
  mediacodec: remove jni_SetAndroidSurfaceSizeEnv call
  mediacodec: fix width/height in case crop is invalid

 configure.ac                                    |   2 +-
 modules/MODULES_LIST                            |   2 +-
 modules/codec/omxil/android_mediacodec.c        |  94 +--
 modules/codec/omxil/android_opaque.h            |   9 -
 modules/codec/omxil/omxil.c                     | 113 ++-
 modules/codec/omxil/omxil.h                     |   2 +-
 modules/video_output/Makefile.am                |  12 +-
 modules/video_output/android/android_window.c   | 925 ++++++++++++++++++++++++
 modules/video_output/android/android_window.h   |  59 ++
 modules/video_output/android/nativewindow.c     |   6 +-
 modules/video_output/android/nativewindowpriv.c | 204 ++++--
 modules/video_output/android/opaque.c           | 353 ---------
 modules/video_output/android/surface.c          | 241 +++---
 modules/video_output/android/utils.c            |  12 +-
 modules/video_output/android/utils.h            |  48 +-
 15 files changed, 1352 insertions(+), 730 deletions(-)
 create mode 100644 modules/video_output/android/android_window.c
 create mode 100644 modules/video_output/android/android_window.h
 delete mode 100644 modules/video_output/android/opaque.c


More information about the vlc-devel mailing list