[Android] rename setSurfaceSize to setSurfaceLayout
Thomas Guillem
git at videolan.org
Sat Nov 15 12:42:01 CET 2014
vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Nov 14 17:10:25 2014 +0100| [2ec472e644312ecfda0cab50cf7aacf1c76cdba0] | committer: Jean-Baptiste Kempf
rename setSurfaceSize to setSurfaceLayout
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=2ec472e644312ecfda0cab50cf7aacf1c76cdba0
---
libvlc/jni/vout.c | 8 ++++----
libvlc/src/org/videolan/libvlc/IVideoPlayer.java | 4 ++--
.../videolan/vlc/gui/video/VideoPlayerActivity.java | 18 +++++++++---------
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/libvlc/jni/vout.c b/libvlc/jni/vout.c
index bc9214d..1a8c6a0 100644
--- a/libvlc/jni/vout.c
+++ b/libvlc/jni/vout.c
@@ -68,20 +68,20 @@ void jni_EventHardwareAccelerationError()
jni_detach_thread();
}
-static void jni_SetAndroidSurfaceSizeEnv(JNIEnv *p_env, int width, int height, int visible_width, int visible_height, int sar_num, int sar_den)
+static void jni_SetSurfaceLayoutEnv(JNIEnv *p_env, int width, int height, int visible_width, int visible_height, int sar_num, int sar_den)
{
if (vout_android_gui == NULL)
return;
jclass cls = (*p_env)->GetObjectClass (p_env, vout_android_gui);
- jmethodID methodId = (*p_env)->GetMethodID (p_env, cls, "setSurfaceSize", "(IIIIII)V");
+ jmethodID methodId = (*p_env)->GetMethodID (p_env, cls, "setSurfaceLayout", "(IIIIII)V");
(*p_env)->CallVoidMethod (p_env, vout_android_gui, methodId, width, height, visible_width, visible_height, sar_num, sar_den);
(*p_env)->DeleteLocalRef(p_env, cls);
}
-void jni_SetAndroidSurfaceSize(int width, int height, int visible_width, int visible_height, int sar_num, int sar_den)
+void jni_SetSurfaceLayout(int width, int height, int visible_width, int visible_height, int sar_num, int sar_den)
{
JNIEnv *p_env;
bool isAttached = false;
@@ -91,7 +91,7 @@ void jni_SetAndroidSurfaceSize(int width, int height, int visible_width, int vis
return;
isAttached = true;
}
- jni_SetAndroidSurfaceSizeEnv(p_env, width, height, visible_width, visible_height, sar_num, sar_den);
+ jni_SetSurfaceLayoutEnv(p_env, width, height, visible_width, visible_height, sar_num, sar_den);
if (isAttached)
jni_detach_thread();
diff --git a/libvlc/src/org/videolan/libvlc/IVideoPlayer.java b/libvlc/src/org/videolan/libvlc/IVideoPlayer.java
index 6d7f53d..3534426 100644
--- a/libvlc/src/org/videolan/libvlc/IVideoPlayer.java
+++ b/libvlc/src/org/videolan/libvlc/IVideoPlayer.java
@@ -22,7 +22,7 @@ package org.videolan.libvlc;
public interface IVideoPlayer {
/**
- * This method is called by native vout to request a surface resize when frame size doesn't match surface size.
+ * This method is called by native vout to request a new layout.
* @param width Frame width
* @param height Frame height
* @param visible_width Visible frame width
@@ -30,7 +30,7 @@ public interface IVideoPlayer {
* @param sar_num Surface aspect ratio numerator
* @param sar_den Surface aspect ratio denominator
*/
- void setSurfaceSize(int width, int height, int visible_width, int visible_height, int sar_num, int sar_den);
+ void setSurfaceLayout(int width, int height, int visible_width, int visible_height, int sar_num, int sar_den);
/**
* Called in case of hardware acceleration error
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 770a0f1..e3fbaf8 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -159,7 +159,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
private static final int OVERLAY_INFINITE = -1;
private static final int FADE_OUT = 1;
private static final int SHOW_PROGRESS = 2;
- private static final int SURFACE_SIZE = 3;
+ private static final int SURFACE_LAYOUT = 3;
private static final int AUDIO_SERVICE_CONNECTION_SUCCESS = 5;
private static final int AUDIO_SERVICE_CONNECTION_FAILED = 6;
private static final int FADE_OUT_INFO = 4;
@@ -299,7 +299,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
public void onSystemUiVisibilityChange(int visibility) {
if (visibility == mUiVisibility)
return;
- setSurfaceSize(mVideoWidth, mVideoHeight, mVideoVisibleWidth, mVideoVisibleHeight, mSarNum, mSarDen);
+ setSurfaceLayout(mVideoWidth, mVideoHeight, mVideoVisibleWidth, mVideoVisibleHeight, mSarNum, mSarDen);
if (visibility == View.SYSTEM_UI_FLAG_VISIBLE && !mShowing && !isFinishing()) {
showOverlay();
}
@@ -848,12 +848,12 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
@Override
public void onConfigurationChanged(Configuration newConfig) {
- setSurfaceSize(mVideoWidth, mVideoHeight, mVideoVisibleWidth, mVideoVisibleHeight, mSarNum, mSarDen);
+ setSurfaceLayout(mVideoWidth, mVideoHeight, mVideoVisibleWidth, mVideoVisibleHeight, mSarNum, mSarDen);
super.onConfigurationChanged(newConfig);
}
@Override
- public void setSurfaceSize(int width, int height, int visible_width, int visible_height, int sar_num, int sar_den) {
+ public void setSurfaceLayout(int width, int height, int visible_width, int visible_height, int sar_num, int sar_den) {
if (width * height == 0)
return;
@@ -864,7 +864,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
mVideoVisibleWidth = visible_width;
mSarNum = sar_num;
mSarDen = sar_den;
- Message msg = mHandler.obtainMessage(SURFACE_SIZE);
+ Message msg = mHandler.obtainMessage(SURFACE_LAYOUT);
mHandler.sendMessage(msg);
}
@@ -1108,8 +1108,8 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
sendMessageDelayed(msg, 1000 - (pos % 1000));
}
break;
- case SURFACE_SIZE:
- activity.changeSurfaceSize();
+ case SURFACE_LAYOUT:
+ activity.changeSurfaceLayout();
break;
case FADE_OUT_INFO:
activity.fadeOutInfo();
@@ -1222,7 +1222,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
}
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
- private void changeSurfaceSize() {
+ private void changeSurfaceLayout() {
int sw;
int sh;
@@ -1784,7 +1784,7 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
} else {
mCurrentSize = 0;
}
- changeSurfaceSize();
+ changeSurfaceLayout();
switch (mCurrentSize) {
case SURFACE_BEST_FIT:
showInfo(R.string.surface_best_fit, 1000);
More information about the Android
mailing list