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