Skip to content

Commit

Permalink
fix 前置竖屏颠倒的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
luohaohaha committed Jun 23, 2022
1 parent 798814f commit c063a79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rtmpx_library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'com.android.library'
}
apply from: './publish.gradle'
//apply from: './publish.gradle'

android {
compileSdkVersion 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void onAudioRecordError(String message) {
@Override
public void handleImage(ImageProxy image, int rotation) {
if (!RTMPPublisher.getInstance().isWorked()) {
Log.d(TAG, "rtmp not worked no handle handleImage");
Log.d(TAG, "rtmp not worked no handle handleImage "+rotation + " image rotation "+image.getImageInfo().getRotationDegrees());
return;
}
byte[] data = ConvertUtils.YUV_420_888toNV12(image, rotation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static byte[] YUV_420_888toLandscapeNV12(ImageProxy image, int rotation)
public static byte[] YUV_420_888toPortraitNV12(ImageProxy image, int rotation) {
YuvFrame yuvFrame = YuvHelper.convertToI420(image.getImage());
//TODO optimization of vertical screen libyuv rotation
byte[] bytes = YuvHelper.rotate(yuvFrame, 90).asArray();
byte[] bytes = YuvHelper.rotate(yuvFrame, image.getImageInfo().getRotationDegrees()).asArray();
if (null == mPortraitYUV || mPortraitYUV.length != bytes.length) {
mPortraitYUV = new byte[bytes.length];
}
Expand Down

0 comments on commit c063a79

Please sign in to comment.