[vlc-devel] [PATCH 0/3] omxil-dr: add rotation support
Thomas Guillem
thomas.guillem at gmail.com
Tue Sep 30 12:18:08 CEST 2014
Hello guys,
Here is a set of patches that enable HW rotation support for omxil-dr (zero
copy).
I started to rename iomx_hwbuffer.cpp to nativewindowpriv.c because I wanted to
use the private native window API from mediacodec.c in order to support hw
rotation for MediaCodec too.
But unfortunately, it's not possible to use the private native window API when
you use MediaCodec from JAVA. I tried a lot of things, but It seems that you
can't connect to NATIVE_WINDOW_API_MEDIA if MediaCodec is already connected to
it. I know it's possible to use it when you use MediaCodec from native but we
don't want that.
So I guess the only way to enable rotation for MediaCodec is to use a
SurfaceTexture and do a matrix transformation on the Java side. But we need to
do it only when we need it because performances are not so good with a
SurfaceTexture (mainly for old devices).
Now, I don't know if the "split iomx_hwbuffer.cpp" commit is really useful as
the private native window API won't be used for MediaCodec (but I think it's
more explicit that way).
If you agree with this patch set, tell me, I'll provide the one liner in
Android.mk in the other mailing list in order to fix the build.
Best regards,
Thomas Guillem.
Thomas Guillem (3):
omxil: split iomx_hwbuffer.cpp
nativewindowpriv: add setOrientation
omxil-dr: reorient video
modules/codec/omxil/iomx.cpp | 24 ++
modules/codec/omxil/iomx_hwbuffer.c | 288 -----------------------
modules/codec/omxil/omxil.c | 110 +++++----
modules/codec/omxil/omxil.h | 2 +
modules/codec/omxil/omxil_core.c | 26 +--
modules/codec/omxil/omxil_core.h | 14 +-
modules/video_output/android/nativewindowpriv.c | 293 ++++++++++++++++++++++++
modules/video_output/android/utils.c | 20 ++
modules/video_output/android/utils.h | 31 +++
9 files changed, 441 insertions(+), 367 deletions(-)
delete mode 100644 modules/codec/omxil/iomx_hwbuffer.c
create mode 100644 modules/video_output/android/nativewindowpriv.c
--
2.1.0
More information about the vlc-devel
mailing list