[vlc-commits] vout/android: use gles2 if MediaCodec can't handle the rotation
Thomas Guillem
git at videolan.org
Mon Dec 19 17:24:43 CET 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Dec 19 16:57:26 2016 +0100| [377d831f14bdfb9e0bb6a7e78e24405e09cb1022] | committer: Thomas Guillem
vout/android: use gles2 if MediaCodec can't handle the rotation
MediaCodec can't handle rotation before Android 21 and can't handle flipped and
transposed orientations.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=377d831f14bdfb9e0bb6a7e78e24405e09cb1022
---
modules/video_output/android/display.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/android/display.c b/modules/video_output/android/display.c
index 4adb652..d5bc65e 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -770,8 +770,12 @@ static int OpenOpaque(vlc_object_t *p_this)
vout_display_t *vd = (vout_display_t*)p_this;
if (vd->fmt.i_chroma != VLC_CODEC_ANDROID_OPAQUE
- || vd->fmt.projection_mode != PROJECTION_MODE_RECTANGULAR)
+ || vd->fmt.projection_mode != PROJECTION_MODE_RECTANGULAR
+ || vd->fmt.orientation != ORIENT_NORMAL)
+ {
+ /* Let the gles2 vout handle orientation and projection */
return VLC_EGENERIC;
+ }
return OpenCommon(vd);
}
More information about the vlc-commits
mailing list