diff --git a/rtmpx_library/build.gradle b/rtmpx_library/build.gradle index 5e47815..5d07376 100644 --- a/rtmpx_library/build.gradle +++ b/rtmpx_library/build.gradle @@ -1,7 +1,7 @@ plugins { id 'com.android.library' } -apply from: './publish.gradle' +//apply from: './publish.gradle' android { compileSdkVersion 30 diff --git a/rtmpx_library/src/main/java/com/rtmpx/library/publish/PublisherX.java b/rtmpx_library/src/main/java/com/rtmpx/library/publish/PublisherX.java index a91db83..1336f56 100644 --- a/rtmpx_library/src/main/java/com/rtmpx/library/publish/PublisherX.java +++ b/rtmpx_library/src/main/java/com/rtmpx/library/publish/PublisherX.java @@ -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); diff --git a/rtmpx_library/src/main/java/com/rtmpx/library/utils/ConvertUtils.java b/rtmpx_library/src/main/java/com/rtmpx/library/utils/ConvertUtils.java index 3f4cf17..0c4778b 100644 --- a/rtmpx_library/src/main/java/com/rtmpx/library/utils/ConvertUtils.java +++ b/rtmpx_library/src/main/java/com/rtmpx/library/utils/ConvertUtils.java @@ -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]; }