提交 678ae76d authored 作者: kongdywang's avatar kongdywang

Fix the issue of invalid renderMode

(cherry picked from commit 94eeb078bd36aa18c59e912ee8a0adab1ff40768)
上级 bad4fb1d
#### Version: 12.7.3 2025.09.03
##### Features:
- Fix the issue of invalid renderMode.
#### Version: 12.7.2 2025.08.29
##### Features:
......
......@@ -5,7 +5,7 @@ buildLog() {
}
inputVersion=$1
export VERSION_NAME="12.7.2"
export VERSION_NAME="12.7.3"
if [ -n "$inputVersion" ]; then
VERSION_NAME=$inputVersion
fi
......
......@@ -4,7 +4,7 @@ rootProject.ext {
supportSdkVersion = "26.0.1"
minSdkVersion = 19
targetSdkVersion = 28
playerVersion = "12.7.2"
playerVersion = "12.7.3"
compat = "androidx.appcompat:appcompat:1.6.1"
/**
......
......@@ -56,6 +56,7 @@ public class FTXTextureRender {
private final float[] projectionMatrix = new float[16];
private final float[] rotationMatrix = new float[16];
private final float[] mResultMatrix = new float[16];
private int mVideoFragmentProgram;
private int muMVPMatrixHandle;
......@@ -69,7 +70,7 @@ public class FTXTextureRender {
private int mPortWidth;
private int mPortHeight;
private float rotationAngle = 90;
private float rotationAngle = 0;
public FTXTextureRender(int width, int height) {
mPortWidth = width;
......@@ -159,7 +160,7 @@ public class FTXTextureRender {
+ ",mHeight:" + mVideoHeight + ",viewWidth:" + mPortWidth + ",viewHeight:"
+ mPortHeight + ",hashCode:" + hashCode());
}
Matrix.orthoM(projectionMatrix, 0, left, right, bottom, top, -1f, 1f);
updateProjection(left, right, bottom, top);
} else {
LiteavLog.w(TAG, "updateSizeAndRenderMode failed, size maybe zero, mWidth:" + mVideoWidth
+ ",mHeight:" + mVideoHeight + ",viewWidth:" + mPortWidth + ",viewHeight:"
......@@ -175,8 +176,28 @@ public class FTXTextureRender {
updateSizeAndRenderMode(mVideoWidth, mVideoHeight, mRenderMode);
}
private void updateProjection(float left, float right, float bottom, float top) {
// reset
Matrix.setIdentityM(projectionMatrix, 0);
Matrix.orthoM(projectionMatrix, 0, left, right, bottom, top, -1f, 1f);
// merge
mergerMatrix();
}
public void setRotationAngle(float angle) {
rotationAngle = angle;
// reset
Matrix.setIdentityM(rotationMatrix, 0);
Matrix.setRotateM(rotationMatrix, 0, rotationAngle, 0, 0, -1);
// merge
mergerMatrix();
}
private void mergerMatrix() {
// reset
Matrix.setIdentityM(mResultMatrix, 0);
Matrix.multiplyMM(mResultMatrix, 0, rotationMatrix, 0, projectionMatrix, 0);
System.arraycopy(mResultMatrix, 0, projectionMatrix, 0, 16);
}
public void cleanDrawCache() {
......@@ -192,11 +213,8 @@ public class FTXTextureRender {
// video frame
GLES30.glUseProgram(mVideoFragmentProgram);
GLES30.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, projectionMatrix, 0);
// OpenGL rotates counterclockwise, here it needs to be modified to rotate clockwise
Matrix.setRotateM(rotationMatrix, 0, rotationAngle, 0, 0, -1);
GLES30.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, rotationMatrix, 0);
GLES30.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, mResultMatrix, 0);
GLES30.glActiveTexture(GLES30.GL_TEXTURE0);
GLES30.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, textureID[0]);
......
......@@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'super_player'
s.version = '12.7.2'
s.version = '12.7.3'
s.summary = 'The super_player Flutter plugin is one of the sub-product SDKs of the audio/video terminal SDK (Tencent Cloud Video on Demand).'
s.description = <<-DESC
player plugin.
......
......@@ -2,5 +2,5 @@
part of SuperPlayer;
abstract class FPlayerPckInfo {
static const String PLAYER_VERSION = "12.7.2";
static const String PLAYER_VERSION = "12.7.3";
}
\ No newline at end of file
name: super_player
description: The super_player Flutter plugin is one of the sub-product SDKs of the audio/video terminal SDK (Tencent Cloud Video on Demand).
version: 12.7.2
version: 12.7.3
homepage: https://github.com/LiteAVSDK/Player_Flutter
environment:
......
......@@ -3,5 +3,5 @@ part of demo_super_player_lib;
class PlayerConstants {
static const PKG_NAME = "superplayer_widget";
static const String PLAYER_WIDGET_VERSION = "12.7.2";
static const String PLAYER_WIDGET_VERSION = "12.7.3";
}
name: superplayer_widget
description: superplayer,base on vodplayer
version: 12.7.2
version: 12.7.3
environment:
sdk: '>=2.17.0 <4.0.0'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论