vlc | branch: master | Thomas Guillem <[email protected]> | Thu Mar 12 13:05:19 2015 +0100| [4f486e173e3f805a01a26d1eb22b9264589f07a8] | committer: Jean-Baptiste Kempf
mediacodec: fix rotation before API 21 Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f486e173e3f805a01a26d1eb22b9264589f07a8 --- modules/codec/omxil/android_mediacodec.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/codec/omxil/android_mediacodec.c b/modules/codec/omxil/android_mediacodec.c index 8a6ce90..7af2320 100644 --- a/modules/codec/omxil/android_mediacodec.c +++ b/modules/codec/omxil/android_mediacodec.c @@ -541,6 +541,17 @@ loopclean: direct rendering should be disabled since no surface will be attached to the JNI. */ p_sys->direct_rendering = jni_IsVideoPlayerActivityCreated() && var_InheritBool(p_dec, CFG_PREFIX "dr"); + + /* There is no way to rotate the video using direct rendering (and using a + * SurfaceView) before API 21 (Lollipop). Therefore, we deactivate direct + * rendering if video doesn't have a normal rotation and if + * get_input_buffer method is not present (This method exists since API + * 21). */ + if (p_sys->direct_rendering + && p_dec->fmt_in.video.orientation != ORIENT_NORMAL + && !p_sys->get_input_buffer) + p_sys->direct_rendering = false; + if (p_sys->direct_rendering) { if (p_dec->fmt_in.video.orientation != ORIENT_NORMAL) { int i_angle; _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
