diff --git a/AIOApp/build.gradle b/AIOApp/build.gradle index 65165682..2f56ee75 100644 --- a/AIOApp/build.gradle +++ b/AIOApp/build.gradle @@ -76,9 +76,6 @@ android { pickFirst '**/libc++_shared.so' pickFirst '**/libMNN.so' pickFirst '**/libMNN_CL.so' - pickFirst '**/libAETemplateEngine.so' - pickFirst '**/liball_in_one.so' - pickFirst '**/libPluginOpus.so' } buildFeatures { @@ -99,8 +96,8 @@ dependencies { implementation project(':AUIFoundation:AVBaseUI') implementation project(':AUIFoundation:AVTheme') if (hasLive()) { - println("hasLive implementation project(':livepusherapp')") - implementation project(':livepusherapp') + println("hasLive implementation project(':LiveApp')") + implementation project(':LiveApp') } if (hasPlayer()) { println("hasPlayer implementation project(':liveplayerapp')") diff --git a/AIOApp/proguard-rules.pro b/AIOApp/proguard-rules.pro index 0e316e9a..09460768 100644 --- a/AIOApp/proguard-rules.pro +++ b/AIOApp/proguard-rules.pro @@ -56,3 +56,75 @@ -keep public class com.alibaba.android.arouter.facade.**{*;} -keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;} -keep class * implements com.alibaba.android.arouter.facade.template.IProvider + +-keep class com.alivc.live.** { + *; +} + +-keep class com.alivc.component.** { + *; +} + +-keep class org.webrtc.** { + *; +} + +-keep class com.huawei.multimedia.alivc.** { + *; +} + +-keep class com.alivc.rtc.** { + *; +} + +-keep class com.alivc.component.** { + *; +} + + +-keep class com.cicada.player.utils.NativeUsed { *; } +-keep,allowobfuscation interface com.cicada.player.utils.NativeUsed + +-keep @com.cicada.player.utils.NativeUsed class * +-keepclassmembers class * { + @com.cicada.player.utils.NativeUsed *; +} + + +-keep class com.aliyun.player.nativeclass.** { *;} +#-keep class com.aliyun.player.externalplayer.** { *;} +-keep class com.aliyun.player.videoview.AliDisplayView { *;} +-keep class com.aliyun.player.videoview.AliDisplayView$* { *;} +-keep class com.aliyun.player.source.** { *;} +-keep class com.aliyun.player.bean.** { *;} +-keep class com.aliyun.player.* { *;} + +-keep class com.aliyun.downloader.** { *;} +-keep class com.aliyun.thumbnail.** { *;} +-keep class com.aliyun.liveshift.** { *;} +-keep class com.aliyun.loader.** { *;} +-keep class com.aliyun.subtitle.** { *;} +-keep class com.aliyun.private_service.** { *;} + +-keep class com.aliyun.utils.DeviceInfoUtils { *;} +-keep class com.cicada.player.utils.** { *;} + +######################短视频混淆配置######################### +-keep class com.aliyun.svideosdk.** { + *; +} +-keep class com.aliyun.common.network.** { + *; +} + +-keep class com.aliyun.common.log.struct.AliyunLogInfo {*;} + + +-keep class **.CalledByNative { *; } +-keep,allowobfuscation interface **.CalledByNative + +-keep @**.CalledByNative class * +-keepclassmembers class * { + @**.CalledByNative *; +} + diff --git a/AUIFoundation/AVTheme/src/main/res/.!33800!.DS_Store b/AUIFoundation/AVTheme/src/main/res/drawable-xxhdpi/.!22547!ic_actionbar_more.png similarity index 100% rename from AUIFoundation/AVTheme/src/main/res/.!33800!.DS_Store rename to AUIFoundation/AVTheme/src/main/res/drawable-xxhdpi/.!22547!ic_actionbar_more.png diff --git a/AliLivePushDemo/.gitignore b/AliLivePushDemo/.gitignore index cc7a871a..8fe32515 100644 --- a/AliLivePushDemo/.gitignore +++ b/AliLivePushDemo/.gitignore @@ -16,4 +16,5 @@ log/ AndroidThirdParty/ AUIFoundation/ out/ +AlivcLivePusher_Demo_Android/ outZip/ diff --git a/AliLivePushDemo/alivc-livepusher-demo/.gitignore b/AliLivePushDemo/LiveApp/.gitignore similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/.gitignore rename to AliLivePushDemo/LiveApp/.gitignore diff --git a/AliLivePushDemo/alivc-livepusher-demo/build.gradle b/AliLivePushDemo/LiveApp/build.gradle similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/build.gradle rename to AliLivePushDemo/LiveApp/build.gradle diff --git a/AliLivePushDemo/alivc-livepusher-demo/build_lib.gradle b/AliLivePushDemo/LiveApp/build_lib.gradle similarity index 96% rename from AliLivePushDemo/alivc-livepusher-demo/build_lib.gradle rename to AliLivePushDemo/LiveApp/build_lib.gradle index b3ee1f7d..14a13bce 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/build_lib.gradle +++ b/AliLivePushDemo/LiveApp/build_lib.gradle @@ -8,6 +8,7 @@ ext.MTL_buildTimestamp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format( ext.Interactive_AppID = getEnvValue("INTERACTIVE_APP_ID", '') ext.Interactive_AppKey = getEnvValue("INTERACTIVE_APP_KEY", '') ext.Interactive_PlayDomain = getEnvValue("INTERACTIVE_PLAY_DOMAIN", '') +ext.isAllInOne = allInOne //@keria:cannot make method static String getEnvValue(key, defValue) { @@ -48,6 +49,7 @@ android { buildTypes { all { + buildConfigField "Boolean", "MTL_BUILD_FOR_AIO", "${isAllInOne}" buildConfigField "String", "MTL_BUILD_ID", "\"${MTL_buildId}\"" buildConfigField "String", "MTL_BUILD_TIMESTAMP", "\"${MTL_buildTimestamp}\"" buildConfigField "String", "INTERACTIVE_APP_ID", "\"${Interactive_AppID}\"" diff --git a/AliLivePushDemo/LiveApp/dependencies.gradle b/AliLivePushDemo/LiveApp/dependencies.gradle new file mode 100644 index 00000000..f7613d9f --- /dev/null +++ b/AliLivePushDemo/LiveApp/dependencies.gradle @@ -0,0 +1,17 @@ +dependencies { + implementation fileTree(dir: 'libs', include: ['*.aar']) + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.1.0' + implementation externalAndroidMultiDex + implementation project(':AUIFoundation:AVBaseUI') + implementation project(':AUIFoundation:AVTheme') + implementation project(':AUIFoundation:AVUtils') + implementation project(':LiveBasic:live_push') + implementation project(':LiveBasic:live_pull') + implementation project(':LiveBasic:live_pull_rts') + implementation project(':LiveBasic:live_screencap') + implementation project(':LiveInteractive:live_pk') + implementation project(':LiveInteractive:live_interactive') + implementation externalARouter + annotationProcessor externalARouterCompiler +} \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/proguard-rules.pro b/AliLivePushDemo/LiveApp/proguard-rules.pro similarity index 77% rename from AliLivePushDemo/alivc-livepusher-demo/proguard-rules.pro rename to AliLivePushDemo/LiveApp/proguard-rules.pro index 1d07d6e1..15920110 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/proguard-rules.pro +++ b/AliLivePushDemo/LiveApp/proguard-rules.pro @@ -30,30 +30,20 @@ -keep public class com.google.vending.licensing.ILicensingService -keep public class com.android.vending.licensing.ILicensingService --keep class com.aliyun.clientinforeport.** {*;} --keep class com.alivc.component.encoder.** { *;} --keep class com.alivc.component.player.** { *; } --keep class com.alivc.live.pusher.Alivc* { *;} --keep class com.alivc.live.pusher.** { *;} --keep class com.alivc.live.utils.** { *;} --keep class com.alivc.live.pusher.LivePusherJNI { *;} --keep class com.alivc.live.pusher.ILivePusher { *;} --keep class com.alivc.component.capture.** { *;} --keep class com.alivc.component.custom.** { *;} --keep class com.alivc.live.pusher.WaterMarkInfo { *;} --keep class com.alivc.live.pusher.LogUtil { *;} --keep class com.alivc.live.pusher.SurfaceStatus { *; } --keep class com.aliyun.rts.network.** { *; } --keep class com.example.rtsnetsdkjar.** { *; } --keep class com.uc.crashsdk.** { *; } --keep class com.alivc.component.voice.** { *; } --keep class com.aliyun.animoji.** { *; } --keep class com.aliyun.player.** { *; } - - +#2023-01-03最新混淆规则(直播SDK版本>=4.4.9,一体化SDK版本>=1.7.0) +#SDK内部已做混淆,外部全部keep即可。 +#混淆规则请见官网文档:https://help.aliyun.com/document_detail/94843.html +-keep class org.webrtc.** { *; } +-keep class com.alivc.** { *; } +-keep class com.aliyun.** { *; } +-keep class com.cicada.** { *; } +#2023-01-03最新混淆规则(直播SDK版本>=4.4.9,一体化SDK版本>=1.7.0) -keep class android.** { *;} +#仅alivctest包才会用到的混淆规则 +-keep class com.uc.crashsdk.** { *; } + # For native methods, see http:#proguard.sourceforge.net/manual/examples.html#native #保留native方法的类名和方法名 -keepclasseswithmembernames class * { diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/alivctest/AndroidManifest.xml b/AliLivePushDemo/LiveApp/src/alivctest/AndroidManifest.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/alivctest/AndroidManifest.xml rename to AliLivePushDemo/LiveApp/src/alivctest/AndroidManifest.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/alivctest/java/com/alivc/live/test/LiveApplication.java b/AliLivePushDemo/LiveApp/src/alivctest/java/com/alivc/live/test/LiveApplication.java similarity index 96% rename from AliLivePushDemo/alivc-livepusher-demo/src/alivctest/java/com/alivc/live/test/LiveApplication.java rename to AliLivePushDemo/LiveApp/src/alivctest/java/com/alivc/live/test/LiveApplication.java index d72de649..5fb636f5 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/alivctest/java/com/alivc/live/test/LiveApplication.java +++ b/AliLivePushDemo/LiveApp/src/alivctest/java/com/alivc/live/test/LiveApplication.java @@ -13,9 +13,9 @@ import com.alibaba.ha.adapter.Plugin; import com.alibaba.sdk.android.networkmonitor.NetworkMonitorManager; import com.alibaba.sdk.android.networkmonitor.utils.Logger; +import com.alivc.live.baselive_push.PushLaunchManager; import com.alivc.live.pusher.AlivcLiveBase; -import com.alivc.live.pusher.demo.PushLaunchManager; -import com.alivc.live.utils.ContextUtils; +import com.alivc.live.commonutils.ContextUtils; public class LiveApplication extends Application { @Override diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/alivctest/res/values/strings.xml b/AliLivePushDemo/LiveApp/src/alivctest/res/values/strings.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/alivctest/res/values/strings.xml rename to AliLivePushDemo/LiveApp/src/alivctest/res/values/strings.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/AndroidManifest.xml b/AliLivePushDemo/LiveApp/src/main/AndroidManifest.xml similarity index 59% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/AndroidManifest.xml rename to AliLivePushDemo/LiveApp/src/main/AndroidManifest.xml index 82bb56ce..cbb29491 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/AndroidManifest.xml +++ b/AliLivePushDemo/LiveApp/src/main/AndroidManifest.xml @@ -53,56 +53,6 @@ - - - - - - - - - - diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/441.pcm b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/441.pcm similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/441.pcm rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/441.pcm diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/AliVideoCert-com_aliyun_AlivcLivePusherDemo-20220507171545.crt b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/AliVideoCert-com_aliyun_AlivcLivePusherDemo-20220507171545.crt similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/AliVideoCert-com_aliyun_AlivcLivePusherDemo-20220507171545.crt rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/AliVideoCert-com_aliyun_AlivcLivePusherDemo-20220507171545.crt diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/Axol.mp3 b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/Axol.mp3 similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/Axol.mp3 rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/Axol.mp3 diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/Pas de Deux 5s.mp3 b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/Pas de Deux 5s.mp3 similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/Pas de Deux 5s.mp3 rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/Pas de Deux 5s.mp3 diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/Pas de Deux.mp3 b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/Pas de Deux.mp3 similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/Pas de Deux.mp3 rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/Pas de Deux.mp3 diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/background_push.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/background_push.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/background_push.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/background_push.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/background_push_land.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/background_push_land.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/background_push_land.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/background_push_land.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/poor_network.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/poor_network.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/poor_network.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/poor_network.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/poor_network_land.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/poor_network_land.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/poor_network_land.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/poor_network_land.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/config.json b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/config.json similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/config.json rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/config.json diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi0.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi0.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi0.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi0.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi1.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi1.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi1.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi1.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi10.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi10.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi10.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi10.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi11.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi11.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi11.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi11.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi12.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi12.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi12.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi12.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi13.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi13.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi13.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi13.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi14.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi14.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi14.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi14.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi15.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi15.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi15.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi15.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi16.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi16.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi16.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi16.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi17.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi17.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi17.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi17.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi18.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi18.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi18.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi18.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi19.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi19.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi19.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi19.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi2.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi2.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi2.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi2.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi20.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi20.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi20.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi20.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi21.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi21.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi21.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi21.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi22.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi22.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi22.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi22.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi23.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi23.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi23.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi23.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi24.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi24.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi24.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi24.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi25.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi25.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi25.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi25.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi26.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi26.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi26.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi26.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi27.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi27.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi27.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi27.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi28.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi28.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi28.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi28.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi29.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi29.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi29.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi29.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi3.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi3.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi3.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi3.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi30.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi30.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi30.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi30.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi31.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi31.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi31.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi31.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi32.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi32.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi32.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi32.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi33.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi33.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi33.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi33.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi34.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi34.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi34.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi34.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi35.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi35.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi35.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi35.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi36.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi36.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi36.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi36.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi37.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi37.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi37.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi37.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi38.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi38.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi38.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi38.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi39.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi39.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi39.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi39.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi4.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi4.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi4.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi4.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi40.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi40.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi40.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi40.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi41.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi41.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi41.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi41.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi42.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi42.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi42.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi42.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi43.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi43.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi43.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi43.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi44.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi44.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi44.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi44.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi45.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi45.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi45.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi45.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi46.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi46.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi46.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi46.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi47.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi47.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi47.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi47.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi48.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi48.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi48.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi48.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi49.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi49.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi49.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi49.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi5.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi5.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi5.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi5.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi50.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi50.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi50.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi50.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi51.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi51.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi51.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi51.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi52.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi52.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi52.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi52.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi53.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi53.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi53.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi53.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi54.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi54.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi54.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi54.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi55.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi55.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi55.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi55.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi56.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi56.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi56.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi56.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi57.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi57.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi57.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi57.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi58.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi58.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi58.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi58.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi59.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi59.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi59.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi59.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi6.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi6.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi6.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi6.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi60.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi60.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi60.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi60.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi61.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi61.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi61.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi61.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi62.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi62.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi62.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi62.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi63.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi63.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi63.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi63.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi64.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi64.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi64.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi64.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi65.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi65.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi65.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi65.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi66.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi66.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi66.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi66.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi67.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi67.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi67.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi67.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi7.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi7.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi7.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi7.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi8.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi8.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi8.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi8.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi9.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi9.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/qizi/qizi9.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/qizi/qizi9.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/watermark.png b/AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/watermark.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/alivc_resource/watermark.png rename to AliLivePushDemo/LiveApp/src/main/assets/alivc_resource/watermark.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/answer.json b/AliLivePushDemo/LiveApp/src/main/assets/answer.json similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/answer.json rename to AliLivePushDemo/LiveApp/src/main/assets/answer.json diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/assets/question.json b/AliLivePushDemo/LiveApp/src/main/assets/question.json similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/assets/question.json rename to AliLivePushDemo/LiveApp/src/main/assets/question.json diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/commonlibs/.gitkeep b/AliLivePushDemo/LiveApp/src/main/commonlibs/.gitkeep similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/commonlibs/.gitkeep rename to AliLivePushDemo/LiveApp/src/main/commonlibs/.gitkeep diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LiveApplication.java b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/LiveApplication.java similarity index 87% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LiveApplication.java rename to AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/LiveApplication.java index 35a40383..0f70d54f 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LiveApplication.java +++ b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/LiveApplication.java @@ -5,6 +5,8 @@ import android.content.IntentFilter; import android.net.ConnectivityManager; +import com.alivc.live.baselive_push.PushLaunchManager; +import com.alivc.live.baselive_push.ui.LivePushActivity; import com.alivc.live.commonutils.ContextUtils; public class LiveApplication extends Application { diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LogInfoAdapter.java b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/LogInfoAdapter.java similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LogInfoAdapter.java rename to AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/LogInfoAdapter.java diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/MainActivity.java b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/MainActivity.java similarity index 92% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/MainActivity.java rename to AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/MainActivity.java index d8e76627..6512b84b 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/MainActivity.java +++ b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/MainActivity.java @@ -8,6 +8,7 @@ import android.os.Build; import android.os.Bundle; import android.text.TextUtils; +import android.text.method.LinkMovementMethod; import android.view.View; import android.view.Window; import android.view.WindowManager; @@ -21,15 +22,18 @@ import androidx.core.content.PermissionChecker; import com.alibaba.android.arouter.launcher.ARouter; +import com.alivc.live.baselive_push.ui.PushConfigActivity; import com.alivc.live.annotations.AlivcLiveMode; +import com.alivc.live.commonbiz.SharedPreferenceUtils; +import com.alivc.live.commonbiz.test.PushDemoTestConstants; import com.alivc.live.pusher.AlivcLiveBase; -import com.alivc.live.pusher.demo.test.PushDemoTestConstants; -import com.aliyun.interactive_common.InteractAppInfoActivity; -import com.aliyun.interactive_live.InteractLiveInputActivity; -import com.aliyun.interactive_pk.PKLiveInputActivity; +import com.alivc.live.baselive_pull.ui.PlayerActivity; +import com.alivc.live.baselive_recording.ui.VideoRecordConfigActivity; +import com.alivc.live.interactive_common.InteractAppInfoActivity; +import com.alivc.live.interactive_live.InteractLiveInputActivity; +import com.alivc.live.interactive_pk.PKLiveInputActivity; import com.alivc.live.commonutils.ContextUtils; import com.alivc.live.commonutils.FastClickUtil; -import com.alivc.live.commonbiz.SharedPreferenceUtils; public class MainActivity extends AppCompatActivity implements View.OnClickListener { private LinearLayout mLivePushLayout; @@ -39,6 +43,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe private LinearLayout mPKLiveInteractLayout; private TextView mVersion;//推流sdk版本号 private String mPushUrl; + private TextView mAliyunSDKPrivacy; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { @@ -86,6 +91,8 @@ private void initView() { mPKLiveInteractLayout.setOnClickListener(this); mVersion = (TextView) findViewById(R.id.push_version); mVersion.setText(getString(R.string.version_desc) + AlivcLiveBase.getSDKVersion()); + mAliyunSDKPrivacy = findViewById(R.id.aliyun_sdk_privacy); + mAliyunSDKPrivacy.setMovementMethod(LinkMovementMethod.getInstance()); mLiveInteractLayout.setVisibility(AlivcLiveBase.isSupportLiveMode(AlivcLiveMode.AlivcLiveInteractiveMode) ? View.VISIBLE : View.GONE); mPKLiveInteractLayout.setVisibility(AlivcLiveBase.isSupportLiveMode(AlivcLiveMode.AlivcLiveInteractiveMode) ? View.VISIBLE : View.GONE); diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushDiagramStatsFragment.java b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/PushDiagramStatsFragment.java similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushDiagramStatsFragment.java rename to AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/PushDiagramStatsFragment.java diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushMainActivity.java b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/PushMainActivity.java similarity index 91% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushMainActivity.java rename to AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/PushMainActivity.java index 697980b7..d88dca61 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushMainActivity.java +++ b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/PushMainActivity.java @@ -10,22 +10,25 @@ import android.os.Build; import android.text.TextUtils; +import com.alivc.live.baselive_pull.ui.PlayerActivity; +import com.alivc.live.baselive_pull_rts.InputRtsUrlActivity; +import com.alivc.live.baselive_push.ui.PushConfigActivity; +import com.alivc.live.baselive_recording.ui.VideoRecordConfigActivity; import com.alivc.live.annotations.AlivcLiveMode; +import com.alivc.live.commonbiz.SharedPreferenceUtils; +import com.alivc.live.commonbiz.test.PushDemoTestConstants; import com.alivc.live.pusher.AlivcLiveBase; -import com.alivc.live.pusher.demo.rts.InputRtsUrlActivity; -import com.alivc.live.pusher.demo.test.PushDemoTestConstants; import com.aliyun.aio.avbaseui.AVBaseListActivity; import java.util.ArrayList; import java.util.List; import com.alibaba.android.arouter.facade.annotation.Route; -import com.aliyun.interactive_common.InteractAppInfoActivity; -import com.aliyun.interactive_live.InteractLiveInputActivity; -import com.aliyun.interactive_pk.PKLiveInputActivity; +import com.alivc.live.interactive_common.InteractAppInfoActivity; +import com.alivc.live.interactive_live.InteractLiveInputActivity; +import com.alivc.live.interactive_pk.PKLiveInputActivity; import com.alivc.live.commonutils.ContextUtils; import com.alivc.live.commonutils.FastClickUtil; -import com.alivc.live.commonbiz.SharedPreferenceUtils; import com.alivc.live.commonutils.ToastUtils; @Route(path = "/live/MainActivity") @@ -85,17 +88,17 @@ public void onListItemClick(ListModel model) { switch (model.index) { case INDEX_CAMERA_PUSH: - startActivity(new Intent(this, com.alivc.live.pusher.demo.PushConfigActivity.class)); + startActivity(new Intent(this, PushConfigActivity.class)); break; case INDEX_SCREEN_PUSH: - startActivity(new Intent(this, com.alivc.live.pusher.demo.VideoRecordConfigActivity.class)); + startActivity(new Intent(this, VideoRecordConfigActivity.class)); break; case INDEX_LOCAL_VIDEO_PUSH: //0615本期不做 break; case INDEX_PULL: - startActivity(new Intent(this, com.alivc.live.pusher.demo.PlayerActivity.class)); + startActivity(new Intent(this, PlayerActivity.class)); break; case INDEX_INTERACT_LIVE: if (checkInteractiveAPPInfoIfNeed()) { diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushTextStatsFragment.java b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/PushTextStatsFragment.java similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushTextStatsFragment.java rename to AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/PushTextStatsFragment.java diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/SignatureUtils.java b/AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/SignatureUtils.java similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/SignatureUtils.java rename to AliLivePushDemo/LiveApp/src/main/java/com/alivc/live/pusher/demo/SignatureUtils.java diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/color/color_text_button.xml b/AliLivePushDemo/LiveApp/src/main/res/color/color_text_button.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/color/color_text_button.xml rename to AliLivePushDemo/LiveApp/src/main/res/color/color_text_button.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/app_name.png b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/app_name.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/app_name.png rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/app_name.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/homepage_bg.jpg b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/homepage_bg.jpg similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/homepage_bg.jpg rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/homepage_bg.jpg diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_av_action_bar_back.png b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_av_action_bar_back.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_av_action_bar_back.png rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_av_action_bar_back.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_interaction.png b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_interaction.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_interaction.png rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_interaction.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_interact.png b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_live_interact.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_interact.png rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_live_interact.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_pk.png b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_pk.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_pk.png rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_pk.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_pk_interact.png b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_pk_interact.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_pk_interact.png rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/ic_pk_interact.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/player_image.png b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/player_image.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/player_image.png rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/player_image.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/pull_test_image.png b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/pull_test_image.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/pull_test_image.png rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/pull_test_image.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/rtc_pull_image.png b/AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/rtc_pull_image.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/rtc_pull_image.png rename to AliLivePushDemo/LiveApp/src/main/res/drawable-xxhdpi/rtc_pull_image.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_black_color.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/bar_black_color.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_black_color.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/bar_black_color.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_blue_color.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/bar_blue_color.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_blue_color.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/bar_blue_color.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_green_color.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/bar_green_color.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_green_color.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/bar_green_color.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_red_color.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/bar_red_color.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_red_color.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/bar_red_color.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_yellow_color.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/bar_yellow_color.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bar_yellow_color.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/bar_yellow_color.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bg_model_shape.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/bg_model_shape.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bg_model_shape.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/bg_model_shape.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bg_oval.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/bg_oval.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/bg_oval.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/bg_oval.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/flash_selector.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/flash_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/flash_selector.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/flash_selector.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/live_button_white.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/live_button_white.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/live_button_white.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/live_button_white.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_bg_btn_green.xml b/AliLivePushDemo/LiveApp/src/main/res/drawable/shape_bg_btn_green.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_bg_btn_green.xml rename to AliLivePushDemo/LiveApp/src/main/res/drawable/shape_bg_btn_green.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/layout_item_log_info.xml b/AliLivePushDemo/LiveApp/src/main/res/layout/layout_item_log_info.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/layout_item_log_info.xml rename to AliLivePushDemo/LiveApp/src/main/res/layout/layout_item_log_info.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_activity_main.xml b/AliLivePushDemo/LiveApp/src/main/res/layout/push_activity_main.xml similarity index 94% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_activity_main.xml rename to AliLivePushDemo/LiveApp/src/main/res/layout/push_activity_main.xml index 27c3c230..9a15cdc4 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_activity_main.xml +++ b/AliLivePushDemo/LiveApp/src/main/res/layout/push_activity_main.xml @@ -32,7 +32,7 @@ + android:layout_marginBottom="40dp"> + + @@ -195,7 +205,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal|bottom" - android:layout_marginBottom="21dp" + android:layout_marginBottom="2dp" android:textColor="@color/trackGradient" android:textSize="11sp" /> diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_diagram_log.xml b/AliLivePushDemo/LiveApp/src/main/res/layout/push_diagram_log.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_diagram_log.xml rename to AliLivePushDemo/LiveApp/src/main/res/layout/push_diagram_log.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_text_log.xml b/AliLivePushDemo/LiveApp/src/main/res/layout/push_text_log.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_text_log.xml rename to AliLivePushDemo/LiveApp/src/main/res/layout/push_text_log.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-hdpi/ic_launcher.png b/AliLivePushDemo/LiveApp/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-hdpi/ic_launcher.png rename to AliLivePushDemo/LiveApp/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-mdpi/ic_launcher.png b/AliLivePushDemo/LiveApp/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-mdpi/ic_launcher.png rename to AliLivePushDemo/LiveApp/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xhdpi/ic_launcher.png b/AliLivePushDemo/LiveApp/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xhdpi/ic_launcher.png rename to AliLivePushDemo/LiveApp/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/camera_flash_on.png b/AliLivePushDemo/LiveApp/src/main/res/mipmap-xxhdpi/camera_flash_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/camera_flash_on.png rename to AliLivePushDemo/LiveApp/src/main/res/mipmap-xxhdpi/camera_flash_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/ic_launcher.png b/AliLivePushDemo/LiveApp/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to AliLivePushDemo/LiveApp/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/AliLivePushDemo/LiveApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to AliLivePushDemo/LiveApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/arrays.xml b/AliLivePushDemo/LiveApp/src/main/res/values-en/arrays.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/arrays.xml rename to AliLivePushDemo/LiveApp/src/main/res/values-en/arrays.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/ssdk_country_arrays.xml b/AliLivePushDemo/LiveApp/src/main/res/values-en/ssdk_country_arrays.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/ssdk_country_arrays.xml rename to AliLivePushDemo/LiveApp/src/main/res/values-en/ssdk_country_arrays.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/ssdk_oks_strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values-en/ssdk_oks_strings.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/ssdk_oks_strings.xml rename to AliLivePushDemo/LiveApp/src/main/res/values-en/ssdk_oks_strings.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/ssdk_strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values-en/ssdk_strings.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/ssdk_strings.xml rename to AliLivePushDemo/LiveApp/src/main/res/values-en/ssdk_strings.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values-en/strings.xml similarity index 98% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/strings.xml rename to AliLivePushDemo/LiveApp/src/main/res/values-en/strings.xml index 2a19ef2f..29b8e101 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-en/strings.xml +++ b/AliLivePushDemo/LiveApp/src/main/res/values-en/strings.xml @@ -9,6 +9,7 @@ 48KHz 44.1KHz 32KHz + 16KHz LC HE-AAC HEv2-AAC @@ -67,7 +68,6 @@ Variable Resolution Auto focus Beauty - Animoji Hardware encode Software encode Audio Hardware enc @@ -137,6 +137,8 @@ Error tips OK + Success + Failed Reconnect @@ -170,7 +172,8 @@ Close Ears Open Ears Close Denoise - Open Denoise + Audio Denoise + Audio Intelligent Denoise Accompaniment Voice Internet music @@ -229,7 +232,6 @@ Statistics on Local Videos Retouching is disabled. Enable retouching and then retry. Retouching - Animoji Background Music Flash Camera diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/arrays.xml b/AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/arrays.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/arrays.xml rename to AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/arrays.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/ssdk_coutry_arrays.xml b/AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/ssdk_coutry_arrays.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/ssdk_coutry_arrays.xml rename to AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/ssdk_coutry_arrays.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/ssdk_oks_strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/ssdk_oks_strings.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/ssdk_oks_strings.xml rename to AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/ssdk_oks_strings.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/ssdk_strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/ssdk_strings.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/ssdk_strings.xml rename to AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/ssdk_strings.xml diff --git a/AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 00000000..ad02cba7 --- /dev/null +++ b/AliLivePushDemo/LiveApp/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,93 @@ + + + 阿里云直播 + 版权信息 + 阿里云 copyright@2017,阿里巴巴集团 + 分辨率 + + Portrait + + 软编 + + 右滑查看log图表 + 左滑查看log + 分享 + 加贴纸 + 删贴纸 + 开启美颜 + 关闭美颜 + 美白 + 磨皮 + 红润 + 腮红 + 瘦脸 + 收下巴 + 大眼 + 采集 + 渲染 + 编码 + 推流 + + 麦克风音量 + + 各模块audio fps + 各模块video fps + 各模块bitrate + 视频编码 + 音频编码 + + 各模块buffer + 视频渲染 + 视频编码 + 视频上传 + 音频编码 + 音频上传 + + + + 推流地址 + 是否推流 + 窄带高清 + + + 推流参数log: + + 没有权限使用摄像头,请开启摄像头权限 + 没有权限使用蓝牙,请开启蓝牙权限 + 没有权限使用录音,请开启录音权限 + 没有读取用户数据的权限,请开启该权限 + 没有文件写权限,请开启该权限 + 没有文件读权限,请开启该权限 + 没有蓝牙连接权限,请开启该权限 + 没有网络权限,请开启该权限 + + 码率参数设置错误! + + //老 demo 资源 + + 录屏工具 + 隐私关 + 摄像头关 + 答题 + + + 截图已保存 + /次 + 发送帧率: + 发送码率: + 版本为:v + 直播 + 录屏推流 + + 摄像头推流 + 本地视频推流 + + 纯音或纯视频流 + + 推流方向 + 美颜 + + 阿里云\n移动推流 + 本Demo为用于展示阿里云移动推流sdk主要功能 + + diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/arrays.xml b/AliLivePushDemo/LiveApp/src/main/res/values/arrays.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/arrays.xml rename to AliLivePushDemo/LiveApp/src/main/res/values/arrays.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/attrs.xml b/AliLivePushDemo/LiveApp/src/main/res/values/attrs.xml similarity index 93% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/attrs.xml rename to AliLivePushDemo/LiveApp/src/main/res/values/attrs.xml index 970481d7..81188fd1 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/attrs.xml +++ b/AliLivePushDemo/LiveApp/src/main/res/values/attrs.xml @@ -51,10 +51,7 @@ - - - - + diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_country_arrays.xml b/AliLivePushDemo/LiveApp/src/main/res/values/ssdk_country_arrays.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_country_arrays.xml rename to AliLivePushDemo/LiveApp/src/main/res/values/ssdk_country_arrays.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_instapaper_strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values/ssdk_instapaper_strings.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_instapaper_strings.xml rename to AliLivePushDemo/LiveApp/src/main/res/values/ssdk_instapaper_strings.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_oks_color_drawables.xml b/AliLivePushDemo/LiveApp/src/main/res/values/ssdk_oks_color_drawables.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_oks_color_drawables.xml rename to AliLivePushDemo/LiveApp/src/main/res/values/ssdk_oks_color_drawables.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_oks_strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values/ssdk_oks_strings.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_oks_strings.xml rename to AliLivePushDemo/LiveApp/src/main/res/values/ssdk_oks_strings.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values/ssdk_strings.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/ssdk_strings.xml rename to AliLivePushDemo/LiveApp/src/main/res/values/ssdk_strings.xml diff --git a/AliLivePushDemo/LiveApp/src/main/res/values/strings.xml b/AliLivePushDemo/LiveApp/src/main/res/values/strings.xml new file mode 100644 index 00000000..574a6649 --- /dev/null +++ b/AliLivePushDemo/LiveApp/src/main/res/values/strings.xml @@ -0,0 +1,85 @@ + + + AlivcLive + License declaration + © 2017 Copyright by Alibaba Cloud All rights reserved + + Software encode + Slide right to view log chart + Slide left to view log + Share + DynamicAdd + DynamicRemove + Beauty on + Beauty off + Whitening + Smooth skin + Ruddy + CheekPink + SlimFace + ShortenFace + BigEye + Capture + Render + Encode + Push + Mic Volume + + Audio fps + Video fps + Bitrate + Video encode + Audio encode + + Buffer + Video render + Video encode + Video upload + Audio encode + Audio upload + + + Push url + + pusher log: + + Camera usage is not permitted, please open first + Bluetooth is not permitted to record, please open first + Audio is not permitted to record, please open first + Phone state is not permitted to read, please opend first + External storage is not permitted to write, please open first + External storage is not permitted to read, please open first + Bluetooth connect is not permitted to read, please open first + Internet is not permitted to push, please open first + + Bitrate setting error + + Close Denoise + + //老 demo 资源 + + Screen tool + Privacy Off + Camera Off + + Answer + + Stream Ingest for Screen Recording + Stream Ingest for Camera + Stream Ingest for Video + Only Audio Or Video Stream + Pushing + Retouching + Screenshot saved + /Times + Sent Frame Rate + send Bitrate + version:v + Live + + 阿里云\n移动推流 + 本Demo为用于展示阿里云移动推流sdk主要功能 + + 阿里云视频服务隐私权政策 + + diff --git a/AliLivePushDemo/LiveApp/src/main/res/values/styles.xml b/AliLivePushDemo/LiveApp/src/main/res/values/styles.xml new file mode 100644 index 00000000..5430eb32 --- /dev/null +++ b/AliLivePushDemo/LiveApp/src/main/res/values/styles.xml @@ -0,0 +1,9 @@ + + + + \ No newline at end of file diff --git a/AliLivePushDemo/beauty/.gitignore b/AliLivePushDemo/LiveBasic/live_pull/.gitignore similarity index 100% rename from AliLivePushDemo/beauty/.gitignore rename to AliLivePushDemo/LiveBasic/live_pull/.gitignore diff --git a/AliLivePushDemo/commonutils/build.gradle b/AliLivePushDemo/LiveBasic/live_pull/build.gradle similarity index 72% rename from AliLivePushDemo/commonutils/build.gradle rename to AliLivePushDemo/LiveBasic/live_pull/build.gradle index 426264cd..0464fc01 100644 --- a/AliLivePushDemo/commonutils/build.gradle +++ b/AliLivePushDemo/LiveBasic/live_pull/build.gradle @@ -29,11 +29,14 @@ android { } dependencies { - implementation fileTree(dir: 'libs', include: ['*.jar','*.aar']) - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.3.0' - testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.2' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + implementation 'com.google.android.material:material:1.1.0' + implementation project(':LiveCommon:live_basic_common') + + implementation project(':LiveBeauty:live_beauty') + implementation project(':LiveBeauty:live_queenbeauty') + + implementation 'com.acker:simplezxing:1.5' + + implementation externalPlayerFull } \ No newline at end of file diff --git a/AliLivePushDemo/beauty/consumer-rules.pro b/AliLivePushDemo/LiveBasic/live_pull/consumer-rules.pro similarity index 100% rename from AliLivePushDemo/beauty/consumer-rules.pro rename to AliLivePushDemo/LiveBasic/live_pull/consumer-rules.pro diff --git a/AliLivePushDemo/interactive/interactive_common/src/main/AndroidManifest.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/AndroidManifest.xml similarity index 53% rename from AliLivePushDemo/interactive/interactive_common/src/main/AndroidManifest.xml rename to AliLivePushDemo/LiveBasic/live_pull/src/main/AndroidManifest.xml index c9ebaf47..364c3207 100644 --- a/AliLivePushDemo/interactive/interactive_common/src/main/AndroidManifest.xml +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/AndroidManifest.xml @@ -1,13 +1,12 @@ + package="com.alivc.live.baselive_pull"> - + android:theme="@style/AVPushTheme" /> - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PlayButtonListAdapter.java b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/adapter/PlayButtonListAdapter.java similarity index 94% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PlayButtonListAdapter.java rename to AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/adapter/PlayButtonListAdapter.java index 08fadcde..0f138259 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PlayButtonListAdapter.java +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/adapter/PlayButtonListAdapter.java @@ -1,15 +1,17 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_pull.adapter; import android.annotation.SuppressLint; -import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; -import com.alivc.live.pusher.demo.R; -import com.alivc.live.pusher.demo.bean.Constants; +import androidx.recyclerview.widget.RecyclerView; + +import com.alivc.live.baselive_pull.R; +import com.alivc.live.baselive_pull.bean.Constants; +import com.alivc.live.baselive_pull.listener.ButtonClickListener; import java.util.ArrayList; import java.util.HashMap; @@ -45,7 +47,7 @@ public void hideItems(boolean isItemHide){ @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { - View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.recycle_button_item_view, parent, false); + View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.live_recycle_button_item_view, parent, false); ButtonHolder buttonHolder = new ButtonHolder(view); return buttonHolder; } @@ -125,8 +127,6 @@ public void setButtonEnable(String buttonName,boolean enable){ notifyItemChanged(position); } } - - } diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/bean/Constants.java b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/bean/Constants.java similarity index 78% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/bean/Constants.java rename to AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/bean/Constants.java index dfda6bce..7e6b42e4 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/bean/Constants.java +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/bean/Constants.java @@ -1,5 +1,7 @@ -package com.alivc.live.pusher.demo.bean; -import com.alivc.live.pusher.demo.R; +package com.alivc.live.baselive_pull.bean; + +import com.alivc.live.baselive_pull.R; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -8,7 +10,6 @@ public class Constants { private static List live_push_button; private static List live_pull_button; private static List live_play_button; - private static List live_beauty_skin_name; private static HashMap live_img_soure; @@ -21,8 +22,8 @@ public static HashMap getLive_img_soure() { * */ live_push_button = new ArrayList<>(); live_img_soure=new HashMap<>(); - live_img_soure.put("开始推流",R.drawable.live_push); - live_img_soure.put("美颜",R.drawable.live_beauty); + live_img_soure.put("开始推流", R.drawable.live_push); + live_img_soure.put("美颜", R.drawable.live_beauty); live_img_soure.put("音效",R.drawable.live_sound); live_img_soure.put("摄像头",R.drawable.live_carmer); live_img_soure.put("静音",R.drawable.mute_btn); @@ -51,12 +52,6 @@ public static HashMap getLive_img_soure() { */ live_play_button = new ArrayList<>(); live_play_button.add("暂停观看"); - - /** - * beauty页面的美肌 - * */ - live_beauty_skin_name = new ArrayList<>(); - live_beauty_skin_name.add(new BeautyItemData("磨皮",false,60)); } public static List getPushActivityButtonList(){ return live_push_button; @@ -67,7 +62,4 @@ public static List getPullActivityButtonList(){ public static List getPlayActivityButtonList(){ return live_play_button; } - public static List getBeautySkinNameList(){ - return live_beauty_skin_name; - } } diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/ButtonClickListener.java b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/listener/ButtonClickListener.java similarity index 67% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/ButtonClickListener.java rename to AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/listener/ButtonClickListener.java index df4e12a4..d66cb9d9 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/ButtonClickListener.java +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/listener/ButtonClickListener.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_pull.listener; public interface ButtonClickListener { void onButtonClick(String message, int position); diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PlayerActivity.java b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/PlayerActivity.java similarity index 95% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PlayerActivity.java rename to AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/PlayerActivity.java index fa2870a1..40a134ff 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PlayerActivity.java +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/PlayerActivity.java @@ -1,13 +1,10 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_pull.ui; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Configuration; import android.graphics.Color; import android.os.Bundle; - -import androidx.core.content.ContextCompat; - import android.text.TextUtils; import android.view.SurfaceHolder; import android.view.SurfaceView; @@ -20,16 +17,21 @@ import android.widget.TextView; import android.widget.Toast; -import com.alivc.live.pusher.demo.bean.Constants; -import com.alivc.live.pusher.demo.test.PushDemoTestConstants; -import com.alivc.live.pusher.widget.ButtonClickListener; -import com.alivc.live.pusher.widget.CommonDialog; -import com.alivc.live.pusher.widget.PlayButtonListView; -import com.alivc.live.pusher.widget.SeiView; -import com.aliyun.aio.avbaseui.widget.AVToast; -import com.aliyun.aio.avtheme.AVBaseThemeActivity; +import androidx.core.content.ContextCompat; + +import com.acker.simplezxing.activity.CaptureActivity; +import com.alivc.live.baselive_common.CommonDialog; +import com.alivc.live.baselive_pull.R; +import com.alivc.live.baselive_pull.bean.Constants; +import com.alivc.live.baselive_pull.listener.ButtonClickListener; +import com.alivc.live.baselive_pull.ui.widget.SeiView; +import com.alivc.live.commonbiz.test.PushDemoTestConstants; +import com.alivc.live.commonutils.BuildConfig; import com.alivc.live.commonutils.StatusBarUtil; import com.alivc.live.commonutils.TextFormatUtil; +import com.aliyun.aio.avbaseui.widget.AVToast; +import com.aliyun.aio.avtheme.AVBaseThemeActivity; +import com.alivc.live.baselive_pull.ui.widget.PlayButtonListView; import com.aliyun.player.AliPlayer; import com.aliyun.player.AliPlayerFactory; import com.aliyun.player.IPlayer; @@ -37,7 +39,6 @@ import com.aliyun.player.nativeclass.PlayerConfig; import com.aliyun.player.source.UrlSource; import com.cicada.player.utils.Logger; -import com.acker.simplezxing.activity.CaptureActivity; import java.util.ArrayList; import java.util.List; @@ -62,14 +63,12 @@ public class PlayerActivity extends AVBaseThemeActivity implements SurfaceHolder static { try{ - if(BuildConfig.MTL_BUILD_FOR_AIO) { System.loadLibrary("all_in_one"); } else { System.loadLibrary("RtsSDK"); } } catch (Throwable ignore) {} - } private View mPageVg; @@ -126,13 +125,13 @@ public void onError(ErrorInfo errorInfo) { mDialog = new CommonDialog(PlayerActivity.this); mDialog.setDialogTitle("播放器出错"); mDialog.setDialogContent(errorInfo.getMsg()); - mDialog.setConfirmButton(TextFormatUtil.getTextFormat(PlayerActivity.this, R.string.cancle), new DialogInterface.OnClickListener() { + mDialog.setConfirmButton(TextFormatUtil.getTextFormat(PlayerActivity.this, R.string.pull_cancel), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }); - mDialog.setCancelButton(TextFormatUtil.getTextFormat(PlayerActivity.this, R.string.restart), new DialogInterface.OnClickListener() { + mDialog.setCancelButton(TextFormatUtil.getTextFormat(PlayerActivity.this, R.string.pull_restart), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { diff --git a/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/MaxHeightLayout.java b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/MaxHeightLayout.java new file mode 100644 index 00000000..6801afcf --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/MaxHeightLayout.java @@ -0,0 +1,71 @@ +package com.alivc.live.baselive_pull.ui.widget; + +import android.content.Context; +import android.content.res.TypedArray; +import android.util.AttributeSet; +import android.widget.LinearLayout; + +import androidx.annotation.Nullable; + +import com.alivc.live.baselive_pull.R; +import com.alivc.live.commonutils.DensityUtil; + +/** + * 设置最大高度的Layout + */ +public class MaxHeightLayout extends LinearLayout { + + private float mMaxRatio = 0.75f; + private float mMaxHeight; + private float mMinHeight; + + public MaxHeightLayout(Context context) { + super(context); + init(); + } + + public MaxHeightLayout(Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + initAtts(context, attrs); + init(); + } + + public MaxHeightLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + initAtts(context, attrs); + init(); + } + + private void initAtts(Context context, AttributeSet attrs){ + TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.mMaxRatio); + if (attributes != null) { + mMaxRatio = attributes.getFloat(R.styleable.mMaxRatio_linear_max_ratio, 0.75f); + attributes.recycle(); + } + } + + private void init() { + mMaxHeight = mMaxRatio * DensityUtil.getDisplayMetrics(getContext()).heightPixels; + mMinHeight = DensityUtil.dip2px(getContext(), 125); + mMaxHeight = mMaxHeight < mMinHeight ? mMinHeight : mMaxHeight; + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + int heightMode = MeasureSpec.getMode(heightMeasureSpec); + int heightSize = MeasureSpec.getSize(heightMeasureSpec); + if (heightMode == MeasureSpec.EXACTLY) { + heightSize = heightSize <= mMaxHeight ? heightSize : (int) mMaxHeight; + } + + if (heightMode == MeasureSpec.UNSPECIFIED) { + heightSize = heightSize <= mMaxHeight ? heightSize : (int) mMaxHeight; + } + + if (heightMode == MeasureSpec.AT_MOST) { + heightSize = heightSize <= mMaxHeight ? heightSize : (int) mMaxHeight; + } + int maxHeightMeasureSpec = MeasureSpec.makeMeasureSpec(heightSize, heightMode); + super.onMeasure(widthMeasureSpec, maxHeightMeasureSpec); + } +} diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PlayButtonListView.java b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/PlayButtonListView.java similarity index 92% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PlayButtonListView.java rename to AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/PlayButtonListView.java index 7e71f9a6..47474948 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PlayButtonListView.java +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/PlayButtonListView.java @@ -1,16 +1,20 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_pull.ui.widget; import android.content.Context; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.FrameLayout; -import com.alivc.live.pusher.demo.R; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.alivc.live.baselive_pull.R; +import com.alivc.live.baselive_pull.adapter.PlayButtonListAdapter; +import com.alivc.live.baselive_pull.listener.ButtonClickListener; +import com.aliyun.aio.utils.DensityUtil; import java.util.List; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/SeiView.java b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/SeiView.java similarity index 92% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/SeiView.java rename to AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/SeiView.java index 8620d324..dcbc28c3 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/SeiView.java +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/SeiView.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_pull.ui.widget; import android.content.Context; import android.util.AttributeSet; @@ -10,7 +10,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import com.alivc.live.pusher.demo.R; +import com.alivc.live.baselive_pull.R; /** * 展示 SEI 信息 View diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/SpaceItemDecortation.java b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/SpaceItemDecortation.java similarity index 89% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/SpaceItemDecortation.java rename to AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/SpaceItemDecortation.java index 89913cce..11f8660f 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/SpaceItemDecortation.java +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/java/com/alivc/live/baselive_pull/ui/widget/SpaceItemDecortation.java @@ -1,10 +1,13 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_pull.ui.widget; import android.content.Context; import android.graphics.Rect; -import androidx.recyclerview.widget.RecyclerView; import android.view.View; +import androidx.recyclerview.widget.RecyclerView; + +import com.aliyun.aio.utils.DensityUtil; + class SpaceItemDecortation extends RecyclerView.ItemDecoration { private int space;//声明间距 //使用构造函数定义间距 private Context mContext; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/colour_bg.webp b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/colour_bg.webp similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/colour_bg.webp rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/colour_bg.webp diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/finish_play.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/finish_play.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/finish_play.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/finish_play.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_adjust_gray.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_adjust_gray.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_adjust_gray.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_adjust_gray.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_adjust_parm.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_adjust_parm.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_adjust_parm.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_adjust_parm.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_beauty.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_beauty.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_beauty.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_beauty.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_carmer.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_carmer.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_carmer.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_carmer.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_data.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_data.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_data.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_data.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_data_gray.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_data_gray.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_data_gray.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_data_gray.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_microphone.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_microphone.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_microphone.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_microphone.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_microphone_gray.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_microphone_gray.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_microphone_gray.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_microphone_gray.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_push.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_push.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_push.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_push.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_push_gray.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_push_gray.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_push_gray.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_push_gray.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_sound.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_sound.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/live_sound.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/live_sound.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/mute_btn.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/mute_btn.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/mute_btn.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/mute_btn.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/telephone_change.png b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/telephone_change.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/telephone_change.png rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable-xxhdpi/telephone_change.png diff --git a/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable/shape_bg_btn_green.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable/shape_bg_btn_green.xml new file mode 100644 index 00000000..fecb2dc4 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable/shape_bg_btn_green.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_bg_search.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable/shape_bg_search.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_bg_search.xml rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/drawable/shape_bg_search.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_player.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/layout/activity_player.xml similarity index 96% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_player.xml rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/layout/activity_player.xml index 0c01ecba..f7c83475 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_player.xml +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/layout/activity_player.xml @@ -3,8 +3,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent" - > + android:layout_height="match_parent"> + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/live_button_list.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/layout/live_button_list.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/live_button_list.xml rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/layout/live_button_list.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/recycle_button_item_view.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/layout/live_recycle_button_item_view.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/recycle_button_item_view.xml rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/layout/live_recycle_button_item_view.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/live_sei_view.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/layout/live_sei_view.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/live_sei_view.xml rename to AliLivePushDemo/LiveBasic/live_pull/src/main/res/layout/live_sei_view.xml diff --git a/AliLivePushDemo/LiveBasic/live_pull/src/main/res/values-en/strings.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/values-en/strings.xml new file mode 100644 index 00000000..f8b6b46c --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/values-en/strings.xml @@ -0,0 +1,6 @@ + + + Live Streaming + Enter the source URL. + Retry + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_pull/src/main/res/values-zh-rCN/strings.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 00000000..e7a659d3 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,7 @@ + + + 拉流播放 + 请输入拉流url + 重试 + + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_pull/src/main/res/values/strings.xml b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/values/strings.xml new file mode 100644 index 00000000..eff4d022 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull/src/main/res/values/strings.xml @@ -0,0 +1,7 @@ + + + Live Streaming + Enter the source URL. + Retry + + \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/.gitignore b/AliLivePushDemo/LiveBasic/live_pull_rts/.gitignore similarity index 100% rename from AliLivePushDemo/beautyui/.gitignore rename to AliLivePushDemo/LiveBasic/live_pull_rts/.gitignore diff --git a/AliLivePushDemo/beautyui/build.gradle b/AliLivePushDemo/LiveBasic/live_pull_rts/build.gradle similarity index 62% rename from AliLivePushDemo/beautyui/build.gradle rename to AliLivePushDemo/LiveBasic/live_pull_rts/build.gradle index 48896134..e2d7b289 100644 --- a/AliLivePushDemo/beautyui/build.gradle +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/build.gradle @@ -23,15 +23,22 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { - implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.3.0' - compileOnly project(':beauty') + implementation 'com.google.android.material:material:1.1.0' + implementation project(':LiveCommon:live_basic_common') + + implementation 'com.acker:simplezxing:1.5' + + implementation externalARTC + if (hasRTS() && !"true".equalsIgnoreCase(allInOne)) { + implementation externalRtsSDK + } + implementation externalPlayerFull } \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/consumer-rules.pro b/AliLivePushDemo/LiveBasic/live_pull_rts/consumer-rules.pro similarity index 100% rename from AliLivePushDemo/beautyui/consumer-rules.pro rename to AliLivePushDemo/LiveBasic/live_pull_rts/consumer-rules.pro diff --git a/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/AndroidManifest.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/AndroidManifest.xml new file mode 100644 index 00000000..15a96a17 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ + + + + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/interactive/interactive_common/src/main/java/com/aliyun/interactive_common/widget/AUILiveDialog.java b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/AUILiveDialog.java similarity index 98% rename from AliLivePushDemo/interactive/interactive_common/src/main/java/com/aliyun/interactive_common/widget/AUILiveDialog.java rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/AUILiveDialog.java index a5417b42..a8d4f712 100644 --- a/AliLivePushDemo/interactive/interactive_common/src/main/java/com/aliyun/interactive_common/widget/AUILiveDialog.java +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/AUILiveDialog.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_common.widget; +package com.alivc.live.baselive_pull_rts; import android.app.Dialog; import android.content.Context; @@ -17,8 +17,6 @@ import androidx.annotation.NonNull; -import com.aliyun.interactive_common.R; - public class AUILiveDialog extends Dialog { private final static int ANIMATION_DURATION = 200; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/InputRtsUrlActivity.java b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/InputRtsUrlActivity.java similarity index 98% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/InputRtsUrlActivity.java rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/InputRtsUrlActivity.java index 6f79a61e..531df078 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/InputRtsUrlActivity.java +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/InputRtsUrlActivity.java @@ -1,8 +1,4 @@ -package com.alivc.live.pusher.demo.rts; - -import androidx.appcompat.app.AppCompatActivity; -import androidx.core.app.ActivityCompat; -import androidx.core.content.ContextCompat; +package com.alivc.live.baselive_pull_rts; import android.Manifest; import android.content.Intent; @@ -15,8 +11,11 @@ import android.widget.ImageView; import android.widget.TextView; +import androidx.appcompat.app.AppCompatActivity; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; + import com.acker.simplezxing.activity.CaptureActivity; -import com.alivc.live.pusher.demo.R; /** * URL 输入界面 diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/RtsPlayActivity.java b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/RtsPlayActivity.java similarity index 98% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/RtsPlayActivity.java rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/RtsPlayActivity.java index 133ca45c..d2c3558f 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/RtsPlayActivity.java +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/RtsPlayActivity.java @@ -1,7 +1,4 @@ -package com.alivc.live.pusher.demo.rts; - -import androidx.annotation.NonNull; -import androidx.appcompat.app.AppCompatActivity; +package com.alivc.live.baselive_pull_rts; import android.os.Bundle; import android.util.Log; @@ -14,7 +11,8 @@ import android.widget.RadioGroup; import android.widget.TextView; -import com.alivc.live.pusher.demo.R; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; import java.util.Locale; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/RtsPlayer.java b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/RtsPlayer.java similarity index 98% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/RtsPlayer.java rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/RtsPlayer.java index b755192a..d4394c10 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/RtsPlayer.java +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/RtsPlayer.java @@ -1,10 +1,8 @@ -package com.alivc.live.pusher.demo.rts; +package com.alivc.live.baselive_pull_rts; import android.content.Context; -import android.util.Log; import android.view.SurfaceHolder; -import com.alivc.live.pusher.demo.BuildConfig; import com.aliyun.player.AliPlayer; import com.aliyun.player.AliPlayerFactory; import com.aliyun.player.IPlayer; @@ -12,6 +10,7 @@ import com.aliyun.player.nativeclass.PlayerConfig; import com.aliyun.player.source.UrlSource; import com.cicada.player.utils.Logger; +import com.alivc.live.commonutils.BuildConfig; /** * RTS 播放 diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/RtsTraceIdInfoView.java b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/RtsTraceIdInfoView.java similarity index 95% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/RtsTraceIdInfoView.java rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/RtsTraceIdInfoView.java index 06d6d24c..f868b7c5 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/rts/RtsTraceIdInfoView.java +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/java/com/alivc/live/baselive_pull_rts/RtsTraceIdInfoView.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo.rts; +package com.alivc.live.baselive_pull_rts; import android.content.ClipData; import android.content.ClipboardManager; @@ -13,9 +13,7 @@ import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.Group; -import com.alivc.live.pusher.demo.R; import com.aliyun.aio.avbaseui.widget.AVToast; -import com.aliyun.interactive_common.widget.AUILiveDialog; public class RtsTraceIdInfoView extends ConstraintLayout { diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_close.png b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable-xxhdpi/ic_close.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_close.png rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable-xxhdpi/ic_close.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/scan_icon.png b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable-xxhdpi/scan_icon.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/scan_icon.png rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable-xxhdpi/scan_icon.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_rts_play_state.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/selector_rts_play_state.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_rts_play_state.xml rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/selector_rts_play_state.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_rts_play_state_text.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/selector_rts_play_state_text.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_rts_play_state_text.xml rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/selector_rts_play_state_text.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rect_blue.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rect_blue.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rect_blue.xml rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rect_blue.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rts_checked_blue.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_checked_blue.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rts_checked_blue.xml rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_checked_blue.xml diff --git a/AliLivePushDemo/interactive/interactive_common/src/main/res/drawable/shape_interact_live_dialog_bg.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_live_dialog_bg.xml similarity index 100% rename from AliLivePushDemo/interactive/interactive_common/src/main/res/drawable/shape_interact_live_dialog_bg.xml rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_live_dialog_bg.xml diff --git a/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_rect_enable_blue.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_rect_enable_blue.xml new file mode 100644 index 00000000..a0aaf59d --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_rect_enable_blue.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rts_rect_unable_blue.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_rect_unable_blue.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rts_rect_unable_blue.xml rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_rect_unable_blue.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rts_trace_id_bg.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_trace_id_bg.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rts_trace_id_bg.xml rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_trace_id_bg.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rts_unchecked_white.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_unchecked_white.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rts_unchecked_white.xml rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/drawable/shape_rts_unchecked_white.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_input_rts_url.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/layout/activity_input_rts_url.xml similarity index 98% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_input_rts_url.xml rename to AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/layout/activity_input_rts_url.xml index d44917bc..4edf3e85 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_input_rts_url.xml +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/layout/activity_input_rts_url.xml @@ -4,8 +4,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/bg_weak" - tools:context=".rts.InputRtsUrlActivity"> + android:background="@color/bg_weak"> + android:background="@color/bg_weak"> + android:background="@drawable/shape_rts_live_dialog_bg"> + + + Rts Live Streaming + URL + Please enter RTS ultra-low delay playback address + The playback address can be generated by the address generator in the live video console + Start playing + Play + Stop + TraceID acquisition + Common Problem + Playback Failed + Please go to the live video console>Toolbox>Self service problem troubleshooting, and enter the URL to locate the problem of playback failure + Play stuck / high delay + step1 + Please go to Live Video Console>Stream Management>Stream Detection to analyze whether your current streaming network environment is good (whether the frame rate or timestamp is normal) + step2 + If your streaming network is good, please click [TraceID Acquisition] to obtain relevant information and submit a work order for help + Copy + Confirm + Close + The network connection is not successful, and the TraceID information is not currently available + If you encounter problems when experiencing Demo, please submit the following information to the after-sales service in the form of work order + Information copied + Demote + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/values-zh-rCN/strings.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 00000000..7e1c430c --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,27 @@ + + + + 超低延时直播 + 播放地址 + 请输入RTS超低延时播放地址 + 播放地址可到视频直播控制台用地址生成器生成 + 开始播放 + 播放 + 停止 + TraceID获取 + 常见问题 + 播放失败 + 请前往 视频直播控制台 > 工具箱 > 自助问题排查,输入URL自助定位播放失败问题 + 播放卡顿/延时高 + step1 + 请前往视频直播控制台 > 流管理 > 流检测,分析您当前的推流网络环境是否良好(帧率或时间戳是否正常) + step2 + 若您的推流网络良好,请点击【TraceID获取】获取相关信息,并提交工单寻求帮助 + 复制 + 确认 + 关闭 + 网络建联不成功,当前未获取到TraceID信息 + 若您在体验Demo时碰到问题,请将以下信息通过工单的形式提交给售后 + 信息已复制 + 降级 + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/values/dimens.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/values/dimens.xml new file mode 100644 index 00000000..6a132c4c --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/values/dimens.xml @@ -0,0 +1,7 @@ + + + 12sp + 14sp + 16sp + 18sp + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/values/strings.xml b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/values/strings.xml new file mode 100644 index 00000000..b88e128c --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_pull_rts/src/main/res/values/strings.xml @@ -0,0 +1,27 @@ + + + + Rts Live Streaming + URL + Please enter RTS ultra-low delay playback address + The playback address can be generated by the address generator in the live video console + Start playing + Play + Stop + TraceID acquisition + Common Problem + Playback Failed + Please go to the live video console>Toolbox>Self service problem troubleshooting, and enter the URL to locate the problem of playback failure + Play stuck / high delay + step1 + Please go to Live Video Console>Stream Management>Stream Detection to analyze whether your current streaming network environment is good (whether the frame rate or timestamp is normal) + step2 + If your streaming network is good, please click [TraceID Acquisition] to obtain relevant information and submit a work order for help + Copy + Confirm + Close + The network connection is not successful, and the TraceID information is not currently available + If you encounter problems when experiencing Demo, please submit the following information to the after-sales service in the form of work order + Information copied + Demote + \ No newline at end of file diff --git a/AliLivePushDemo/commonutils/.gitignore b/AliLivePushDemo/LiveBasic/live_push/.gitignore similarity index 100% rename from AliLivePushDemo/commonutils/.gitignore rename to AliLivePushDemo/LiveBasic/live_push/.gitignore diff --git a/AliLivePushDemo/LiveBasic/live_push/build.gradle b/AliLivePushDemo/LiveBasic/live_push/build.gradle new file mode 100644 index 00000000..97d5aaa1 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/build.gradle @@ -0,0 +1,45 @@ +plugins { + id 'com.android.library' +} + +android { + compileSdkVersion androidCompileSdkVersion + buildToolsVersion androidBuildToolsVersion + + defaultConfig { + minSdkVersion androidMinSdkVersion + targetSdkVersion androidTargetSdkVersion + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles "consumer-rules.pro" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.1.0' + + implementation project(':LiveCommon:live_basic_common') + + implementation project(':LiveBeauty:live_beauty') + implementation project(':LiveBeauty:live_queenbeauty') + + implementation 'com.acker:simplezxing:1.5' + + implementation(externalAliyunQueenUI) { + exclude group: 'com.aliyun.maliang.android', module: 'queen' + } +} \ No newline at end of file diff --git a/AliLivePushDemo/commonbiz/consumer-rules.pro b/AliLivePushDemo/LiveBasic/live_push/consumer-rules.pro similarity index 100% rename from AliLivePushDemo/commonbiz/consumer-rules.pro rename to AliLivePushDemo/LiveBasic/live_push/consumer-rules.pro diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/AndroidManifest.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/AndroidManifest.xml new file mode 100644 index 00000000..e36d6209 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/AndroidManifest.xml @@ -0,0 +1,25 @@ + + + + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/Common.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/Common.java similarity index 85% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/Common.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/Common.java index 1fdb3431..09a25930 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/Common.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/Common.java @@ -1,13 +1,14 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_push; import android.content.Context; import android.content.DialogInterface; import android.content.res.AssetManager; import android.os.Handler; import android.os.Looper; + import androidx.appcompat.app.AlertDialog; -import com.alivc.live.pusher.demo.bean.MusicInfo; +import com.alivc.live.baselive_push.bean.MusicInfo; import java.io.File; import java.io.FileInputStream; @@ -172,32 +173,4 @@ public static String getTime(long ms) { String hms = formatter.format(ms); return hms; } - - public static String getFileMD5(File file) { - if (file == null) { - return ""; - } - String value = null; - FileInputStream in = null; - try { - in = new FileInputStream(file); - MappedByteBuffer byteBuffer = in.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, - file.length()); - MessageDigest md5 = MessageDigest.getInstance("MD5"); - md5.update(byteBuffer); - BigInteger bi = new BigInteger(1, md5.digest()); - value = bi.toString(16); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (null != in) { - try { - in.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - return value; - } } diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushLaunchManager.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/PushLaunchManager.java similarity index 88% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushLaunchManager.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/PushLaunchManager.java index aee566da..6bf8f168 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushLaunchManager.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/PushLaunchManager.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_push; import static android.os.Environment.MEDIA_MOUNTED; @@ -8,14 +8,13 @@ import androidx.annotation.NonNull; +import com.alivc.live.commonbiz.BuildConfig; import com.alivc.live.pusher.AlivcLiveBase; import com.alivc.live.pusher.AlivcLiveBaseListener; import com.alivc.live.pusher.AlivcLivePushConstants; import com.alivc.live.pusher.AlivcLivePushInstance; import com.alivc.live.pusher.AlivcLivePushLogLevel; import com.aliyun.aio.utils.ThreadUtils; -import com.aliyun.animoji.AnimojiDataFactory; -import com.aliyun.animoji.utils.LogUtils; import com.aliyunsdk.queen.menu.download.BeautyMenuMaterial; import java.io.File; @@ -46,7 +45,6 @@ public static void launch4All(@NonNull Context context) { launch4LivePushDemo(context); registerPushSDKLicense(context); launch4Log(context); - launch4Animoji(context); launch4QueenBeauty(context); } @@ -99,18 +97,6 @@ private static void launch4Log(@NonNull Context context) { } } - /** - * Animoji资源加载等 - * - * @param context android context - * @see 美颜特效SDK官网 - * @see 美颜特效SDK文档 - */ - private static void launch4Animoji(@NonNull Context context) { - AnimojiDataFactory.INSTANCE.loadResources(context); - LogUtils.init(true); - } - /** * Queen美颜资源加载等 * diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/IPushController.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/IPushController.java similarity index 72% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/IPushController.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/IPushController.java index bde42719..1a8bbbba 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/IPushController.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/IPushController.java @@ -1,7 +1,8 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_push.adapter; import android.view.SurfaceView; +import com.alivc.live.baselive_push.ui.LivePushActivity; import com.alivc.live.pusher.AlivcLivePusher; public interface IPushController { diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/MusicSelectAdapter.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/MusicSelectAdapter.java similarity index 94% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/MusicSelectAdapter.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/MusicSelectAdapter.java index 2fa2a52d..77fc0882 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/MusicSelectAdapter.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/MusicSelectAdapter.java @@ -1,7 +1,6 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_push.adapter; import android.content.Context; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -10,7 +9,9 @@ import androidx.recyclerview.widget.RecyclerView; -import com.alivc.live.pusher.demo.bean.MusicInfo; +import com.alivc.live.baselive_push.Common; +import com.alivc.live.baselive_push.R; +import com.alivc.live.baselive_push.bean.MusicInfo; import java.util.ArrayList; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/adapter/OnSoundEffectChangedListener.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/OnSoundEffectChangedListener.java similarity index 78% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/adapter/OnSoundEffectChangedListener.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/OnSoundEffectChangedListener.java index 8981a2e2..b7de0d6b 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/adapter/OnSoundEffectChangedListener.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/OnSoundEffectChangedListener.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo.adapter; +package com.alivc.live.baselive_push.adapter; public interface OnSoundEffectChangedListener { void onSoundEffectChangeVoiceModeSelected(int position); diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/adapter/SoundEffectRecyclerViewAdapter.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/SoundEffectRecyclerViewAdapter.java similarity index 96% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/adapter/SoundEffectRecyclerViewAdapter.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/SoundEffectRecyclerViewAdapter.java index 73a2e15b..0ef3e9bc 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/adapter/SoundEffectRecyclerViewAdapter.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/adapter/SoundEffectRecyclerViewAdapter.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo.adapter; +package com.alivc.live.baselive_push.adapter; import android.content.Context; import android.view.LayoutInflater; @@ -11,8 +11,8 @@ import androidx.constraintlayout.widget.ConstraintLayout; import androidx.recyclerview.widget.RecyclerView; -import com.alivc.live.pusher.demo.R; -import com.alivc.live.pusher.demo.bean.SoundEffectBean; +import com.alivc.live.baselive_push.R; +import com.alivc.live.baselive_push.bean.SoundEffectBean; import org.jetbrains.annotations.NotNull; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/bean/MusicInfo.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/bean/MusicInfo.java similarity index 95% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/bean/MusicInfo.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/bean/MusicInfo.java index c2539bb7..c9509c42 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/bean/MusicInfo.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/bean/MusicInfo.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo.bean; +package com.alivc.live.baselive_push.bean; public class MusicInfo { private String mMusicName; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/bean/SoundEffectBean.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/bean/SoundEffectBean.java similarity index 98% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/bean/SoundEffectBean.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/bean/SoundEffectBean.java index ba9abddc..c6e28305 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/bean/SoundEffectBean.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/bean/SoundEffectBean.java @@ -1,16 +1,15 @@ -package com.alivc.live.pusher.demo.bean; +package com.alivc.live.baselive_push.bean; import androidx.annotation.DrawableRes; import androidx.annotation.IdRes; import androidx.annotation.StringRes; +import com.alivc.live.baselive_push.R; import com.alivc.live.pusher.AlivcLivePushAudioEffectReverbMode; import com.alivc.live.pusher.AlivcLivePushAudioEffectVoiceChangeMode; -import com.alivc.live.pusher.demo.R; import java.io.Serializable; import java.util.HashMap; -import java.util.Map; public class SoundEffectBean implements Serializable { diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/test/InformationActivity.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/test/InformationActivity.java similarity index 86% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/test/InformationActivity.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/test/InformationActivity.java index a6d96ffc..3058e87c 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/test/InformationActivity.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/test/InformationActivity.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo.test; +package com.alivc.live.baselive_push.test; import android.content.ClipboardManager; import android.content.Context; @@ -9,9 +9,9 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; +import com.alivc.live.baselive_push.R; +import com.alivc.live.commonutils.BuildConfig; import com.alivc.live.pusher.AlivcLiveBase; -import com.alivc.live.pusher.BuildConfig; -import com.alivc.live.pusher.demo.R; import com.alivc.live.commonutils.AppUtil; import com.alivc.live.commonutils.FileUtil; import com.alivc.live.commonutils.ToastUtils; @@ -67,10 +67,10 @@ public boolean onLongClick(View v) { private static String getDemoBuildInfo() { return String.format("%s%n%s%n%s%n%s", - "Demo Build Type: " + com.alivc.live.pusher.demo.BuildConfig.BUILD_TYPE, - "Demo Build AIO: " + com.alivc.live.pusher.demo.BuildConfig.MTL_BUILD_FOR_AIO, - "Demo Build ID: " + com.alivc.live.pusher.demo.BuildConfig.MTL_BUILD_ID, - "Demo Build Timestamp: " + com.alivc.live.pusher.demo.BuildConfig.MTL_BUILD_TIMESTAMP + "Demo Build Type: " + BuildConfig.BUILD_TYPE, + "Demo Build AIO: " + BuildConfig.MTL_BUILD_FOR_AIO, + "Demo Build ID: " + BuildConfig.MTL_BUILD_ID, + "Demo Build Timestamp: " + BuildConfig.MTL_BUILD_TIMESTAMP ); } @@ -78,8 +78,8 @@ private static String getSdkBuildInfo() { return String.format("%s%n%s%n%s%n%s%n%s%n%s", "SDK Version: " + AlivcLiveBase.getSDKVersion(), "SDK Build Type: " + BuildConfig.BUILD_TYPE, - "SDK Build Interactive: " + BuildConfig.BUILD_INTERACTIVE, - "SDK Head Commit ID: " + BuildConfig.HEAD_COMMIT_ID, + "SDK Build Interactive: " + com.alivc.live.pusher.BuildConfig.BUILD_INTERACTIVE, + "SDK Head Commit ID: " + com.alivc.live.pusher.BuildConfig.HEAD_COMMIT_ID, "SDK Build ID: " + BuildConfig.MTL_BUILD_ID, "SDK Build Timestamp: " + BuildConfig.MTL_BUILD_TIMESTAMP ); diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LivePushActivity.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/LivePushActivity.java similarity index 73% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LivePushActivity.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/LivePushActivity.java index cb9fc14a..8fa41258 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LivePushActivity.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/LivePushActivity.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_push.ui; import static com.alivc.live.pusher.AlivcPreviewOrientationEnum.ORIENTATION_LANDSCAPE_HOME_LEFT; import static com.alivc.live.pusher.AlivcPreviewOrientationEnum.ORIENTATION_LANDSCAPE_HOME_RIGHT; @@ -15,7 +15,6 @@ import android.hardware.Camera; import android.net.ConnectivityManager; import android.os.Bundle; -import android.util.Log; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.ScaleGestureDetector; @@ -32,8 +31,11 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; +import androidx.lifecycle.ViewModelProvider; import androidx.viewpager.widget.ViewPager; +import com.alivc.live.baselive_push.R; +import com.alivc.live.baselive_push.adapter.IPushController; import com.alivc.live.annotations.AlivcLiveMode; import com.alivc.live.pusher.AlivcLivePushConfig; import com.alivc.live.pusher.AlivcLivePushStatsInfo; @@ -41,20 +43,12 @@ import com.alivc.live.pusher.AlivcPreviewOrientationEnum; import com.alivc.live.pusher.SurfaceStatus; import com.alivc.live.pusher.WaterMarkInfo; -import com.alivc.live.pusher.demo.download.ResourcesDownload; +import com.alivc.live.commonutils.NetWorkUtils; import com.alivc.live.commonutils.StatusBarUtil; import com.aliyun.aio.avtheme.AVBaseThemeActivity; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; import java.util.ArrayList; import java.util.List; -import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.atomic.AtomicInteger; public class LivePushActivity extends AVBaseThemeActivity implements IPushController { private static final String TAG = "LivePushActivity"; @@ -90,8 +84,6 @@ public class LivePushActivity extends AVBaseThemeActivity implements IPushContro private GestureDetector mDetector; private ScaleGestureDetector mScaleDetector; private LivePushFragment mLivePushFragment; - private PushTextStatsFragment mPushTextStatsFragment; - private PushDiagramStatsFragment mPushDiagramStatsFragment; private AlivcLivePushConfig mAlivcLivePushConfig; private static AlivcLivePusher mAlivcLivePusher = null; @@ -116,15 +108,18 @@ public class LivePushActivity extends AVBaseThemeActivity implements IPushContro private String mPrivacyKey = ""; // private ConnectivityChangedReceiver mChangedReceiver = new ConnectivityChangedReceiver(); - private boolean videoThreadOn = false; - private boolean audioThreadOn = false; private static int mNetWork = 0; private int mFps; + private LivePushViewModel mLivePushViewModel; + @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); + + mLivePushViewModel = new ViewModelProvider(this).get(LivePushViewModel.class); + requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); StatusBarUtil.translucent(this, Color.TRANSPARENT); @@ -165,8 +160,6 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { mLivePushFragment = LivePushFragment.newInstance(mAlivcLivePushConfig, mPushUrl, mAsync, mAudioOnly, mVideoOnly, mCameraId, mFlash, mAlivcLivePushConfig.getQualityMode().getQualityMode(), mAuthTime, mPrivacyKey, mMixExtern, mMixMain, mBeautyOn, mFps, mOrientation, waterMarkInfos); - mPushTextStatsFragment = new PushTextStatsFragment(); - mPushDiagramStatsFragment = new PushDiagramStatsFragment(); initViewPager(); mScaleDetector = new ScaleGestureDetector(getApplicationContext(), mScaleGestureDetector); mDetector = new GestureDetector(getApplicationContext(), mGestureDetector); @@ -314,23 +307,7 @@ public void onScaleEnd(ScaleGestureDetector scaleGestureDetector) { public void surfaceCreated(SurfaceHolder surfaceHolder) { if (mSurfaceStatus == SurfaceStatus.UNINITED) { mSurfaceStatus = SurfaceStatus.CREATED; - if (mAlivcLivePusher != null) { - try { - if (mAsync) { - mAlivcLivePusher.startPreviewAysnc(mPreviewView); - } else { - mAlivcLivePusher.startPreview(mPreviewView); - } - if (mAlivcLivePushConfig.isExternMainStream()) { - startYUV(getApplicationContext()); - startPCM(getApplicationContext()); - } - } catch (IllegalArgumentException e) { - Log.e(TAG, "surfaceCreated: ", e); - } catch (IllegalStateException e) { - Log.e(TAG, "surfaceCreated: ", e); - } - } + mLivePushViewModel.onSurfaceCreated(mAsync,mPreviewView,mAlivcLivePusher); } else if (mSurfaceStatus == SurfaceStatus.DESTROYED) { mSurfaceStatus = SurfaceStatus.RECREATED; } @@ -415,8 +392,8 @@ protected void onPause() { @Override protected void onDestroy() { - videoThreadOn = false; - audioThreadOn = false; + mLivePushViewModel.stopYUV(); + mLivePushViewModel.stopPcm(); if (mAlivcLivePusher != null) { try { mAlivcLivePusher.destroy(); @@ -432,8 +409,6 @@ protected void onDestroy() { mDetector = null; mScaleDetector = null; mLivePushFragment = null; - mPushTextStatsFragment = null; - mPushDiagramStatsFragment = null; mAlivcLivePushConfig = null; mAlivcLivePusher = null; alivcLivePushStatsInfo = null; @@ -527,134 +502,7 @@ public void updatePause(boolean state) { } }; - public void startYUV(final Context context) { - new ScheduledThreadPoolExecutor(1, new ThreadFactory() { - private AtomicInteger atoInteger = new AtomicInteger(0); - - public Thread newThread(Runnable r) { - Thread t = new Thread(r); - t.setName("LivePushActivity-readYUV-Thread" + atoInteger.getAndIncrement()); - return t; - } - }).execute(new Runnable() { - @Override - public void run() { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - videoThreadOn = true; - byte[] yuv; - InputStream myInput = null; - try { - File f = ResourcesDownload.localCaptureYUVFilePath(LivePushActivity.this); - myInput = new FileInputStream(f); - byte[] buffer = new byte[1280 * 720 * 3 / 2]; - int length = myInput.read(buffer); - //发数据 - while (length > 0 && videoThreadOn) { - long pts = System.currentTimeMillis() * 1000; - mAlivcLivePusher.inputStreamVideoData(buffer, 720, 1280, 720, 1280 * 720 * 3 / 2, pts, 0); - try { - Thread.sleep(40); - } catch (InterruptedException e) { - e.printStackTrace(); - } - //发数据 - length = myInput.read(buffer); - if (length <= 0) { - myInput.close(); - myInput = new FileInputStream(f); - length = myInput.read(buffer); - } - } - myInput.close(); - videoThreadOn = false; - } catch (IOException e) { - e.printStackTrace(); - } - } - }); - } - - private void stopYUV() { - videoThreadOn = false; - } - - private void stopPcm() { - audioThreadOn = false; - } - - private void startPCM(final Context context) { - new ScheduledThreadPoolExecutor(1, new ThreadFactory() { - private AtomicInteger atoInteger = new AtomicInteger(0); - - @Override - public Thread newThread(Runnable r) { - Thread t = new Thread(r); - t.setName("LivePushActivity-readPCM-Thread" + atoInteger.getAndIncrement()); - return t; - } - }).execute(new Runnable() { - @Override - public void run() { - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - audioThreadOn = true; - byte[] pcm; - int allSended = 0; - int sizePerSecond = 44100 * 2; - InputStream myInput = null; - OutputStream myOutput = null; - boolean reUse = false; - long startPts = System.nanoTime() / 1000; - try { - File f = new File(getFilesDir().getPath() + File.separator + "alivc_resource/441.pcm"); - myInput = new FileInputStream(f); - // File f = new File("/sdcard/alivc_resource/441.pcm"); - byte[] buffer = new byte[2048]; - int length = myInput.read(buffer, 0, 2048); - double sleep_time = 1000 / 44.1; - while (length > 0 && audioThreadOn) { - long start = System.nanoTime(); - long pts = System.currentTimeMillis() * 1000; - mAlivcLivePusher.inputStreamAudioData(buffer, length, 44100, 1, pts); - allSended += length; - if ((allSended * 1000000L / sizePerSecond - 50000) > (pts - startPts)) { - try { - Thread.sleep(45); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - length = myInput.read(buffer); - if (length < 2048) { - myInput.close(); - myInput = new FileInputStream(f); - length = myInput.read(buffer); - } - long end = System.nanoTime(); - try { - long real_sleep_time = (long) (sleep_time - (end - start) / 1000 / 1000); - Thread.sleep(real_sleep_time); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - myInput.close(); - audioThreadOn = false; - } catch (IOException e) { - e.printStackTrace(); - } - } - }); - } - - static class ConnectivityChangedReceiver extends BroadcastReceiver { + public static class ConnectivityChangedReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LivePushFragment.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/LivePushFragment.java similarity index 86% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LivePushFragment.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/LivePushFragment.java index e4d0d0c4..e68c27a2 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/LivePushFragment.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/LivePushFragment.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_push.ui; import static com.alivc.live.pusher.AlivcLivePushCameraTypeEnum.CAMERA_TYPE_BACK; import static com.alivc.live.pusher.AlivcLivePushCameraTypeEnum.CAMERA_TYPE_FRONT; @@ -24,20 +24,28 @@ import android.widget.TextView; import android.widget.Toast; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; import androidx.annotation.StringRes; import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.Fragment; +import androidx.lifecycle.ViewModelProvider; import com.alivc.component.custom.AlivcLivePushCustomFilter; import com.alivc.live.annotations.AlivcLiveMode; +import com.alivc.live.baselive_common.CommonDialog; +import com.alivc.live.baselive_push.R; +import com.alivc.live.baselive_push.adapter.IPushController; +import com.alivc.live.baselive_push.adapter.OnSoundEffectChangedListener; +import com.alivc.live.baselive_push.ui.widget.DataView; +import com.alivc.live.baselive_push.ui.widget.PushMoreConfigBottomSheet; +import com.alivc.live.baselive_push.ui.widget.PushMusicBottomSheet; +import com.alivc.live.baselive_push.ui.widget.SoundEffectView; import com.alivc.live.beauty.BeautyFactory; import com.alivc.live.beauty.BeautyInterface; import com.alivc.live.beauty.constant.BeautySDKType; -import com.alivc.live.beautyui.AnimojiContainerView; -import com.alivc.live.beautyui.bean.AnimojiItemBean; import com.alivc.live.commonbiz.SharedPreferenceUtils; +import com.alivc.live.commonutils.FastClickUtil; +import com.alivc.live.commonutils.TextFormatUtil; +import com.alivc.live.commonutils.ToastUtils; import com.alivc.live.pusher.AlivcLivePushAudioEffectReverbMode; import com.alivc.live.pusher.AlivcLivePushAudioEffectVoiceChangeMode; import com.alivc.live.pusher.AlivcLivePushBGMListener; @@ -49,24 +57,9 @@ import com.alivc.live.pusher.AlivcLivePushStatsInfo; import com.alivc.live.pusher.AlivcLivePusher; import com.alivc.live.pusher.AlivcPreviewDisplayMode; -import com.alivc.live.pusher.AlivcPreviewOrientationEnum; import com.alivc.live.pusher.AlivcSnapshotListener; import com.alivc.live.pusher.WaterMarkInfo; -import com.alivc.live.pusher.demo.adapter.OnSoundEffectChangedListener; -import com.alivc.live.pusher.widget.CommonDialog; -import com.alivc.live.pusher.widget.DataView; -import com.alivc.live.pusher.widget.PushMoreConfigBottomSheet; -import com.alivc.live.pusher.widget.PushMusicBottomSheet; -import com.alivc.live.pusher.widget.SoundEffectView; -import com.alivc.live.commonutils.FastClickUtil; -import com.alivc.live.commonutils.TextFormatUtil; -import com.alivc.live.commonutils.ToastUtils; import com.aliyun.aio.avbaseui.widget.AVToast; -import com.aliyun.animoji.AnimojiDataFactory; -import com.aliyun.animoji.AnimojiEngine; -import com.aliyun.animoji.AnimojiError; -import com.aliyun.animoji.Flip; -import com.aliyun.animoji.utils.DeviceOrientationDetector; import com.aliyunsdk.queen.menu.BeautyMenuPanel; import java.io.File; @@ -113,7 +106,6 @@ public class LivePushFragment extends Fragment { private View mCamera; private View mSnapshot; private View mBeautyButton; - private View mAnimojiButton; private View mSoundEffectButton; private TextView mPreviewButton; @@ -157,13 +149,10 @@ public class LivePushFragment extends Fragment { // 高级美颜管理类 private BeautyInterface mBeautyManager; private boolean isBeautyEnable = true; - private AnimojiContainerView mAnimojiContainerView; - private AnimojiEngine mAnimojiEngine; private DataView mDataView; private int mCurBr; private int mTargetBr; private boolean mBeautyOn = true; - private boolean mAnimojiOn = false; private int mFps; private int mPreviewOrientation; private CommonDialog mDialog; @@ -172,12 +161,12 @@ public class LivePushFragment extends Fragment { private TextView mTotalLivePushStatsInfoTV;//数据指标 private BeautyMenuPanel mBeautyBeautyContainerView; private IPushController mPushController = null; - private final DeviceOrientationDetector mDeviceOrientationDetector = new DeviceOrientationDetector(); - private int mDeviceOrientation = 0; private ArrayList waterMarkInfos = null; //音效 private SoundEffectView mSoundEffectView; + private LivePushViewModel mLivePushViewModel; + public static LivePushFragment newInstance(AlivcLivePushConfig livePushConfig, String url, boolean async, boolean mAudio, boolean mVideoOnly, int cameraId, boolean isFlash, int mode, String authTime, String privacyKey, boolean mixExtern, boolean mixMain, boolean beautyOn, int fps, int previewOrientation, @@ -224,6 +213,8 @@ public void onCreate(Bundle savedInstanceState) { public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); + mLivePushViewModel = new ViewModelProvider(getActivity()).get(LivePushViewModel.class); + AlivcLivePusher pusher = mPushController.getLivePusher(); if (getArguments() != null) { mAlivcLivePushConfig = (AlivcLivePushConfig) getArguments().getSerializable(PUSH_CONFIG); @@ -252,25 +243,17 @@ public void onActivityCreated(Bundle savedInstanceState) { pusher.setLivePushBGMListener(mPushBGMListener); } - mDeviceOrientationDetector.initDeviceDetector(getContext(), orientation -> { - mDeviceOrientation = orientation; - }); - - // Only when device level matches, can use animoji feature. - boolean isDeviceSupportAnimoji = AnimojiEngine.isDeviceSupported(getContext()); - mAnimojiOn = SharedPreferenceUtils.isAnimojiOn(getContext()) && isDeviceSupportAnimoji; - initAnimojiEngine(getContext()); - mAnimojiButton.setVisibility(mAnimojiOn ? View.VISIBLE : View.GONE); + if (mAlivcLivePushConfig.isExternMainStream()) { + mLivePushViewModel.startPCM(pusher); + mLivePushViewModel.startYUV(pusher); + } - if (pusher != null && (mBeautyOn || mAnimojiOn)) { + if (pusher != null && (mBeautyOn)) { pusher.setCustomFilter(new AlivcLivePushCustomFilter() { @Override public void customFilterCreate(long var1) { Log.d(TAG, "customFilterCreate start-" + var1); - initBeautyManager(var1); - initAnimojiEngine(getContext()); - Log.d(TAG, "customFilterCreate end"); } @@ -285,27 +268,6 @@ public int customFilterProcess(int inputTexture, int textureWidth, int textureHe ret = mBeautyManager.onTextureInput(inputTexture, textureWidth, textureHeight, textureMatrix, isOES); } else { ret = mBeautyManager.onTextureInput(inputTexture, textureWidth, textureHeight, textureMatrix, false); - - // todo keria, 互动模式下,不处理animoji相关... - // should do in texture thread!!! - if (null != mAnimojiEngine) { - if (mDeviceOrientation % 180 == 0) { - mAnimojiEngine.setParams(180 - mDeviceOrientation, 180 - mDeviceOrientation, Flip.NONE); - } else { - mAnimojiEngine.setParams(mDeviceOrientation, mDeviceOrientation, Flip.NONE); - } - mAnimojiEngine.process(textureWidth, textureHeight, ret, 0); - } - - // should do in texture thread!!! - if (null != mAnimojiEngine) { - if (mDeviceOrientation % 180 == 0) { - mAnimojiEngine.setParams(180 - mDeviceOrientation, 180 - mDeviceOrientation, Flip.NONE); - } else { - mAnimojiEngine.setParams(mDeviceOrientation, mDeviceOrientation, Flip.NONE); - } - mAnimojiEngine.process(textureWidth, textureHeight, ret, 0); - } } return ret; @@ -314,9 +276,6 @@ public int customFilterProcess(int inputTexture, int textureWidth, int textureHe @Override public void customFilterDestroy() { destroyBeautyManager(); - if (mAnimojiButton.getVisibility() == View.VISIBLE) { - destroyAnimojiEngine(); - } Log.d(TAG, "customFilterDestroy---> thread_id: " + Thread.currentThread().getId()); } }); @@ -335,8 +294,6 @@ public void onViewCreated(View view, Bundle savedInstanceState) { mBeautyBeautyContainerView = view.findViewById(R.id.beauty_beauty_menuPanel); mBeautyBeautyContainerView.onHideMenu(); mSoundEffectView = view.findViewById(R.id.sound_effect_view); - mAnimojiContainerView = view.findViewById(R.id.animoji_container_view); - mAnimojiContainerView.initData(getAnimojiItemBeans(getContext())); mSoundEffectView.setOnSoundEffectChangedListener(new OnSoundEffectChangedListener() { @Override @@ -357,26 +314,6 @@ public void onSoundEffectRevertBSelected(int position) { } } }); - mAnimojiContainerView.setCallback(new AnimojiContainerView.AnimojiContainerViewCallback() { - @Override - public void onItemClicked(@Nullable AnimojiItemBean bean) { - if (null != bean && null != mAnimojiEngine) { - mAnimojiEngine.setMaterialPath(bean.getPath()); - } - } - - @Override - public void onTabPutAway() { - changeAnimojiContainerVisibility(); - } - - @Override - public void onTabReset() { - if (null != mAnimojiEngine) { - mAnimojiEngine.setMaterialPath(null); - } - } - }); mDataButton = (TextView) view.findViewById(R.id.data); mDataView = (DataView) view.findViewById(R.id.ll_data); mDataView.setVisibility(View.GONE); @@ -400,8 +337,6 @@ public void onTabReset() { mBeautyButton = view.findViewById(R.id.beauty_button); mBeautyButton.setSelected(SharedPreferenceUtils.isBeautyOn(getActivity().getApplicationContext())); mSoundEffectButton = view.findViewById(R.id.sound_effect_button); - mAnimojiButton = view.findViewById(R.id.animoji_button); - mAnimojiButton.setSelected(SharedPreferenceUtils.isAnimojiOn(getActivity().getApplicationContext())); mRestartButton = (TextView) view.findViewById(R.id.restart_button); mTotalLivePushStatsInfoTV = ((TextView) mDataView.findViewById(R.id.tv_data)); mExit.setOnClickListener(onClickListener); @@ -415,7 +350,6 @@ public void onTabReset() { mPushButton.setOnClickListener(onClickListener); mOperaButton.setOnClickListener(onClickListener); mBeautyButton.setOnClickListener(onClickListener); - mAnimojiButton.setOnClickListener(onClickListener); mRestartButton.setOnClickListener(onClickListener); mMore.setOnClickListener(onClickListener); mDataButton.setOnClickListener(onClickListener); @@ -428,14 +362,12 @@ public void onTabReset() { } if (mMixMain) { mBeautyButton.setVisibility(View.GONE); - mAnimojiButton.setVisibility(View.GONE); mMusic.setVisibility(View.GONE); mFlash.setVisibility(View.GONE); mCamera.setVisibility(View.GONE); } mMore.setVisibility(mAudio ? View.GONE : View.VISIBLE); mBeautyButton.setVisibility(mAudio ? View.GONE : View.VISIBLE); - mAnimojiButton.setVisibility(isSupportAnimoji(getContext()) ? View.VISIBLE : View.GONE); mFlash.setVisibility(mAudio ? View.GONE : View.VISIBLE); mCamera.setVisibility(mAudio ? View.GONE : View.VISIBLE); mFlash.setClickable(mCameraId != CAMERA_TYPE_FRONT.getCameraId()); @@ -608,7 +540,7 @@ public void run() { } else { SurfaceView previewView = mPushController.getPreviewView(); if (mAsync) { - pusher.startPreviewAysnc(previewView); + pusher.startPreviewAsync(previewView); } else { pusher.startPreview(previewView); } @@ -625,7 +557,7 @@ public void run() { final boolean isPush = mPushButton.isSelected(); if (!isPush) { if (mAsync) { - pusher.startPushAysnc(mPushUrl); + pusher.startPushAsync(mPushUrl); } else { pusher.startPush(mPushUrl); } @@ -668,25 +600,12 @@ public void run() { stateListener.updatePause(!isPause); } updateOperaButtonState(isPause); - } else if (id == R.id.animoji_button) { - mAnimojiButton.post(() -> { - if (mBeautyBeautyContainerView.getVisibility() == View.VISIBLE) { - changeBeautyContainerVisibility(); - } - if (mSoundEffectView.getVisibility() == View.VISIBLE) { - changeSoundEffectVisibility(); - } - changeAnimojiContainerVisibility(); - }); } else if (id == R.id.sound_effect_button) { if (!mAlivcLivePushConfig.isVideoOnly()) { mSoundEffectView.post(() -> { if (mBeautyBeautyContainerView.getVisibility() == View.VISIBLE) { changeBeautyContainerVisibility(); } - if (mAnimojiContainerView.getVisibility() == View.VISIBLE) { - changeAnimojiContainerVisibility(); - } changeSoundEffectVisibility(); }); } @@ -697,9 +616,6 @@ public void run() { } if (!mAlivcLivePushConfig.isAudioOnly()) { mBeautyButton.post(() -> { - if (mAnimojiContainerView.getVisibility() == View.VISIBLE) { - changeAnimojiContainerVisibility(); - } if (mSoundEffectView.getVisibility() == View.VISIBLE) { changeSoundEffectVisibility(); } @@ -710,7 +626,7 @@ public void run() { if (mAsync) { if (!mIsStartAsnycPushing) { mIsStartAsnycPushing = true; - pusher.restartPushAync(); + pusher.restartPushAsync(); } } else { pusher.restartPush(); @@ -862,7 +778,7 @@ public void onPreviewStarted(AlivcLivePusher pusher) { } @Override - public void onPreviewStoped(AlivcLivePusher pusher) { + public void onPreviewStopped(AlivcLivePusher pusher) { if (isAdded()) { showToast(getSafeString(R.string.stop_preview)); } @@ -878,12 +794,12 @@ public void onPushStarted(AlivcLivePusher pusher) { } @Override - public void onFirstAVFramePushed(AlivcLivePusher pusher) { - Log.d(TAG, "onFirstAVFramePushed: "); + public void onFirstFramePushed(AlivcLivePusher pusher) { + Log.d(TAG, "onFirstFramePushed: "); } @Override - public void onPushPauesed(AlivcLivePusher pusher) { + public void onPushPaused(AlivcLivePusher pusher) { showToast(getSafeString(R.string.pause_push)); } @@ -893,7 +809,7 @@ public void onPushResumed(AlivcLivePusher pusher) { } @Override - public void onPushStoped(AlivcLivePusher pusher) { + public void onPushStopped(AlivcLivePusher pusher) { showToast(getSafeString(R.string.stop_push)); } @@ -919,13 +835,13 @@ public void onDropFrame(AlivcLivePusher pusher, int countBef, int countAft) { } @Override - public void onAdjustBitRate(AlivcLivePusher pusher, int curBr, int targetBr) { - Log.i(TAG, "onAdjustBitRate: "); + public void onAdjustBitrate(AlivcLivePusher pusher, int currentBitrate, int targetBitrate) { + Log.i(TAG, "onAdjustBitrate: " + currentBitrate + "->" + targetBitrate); } @Override - public void onAdjustFps(AlivcLivePusher pusher, int curFps, int targetFps) { - Log.d(TAG, "onAdjustFps: "); + public void onAdjustFps(AlivcLivePusher pusher, int currentFps, int targetFps) { + Log.d(TAG, "onAdjustFps: " + currentFps + "->" + targetFps); } @Override @@ -1091,7 +1007,6 @@ public void onDestroy() { if (mExecutorService != null && !mExecutorService.isShutdown()) { mExecutorService.shutdown(); } - destroyAnimojiEngine(); destroyBeautyManager(); } @@ -1374,17 +1289,6 @@ private void changeBeautyContainerVisibility() { } } - - private void changeAnimojiContainerVisibility() { - if (mAnimojiContainerView.getVisibility() == View.VISIBLE) { - mAnimojiContainerView.setVisibilityWithAnimation(false); - mActionBar.setVisibility(View.VISIBLE); - } else { - mAnimojiContainerView.setVisibilityWithAnimation(true); - mActionBar.setVisibility(View.INVISIBLE); - } - } - private void changeSoundEffectVisibility() { if (mSoundEffectView.getVisibility() == View.VISIBLE) { mActionBar.setVisibility(View.VISIBLE); @@ -1395,49 +1299,6 @@ private void changeSoundEffectVisibility() { } } - // should do in texture thread!!! - private void initAnimojiEngine(@NonNull Context context) { - if (!mAnimojiOn) { - return; - } - if (null == mAnimojiEngine) { - mAnimojiEngine = new AnimojiEngine(); - int result = mAnimojiEngine.initEngine(context); - if (AnimojiError.ANIMOJI_NO_ERROR == result) { - mAnimojiEngine.setWebTrackEnable(true); - mAnimojiEngine.setCallback((code, msg) -> { - Log.e(TAG, "animoji error: " + code + ", " + msg); - }); - } else { - Log.e(TAG, "init animoji error! " + result); - destroyAnimojiEngine(); - } - } - } - - // should do in texture thread!!! - private void destroyAnimojiEngine() { - if (null != mAnimojiEngine) { - mAnimojiEngine.destroy(); - mAnimojiEngine = null; - } - } - - // only high-performance android device supports animoji feature. - private boolean isSupportAnimoji(@NonNull Context context) { - boolean isDeviceSupportAnimoji = AnimojiEngine.isDeviceSupported(context); - return !mAudio && mPreviewOrientation == AlivcPreviewOrientationEnum.ORIENTATION_PORTRAIT.getOrientation() && isDeviceSupportAnimoji; - } - - private ArrayList getAnimojiItemBeans(@NonNull Context context) { - ArrayList itemBeans = new ArrayList<>(); - String alibear = AnimojiDataFactory.INSTANCE.getResourcePath(context, AnimojiDataFactory.ALIBEAR_BUNDLE_FILE); - itemBeans.add(new AnimojiItemBean(com.alivc.live.queenbeauty.R.drawable.icon_animoji_alibear, "熊猫", alibear)); -// String ding3duo = AnimojiDataFactory.INSTANCE.getResourcePath(context, AnimojiDataFactory.DING3DUO_BUNDLE_FILE); -// itemBeans.add(new AnimojiItemBean(com.alivc.live.queenbeauty.R.drawable.icon_animoji_ding3duo, "钉三多", ding3duo)); - return itemBeans; - } - public void updateOperaButtonState(boolean bool){ mOperaButton.post(() -> { mOperaButton.setText(bool ? getSafeString(R.string.pause_button) : getSafeString(R.string.resume_button)); diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/LivePushViewModel.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/LivePushViewModel.java new file mode 100644 index 00000000..bfaa37fc --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/LivePushViewModel.java @@ -0,0 +1,62 @@ +package com.alivc.live.baselive_push.ui; + +import android.app.Application; +import android.content.Context; +import android.view.SurfaceView; + +import androidx.annotation.NonNull; +import androidx.lifecycle.AndroidViewModel; + +import com.alivc.live.commonbiz.ReadFileData; +import com.alivc.live.commonbiz.ResourcesDownload; +import com.alivc.live.pusher.AlivcLivePusher; + +import java.io.File; + +public class LivePushViewModel extends AndroidViewModel { + + private final Context mApplicationContext; + private final ReadFileData mReadFileData; + + public LivePushViewModel(@NonNull Application application) { + super(application); + mApplicationContext = application; + mReadFileData = new ReadFileData(); + } + + private void startYUV(final Context context, AlivcLivePusher mAlivcLivePusher) { + File f = ResourcesDownload.localCaptureYUVFilePath(context); + mReadFileData.readYUVData(f, (buffer, pts) -> mAlivcLivePusher.inputStreamVideoData(buffer, 720, 1280, 720, 1280 * 720 * 3 / 2, pts, 0)); + } + + public void stopYUV() { + mReadFileData.stopYUV(); + } + + public void stopPcm() { + mReadFileData.stopPcm(); + } + + private void startPCM(final Context context, AlivcLivePusher mAlivcLivePusher) { + File f = new File(context.getFilesDir().getPath() + File.separator + "alivc_resource/441.pcm"); + mReadFileData.readPCMData(f, (buffer, length, pts) -> mAlivcLivePusher.inputStreamAudioData(buffer, length, 44100, 1, pts)); + } + + public void onSurfaceCreated(boolean mAsync, SurfaceView mPreviewView, AlivcLivePusher mAlivcLivePusher) { + if (mAlivcLivePusher != null) { + if (mAsync) { + mAlivcLivePusher.startPreviewAsync(mPreviewView); + } else { + mAlivcLivePusher.startPreview(mPreviewView); + } + } + } + + public void startYUV(AlivcLivePusher mAlivcLivePusher) { + startYUV(mApplicationContext, mAlivcLivePusher); + } + + public void startPCM(AlivcLivePusher mAlivcLivePusher) { + startPCM(mApplicationContext, mAlivcLivePusher); + } +} diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushConfigActivity.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/PushConfigActivity.java similarity index 97% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushConfigActivity.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/PushConfigActivity.java index 32138fdc..7f8d4f53 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushConfigActivity.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/PushConfigActivity.java @@ -1,5 +1,5 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_push.ui; import static com.alivc.live.pusher.AlivcAudioChannelEnum.AUDIO_CHANNEL_ONE; import static com.alivc.live.pusher.AlivcAudioChannelEnum.AUDIO_CHANNEL_TWO; @@ -58,9 +58,17 @@ import androidx.core.content.ContextCompat; import com.acker.simplezxing.activity.CaptureActivity; +import com.alivc.live.baselive_common.PushConfigBottomSheet; +import com.alivc.live.baselive_common.PushConfigDialogImpl; +import com.alivc.live.baselive_push.Common; +import com.alivc.live.baselive_push.R; +import com.alivc.live.baselive_push.test.InformationActivity; +import com.alivc.live.baselive_push.ui.widget.PushWaterMarkDialog; import com.alivc.live.annotations.AlivcLiveMode; +import com.alivc.live.commonbiz.ResourcesDownload; import com.alivc.live.commonbiz.SharedPreferenceUtils; import com.alivc.live.commonbiz.listener.OnDownloadListener; +import com.alivc.live.commonbiz.test.PushDemoTestConstants; import com.alivc.live.pusher.AlivcAudioAACProfileEnum; import com.alivc.live.pusher.AlivcAudioChannelEnum; import com.alivc.live.pusher.AlivcAudioSampleRateEnum; @@ -78,15 +86,11 @@ import com.alivc.live.pusher.AlivcResolutionEnum; import com.alivc.live.pusher.AlivcSoundFormat; import com.alivc.live.pusher.WaterMarkInfo; -import com.alivc.live.pusher.demo.download.ResourcesDownload; -import com.alivc.live.pusher.demo.test.InformationActivity; -import com.alivc.live.pusher.demo.test.PushDemoTestConstants; -import com.alivc.live.pusher.widget.PushConfigBottomSheet; import com.alivc.live.commonutils.FastClickUtil; +import com.alivc.live.commonutils.LogcatHelper; import com.aliyun.aio.avbaseui.widget.AVLoadingDialog; import com.aliyun.aio.avbaseui.widget.AVToast; import com.aliyun.aio.avtheme.AVBaseThemeActivity; -import com.aliyun.animoji.AnimojiEngine; import com.aliyunsdk.queen.menu.download.BeautyMenuMaterial; import com.aliyunsdk.queen.menu.download.OnDownloadUICallback; @@ -95,6 +99,8 @@ public class PushConfigActivity extends AVBaseThemeActivity { + private RelativeLayout mInteractionRelativeLayout; + @Override protected int specifiedThemeMode() { return AppCompatDelegate.MODE_NIGHT_YES; @@ -160,11 +166,8 @@ protected int specifiedThemeMode() { private Switch mHardCode; private Switch mAudioHardCode; private Switch mCamera; - // private Switch mAudioOnly; -// private Switch mVideoOnly; private Switch mAutoFocus; private Switch mBeautyOn; - private Switch mAnimojiOn; private Switch mAsync; private Switch mFlash; private Switch mLog; @@ -323,13 +326,6 @@ private void initView() { // mVideoOnly = (Switch) findViewById(R.id.video_only_switch); mAutoFocus = (Switch) findViewById(R.id.autofocus_switch); mBeautyOn = (Switch) findViewById(R.id.beautyOn_switch); - // Only when device level matches, can use animoji feature. - mAnimojiOn = (Switch) findViewById(R.id.animoji_switch); - boolean isDeviceSupportAnimoji = AnimojiEngine.isDeviceSupported(getApplicationContext()); - mAnimojiOn.setVisibility(isDeviceSupportAnimoji ? View.VISIBLE : View.GONE); - if (!isDeviceSupportAnimoji) { - SharedPreferenceUtils.setAnimojiOn(getApplicationContext(), false); - } mAsync = (Switch) findViewById(R.id.async_switch); mAdvanceConfig = (Switch) findViewById(R.id.advance_config); mLog = (Switch) findViewById(R.id.log_switch); @@ -368,9 +364,9 @@ private void initView() { // mVideoEncoder.check(R.id.h264_encoder); // mBFrames.check(R.id.b_frame_no); mInteractionControlSwitch = findViewById(R.id.interaction_control); - RelativeLayout interactionRelativeLayout = findViewById(R.id.rl_interaction); + mInteractionRelativeLayout = findViewById(R.id.rl_interaction); - interactionRelativeLayout.setVisibility(AlivcLiveBase.isSupportLiveMode(AlivcLiveMode.AlivcLiveInteractiveMode) ? View.VISIBLE : View.GONE); + mInteractionRelativeLayout.setVisibility(AlivcLiveBase.isSupportLiveMode(AlivcLiveMode.AlivcLiveInteractiveMode) ? View.VISIBLE : View.GONE); String initUrl = PushDemoTestConstants.getTestPushUrl(); if (!initUrl.isEmpty()) { @@ -391,7 +387,6 @@ private void setClick() { mCamera.setOnCheckedChangeListener(onCheckedChangeListener); mAutoFocus.setOnCheckedChangeListener(onCheckedChangeListener); mBeautyOn.setOnCheckedChangeListener(onCheckedChangeListener); - mAnimojiOn.setOnCheckedChangeListener(onCheckedChangeListener); mAdvanceConfig.setOnCheckedChangeListener(onCheckedChangeListener); mResolution.setOnSeekBarChangeListener(onSeekBarChangeListener); mAudioRate.setOnSeekBarChangeListener(onSeekBarChangeListener); @@ -475,11 +470,13 @@ public void run() { mTabArgsView.setVisibility(View.VISIBLE); mTabActionView.setVisibility(View.INVISIBLE); mTabArgsContentLayout.setVisibility(View.VISIBLE); + mInteractionRelativeLayout.setVisibility(AlivcLiveBase.isSupportLiveMode(AlivcLiveMode.AlivcLiveInteractiveMode) ? View.VISIBLE : View.GONE); mTabActionContentLayout.setVisibility(View.GONE); } else if (id == R.id.tab_action_layout) { mTabActionView.setVisibility(View.VISIBLE); mTabArgsView.setVisibility(View.INVISIBLE); mTabArgsContentLayout.setVisibility(View.GONE); + mInteractionRelativeLayout.setVisibility(View.GONE); mTabActionContentLayout.setVisibility(View.VISIBLE); } else if (id == R.id.quality_modes) { mPushConfigDialog.showConfigDialog(mQualityMode, mQualityListener, 0); @@ -557,8 +554,6 @@ public void confirm(String data, int index) { mAlivcLivePushConfig.setNetworkPoorPushImage(getFilesDir().getPath() + File.separator + "alivc_resource/poor_network.png"); } } - updateAnimojiButtonState(getApplicationContext()); - } }; private final PushConfigBottomSheet.OnPushConfigSelectorListener mFrameNumListener = new PushConfigBottomSheet.OnPushConfigSelectorListener() { @@ -806,9 +801,6 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { } } else if (id == R.id.beautyOn_switch) { SharedPreferenceUtils.setBeautyOn(getApplicationContext(), isChecked); - updateAnimojiButtonState(getApplicationContext()); - } else if (id == R.id.animoji_switch) { - SharedPreferenceUtils.setAnimojiOn(getApplicationContext(), isChecked); } else if (id == R.id.async_switch) { mAsyncValue = isChecked; } else if (id == R.id.log_switch) { @@ -1188,8 +1180,6 @@ protected void onResume() { mPreviewMirror.setChecked(SharedPreferenceUtils.isPreviewMirror(getApplicationContext(), DEFAULT_VALUE_PREVIEW_MIRROR)); mAutoFocus.setChecked(SharedPreferenceUtils.isAutoFocus(getApplicationContext(), DEFAULT_VALUE_AUTO_FOCUS)); mBeautyOn.setChecked(SharedPreferenceUtils.isBeautyOn(getApplicationContext())); - mAnimojiOn.setChecked(SharedPreferenceUtils.isAnimojiOn(getApplicationContext())); - updateAnimojiButtonState(getApplicationContext()); } private void startCaptureActivityForResult() { @@ -1350,30 +1340,6 @@ protected void onDestroy() { mPushConfigDialog.destroy(); } - private void updateAnimojiButtonState(@NonNull Context context) { - if (mAnimojiOn.getVisibility() != View.VISIBLE) { - return; - } - boolean isSupport = isSupportAnimoji(context); - mAnimojiOn.setClickable(isSupport); - // If animoji switch is disabled, we need to set is as unchecked - if (!mAnimojiOn.isClickable() && mAnimojiOn.isChecked()) { - mAnimojiOn.setChecked(false); - SharedPreferenceUtils.setAnimojiOn(getApplicationContext(), false); - } - } - - // only high-performance android device supports animoji feature. - private boolean isSupportAnimoji(@NonNull Context context) { - boolean isDeviceSupportAnimoji = AnimojiEngine.isDeviceSupported(context); - // Animoji can only be used when the following conditions are true: - // 1.Not audio push, we can get the preview; - // 2.The display orientation is not left or right; - // 3.Beauty switch is off; - // 4.The device hardware level matches; - return !mAudioOnlyPush && mOrientationEnum == AlivcPreviewOrientationEnum.ORIENTATION_PORTRAIT && !mBeautyOn.isChecked() && isDeviceSupportAnimoji; - } - private void checkModelAndRun(final Runnable runnable) { BeautyMenuMaterial.getInstance().checkModelReady(this, new OnDownloadUICallback() { @Override diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/fragment/SoundEffectFragment.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/SoundEffectFragment.java similarity index 91% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/fragment/SoundEffectFragment.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/SoundEffectFragment.java index 6bf3931d..ff3b8702 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/fragment/SoundEffectFragment.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/SoundEffectFragment.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo.fragment; +package com.alivc.live.baselive_push.ui; import android.os.Bundle; import android.view.LayoutInflater; @@ -11,9 +11,9 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import com.alivc.live.pusher.demo.R; -import com.alivc.live.pusher.demo.adapter.SoundEffectRecyclerViewAdapter; -import com.alivc.live.pusher.demo.bean.SoundEffectBean; +import com.alivc.live.baselive_push.R; +import com.alivc.live.baselive_push.adapter.SoundEffectRecyclerViewAdapter; +import com.alivc.live.baselive_push.bean.SoundEffectBean; import java.util.HashMap; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/DataView.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/DataView.java similarity index 90% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/DataView.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/DataView.java index d42ae62a..e9eb56fb 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/DataView.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/DataView.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_push.ui.widget; import android.content.Context; import android.util.AttributeSet; @@ -7,7 +7,7 @@ import androidx.annotation.Nullable; -import com.alivc.live.pusher.demo.R; +import com.alivc.live.baselive_push.R; public class DataView extends LinearLayout { public DataView(Context context) { diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PushMoreConfigBottomSheet.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/PushMoreConfigBottomSheet.java similarity index 98% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PushMoreConfigBottomSheet.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/PushMoreConfigBottomSheet.java index a8f063e7..77a95d34 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PushMoreConfigBottomSheet.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/PushMoreConfigBottomSheet.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_push.ui.widget; import static com.alivc.live.pusher.AlivcLivePushConstants.DEFAULT_VALUE_PREVIEW_MIRROR; import static com.alivc.live.pusher.AlivcLivePushConstants.DEFAULT_VALUE_PUSH_MIRROR; @@ -12,11 +12,12 @@ import android.widget.Switch; import android.widget.TextView; +import com.alivc.live.baselive_push.Common; +import com.alivc.live.baselive_push.R; +import com.alivc.live.commonbiz.SharedPreferenceUtils; import com.alivc.live.pusher.AlivcPreviewDisplayMode; import com.alivc.live.pusher.AlivcQualityModeEnum; -import com.alivc.live.pusher.demo.Common; -import com.alivc.live.pusher.demo.R; -import com.alivc.live.commonbiz.SharedPreferenceUtils; +import com.alivc.live.commonutils.DensityUtil; import com.aliyun.aio.avbaseui.avdialog.AVBaseBottomSheetDialog; public class PushMoreConfigBottomSheet extends AVBaseBottomSheetDialog implements View.OnClickListener ,CompoundButton.OnCheckedChangeListener{ diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PushMusicBottomSheet.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/PushMusicBottomSheet.java similarity index 97% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PushMusicBottomSheet.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/PushMusicBottomSheet.java index 3d0d2daf..754e7743 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PushMusicBottomSheet.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/PushMusicBottomSheet.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_push.ui.widget; import android.content.Context; import android.view.View; @@ -13,10 +13,10 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; -import com.alivc.live.pusher.demo.Common; -import com.alivc.live.pusher.demo.MusicSelectAdapter; -import com.alivc.live.pusher.demo.R; -import com.alivc.live.pusher.demo.bean.MusicInfo; +import com.alivc.live.baselive_push.Common; +import com.alivc.live.baselive_push.R; +import com.alivc.live.baselive_push.adapter.MusicSelectAdapter; +import com.alivc.live.baselive_push.bean.MusicInfo; import com.aliyun.aio.avbaseui.avdialog.AVBaseBottomSheetDialog; public class PushMusicBottomSheet extends AVBaseBottomSheetDialog implements View.OnClickListener, CompoundButton.OnCheckedChangeListener, SeekBar.OnSeekBarChangeListener ,MusicSelectAdapter.OnItemClick{ diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushWaterMarkDialog.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/PushWaterMarkDialog.java similarity index 97% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushWaterMarkDialog.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/PushWaterMarkDialog.java index 719ffe19..23f78785 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushWaterMarkDialog.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/PushWaterMarkDialog.java @@ -1,11 +1,9 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_push.ui.widget; import android.content.DialogInterface; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; -import androidx.annotation.Nullable; -import androidx.fragment.app.DialogFragment; import android.util.DisplayMetrics; import android.view.Gravity; import android.view.LayoutInflater; @@ -16,6 +14,11 @@ import android.widget.EditText; import android.widget.Switch; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; + +import com.alivc.live.baselive_push.Common; +import com.alivc.live.baselive_push.R; import com.alivc.live.pusher.WaterMarkInfo; import java.util.ArrayList; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/SoundEffectView.java b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/SoundEffectView.java similarity index 91% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/SoundEffectView.java rename to AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/SoundEffectView.java index aad0966e..0d186e08 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/SoundEffectView.java +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/java/com/alivc/live/baselive_push/ui/widget/SoundEffectView.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_push.ui.widget; import android.content.Context; import android.os.Bundle; @@ -12,10 +12,10 @@ import androidx.fragment.app.FragmentActivity; import androidx.fragment.app.FragmentTransaction; -import com.alivc.live.pusher.demo.R; -import com.alivc.live.pusher.demo.adapter.OnSoundEffectChangedListener; -import com.alivc.live.pusher.demo.bean.SoundEffectBean; -import com.alivc.live.pusher.demo.fragment.SoundEffectFragment; +import com.alivc.live.baselive_push.R; +import com.alivc.live.baselive_push.adapter.OnSoundEffectChangedListener; +import com.alivc.live.baselive_push.bean.SoundEffectBean; +import com.alivc.live.baselive_push.ui.SoundEffectFragment; import com.google.android.material.tabs.TabLayout; /** @@ -52,7 +52,7 @@ private void init(Context context) { private void initFragment() { mSoundEffectChangeVoiceFragment = new SoundEffectFragment(); Bundle changeVoiceBundle = new Bundle(); - changeVoiceBundle.putSerializable("args",SoundEffectBean.SoundEffectChangeVoiceBean.getLivePushSoundEffectChangeVoice()); + changeVoiceBundle.putSerializable("args", SoundEffectBean.SoundEffectChangeVoiceBean.getLivePushSoundEffectChangeVoice()); mSoundEffectChangeVoiceFragment.setArguments(changeVoiceBundle); mSoundEffectReverbFragment = new SoundEffectFragment(); diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/back.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/back_icon.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/back.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/back_icon.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/beauty_on.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/beauty_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/beauty_on.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/beauty_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/camera_on.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/camera_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/camera_on.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/camera_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/flash_off.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/flash_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/flash_off.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/flash_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/flash_on.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/flash_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/flash_on.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/flash_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_babyboy.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_babyboy.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_babyboy.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_babyboy.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_babygirl.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_babygirl.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_babygirl.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_babygirl.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_daimo.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_daimo.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_daimo.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_daimo.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_echo.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_echo.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_echo.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_echo.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_ktv.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_ktv.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_ktv.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_ktv.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_off.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_off.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_oldman.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_oldman.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_oldman.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_oldman.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_robot.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_robot.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_robot.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/ic_live_push_sound_effect_robot.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/icon_check.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/icon_check.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/icon_check.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/icon_check.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/loop_off.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/loop_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/loop_off.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/loop_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/loop_on.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/loop_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/loop_on.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/loop_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/music.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/music.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/music.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/music.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/music_pause.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/music_pause.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/music_pause.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/music_pause.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/music_play.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/music_play.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/music_play.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/music_play.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/mute_off.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/mute_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/mute_off.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/mute_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/mute_on.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/mute_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/mute_on.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/mute_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/preview_off.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/preview_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/preview_off.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/preview_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/preview_on.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/preview_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/preview_on.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/preview_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/push_info_on.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/push_info_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/push_info_on.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/push_info_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/push_off.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/push_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/push_off.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/push_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/push_on.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/push_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/push_on.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/push_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/push_pause.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/push_pause.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/push_pause.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/push_pause.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/repush_off.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/repush_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/repush_off.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/repush_off.png diff --git a/AliLivePushDemo/interactive/interactive_common/src/main/res/drawable-xxhdpi/scan_icon.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/scan_icon.png similarity index 100% rename from AliLivePushDemo/interactive/interactive_common/src/main/res/drawable-xxhdpi/scan_icon.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/scan_icon.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/screenshot.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/screenshot.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/screenshot.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/screenshot.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/setting_more_on.png b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/setting_more_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/setting_more_on.png rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable-xxhdpi/setting_more_on.png diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/beauty_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/beauty_selector.xml new file mode 100644 index 00000000..4aa3f7a7 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/beauty_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/data_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/data_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/data_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/data_selector.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/icon_sound_effect_background.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/icon_sound_effect_background.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/icon_sound_effect_background.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/icon_sound_effect_background.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/left_shape_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/left_shape_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/left_shape_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/left_shape_selector.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/middle_shape_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/middle_shape_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/middle_shape_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/middle_shape_selector.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/more_setting_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/more_setting_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/more_setting_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/more_setting_selector.xml diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/music_loop_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/music_loop_selector.xml new file mode 100644 index 00000000..73f17713 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/music_loop_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/music_play_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/music_play_selector.xml new file mode 100644 index 00000000..a048fbee --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/music_play_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/music_volume_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/music_volume_selector.xml new file mode 100644 index 00000000..21826bed --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/music_volume_selector.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/preview_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/preview_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/preview_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/preview_selector.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/push_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/push_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/push_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/push_selector.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/repush_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/repush_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/repush_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/repush_selector.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/right_shape_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/right_shape_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/right_shape_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/right_shape_selector.xml diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/selector_camera_flash.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/selector_camera_flash.xml new file mode 100644 index 00000000..41514a38 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/selector_camera_flash.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_music_controll_bg.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/shape_music_controll_bg.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_music_controll_bg.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/shape_music_controll_bg.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_pysh_btn_bg.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/shape_pysh_btn_bg.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_pysh_btn_bg.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/shape_pysh_btn_bg.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rect_gray.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/shape_rect_gray.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shape_rect_gray.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/shape_rect_gray.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/stop_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/stop_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/stop_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/stop_selector.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/tools_tip_selector.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/tools_tip_selector.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/tools_tip_selector.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/drawable/tools_tip_selector.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_push.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/activity_push.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_push.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/activity_push.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/fragment_sound_effect.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/fragment_sound_effect.xml similarity index 79% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/fragment_sound_effect.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/fragment_sound_effect.xml index ebfa2848..3e0bda11 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/fragment_sound_effect.xml +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/fragment_sound_effect.xml @@ -1,8 +1,10 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + tools:ignore="MissingDefaultResource"> + android:layout_marginEnd="@dimen/alivc_common_20" + tools:ignore="MissingDefaultResource"> + android:background="@color/menu_bg_color" + tools:ignore="MissingDefaultResource"> diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_activity_information.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_activity_information.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_activity_information.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_activity_information.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_fragment.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_fragment.xml similarity index 88% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_fragment.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_fragment.xml index 1fc11919..fbbb25d2 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_fragment.xml +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_fragment.xml @@ -1,8 +1,8 @@ + android:layout_height="match_parent"> - - - - + app:tint="@color/text_black" /> + android:src="@drawable/music" /> + android:src="@drawable/camera_on" /> + android:src="@drawable/screenshot" /> - - - - - @@ -272,7 +272,7 @@ + android:src="@drawable/icon_check" /> @@ -358,7 +358,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" - android:src="@mipmap/icon_check" + android:src="@drawable/icon_check" android:visibility="gone" /> @@ -391,7 +391,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical|end" - android:src="@mipmap/icon_check" + android:src="@drawable/icon_check" android:visibility="gone" /> diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_music_sheet.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_music_sheet.xml similarity index 89% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_music_sheet.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_music_sheet.xml index b54d2fe3..ab1c1f2b 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_music_sheet.xml +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_music_sheet.xml @@ -1,9 +1,11 @@ + android:orientation="vertical" + tools:ignore="MissingDefaultResource"> @@ -120,6 +122,41 @@ + + + + + + + + + + + android:layout_height="match_parent" /> \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_setting.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_setting.xml similarity index 87% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_setting.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_setting.xml index 29d4240f..061b5d20 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_setting.xml +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_setting.xml @@ -1,12 +1,12 @@ - - - - + @@ -162,20 +158,14 @@ android:id="@+id/interaction_control" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_alignParentRight="true" - android:layout_marginRight="16dp" + android:layout_alignParentEnd="true" + android:layout_marginEnd="16dp" android:checked="false" android:textOff="" android:textOn="" android:thumb="@drawable/thumb" - android:track="@drawable/track" /> - - + android:track="@drawable/track" + tools:ignore="UseSwitchCompatOrMaterialXml" /> @@ -197,17 +187,17 @@ android:layout_width="match_parent" android:layout_height="48dp" android:layout_gravity="center" - android:layout_marginTop="20dp" - android:layout_marginBottom="42dp" android:layout_marginStart="20dp" + android:layout_marginTop="20dp" android:layout_marginEnd="20dp" - android:textStyle="normal" - android:textColor="@color/text_strong" - android:textSize="@dimen/font_size_36px" - android:text="@string/start_button" + android:layout_marginBottom="42dp" android:background="@drawable/shape_pysh_btn_bg" android:gravity="center" - android:orientation="horizontal" /> + android:orientation="horizontal" + android:text="@string/start_button" + android:textColor="@color/text_strong" + android:textSize="@dimen/font_size_36px" + android:textStyle="normal" /> diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_watermark.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_watermark.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_watermark.xml rename to AliLivePushDemo/LiveBasic/live_push/src/main/res/layout/push_watermark.xml diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/res/values-en/strings.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/values-en/strings.xml new file mode 100644 index 00000000..24ab4c9e --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/values-en/strings.xml @@ -0,0 +1,96 @@ + + + Stream Ingest Parameters + Stream Ingest Features + Interaction Mode + Start pushing + waiting for download external video resources + + OK + Success + Failed + + Pause + Error tips + pushing_wating + Ingesting... + + + Retouching is disabled. Enable retouching and then retry. + Add dynamic failed, id= + Start preview + Stop preview + Stop pushing + Pause + Resume + Restart successfully + + The network is unstable, please quit or try again + The network has recovered + Start reconnecting + Reconnection failed + Reconnection succeed + Sending data timeout + Send Message + BGM File open Failed + Reconnect + Resume + + Start preview + Waiting for Stream Ingest... + Background Music + Flash + Camera + Snapshot + Stop preview + Restart pushing + More setting + Data Metrics + Statistics on Local Videos + + Close Ears + Open Ears + Audio Denoise + Audio Intelligent Denoise + Accompaniment + Voice + Music Operations + Pause + Resume + Stop + Start + Close Loop + Open Loop + Close Mute + Open Mute + Music List + No Music + Internet music + + + 44.1KHz + 32KHz + 16KHz + + Off + Vocal1 + Vocal2 + BathRoom + SmallRoom(bright) + SmallRoom(Dark) + MediumRoom + LargeRoom + ChurchHall + + Sound Effect + Change Voice + Reverb + Off + Old_man + Baby_Boy + Baby_Girl + Robot + Daimo + KTV + Echo + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/res/values-zh-rCN/strings.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 00000000..8219a562 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,96 @@ + + + 推流参数 + 推流功能 + 互动模式 + 进入直播 + 正在下载外部音视频资源中,请等待 + + 确定 + 成功 + 失败 + 暂停 + 提示 + 推流连接中,请稍后 + 推流中 + 美颜开关关闭,请在设置开启后重试... + 添加贴纸失败, id= + 开始预览 + 停止预览 + 停止推流 + 暂停 + 恢复 + 重启成功 + 网络差,请退出或者重连 + 网络恢复 + 重连开始 + 重连失败 + 重连成功 + 发送数据超时 + 发送消息 + 音乐文件打开失败 + 重连 + 恢复 + + + + 开始预览 + 未推流 + 背景音乐 + 闪光灯 + 摄像头 + 截图 + 停止预览 + 重新推流 + 更多设置 + 数据指标 + 本地视频统计信息 + + + 关耳返 + 开耳返 + 音频降噪 + 音频智能降噪 + 伴奏音量 + 人声音量 + 音乐操作 + 暂停 + 恢复 + 停止 + 开始 + 关循环 + 开循环 + 关静音 + 开静音 + 音乐列表 + 无音乐 + 网络音乐 + + + + 44.1KHz + 32KHz + 16KHz + + + 人声I + 人声II + 澡堂 + 明亮小房间 + 黑暗小房间 + 中等房间 + 大房间 + 教堂走廊 + + 音效 + 变声 + 混响 + + 老人 + 男孩 + 女孩 + 机器人 + 大魔王 + KTV + 回声 + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_push/src/main/res/values/strings.xml b/AliLivePushDemo/LiveBasic/live_push/src/main/res/values/strings.xml new file mode 100644 index 00000000..24ab4c9e --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_push/src/main/res/values/strings.xml @@ -0,0 +1,96 @@ + + + Stream Ingest Parameters + Stream Ingest Features + Interaction Mode + Start pushing + waiting for download external video resources + + OK + Success + Failed + + Pause + Error tips + pushing_wating + Ingesting... + + + Retouching is disabled. Enable retouching and then retry. + Add dynamic failed, id= + Start preview + Stop preview + Stop pushing + Pause + Resume + Restart successfully + + The network is unstable, please quit or try again + The network has recovered + Start reconnecting + Reconnection failed + Reconnection succeed + Sending data timeout + Send Message + BGM File open Failed + Reconnect + Resume + + Start preview + Waiting for Stream Ingest... + Background Music + Flash + Camera + Snapshot + Stop preview + Restart pushing + More setting + Data Metrics + Statistics on Local Videos + + Close Ears + Open Ears + Audio Denoise + Audio Intelligent Denoise + Accompaniment + Voice + Music Operations + Pause + Resume + Stop + Start + Close Loop + Open Loop + Close Mute + Open Mute + Music List + No Music + Internet music + + + 44.1KHz + 32KHz + 16KHz + + Off + Vocal1 + Vocal2 + BathRoom + SmallRoom(bright) + SmallRoom(Dark) + MediumRoom + LargeRoom + ChurchHall + + Sound Effect + Change Voice + Reverb + Off + Old_man + Baby_Boy + Baby_Girl + Robot + Daimo + KTV + Echo + \ No newline at end of file diff --git a/AliLivePushDemo/imageutil/.gitignore b/AliLivePushDemo/LiveBasic/live_screencap/.gitignore similarity index 100% rename from AliLivePushDemo/imageutil/.gitignore rename to AliLivePushDemo/LiveBasic/live_screencap/.gitignore diff --git a/AliLivePushDemo/imageutil/build.gradle b/AliLivePushDemo/LiveBasic/live_screencap/build.gradle similarity index 82% rename from AliLivePushDemo/imageutil/build.gradle rename to AliLivePushDemo/LiveBasic/live_screencap/build.gradle index 20b98827..95a28f95 100644 --- a/AliLivePushDemo/imageutil/build.gradle +++ b/AliLivePushDemo/LiveBasic/live_screencap/build.gradle @@ -30,5 +30,9 @@ android { dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' - implementation 'com.google.android.material:material:1.3.0' + implementation 'com.google.android.material:material:1.1.0' + implementation project(':LiveCommon:live_basic_common') + + + implementation 'com.acker:simplezxing:1.5' } \ No newline at end of file diff --git a/AliLivePushDemo/commonutils/consumer-rules.pro b/AliLivePushDemo/LiveBasic/live_screencap/consumer-rules.pro similarity index 100% rename from AliLivePushDemo/commonutils/consumer-rules.pro rename to AliLivePushDemo/LiveBasic/live_screencap/consumer-rules.pro diff --git a/AliLivePushDemo/LiveBasic/live_screencap/src/main/AndroidManifest.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/AndroidManifest.xml new file mode 100644 index 00000000..27500d56 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordViewManager.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/VideoRecordViewManager.java similarity index 90% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordViewManager.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/VideoRecordViewManager.java index c4823da1..aa1a57b8 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordViewManager.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/VideoRecordViewManager.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_recording; import android.app.Activity; import android.content.Context; @@ -12,6 +12,8 @@ import android.view.WindowManager; import android.view.WindowManager.LayoutParams; +import com.alivc.live.baselive_recording.ui.widget.VideoRecordSmallView; +import com.alivc.live.baselive_recording.ui.widget.VideoRecordCameraPreviewView; import com.alivc.live.pusher.AlivcLivePusher; import com.aliyun.aio.utils.DensityUtil; @@ -36,14 +38,14 @@ public static void createViewoRecordWindow(Activity activity, Context context, A if (mVideoRecordWindowParams == null) { mVideoRecordWindowParams = new LayoutParams(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - mVideoRecordWindowParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; + mVideoRecordWindowParams.type = LayoutParams.TYPE_APPLICATION_OVERLAY; } else { - mVideoRecordWindowParams.type = WindowManager.LayoutParams.TYPE_PHONE; + mVideoRecordWindowParams.type = LayoutParams.TYPE_PHONE; } mVideoRecordWindowParams.format = PixelFormat.RGBA_8888; - mVideoRecordWindowParams.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | - WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | - WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED; + mVideoRecordWindowParams.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL | + LayoutParams.FLAG_NOT_FOCUSABLE | + LayoutParams.FLAG_HARDWARE_ACCELERATED; mVideoRecordWindowParams.gravity = Gravity.LEFT | Gravity.TOP; mVideoRecordWindowParams.width = LayoutParams.WRAP_CONTENT; mVideoRecordWindowParams.height = LayoutParams.WRAP_CONTENT; @@ -94,9 +96,9 @@ public static void createViewoRecordCameraWindow(Activity activity, Context cont if (mVideoRecordCameraWindowParams == null) { mVideoRecordCameraWindowParams = new LayoutParams(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - mVideoRecordCameraWindowParams.type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY; + mVideoRecordCameraWindowParams.type = LayoutParams.TYPE_APPLICATION_OVERLAY; } else { - mVideoRecordCameraWindowParams.type = WindowManager.LayoutParams.TYPE_PHONE; + mVideoRecordCameraWindowParams.type = LayoutParams.TYPE_PHONE; } mVideoRecordCameraWindowParams.format = PixelFormat.RGBA_8888; mVideoRecordCameraWindowParams.flags = LayoutParams.FLAG_NOT_TOUCH_MODAL diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/FloatWindowManager.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/FloatWindowManager.java similarity index 93% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/FloatWindowManager.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/FloatWindowManager.java index b3532bb2..d2bb8ebc 100755 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/FloatWindowManager.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/FloatWindowManager.java @@ -1,7 +1,7 @@ /* * Copyright (C) 2016 Facishare Technology Co., Ltd. All Rights Reserved. */ -package com.alivc.live.pusher.demo.floatwindowpermission; +package com.alivc.live.baselive_recording.floatwindowpermission; import android.content.Context; import android.content.DialogInterface; @@ -11,9 +11,14 @@ import android.provider.Settings; import android.util.Log; -import com.alivc.live.pusher.demo.R; -import com.alivc.live.pusher.demo.floatwindowpermission.rom.*; -import com.alivc.live.pusher.widget.CommonDialog; +import com.alivc.live.baselive_common.CommonDialog; +import com.alivc.live.baselive_recording.R; +import com.alivc.live.baselive_recording.floatwindowpermission.rom.MiuiUtils; +import com.alivc.live.baselive_recording.floatwindowpermission.rom.OppoUtils; +import com.alivc.live.baselive_recording.floatwindowpermission.rom.QikuUtils; +import com.alivc.live.baselive_recording.floatwindowpermission.rom.RomUtils; +import com.alivc.live.baselive_recording.floatwindowpermission.rom.HuaweiUtils; +import com.alivc.live.baselive_recording.floatwindowpermission.rom.MeizuUtils; import com.alivc.live.commonutils.TextFormatUtil; import java.lang.reflect.Field; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/HuaweiUtils.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/HuaweiUtils.java similarity index 96% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/HuaweiUtils.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/HuaweiUtils.java index 33f05c62..5c1d484f 100755 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/HuaweiUtils.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/HuaweiUtils.java @@ -1,7 +1,7 @@ /* * Copyright (C) 2016 Facishare Technology Co., Ltd. All Rights Reserved. */ -package com.alivc.live.pusher.demo.floatwindowpermission.rom; +package com.alivc.live.baselive_recording.floatwindowpermission.rom; import android.annotation.TargetApi; import android.app.AppOpsManager; @@ -9,14 +9,11 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; -import android.net.Uri; import android.os.Binder; import android.os.Build; -import android.provider.Settings; import android.util.Log; import android.widget.Toast; -import java.lang.reflect.Field; import java.lang.reflect.Method; public class HuaweiUtils { diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/MeizuUtils.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/MeizuUtils.java similarity index 94% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/MeizuUtils.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/MeizuUtils.java index d7530617..6327a2c3 100755 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/MeizuUtils.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/MeizuUtils.java @@ -1,7 +1,7 @@ /* * Copyright (C) 2016 Facishare Technology Co., Ltd. All Rights Reserved. */ -package com.alivc.live.pusher.demo.floatwindowpermission.rom; +package com.alivc.live.baselive_recording.floatwindowpermission.rom; import android.annotation.TargetApi; import android.app.AppOpsManager; import android.content.Context; @@ -10,7 +10,7 @@ import android.os.Build; import android.util.Log; -import com.alivc.live.pusher.demo.floatwindowpermission.FloatWindowManager; +import com.alivc.live.baselive_recording.floatwindowpermission.FloatWindowManager; import java.lang.reflect.Method; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/MiuiUtils.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/MiuiUtils.java similarity index 99% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/MiuiUtils.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/MiuiUtils.java index 206c3721..d5c07342 100755 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/MiuiUtils.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/MiuiUtils.java @@ -1,7 +1,7 @@ /* * Copyright (C) 2016 Facishare Technology Co., Ltd. All Rights Reserved. */ -package com.alivc.live.pusher.demo.floatwindowpermission.rom; +package com.alivc.live.baselive_recording.floatwindowpermission.rom; import android.annotation.TargetApi; import android.app.AppOpsManager; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/OppoUtils.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/OppoUtils.java similarity index 97% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/OppoUtils.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/OppoUtils.java index 260a5239..ff658c22 100755 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/OppoUtils.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/OppoUtils.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo.floatwindowpermission.rom; +package com.alivc.live.baselive_recording.floatwindowpermission.rom; import android.annotation.TargetApi; import android.app.AppOpsManager; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/QikuUtils.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/QikuUtils.java similarity index 97% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/QikuUtils.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/QikuUtils.java index 8b027b62..1cdbbf43 100755 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/QikuUtils.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/QikuUtils.java @@ -1,7 +1,7 @@ /* * Copyright (C) 2016 Facishare Technology Co., Ltd. All Rights Reserved. */ -package com.alivc.live.pusher.demo.floatwindowpermission.rom; +package com.alivc.live.baselive_recording.floatwindowpermission.rom; import android.annotation.TargetApi; import android.app.AppOpsManager; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/RomUtils.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/RomUtils.java similarity index 97% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/RomUtils.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/RomUtils.java index 165809bc..39fe38bf 100755 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/floatwindowpermission/rom/RomUtils.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/floatwindowpermission/rom/RomUtils.java @@ -1,7 +1,7 @@ /* * Copyright (C) 2016 Facishare Technology Co., Ltd. All Rights Reserved. */ -package com.alivc.live.pusher.demo.floatwindowpermission.rom; +package com.alivc.live.baselive_recording.floatwindowpermission.rom; import android.os.Build; import android.text.TextUtils; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/ForegroundService.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/service/ForegroundService.java similarity index 87% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/ForegroundService.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/service/ForegroundService.java index 68b645cf..0d2b0769 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/ForegroundService.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/service/ForegroundService.java @@ -1,4 +1,7 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_recording.service; + +import static android.app.Notification.FLAG_NO_CLEAR; +import static android.app.Notification.FLAG_ONGOING_EVENT; import android.app.Notification; import android.app.NotificationChannel; @@ -10,13 +13,18 @@ import android.graphics.BitmapFactory; import android.os.Build; import android.os.IBinder; -import android.util.Log; import androidx.annotation.Nullable; -import static android.app.Notification.FLAG_NO_CLEAR; -import static android.app.Notification.FLAG_ONGOING_EVENT; +import com.alivc.live.baselive_recording.R; +import com.alivc.live.baselive_recording.ui.VideoRecordConfigActivity; +/** + * 录屏后台service + * 请务必在AndroidManifest.xml里面进行注册,否则会因系统权限不足,导致推流黑屏 + * + * @author aliyun + */ public class ForegroundService extends Service { private static final int NOTIFICATION_FLAG = 0X11; @@ -32,14 +40,14 @@ public IBinder onBind(Intent intent) { @Override public int onStartCommand(Intent intent, int flags, int startId) { NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { NotificationChannel channel = new NotificationChannel(NOTIFICATION_ID, NOTIFICATION_NAME, NotificationManager.IMPORTANCE_HIGH); manager.createNotificationChannel(channel); } Intent nfIntent = new Intent(this, VideoRecordConfigActivity.class); PendingIntent pendingIntent; - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { pendingIntent = PendingIntent.getActivity(this, 0, nfIntent, PendingIntent.FLAG_IMMUTABLE); } else { pendingIntent = PendingIntent.getActivity(this, 0, nfIntent, PendingIntent.FLAG_UPDATE_CURRENT); diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordConfigActivity.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/ui/VideoRecordConfigActivity.java similarity index 96% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordConfigActivity.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/ui/VideoRecordConfigActivity.java index 631b50c7..843194a3 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordConfigActivity.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/ui/VideoRecordConfigActivity.java @@ -1,11 +1,10 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_recording.ui; import static com.alivc.live.pusher.AlivcPreviewOrientationEnum.ORIENTATION_LANDSCAPE_HOME_LEFT; import static com.alivc.live.pusher.AlivcPreviewOrientationEnum.ORIENTATION_LANDSCAPE_HOME_RIGHT; import static com.alivc.live.pusher.AlivcPreviewOrientationEnum.ORIENTATION_PORTRAIT; import android.Manifest; -import android.annotation.TargetApi; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Context; @@ -40,6 +39,12 @@ import androidx.core.content.ContextCompat; import com.acker.simplezxing.activity.CaptureActivity; +import com.alivc.live.baselive_common.PushConfigBottomSheet; +import com.alivc.live.baselive_common.PushConfigDialogImpl; +import com.alivc.live.baselive_recording.R; +import com.alivc.live.baselive_recording.floatwindowpermission.FloatWindowManager; +import com.alivc.live.baselive_recording.service.ForegroundService; +import com.alivc.live.commonbiz.test.PushDemoTestConstants; import com.alivc.live.pusher.AlivcLiveBase; import com.alivc.live.pusher.AlivcLivePushConfig; import com.alivc.live.pusher.AlivcLivePushError; @@ -50,12 +55,10 @@ import com.alivc.live.pusher.AlivcLivePusher; import com.alivc.live.pusher.AlivcPreviewOrientationEnum; import com.alivc.live.pusher.AlivcResolutionEnum; -import com.alivc.live.pusher.demo.floatwindowpermission.FloatWindowManager; -import com.alivc.live.pusher.demo.test.PushDemoTestConstants; -import com.alivc.live.pusher.widget.PushConfigBottomSheet; +import com.alivc.live.commonutils.StatusBarUtil; import com.aliyun.aio.avbaseui.widget.AVToast; import com.aliyun.aio.avtheme.AVBaseThemeActivity; -import com.alivc.live.commonutils.StatusBarUtil; +import com.alivc.live.baselive_recording.VideoRecordViewManager; import java.io.File; @@ -508,7 +511,6 @@ protected void onDestroy() { super.onDestroy(); } - @TargetApi(21) private void startScreenCapture() { if (Build.VERSION.SDK_INT >= 21) { MediaProjectionManager mediaProjectionManager = (MediaProjectionManager) @@ -522,7 +524,7 @@ private void startScreenCapture() { @Override public void run() { Toast.makeText(getApplicationContext() - , "Start ScreenRecording failed, current device is NOT suuported!", Toast.LENGTH_SHORT).show(); + , "Start ScreenRecording failed, current device is NOT supported!", Toast.LENGTH_SHORT).show(); } }); } @@ -583,8 +585,8 @@ public void onPreviewStarted(AlivcLivePusher pusher) { } @Override - public void onPreviewStoped(AlivcLivePusher pusher) { - Log.d(TAG, "onPreviewStoped: "); + public void onPreviewStopped(AlivcLivePusher pusher) { + Log.d(TAG, "onPreviewStopped: "); } @Override @@ -593,13 +595,8 @@ public void onPushStarted(AlivcLivePusher pusher) { } @Override - public void onFirstAVFramePushed(AlivcLivePusher pusher) { - Log.d(TAG, "onFirstAVFramePushed: "); - } - - @Override - public void onPushPauesed(AlivcLivePusher pusher) { - Log.d(TAG, "onPushPauesed: "); + public void onPushPaused(AlivcLivePusher pusher) { + Log.d(TAG, "onPushPaused: "); } @Override @@ -608,8 +605,8 @@ public void onPushResumed(AlivcLivePusher pusher) { } @Override - public void onPushStoped(AlivcLivePusher pusher) { - Log.d(TAG, "onPushStoped: "); + public void onPushStopped(AlivcLivePusher pusher) { + Log.d(TAG, "onPushStopped: "); } @Override @@ -617,6 +614,11 @@ public void onPushRestarted(AlivcLivePusher pusher) { Log.d(TAG, "onPushRestarted: "); } + @Override + public void onFirstFramePushed(AlivcLivePusher pusher) { + Log.d(TAG, "onFirstFramePushed: "); + } + @Override public void onFirstFramePreviewed(AlivcLivePusher pusher) { Log.d(TAG, "onFirstFramePreviewed: "); @@ -629,8 +631,8 @@ public void onDropFrame(AlivcLivePusher pusher, int countBef, int countAft) { } @Override - public void onAdjustBitRate(AlivcLivePusher pusher, int curBr, int targetBr) { - Log.i(TAG, "onAdjustBitRate: "); + public void onAdjustBitrate(AlivcLivePusher pusher, int currentBitrate, int targetBitrate) { + Log.i(TAG, "onAdjustBitrate: " + currentBitrate + "->" + targetBitrate); } @Override diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordCameraPreviewView.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/ui/widget/VideoRecordCameraPreviewView.java similarity index 95% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordCameraPreviewView.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/ui/widget/VideoRecordCameraPreviewView.java index fb2158c8..2db297b9 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordCameraPreviewView.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/ui/widget/VideoRecordCameraPreviewView.java @@ -1,8 +1,7 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_recording.ui.widget; import android.app.Activity; import android.content.Context; -import android.util.Log; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.Surface; @@ -12,14 +11,13 @@ import android.view.WindowManager; import android.widget.LinearLayout; -import com.alivc.live.pusher.*; +import com.alivc.live.baselive_recording.R; +import com.alivc.live.pusher.AlivcLivePushStats; +import com.alivc.live.pusher.AlivcLivePusher; import com.aliyun.aio.utils.DensityUtil; import java.lang.reflect.Field; -import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; -import static android.content.res.Configuration.ORIENTATION_PORTRAIT; - public class VideoRecordCameraPreviewView extends LinearLayout { public static int viewWidth; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordSmallView.java b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/ui/widget/VideoRecordSmallView.java similarity index 97% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordSmallView.java rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/ui/widget/VideoRecordSmallView.java index 5b7fb281..3ba5d895 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/VideoRecordSmallView.java +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/java/com/alivc/live/baselive_recording/ui/widget/VideoRecordSmallView.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_recording.ui.widget; import android.app.ActivityManager; import android.content.ComponentName; @@ -12,7 +12,10 @@ import android.widget.LinearLayout; import android.widget.TextView; +import com.alivc.live.baselive_recording.R; +import com.alivc.live.baselive_recording.ui.VideoRecordConfigActivity; import com.alivc.live.pusher.AlivcLivePusher; +import com.alivc.live.baselive_recording.VideoRecordViewManager; import java.lang.reflect.Field; import java.util.List; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_camera_off.png b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_camera_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_camera_off.png rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_camera_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_camera_on.png b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_camera_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_camera_on.png rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_camera_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_mic_off.png b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_mic_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_mic_off.png rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_mic_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_mic_on.png b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_mic_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_mic_on.png rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_mic_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_mix_off.png b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_mix_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_mix_off.png rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_mix_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_mix_on.png b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_mix_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_mix_on.png rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_mix_on.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_privacy_off.png b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_privacy_off.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_privacy_off.png rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_privacy_off.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_privacy_on.png b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_privacy_on.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_privacy_on.png rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable-xxxhdpi/ic_privacy_on.png diff --git a/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_camera.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_camera.xml new file mode 100644 index 00000000..4b9c287d --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_camera.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_mic.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_mic.xml new file mode 100644 index 00000000..86ae114d --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_mic.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_mix.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_mix.xml new file mode 100644 index 00000000..a258bf45 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_mix.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_privacy.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_privacy.xml new file mode 100644 index 00000000..3795edd7 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_drawable_privacy.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_text_color.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_text_color.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_text_color.xml rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/selector_push_text_color.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shap_oval_gray.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/shap_oval_gray.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/shap_oval_gray.xml rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/shap_oval_gray.xml diff --git a/AliLivePushDemo/interactive/interactive_common/src/main/res/drawable/shape_rect_blue.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/shape_rect_blue.xml similarity index 100% rename from AliLivePushDemo/interactive/interactive_common/src/main/res/drawable/shape_rect_blue.xml rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/drawable/shape_rect_blue.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_config_dialog.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/layout/push_config_dialog.xml similarity index 94% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_config_dialog.xml rename to AliLivePushDemo/LiveBasic/live_screencap/src/main/res/layout/push_config_dialog.xml index f532bbe7..f863228f 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_config_dialog.xml +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/layout/push_config_dialog.xml @@ -9,7 +9,7 @@ android:gravity="center" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toTopOf="parent" - android:text="@string/cancle" + android:text="@string/pull_cancel" android:textSize="15sp" android:textColor="@color/colourful_text_strong" android:layout_width="62dp" @@ -33,7 +33,7 @@ android:background="@color/border_medium" android:layout_height="1px"/> - + + You can start other applications and start live... + The screen function has stopped. + Narrowband HD + + The floating window permission is required. Obtain the floating window permission and try again. + Enable Later + Enable Now + + back + Privacy + Camera + + Mix + Mix Off + Mic + Mic Off + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/values-zh-rCN/strings.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 00000000..1db38469 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,20 @@ + + + 录制中 + 录屏功能已停止 + 窄带高清 + + 您的手机没有授予悬浮窗权限,请开启后再试 + 暂不开启 + 现在去开启 + + 返回 + 隐私模式 + 摄像头 + + + 混流 + 混流关 + 麦克风 + 麦克风关 + \ No newline at end of file diff --git a/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/values/strings.xml b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/values/strings.xml new file mode 100644 index 00000000..5df6b473 --- /dev/null +++ b/AliLivePushDemo/LiveBasic/live_screencap/src/main/res/values/strings.xml @@ -0,0 +1,19 @@ + + + You can start other applications and start live... + The screen function has stopped. + Narrowband HD + + The floating window permission is required. Obtain the floating window permission and try again. + Enable Later + Enable Now + + back + Privacy + Camera + + Mix + Mix Off + Mic + Mic Off + \ No newline at end of file diff --git a/AliLivePushDemo/interactive/interactive_common/.gitignore b/AliLivePushDemo/LiveBeauty/live_beauty/.gitignore similarity index 100% rename from AliLivePushDemo/interactive/interactive_common/.gitignore rename to AliLivePushDemo/LiveBeauty/live_beauty/.gitignore diff --git a/AliLivePushDemo/beauty/build.gradle b/AliLivePushDemo/LiveBeauty/live_beauty/build.gradle similarity index 100% rename from AliLivePushDemo/beauty/build.gradle rename to AliLivePushDemo/LiveBeauty/live_beauty/build.gradle diff --git a/AliLivePushDemo/imageutil/consumer-rules.pro b/AliLivePushDemo/LiveBeauty/live_beauty/consumer-rules.pro similarity index 100% rename from AliLivePushDemo/imageutil/consumer-rules.pro rename to AliLivePushDemo/LiveBeauty/live_beauty/consumer-rules.pro diff --git a/AliLivePushDemo/beauty/src/main/AndroidManifest.xml b/AliLivePushDemo/LiveBeauty/live_beauty/src/main/AndroidManifest.xml similarity index 100% rename from AliLivePushDemo/beauty/src/main/AndroidManifest.xml rename to AliLivePushDemo/LiveBeauty/live_beauty/src/main/AndroidManifest.xml diff --git a/AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/BeautyFactory.java b/AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/BeautyFactory.java similarity index 100% rename from AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/BeautyFactory.java rename to AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/BeautyFactory.java diff --git a/AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/BeautyInterface.java b/AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/BeautyInterface.java similarity index 100% rename from AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/BeautyInterface.java rename to AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/BeautyInterface.java diff --git a/AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/constant/BeautyConstant.java b/AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/constant/BeautyConstant.java similarity index 100% rename from AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/constant/BeautyConstant.java rename to AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/constant/BeautyConstant.java diff --git a/AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/constant/BeautyImageFormat.java b/AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/constant/BeautyImageFormat.java similarity index 100% rename from AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/constant/BeautyImageFormat.java rename to AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/constant/BeautyImageFormat.java diff --git a/AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/constant/BeautySDKType.java b/AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/constant/BeautySDKType.java similarity index 100% rename from AliLivePushDemo/beauty/src/main/java/com/alivc/live/beauty/constant/BeautySDKType.java rename to AliLivePushDemo/LiveBeauty/live_beauty/src/main/java/com/alivc/live/beauty/constant/BeautySDKType.java diff --git a/AliLivePushDemo/interactive/interactive_live/.gitignore b/AliLivePushDemo/LiveBeauty/live_queenbeauty/.gitignore similarity index 100% rename from AliLivePushDemo/interactive/interactive_live/.gitignore rename to AliLivePushDemo/LiveBeauty/live_queenbeauty/.gitignore diff --git a/AliLivePushDemo/queenbeauty/build.gradle b/AliLivePushDemo/LiveBeauty/live_queenbeauty/build.gradle similarity index 94% rename from AliLivePushDemo/queenbeauty/build.gradle rename to AliLivePushDemo/LiveBeauty/live_queenbeauty/build.gradle index 29b28ec6..b8606024 100644 --- a/AliLivePushDemo/queenbeauty/build.gradle +++ b/AliLivePushDemo/LiveBeauty/live_queenbeauty/build.gradle @@ -1,7 +1,7 @@ plugins { id 'com.android.library' } -apply from:'../sdk_type_config.gradle' + android { compileSdkVersion androidCompileSdkVersion buildToolsVersion androidBuildToolsVersion @@ -35,8 +35,8 @@ dependencies { //api 'com.aliyunsdk.components:queen_menu:1.0.5-SNAPSHOT' implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'com.google.android.material:material:1.3.0' + implementation project(':LiveBeauty:live_beauty') // list of aliyun sdk. - implementation project(':beauty') // 此处修改:根据自身项目需要,指定依赖的菜单组件sdk implementation (externalAliyunQueenUI) { diff --git a/AliLivePushDemo/interactive/interactive_common/consumer-rules.pro b/AliLivePushDemo/LiveBeauty/live_queenbeauty/consumer-rules.pro similarity index 100% rename from AliLivePushDemo/interactive/interactive_common/consumer-rules.pro rename to AliLivePushDemo/LiveBeauty/live_queenbeauty/consumer-rules.pro diff --git a/AliLivePushDemo/queenbeauty/src/main/AndroidManifest.xml b/AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/AndroidManifest.xml similarity index 100% rename from AliLivePushDemo/queenbeauty/src/main/AndroidManifest.xml rename to AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/AndroidManifest.xml diff --git a/AliLivePushDemo/queenbeauty/src/main/java/com/alivc/live/queenbeauty/InteractQueenBeautyImpl.java b/AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/java/com/alivc/live/queenbeauty/InteractQueenBeautyImpl.java similarity index 85% rename from AliLivePushDemo/queenbeauty/src/main/java/com/alivc/live/queenbeauty/InteractQueenBeautyImpl.java rename to AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/java/com/alivc/live/queenbeauty/InteractQueenBeautyImpl.java index d41be55f..bf18268e 100644 --- a/AliLivePushDemo/queenbeauty/src/main/java/com/alivc/live/queenbeauty/InteractQueenBeautyImpl.java +++ b/AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/java/com/alivc/live/queenbeauty/InteractQueenBeautyImpl.java @@ -1,11 +1,11 @@ package com.alivc.live.queenbeauty; +import static android.opengl.GLES20.GL_FRAMEBUFFER; + import android.content.Context; -//import android.graphics.Bitmap; import android.hardware.Camera; import android.hardware.SensorManager; import android.opengl.GLES20; -import android.opengl.GLES30; import android.os.SystemClock; import android.util.Log; import android.view.OrientationEventListener; @@ -25,29 +25,18 @@ import com.aliyunsdk.queen.param.QueenParamHolder; import java.nio.IntBuffer; -import java.util.LinkedList; -import java.util.List; - -import static android.opengl.GLES20.GL_FRAMEBUFFER; /** * 互动模式下,美颜实现相关类 */ @Keep public class InteractQueenBeautyImpl implements BeautyInterface { - private static final String TAG = InteractQueenBeautyImpl.class.getSimpleName(); + private static final String TAG = "InteractQueenBeautyImpl"; private final Context mContext; - private final Object mCmdLock = new Object(); - private final List mCmdList = new LinkedList<>(); - - private long glThreadId = -1; - private QueenEngine mMediaChainEngine; -// private Texture2D mInputTexture = null; -// private Texture2D mInputTextureOES = null; private Texture2D mOutTexture2D = null; private int lastTextureWidth = 0; private int lastTextureHeight = 0; @@ -70,32 +59,20 @@ public InteractQueenBeautyImpl(Context context) { private void resetQueenEngine() { Log.i(TAG, "resetQueenEngine"); - destoryQueenEngine(); + destroyQueenEngine(); initQueenEngine(mShareGlContext); } - private void destoryQueenEngine() { - if (null != mMediaChainEngine) { - if (mOutTexture2D != null) { - mOutTexture2D.release(); - mOutTexture2D = null; - } + private void destroyQueenEngine() { + if (mOutTexture2D != null) { + mOutTexture2D.release(); + mOutTexture2D = null; + } -// if (mInputTexture != null) { -// mInputTexture.release(); -// mInputTexture = null; -// } -// -// if (mInputTextureOES != null) { -// mInputTextureOES.release(); -// mInputTextureOES = null; -// } - - if (mMediaChainEngine != null) { - mMediaChainEngine.release(); - mMediaChainEngine = null; - } + if (mMediaChainEngine != null) { + mMediaChainEngine.release(); + mMediaChainEngine = null; } } @@ -140,7 +117,10 @@ public void release() { destroyOrientationListener(); - destoryQueenEngine(); + destroyQueenEngine(); + + // 重置美颜设置,美颜参数效果在内部以静态变量形式保存 + QueenParamHolder.relaseQueenParams(); isBeautyEnable = false; } @@ -196,27 +176,12 @@ public int onTextureInput(int inputTexture, int textureWidth, int textureHeight, } Log.i(TAG, "onTextureInput [inputTexture: " + inputTexture + ", isOES: " + isOES); - glThreadId = Thread.currentThread().getId(); if (mMediaChainEngine == null || !isBeautyEnable) { Log.e("QueenBeautyImpl", "mMediaChainEngine == null || !isBeautyEnable"); return inputTexture; } -// if (isOES) { -// if (null == mInputTextureOES) { -// mInputTextureOES = mMediaChainEngine.createTexture2D(); -// mInputTextureOES.init(inputTexture, textureHeight, textureWidth, isOES); -// } -// mInputTextureOES.saveToFile("/sdcard/Download/lzx_rtc/in_oes_" + System.currentTimeMillis() + "_" + inputTexture + ".jpg", Bitmap.CompressFormat.JPEG, 100); -// } else { -// if (null == mInputTexture) { -// mInputTexture = mMediaChainEngine.createTexture2D(); -// mInputTexture.init(inputTexture, textureWidth, textureHeight, isOES); -// } -// mInputTexture.saveToFile("/sdcard/Download/lzx_rtc/in_" + System.currentTimeMillis() + "_" + inputTexture + ".jpg", Bitmap.CompressFormat.JPEG, 100); -// } - int[] oldFboId = new int[1]; GLES20.glGetIntegerv(GLES20.GL_FRAMEBUFFER_BINDING, IntBuffer.wrap(oldFboId)); @@ -232,8 +197,6 @@ public int onTextureInput(int inputTexture, int textureWidth, int textureHeight, } lastTextureWidth = width; lastTextureHeight = height; -// Log.e("QueenBeautyImpl", "setScreenViewport [w: " + w + ", h: " + h + "]"); -// mMediaChainEngine.setScreenViewport(0, 0, w, h); } if (mOutTexture2D == null) { @@ -290,7 +253,6 @@ public int onTextureInput(int inputTexture, int textureWidth, int textureHeight, } GLES20.glBindFramebuffer(GL_FRAMEBUFFER, oldFboId[0]); -// mOutTexture2D.saveToFile("/sdcard/Download/lzx_rtc/out_"+System.currentTimeMillis()+"_"+mOutTexture2D.getTextureId()+".jpg", Bitmap.CompressFormat.JPEG, 100); return mOutTexture2D.getTextureId(); } @@ -491,18 +453,4 @@ private int getDisplayOrientation() { return displayOrientation; } - // 如果引擎未创建或者不是texture线程,先缓存设置 - private boolean isCurrentTextureThread(Object cmd) { - long currentThreadId = Thread.currentThread().getId(); - if (mMediaChainEngine != null && glThreadId == currentThreadId) { - return true; - } - - Log.w(TAG, "now not in texture thread " + glThreadId + ", " + currentThreadId); - synchronized (mCmdLock) { - mCmdList.add(cmd); - } - return false; - } - } \ No newline at end of file diff --git a/AliLivePushDemo/queenbeauty/src/main/java/com/alivc/live/queenbeauty/QueenBeautyImpl.java b/AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/java/com/alivc/live/queenbeauty/QueenBeautyImpl.java similarity index 100% rename from AliLivePushDemo/queenbeauty/src/main/java/com/alivc/live/queenbeauty/QueenBeautyImpl.java rename to AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/java/com/alivc/live/queenbeauty/QueenBeautyImpl.java diff --git a/AUIFoundation/AVTheme/src/main/res/.!65161!.DS_Store b/AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/res/drawable-xxhdpi/.!23021!icon_animoji_alibear.png similarity index 100% rename from AUIFoundation/AVTheme/src/main/res/.!65161!.DS_Store rename to AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/res/drawable-xxhdpi/.!23021!icon_animoji_alibear.png diff --git a/AliLivePushDemo/queenbeauty/src/main/res/drawable-xxhdpi/icon_animoji_alibear.png b/AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/res/drawable-xxhdpi/icon_animoji_alibear.png similarity index 100% rename from AliLivePushDemo/queenbeauty/src/main/res/drawable-xxhdpi/icon_animoji_alibear.png rename to AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/res/drawable-xxhdpi/icon_animoji_alibear.png diff --git a/AliLivePushDemo/queenbeauty/src/main/res/drawable-xxhdpi/icon_animoji_ding3duo.png b/AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/res/drawable-xxhdpi/icon_animoji_ding3duo.png similarity index 100% rename from AliLivePushDemo/queenbeauty/src/main/res/drawable-xxhdpi/icon_animoji_ding3duo.png rename to AliLivePushDemo/LiveBeauty/live_queenbeauty/src/main/res/drawable-xxhdpi/icon_animoji_ding3duo.png diff --git a/AliLivePushDemo/LiveCommon/live_basic_common/.gitignore b/AliLivePushDemo/LiveCommon/live_basic_common/.gitignore new file mode 100644 index 00000000..956c004d --- /dev/null +++ b/AliLivePushDemo/LiveCommon/live_basic_common/.gitignore @@ -0,0 +1,2 @@ +/build +/release \ No newline at end of file diff --git a/AliLivePushDemo/LiveCommon/live_basic_common/build.gradle b/AliLivePushDemo/LiveCommon/live_basic_common/build.gradle new file mode 100644 index 00000000..29c0dd5b --- /dev/null +++ b/AliLivePushDemo/LiveCommon/live_basic_common/build.gradle @@ -0,0 +1,50 @@ +plugins { + id 'com.android.library' +} + +android { + compileSdkVersion androidCompileSdkVersion + buildToolsVersion androidBuildToolsVersion + + defaultConfig { + minSdkVersion androidMinSdkVersion + targetSdkVersion androidTargetSdkVersion + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles "consumer-rules.pro" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.1.0' + + api project(':LiveCommon:live_commonutils') + api project(':LiveCommon:live_commonbiz') + + api project(':AUIFoundation:AVBaseUI') + api project(':AUIFoundation:AVTheme') + api project(':AUIFoundation:AVUtils') + + // 音频智能降噪组件库,如果需要使用pusher里面的音频智能降噪功能,需集成此依赖库,否则调用相关接口将会失效 + api 'com.alivc.live.component:intelligentdenoise:1.0.0' + + if (file(livePushSdkSourceCode).exists()) { + api project(':alivc-livepusher-lib') + } else { + api hasInteractiveLive() ? externalLivePusherInteractive : externalLivePusher + } +} \ No newline at end of file diff --git a/AliLivePushDemo/interactive/interactive_live/consumer-rules.pro b/AliLivePushDemo/LiveCommon/live_basic_common/consumer-rules.pro similarity index 100% rename from AliLivePushDemo/interactive/interactive_live/consumer-rules.pro rename to AliLivePushDemo/LiveCommon/live_basic_common/consumer-rules.pro diff --git a/AliLivePushDemo/beautyui/src/main/AndroidManifest.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/AndroidManifest.xml similarity index 72% rename from AliLivePushDemo/beautyui/src/main/AndroidManifest.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/AndroidManifest.xml index 86bced5c..7e7ec911 100644 --- a/AliLivePushDemo/beautyui/src/main/AndroidManifest.xml +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.alivc.live.baselive_common"> \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/CommonDialog.java b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/CommonDialog.java similarity index 97% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/CommonDialog.java rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/CommonDialog.java index 9cc30126..1c46596d 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/CommonDialog.java +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/CommonDialog.java @@ -1,13 +1,11 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_common; import android.app.Dialog; import android.content.Context; import android.os.Bundle; -import androidx.annotation.NonNull; import android.text.TextUtils; import android.text.TextUtils.TruncateAt; import android.view.View; -import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager.LayoutParams; import android.widget.FrameLayout; @@ -15,7 +13,9 @@ import android.widget.ScrollView; import android.widget.TextView; -import com.alivc.live.pusher.demo.R; +import androidx.annotation.NonNull; + +import com.alivc.live.commonutils.DensityUtil; import com.alivc.live.commonutils.TextFormatUtil; @@ -78,7 +78,7 @@ public void dismiss() { } private void initView() { - View tipDialogView = this.getLayoutInflater().inflate(R.layout.common_dialog, (ViewGroup)null); + View tipDialogView = this.getLayoutInflater().inflate(R.layout.common_dialog, null); this.titleText = (TextView)tipDialogView.findViewById(R.id.dialog_title); this.contentLayout = (LinearLayout)tipDialogView.findViewById(R.id.dialog_content_layout); this.contentContainer2 = (FrameLayout)tipDialogView.findViewById(R.id.dialog_content_container2); @@ -90,7 +90,7 @@ private void initView() { this.btnLine = tipDialogView.findViewById(R.id.dialog_btn_line); this.confirmButton = (TextView)tipDialogView.findViewById(R.id.dialog_confirm_btn); View bottomSpace = tipDialogView.findViewById(R.id.dialog_bottom_space); - int space = (int)((double)DensityUtil.getDisplayMetrics(this.getContext()).heightPixels * 0.05D); + int space = (int)((double) DensityUtil.getDisplayMetrics(this.getContext()).heightPixels * 0.05D); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(-1, space); bottomSpace.setLayoutParams(params); this.setContentView(tipDialogView); diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/MaxHeightLayout.java b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/MaxHeightLayout.java similarity index 96% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/MaxHeightLayout.java rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/MaxHeightLayout.java index fbe5ff1e..fae55e14 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/MaxHeightLayout.java +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/MaxHeightLayout.java @@ -1,11 +1,13 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_common; + import android.content.Context; import android.content.res.TypedArray; -import androidx.annotation.Nullable; import android.util.AttributeSet; import android.widget.LinearLayout; -import com.alivc.live.pusher.demo.R; +import androidx.annotation.Nullable; + +import com.alivc.live.commonutils.DensityUtil; /** * 设置最大高度的Layout diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/OptionSelectorView.java b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/OptionSelectorView.java similarity index 99% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/OptionSelectorView.java rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/OptionSelectorView.java index 31e85b7e..5c9ded14 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/OptionSelectorView.java +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/OptionSelectorView.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_common; import android.content.Context; import android.content.res.Resources; @@ -7,7 +7,6 @@ import android.graphics.Paint; import android.graphics.Rect; import android.util.AttributeSet; -import android.util.Log; import android.util.TypedValue; import android.view.MotionEvent; import android.view.VelocityTracker; diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PushConfigBottomSheet.java b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/PushConfigBottomSheet.java similarity index 93% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PushConfigBottomSheet.java rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/PushConfigBottomSheet.java index 2d2b17d1..0a7f2da3 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/PushConfigBottomSheet.java +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/PushConfigBottomSheet.java @@ -1,11 +1,11 @@ -package com.alivc.live.pusher.widget; +package com.alivc.live.baselive_common; import android.content.Context; -import android.graphics.Color; +import android.content.DialogInterface; import android.view.View; import android.view.ViewGroup; -import com.alivc.live.pusher.demo.R; +import com.alivc.live.commonutils.DensityUtil; import com.aliyun.aio.avbaseui.avdialog.AVBaseBottomSheetDialog; import java.util.List; @@ -23,7 +23,7 @@ public PushConfigBottomSheet(Context context, int theme) { super(context, theme); } - protected PushConfigBottomSheet(Context context, boolean cancelable, OnCancelListener cancelListener) { + protected PushConfigBottomSheet(Context context, boolean cancelable, DialogInterface.OnCancelListener cancelListener) { super(context, cancelable, cancelListener); } diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushConfigDialogImpl.java b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/PushConfigDialogImpl.java similarity index 97% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushConfigDialogImpl.java rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/PushConfigDialogImpl.java index fc77812a..fc03aaea 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/demo/PushConfigDialogImpl.java +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/java/com/alivc/live/baselive_common/PushConfigDialogImpl.java @@ -1,4 +1,4 @@ -package com.alivc.live.pusher.demo; +package com.alivc.live.baselive_common; import android.content.Context; import android.view.View; @@ -6,7 +6,6 @@ import androidx.annotation.Nullable; -import com.alivc.live.pusher.widget.PushConfigBottomSheet; import java.util.Arrays; import java.util.List; diff --git a/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/anim/anim_layout_bottom_out.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/anim/anim_layout_bottom_out.xml new file mode 100644 index 00000000..cd2c1e1b --- /dev/null +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/anim/anim_layout_bottom_out.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/anim/anim_trans_from_bottom.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/anim/anim_trans_from_bottom.xml new file mode 100644 index 00000000..d5453547 --- /dev/null +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/anim/anim_trans_from_bottom.xml @@ -0,0 +1,9 @@ + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_blue_back.png b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable-xxhdpi/ic_blue_back.png similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxxhdpi/ic_blue_back.png rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable-xxhdpi/ic_blue_back.png diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/dialog_bg.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/dialog_bg.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/dialog_bg.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/dialog_bg.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/thumb.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/thumb.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/thumb.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/thumb.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/thumb_off.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/thumb_off.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/thumb_off.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/thumb_off.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/thumb_on.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/thumb_on.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/thumb_on.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/thumb_on.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/track.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/track.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/track.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/track.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/track_off.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/track_off.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/track_off.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/track_off.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/track_on.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/track_on.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/track_on.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/drawable/track_on.xml diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/common_dialog.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/common_dialog.xml similarity index 98% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/common_dialog.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/common_dialog.xml index b176988f..1bd6ddd1 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/common_dialog.xml +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/common_dialog.xml @@ -6,7 +6,7 @@ android:orientation="vertical" tools:background="#80000000"> - - + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_args_setting_layout.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/push_args_setting_layout.xml similarity index 100% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_args_setting_layout.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/push_args_setting_layout.xml diff --git a/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/push_config_dialog.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/push_config_dialog.xml new file mode 100644 index 00000000..f863228f --- /dev/null +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/push_config_dialog.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_function_setting_layout.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/push_function_setting_layout.xml similarity index 96% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_function_setting_layout.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/push_function_setting_layout.xml index bb47abc7..67754de8 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_function_setting_layout.xml +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/layout/push_function_setting_layout.xml @@ -448,34 +448,6 @@ android:layout_height="1px" android:layout_marginStart="20dp" android:background="@color/border_medium" /> - - - - - - + + System error: + SDK error: + Connection failed + Enter the ingest URL. + Please enter url + Confirm + Cancel + Stop pushing + Start pushing + Resolution + 180P + 240P + 360P + 480P + 540P + 720P + 1080P + Bitrate Control + Variable Resolution + To enable the system to automatically switch to the most suitable resolution, you must enable adaptive bitrate streaming. For more information, see the API reference. + Advanced Settings + DisplayMode + scaleToFill + aspectFit + aspectFill + High quality priority + fluency priority + You can adjust the video bitrate and frame rate only in custom mode. + custom + Target bitrate + 1200 + Min bitrate + 300 + Initial bitrate + Audio bitrate + 1000 + 64 + Min fps + Captrue fps + 20 + Audio sampling rate + 48KHz + Gop + Audio profile + Sound track + Video Encoder + B Frames + Hardware encode + Audio Hardware enc + LC + HE-AAC + HEv2-AAC + AAC-LD + Single track + Dual track + H264 + H265 + Portrait + HomeLeft + HomeRight + Default + Audio only + Video only + Ingest To + Orientation + Auto Reconnection + Reconnection duration + Enter + Reconnection times + Watermark + Watermark + Setting + Mirroring + Preview mirror + Push mirror + Camera Control + Front camera + Auto focus + Retouching Switch + Beauty + Ingest Standby Stream + Pause Image + NetworkPoor Image + Push Mode + Url Auth Setting + Auth Time + Privacy Key + Other Features + Asynchronous interface + Music Mode + Main Extern Stream + Local log + \ No newline at end of file diff --git a/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values-zh-rCN/strings.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values-zh-rCN/strings.xml new file mode 100644 index 00000000..8a6326eb --- /dev/null +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values-zh-rCN/strings.xml @@ -0,0 +1,102 @@ + + + 系统错误: + SDK错误: + 连接失败 + + 请输入推流url + 请输入推流地址 + + 确认 + 取消 + 停止推流 + 开始推流 + + + 分辨率 + 180P + 240P + 360P + 480P + 540P + 720P + 1080P + + 码率自适应 + 可变分辨率 + 分辨率自适应需开启码率自适应,详细请参考api文档 + 高级设置 + 显示模式 + 拉伸 + 适合 + 剪裁 + 清晰度优先 + 流畅度优先 + 视频码率和帧率仅在自定义模式下可以调整 + 自定义 + 视频目标码率 + 1200 + 视频最小码率 + 300 + 视频初始码率 + 1000 + 音频码率 + 64 + 最小帧率 + 采集帧率 + 20 + 音频采样率 + 48KHz + 关键帧间隔 + 音频编码 + 声道 + 视频编码器 + B帧个数 + 视频硬编码 + 音频硬编码 + LC + HE-AAC + HEv2-AAC + AAC-LD + 单声道 + 双声道 + H264 + H265 + Portrait + HomeLeft + HomeRight + 音视频 + 纯音频 + 纯视频 + + + 推流方向 + 显示模式 + 自动重连 + 重连时长 + 请输入 + 重连次数 + 水印 + 开启水印 + 水印位置 + 镜像 + 预览镜像 + 推流镜像 + 相机控制 + 前置摄像头 + 自动对焦 + 美颜开关 + 开启美颜 + 图片推流 + 暂停图片 + 网络差图片 + 推流模式 + 推流鉴权 + 有效时长 + 鉴权key + 其他功能 + 异步接口 + 音乐模式 + 外部音视频 + 本地日志 + \ No newline at end of file diff --git a/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values/attrs.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values/attrs.xml new file mode 100644 index 00000000..ba5c04c2 --- /dev/null +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values/attrs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values/strings.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values/strings.xml new file mode 100644 index 00000000..31b9eb5b --- /dev/null +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values/strings.xml @@ -0,0 +1,96 @@ + + + System error: + SDK error: + Connection failed + Enter the ingest URL. + Please enter url + Confirm + Cancel + Stop pushing + Start pushing + Resolution + 180P + 240P + 360P + 480P + 540P + 720P + 1080P + Bitrate Control + Variable Resolution + To enable the system to automatically switch to the most suitable resolution, you must enable adaptive bitrate streaming. For more information, see the API reference. + Advanced Settings + DisplayMode + scaleToFill + aspectFit + aspectFill + High quality priority + fluency priority + You can adjust the video bitrate and frame rate only in custom mode. + custom + Target bitrate + 1200 + Min bitrate + 300 + Initial bitrate + Audio bitrate + 1000 + 64 + Min fps + Captrue fps + 20 + Audio sampling rate + 48KHz + Gop + Audio profile + Sound track + Video Encoder + B Frames + Hardware encode + Audio Hardware enc + LC + HE-AAC + HEv2-AAC + AAC-LD + Single track + Dual track + H264 + H265 + Portrait + HomeLeft + HomeRight + Default + Audio only + Video only + Ingest To + Orientation + Auto Reconnection + Reconnection duration + Enter + Reconnection times + Watermark + Watermark + Setting + Mirroring + Preview mirror + Push mirror + Camera Control + Front camera + Auto focus + Retouching Switch + Beauty + Ingest Standby Stream + Pause Image + NetworkPoor Image + Push Mode + Url Auth Setting + Auth Time + Privacy Key + Other Features + Asynchronous interface + Music Mode + Main Extern Stream + Local log + + \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/styles.xml b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values/styles.xml similarity index 86% rename from AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/styles.xml rename to AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values/styles.xml index 7ee8943a..b404020c 100644 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/styles.xml +++ b/AliLivePushDemo/LiveCommon/live_basic_common/src/main/res/values/styles.xml @@ -6,12 +6,6 @@ @color/colorPrimaryDark @color/colorAccent - + + diff --git a/AliLivePushDemo/LiveInteractive/live_interactive/.gitignore b/AliLivePushDemo/LiveInteractive/live_interactive/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/AliLivePushDemo/LiveInteractive/live_interactive/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/AliLivePushDemo/interactive/interactive_live/build.gradle b/AliLivePushDemo/LiveInteractive/live_interactive/build.gradle similarity index 96% rename from AliLivePushDemo/interactive/interactive_live/build.gradle rename to AliLivePushDemo/LiveInteractive/live_interactive/build.gradle index 3ad01507..d8f88483 100644 --- a/AliLivePushDemo/interactive/interactive_live/build.gradle +++ b/AliLivePushDemo/LiveInteractive/live_interactive/build.gradle @@ -42,7 +42,7 @@ dependencies { androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' - api project(':interactiveCommon') + api project(':LiveCommon:live_interactive_common') implementation externalARouter annotationProcessor externalARouterCompiler } \ No newline at end of file diff --git a/AliLivePushDemo/queenbeauty/src/main/res/drawable-xxhdpi/.!34999!icon_animoji_alibear.png b/AliLivePushDemo/LiveInteractive/live_interactive/consumer-rules.pro similarity index 100% rename from AliLivePushDemo/queenbeauty/src/main/res/drawable-xxhdpi/.!34999!icon_animoji_alibear.png rename to AliLivePushDemo/LiveInteractive/live_interactive/consumer-rules.pro diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/AndroidManifest.xml b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/AndroidManifest.xml similarity index 61% rename from AliLivePushDemo/interactive/interactive_live/src/main/AndroidManifest.xml rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/AndroidManifest.xml index 338008b3..1b613b3c 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/AndroidManifest.xml +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/AndroidManifest.xml @@ -1,24 +1,19 @@ + package="com.alivc.live.interactive_live"> - - - - + mInteractLiveManager.inputStreamVideoData(buffer, 720, 1280, 720, 1280 * 720 * 3 / 2, pts, 0) + ); + File pcmFile = new File(mContext.getFilesDir().getPath() + File.separator + "alivc_resource/441.pcm"); + mReadFileData.readPCMData(pcmFile, (buffer, length, pts) -> mInteractLiveManager.inputStreamAudioData(buffer, length, 44100, 1, pts)); + } + } + /** * 开始连麦 * @@ -100,6 +122,8 @@ public void pause() { public void release() { mInteractLiveManager.release(); + mReadFileData.stopYUV(); + mReadFileData.stopPcm(); } /** @@ -113,4 +137,8 @@ public void stopConnect() { public void setInteractLivePushPullListener(InteractLivePushPullListener listener) { mInteractLiveManager.setInteractLivePushPullListener(listener); } + + public void setMute(boolean b) { + mInteractLiveManager.setMute(b); + } } diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveActivity.java b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveActivity.java similarity index 96% rename from AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveActivity.java rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveActivity.java index 711eee6e..57e00930 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveActivity.java +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveActivity.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_live; +package com.alivc.live.interactive_live; import android.content.Context; import android.graphics.Color; @@ -16,16 +16,16 @@ import androidx.appcompat.app.AppCompatActivity; import com.alivc.live.player.annotations.AlivcLivePlayError; -import com.aliyun.interactive_common.listener.ConnectionLostListener; -import com.aliyun.interactive_common.listener.InteractLivePushPullListener; -import com.aliyun.interactive_common.listener.InteractLiveTipsViewListener; -import com.aliyun.interactive_common.utils.InteractLiveIntent; -import com.aliyun.interactive_common.widget.AUILiveDialog; +import com.alivc.live.interactive_common.listener.ConnectionLostListener; +import com.alivc.live.interactive_common.listener.InteractLivePushPullListener; +import com.alivc.live.interactive_common.listener.InteractLiveTipsViewListener; +import com.alivc.live.interactive_common.utils.InteractLiveIntent; +import com.alivc.live.interactive_common.widget.AUILiveDialog; import com.alivc.live.commonutils.FastClickUtil; import com.alivc.live.commonutils.StatusBarUtil; import com.alivc.live.commonutils.ToastUtils; -import com.aliyun.interactive_common.widget.ConnectionLostTipsView; -import com.aliyun.interactive_common.widget.RoomAndUserInfoView; +import com.alivc.live.interactive_common.widget.ConnectionLostTipsView; +import com.alivc.live.interactive_common.widget.RoomAndUserInfoView; public class InteractLiveActivity extends AppCompatActivity { diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveInputActivity.java b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveInputActivity.java similarity index 92% rename from AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveInputActivity.java rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveInputActivity.java index 843e5450..f9af4ec4 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveInputActivity.java +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveInputActivity.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_live; +package com.alivc.live.interactive_live; import android.content.Intent; import android.os.Bundle; @@ -13,10 +13,11 @@ import androidx.appcompat.app.AppCompatActivity; import com.alibaba.android.arouter.facade.annotation.Route; -import com.aliyun.interactive_common.InteractAppInfoActivity; -import com.aliyun.interactive_common.InteractLiveAppInfoFragment; -import com.aliyun.interactive_common.utils.LivePushGlobalConfig; -import com.aliyun.interactive_live.widget.InteractLiveRadioButton; +import com.alivc.live.interactive_common.InteractAppInfoActivity; +import com.alivc.live.interactive_common.InteractLiveAppInfoFragment; +import com.alivc.live.interactive_common.InteractiveSettingActivity; +import com.alivc.live.interactive_common.utils.LivePushGlobalConfig; +import com.alivc.live.interactive_live.widget.InteractLiveRadioButton; import com.alivc.live.commonutils.TextFormatUtil; import java.util.regex.Pattern; @@ -75,7 +76,7 @@ private void initListener() { mBackImageView.setOnClickListener(view -> finish()); mSettingTextView.setOnClickListener(view -> { - Intent intent = new Intent(this, InteractLiveSettingActivity.class); + Intent intent = new Intent(this, InteractiveSettingActivity.class); startActivity(intent); }); diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveManager.java b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveManager.java similarity index 95% rename from AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveManager.java rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveManager.java index b1261df0..aeb84368 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveManager.java +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveManager.java @@ -1,13 +1,15 @@ -package com.aliyun.interactive_live; +package com.alivc.live.interactive_live; import android.text.TextUtils; import android.util.Log; import android.view.SurfaceHolder; import android.widget.FrameLayout; +import com.alivc.live.interactive_common.utils.LivePushGlobalConfig; import com.alivc.live.pusher.AlivcLiveMixStream; import com.alivc.live.pusher.AlivcLiveTranscodingConfig; -import com.aliyun.interactive_common.InteractLiveBaseManager; +import com.alivc.live.interactive_common.InteractLiveBaseManager; +import com.alivc.live.pusher.AlivcVideoEncodeGopEnum; import java.util.ArrayList; @@ -158,4 +160,8 @@ public void release() { stopCDNPull(); super.release(); } + + public void setGOP(AlivcVideoEncodeGopEnum gop) { + mAlivcLivePushConfig.setVideoEncodeGop(gop); + } } diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveTipsView.java b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveTipsView.java similarity index 96% rename from AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveTipsView.java rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveTipsView.java index 5cb76e36..b74086e0 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveTipsView.java +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/InteractLiveTipsView.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_live; +package com.alivc.live.interactive_live; import android.content.Context; import android.util.AttributeSet; @@ -11,7 +11,7 @@ import androidx.annotation.NonNull; import androidx.constraintlayout.widget.ConstraintLayout; -import com.aliyun.interactive_common.listener.InteractLiveTipsViewListener; +import com.alivc.live.interactive_common.listener.InteractLiveTipsViewListener; public class InteractLiveTipsView extends ConstraintLayout { diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/MultiAnchorController.java b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/MultiAnchorController.java similarity index 71% rename from AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/MultiAnchorController.java rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/MultiAnchorController.java index 28f379eb..3e18cb13 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/MultiAnchorController.java +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/MultiAnchorController.java @@ -1,10 +1,15 @@ -package com.aliyun.interactive_live; +package com.alivc.live.interactive_live; import android.content.Context; import android.widget.FrameLayout; -import com.aliyun.interactive_common.listener.MultiInteractLivePushPullListener; -import com.aliyun.interactive_common.utils.URLUtils; +import com.alivc.live.commonbiz.ReadFileData; +import com.alivc.live.commonbiz.ResourcesDownload; +import com.alivc.live.commonbiz.test.URLUtils; +import com.alivc.live.interactive_common.listener.MultiInteractLivePushPullListener; +import com.alivc.live.interactive_common.utils.LivePushGlobalConfig; + +import java.io.File; /** * 以主播身份进入多人连麦互动界面的 Controller @@ -12,6 +17,8 @@ public class MultiAnchorController { private final InteractLiveManager mInteractLiveManager; + private final Context mContext; + private final ReadFileData mReadFileData; //主播预览 View private FrameLayout mAnchorRenderView; //主播推流地址 @@ -24,6 +31,8 @@ public class MultiAnchorController { public MultiAnchorController(Context context, String roomId, String anchorId) { this.mRoomId = roomId; this.mAnchorId = anchorId; + this.mContext = context; + mReadFileData = new ReadFileData(); mPushUrl = URLUtils.generatePushUrl(roomId, anchorId, 1); mInteractLiveManager = new InteractLiveManager(); mInteractLiveManager.init(context); @@ -51,6 +60,7 @@ public void setAnchorRenderView(FrameLayout frameLayout) { * 开始直播 */ public void startPush() { + externAV(); mInteractLiveManager.startPreviewAndPush(mAnchorRenderView, mPushUrl, true); mInteractLiveManager.addAnchorMixTranscodingConfig(mAnchorId); } @@ -71,6 +81,15 @@ public boolean isOnConnected(String key) { return mInteractLiveManager.isPulling(key); } + private void externAV() { + if (LivePushGlobalConfig.ENABLE_EXTERN_AV) { + File yuvFile = ResourcesDownload.localCaptureYUVFilePath(mContext); + mReadFileData.readYUVData(yuvFile, (buffer, pts) -> mInteractLiveManager.inputStreamVideoData(buffer, 720, 1280, 720, 1280 * 720 * 3 / 2, pts, 0)); + File pcmFile = new File(mContext.getFilesDir().getPath() + File.separator + "alivc_resource/441.pcm"); + mReadFileData.readPCMData(pcmFile, (buffer, length, pts) -> mInteractLiveManager.inputStreamAudioData(buffer, length, 44100, 1, pts)); + } + } + /** * 结束连麦 */ @@ -103,6 +122,8 @@ public void pause() { public void release() { mInteractLiveManager.release(); + mReadFileData.stopYUV(); + mReadFileData.stopPcm(); } public void setMultiInteractLivePushPullListener(MultiInteractLivePushPullListener listener) { diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/MultiInteractLiveActivity.java b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/MultiInteractLiveActivity.java similarity index 96% rename from AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/MultiInteractLiveActivity.java rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/MultiInteractLiveActivity.java index 6992a5e5..676cdae9 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/MultiInteractLiveActivity.java +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/MultiInteractLiveActivity.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_live; +package com.alivc.live.interactive_live; import android.content.Context; import android.graphics.Color; @@ -15,14 +15,14 @@ import androidx.appcompat.app.AppCompatActivity; +import com.alivc.live.interactive_live.widget.MultiAlivcLiveView; import com.alivc.live.player.annotations.AlivcLivePlayError; -import com.aliyun.interactive_common.listener.ConnectionLostListener; -import com.aliyun.interactive_common.listener.InteractLiveTipsViewListener; -import com.aliyun.interactive_common.listener.MultiInteractLivePushPullListener; -import com.aliyun.interactive_common.utils.InteractLiveIntent; -import com.aliyun.interactive_common.widget.AUILiveDialog; -import com.aliyun.interactive_common.widget.ConnectionLostTipsView; -import com.aliyun.interactive_live.widget.MultiAlivcLiveView; +import com.alivc.live.interactive_common.listener.ConnectionLostListener; +import com.alivc.live.interactive_common.listener.InteractLiveTipsViewListener; +import com.alivc.live.interactive_common.listener.MultiInteractLivePushPullListener; +import com.alivc.live.interactive_common.utils.InteractLiveIntent; +import com.alivc.live.interactive_common.widget.AUILiveDialog; +import com.alivc.live.interactive_common.widget.ConnectionLostTipsView; import com.alivc.live.commonutils.StatusBarUtil; import com.alivc.live.commonutils.ToastUtils; diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/ViewerController.java b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/ViewerController.java similarity index 77% rename from AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/ViewerController.java rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/ViewerController.java index 3503e9d7..c411e64b 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/ViewerController.java +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/ViewerController.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_live; +package com.alivc.live.interactive_live; import android.content.Context; import android.text.TextUtils; @@ -8,9 +8,13 @@ import androidx.annotation.NonNull; -import com.alivc.live.player.annotations.AlivcLivePlayError; -import com.aliyun.interactive_common.listener.InteractLivePushPullListener; -import com.aliyun.interactive_common.utils.URLUtils; +import com.alivc.live.commonbiz.ReadFileData; +import com.alivc.live.commonbiz.ResourcesDownload; +import com.alivc.live.commonbiz.test.URLUtils; +import com.alivc.live.interactive_common.listener.InteractLivePushPullListener; +import com.alivc.live.interactive_common.utils.LivePushGlobalConfig; + +import java.io.File; /** * 以观众身份进入连麦互动界面的 Controller @@ -18,6 +22,8 @@ public class ViewerController { private final InteractLiveManager mInteractLiveManager; + private final Context mContext; + private final ReadFileData mReadFileData; //主播预览 View private FrameLayout mAnchorRenderView; //观众连麦预览 View @@ -32,6 +38,8 @@ public class ViewerController { public ViewerController(Context context, String roomId, String viewId) { this.mRoomId = roomId; + this.mContext = context; + mReadFileData = new ReadFileData(); mPushUrl = URLUtils.generatePushUrl(roomId, viewId, 1); mInteractLiveManager = new InteractLiveManager(); mInteractLiveManager.init(context); @@ -94,6 +102,7 @@ public void watchLive(String anchorId) { * 观众连麦主播 */ public void startConnect() { + externAV(); //停止 cdn 拉流 mInteractLiveManager.stopCDNPull(); //连麦拉流 @@ -103,6 +112,15 @@ public void startConnect() { mInteractLiveManager.startPreviewAndPush(mViewerRenderView, mPushUrl, false); } + private void externAV() { + if (LivePushGlobalConfig.ENABLE_EXTERN_AV) { + File yuvFile = ResourcesDownload.localCaptureYUVFilePath(mContext); + mReadFileData.readYUVData(yuvFile, (buffer, pts) -> mInteractLiveManager.inputStreamVideoData(buffer, 720, 1280, 720, 1280 * 720 * 3 / 2, pts, 0)); + File pcmFile = new File(mContext.getFilesDir().getPath() + File.separator + "alivc_resource/441.pcm"); + mReadFileData.readPCMData(pcmFile, (buffer, length, pts) -> mInteractLiveManager.inputStreamAudioData(buffer, length, 44100, 1, pts)); + } + } + /** * 结束连麦 */ @@ -144,6 +162,8 @@ public void setInteractLivePushPullListener(InteractLivePushPullListener listene public void release() { mInteractLiveManager.release(); mInteractLiveManager.setInteractLivePushPullListener(null); + mReadFileData.stopYUV(); + mReadFileData.stopPcm(); } public void setMute(boolean b) { diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/widget/InteractLiveRadioButton.java b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/widget/InteractLiveRadioButton.java similarity index 95% rename from AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/widget/InteractLiveRadioButton.java rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/widget/InteractLiveRadioButton.java index e3f307ae..6e165bf7 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/widget/InteractLiveRadioButton.java +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/widget/InteractLiveRadioButton.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_live.widget; +package com.alivc.live.interactive_live.widget; import android.content.Context; import android.content.res.TypedArray; @@ -9,7 +9,7 @@ import androidx.constraintlayout.widget.ConstraintLayout; -import com.aliyun.interactive_live.R; +import com.alivc.live.interactive_live.R; public class InteractLiveRadioButton extends ConstraintLayout { diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/widget/MultiAlivcLiveView.java b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/widget/MultiAlivcLiveView.java similarity index 96% rename from AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/widget/MultiAlivcLiveView.java rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/widget/MultiAlivcLiveView.java index 7328c8f3..e58c695a 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/widget/MultiAlivcLiveView.java +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/java/com/alivc/live/interactive_live/widget/MultiAlivcLiveView.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_live.widget; +package com.alivc.live.interactive_live.widget; import android.widget.FrameLayout; import android.widget.TextView; diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/res/layout/activity_interact_live.xml b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/res/layout/activity_interact_live.xml similarity index 97% rename from AliLivePushDemo/interactive/interactive_live/src/main/res/layout/activity_interact_live.xml rename to AliLivePushDemo/LiveInteractive/live_interactive/src/main/res/layout/activity_interact_live.xml index c350b972..3c313805 100644 --- a/AliLivePushDemo/interactive/interactive_live/src/main/res/layout/activity_interact_live.xml +++ b/AliLivePushDemo/LiveInteractive/live_interactive/src/main/res/layout/activity_interact_live.xml @@ -35,7 +35,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="@id/tv_home_id" /> - - @@ -151,7 +151,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/fragment_app_info"> - - + + + package="com.alivc.live.interactive_pk"> - { mCurrentIntent = InteractLiveIntent.INTENT_FINISH; showInteractLiveDialog(0, getResources().getString(R.string.interact_live_leave_room_tips), false); @@ -192,6 +220,16 @@ public void onPullStop(String userKey) { mKeyPositionMap.remove(userKey); } + @Override + public void onConnectionLost() { + runOnUiThread(new Runnable() { + @Override + public void run() { + mConnectionLostTipsView.show(); + } + }); + } + @Override public void onPushSuccess() { super.onPushSuccess(); diff --git a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/MultiPKLiveRecyclerViewAdapter.java b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/MultiPKLiveRecyclerViewAdapter.java similarity index 99% rename from AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/MultiPKLiveRecyclerViewAdapter.java rename to AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/MultiPKLiveRecyclerViewAdapter.java index 761f62c1..1bca6a73 100644 --- a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/MultiPKLiveRecyclerViewAdapter.java +++ b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/MultiPKLiveRecyclerViewAdapter.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_pk; +package com.alivc.live.interactive_pk; import android.view.LayoutInflater; import android.view.View; diff --git a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKController.java b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKController.java similarity index 82% rename from AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKController.java rename to AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKController.java index 720fa08e..3194736c 100644 --- a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKController.java +++ b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKController.java @@ -1,15 +1,22 @@ -package com.aliyun.interactive_pk; +package com.alivc.live.interactive_pk; import android.content.Context; import android.widget.FrameLayout; -import com.aliyun.interactive_common.listener.InteractLivePushPullListener; -import com.aliyun.interactive_common.listener.MultiInteractLivePushPullListener; -import com.aliyun.interactive_common.utils.URLUtils; +import com.alivc.live.commonbiz.ReadFileData; +import com.alivc.live.commonbiz.ResourcesDownload; +import com.alivc.live.commonbiz.test.URLUtils; +import com.alivc.live.interactive_common.listener.InteractLivePushPullListener; +import com.alivc.live.interactive_common.listener.MultiInteractLivePushPullListener; +import com.alivc.live.interactive_common.utils.LivePushGlobalConfig; + +import java.io.File; public class PKController { private final PKLiveManager mPKLiveManager; + private final Context mContext; + private final ReadFileData mReadFileData; //主播房间号和 ID private String mOwnerRoomId; private String mOwnerUserId; @@ -25,6 +32,8 @@ public PKController(Context context, String roomId, String userId) { mPKLiveManager.init(context.getApplicationContext()); this.mOwnerRoomId = roomId; this.mOwnerUserId = userId; + mReadFileData = new ReadFileData(); + this.mContext = context; mOwnerPushUrl = URLUtils.generatePushUrl(roomId, userId, 1); } @@ -46,9 +55,19 @@ public void setPKOtherInfo(String userId, String roomId) { * @param frameLayout 推流画面渲染 View 的 parent ViewGroup */ public void startPush(FrameLayout frameLayout) { + externAV(); mPKLiveManager.startPreviewAndPush(frameLayout, mOwnerPushUrl, true); } + private void externAV() { + if (LivePushGlobalConfig.ENABLE_EXTERN_AV) { + File yuvFile = ResourcesDownload.localCaptureYUVFilePath(mContext); + mReadFileData.readYUVData(yuvFile, (buffer, pts) -> mPKLiveManager.inputStreamVideoData(buffer, 720, 1280, 720, 1280 * 720 * 3 / 2, pts, 0)); + File pcmFile = new File(mContext.getFilesDir().getPath() + File.separator + "alivc_resource/441.pcm"); + mReadFileData.readPCMData(pcmFile, (buffer, length, pts) -> mPKLiveManager.inputStreamAudioData(buffer, length, 44100, 1, pts)); + } + } + /** * 开始 PK (拉流) */ @@ -191,6 +210,8 @@ public void setMultiPKLivePushPullListener(MultiInteractLivePushPullListener lis public void release() { mPKLiveManager.release(); + mReadFileData.stopYUV(); + mReadFileData.stopPcm(); } public void setMute(boolean b) { diff --git a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveActivity.java b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveActivity.java similarity index 93% rename from AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveActivity.java rename to AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveActivity.java index c4d5d576..fa68959f 100644 --- a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveActivity.java +++ b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveActivity.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_pk; +package com.alivc.live.interactive_pk; import android.os.Bundle; import android.view.View; @@ -10,14 +10,14 @@ import androidx.appcompat.app.AppCompatActivity; import com.alivc.live.player.annotations.AlivcLivePlayError; -import com.aliyun.interactive_common.listener.ConnectionLostListener; -import com.aliyun.interactive_common.listener.InteractLivePushPullListener; -import com.aliyun.interactive_common.listener.InteractLiveTipsViewListener; -import com.aliyun.interactive_common.utils.InteractLiveIntent; -import com.aliyun.interactive_common.widget.AUILiveDialog; +import com.alivc.live.interactive_common.listener.ConnectionLostListener; +import com.alivc.live.interactive_common.listener.InteractLivePushPullListener; +import com.alivc.live.interactive_common.listener.InteractLiveTipsViewListener; +import com.alivc.live.interactive_common.utils.InteractLiveIntent; +import com.alivc.live.interactive_common.widget.AUILiveDialog; import com.alivc.live.commonutils.FastClickUtil; -import com.aliyun.interactive_common.widget.ConnectionLostTipsView; -import com.aliyun.interactive_common.widget.RoomAndUserInfoView; +import com.alivc.live.interactive_common.widget.ConnectionLostTipsView; +import com.alivc.live.interactive_common.widget.RoomAndUserInfoView; /** * PK 互动界面 diff --git a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveInputActivity.java b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveInputActivity.java similarity index 92% rename from AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveInputActivity.java rename to AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveInputActivity.java index 02f4b17e..e73b77cf 100644 --- a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveInputActivity.java +++ b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveInputActivity.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_pk; +package com.alivc.live.interactive_pk; import android.content.Intent; import android.os.Bundle; @@ -12,9 +12,10 @@ import androidx.appcompat.app.AppCompatActivity; import com.alibaba.android.arouter.facade.annotation.Route; -import com.aliyun.interactive_common.InteractAppInfoActivity; -import com.aliyun.interactive_common.InteractLiveAppInfoFragment; -import com.aliyun.interactive_common.utils.LivePushGlobalConfig; +import com.alivc.live.interactive_common.InteractAppInfoActivity; +import com.alivc.live.interactive_common.InteractLiveAppInfoFragment; +import com.alivc.live.interactive_common.InteractiveSettingActivity; +import com.alivc.live.interactive_common.utils.LivePushGlobalConfig; import com.alivc.live.commonutils.TextFormatUtil; import java.util.regex.Pattern; @@ -69,7 +70,7 @@ private void initListener(){ mBackImageView.setOnClickListener(view -> finish()); mSettingTextView.setOnClickListener(view -> { - Intent intent = new Intent(this, PKLiveSettingActivity.class); + Intent intent = new Intent(this, InteractiveSettingActivity.class); startActivity(intent); }); diff --git a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveManager.java b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveManager.java similarity index 98% rename from AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveManager.java rename to AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveManager.java index e2929349..bfef4722 100644 --- a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveManager.java +++ b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveManager.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_pk; +package com.alivc.live.interactive_pk; import android.text.TextUtils; import android.util.Log; @@ -7,7 +7,7 @@ import com.alivc.live.player.AlivcLivePlayer; import com.alivc.live.pusher.AlivcLiveMixStream; import com.alivc.live.pusher.AlivcLiveTranscodingConfig; -import com.aliyun.interactive_common.InteractLiveBaseManager; +import com.alivc.live.interactive_common.InteractLiveBaseManager; import java.util.ArrayList; diff --git a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveTipsView.java b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveTipsView.java similarity index 97% rename from AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveTipsView.java rename to AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveTipsView.java index 8e6eb384..55049d3a 100644 --- a/AliLivePushDemo/interactive/interactive_pk/src/main/java/com/aliyun/interactive_pk/PKLiveTipsView.java +++ b/AliLivePushDemo/LiveInteractive/live_pk/src/main/java/com/alivc/live/interactive_pk/PKLiveTipsView.java @@ -1,4 +1,4 @@ -package com.aliyun.interactive_pk; +package com.alivc.live.interactive_pk; import android.content.Context; import android.text.TextUtils; @@ -12,7 +12,7 @@ import androidx.annotation.NonNull; import androidx.constraintlayout.widget.ConstraintLayout; -import com.aliyun.interactive_common.listener.InteractLiveTipsViewListener; +import com.alivc.live.interactive_common.listener.InteractLiveTipsViewListener; public class PKLiveTipsView extends ConstraintLayout { diff --git a/AliLivePushDemo/interactive/interactive_pk/src/main/res/layout/activity_multi_pklive.xml b/AliLivePushDemo/LiveInteractive/live_pk/src/main/res/layout/activity_multi_pklive.xml similarity index 100% rename from AliLivePushDemo/interactive/interactive_pk/src/main/res/layout/activity_multi_pklive.xml rename to AliLivePushDemo/LiveInteractive/live_pk/src/main/res/layout/activity_multi_pklive.xml diff --git a/AliLivePushDemo/interactive/interactive_pk/src/main/res/layout/activity_pklive.xml b/AliLivePushDemo/LiveInteractive/live_pk/src/main/res/layout/activity_pklive.xml similarity index 80% rename from AliLivePushDemo/interactive/interactive_pk/src/main/res/layout/activity_pklive.xml rename to AliLivePushDemo/LiveInteractive/live_pk/src/main/res/layout/activity_pklive.xml index 7417f731..ec92ce7c 100644 --- a/AliLivePushDemo/interactive/interactive_pk/src/main/res/layout/activity_pklive.xml +++ b/AliLivePushDemo/LiveInteractive/live_pk/src/main/res/layout/activity_pklive.xml @@ -70,6 +70,22 @@ app:layout_constraintStart_toEndOf="@id/frame_owner" app:layout_constraintTop_toTopOf="@id/frame_owner" /> + + + + + + \ No newline at end of file diff --git a/AliLivePushDemo/interactive/interactive_pk/src/main/res/layout/activity_pklive_input.xml b/AliLivePushDemo/LiveInteractive/live_pk/src/main/res/layout/activity_pklive_input.xml similarity index 98% rename from AliLivePushDemo/interactive/interactive_pk/src/main/res/layout/activity_pklive_input.xml rename to AliLivePushDemo/LiveInteractive/live_pk/src/main/res/layout/activity_pklive_input.xml index d55bf645..e7d3551d 100644 --- a/AliLivePushDemo/interactive/interactive_pk/src/main/res/layout/activity_pklive_input.xml +++ b/AliLivePushDemo/LiveInteractive/live_pk/src/main/res/layout/activity_pklive_input.xml @@ -35,7 +35,7 @@ android:layout_height="44dp" android:layout_marginTop="44dp" android:gravity="center" - android:visibility="gone" + android:visibility="visible" android:text="@string/interact_setting" android:textColor="@color/text_strong" android:textSize="12sp" @@ -127,7 +127,7 @@ android:id="@+id/fragment_app_info" android:layout_width="match_parent" android:layout_height="wrap_content" - android:name="com.aliyun.interactive_common.InteractLiveAppInfoFragment" + android:name="com.alivc.live.interactive_common.InteractLiveAppInfoFragment" app:layout_constraintTop_toBottomOf="@id/et_room_id"/> - * Develop test data class. ONLY FOR TEST!!!! - *

- * First, we store dev test data into `local.properties` file, it's a gitignore file. - *

- * Such as: - * sdk.dir=/Users/keria/Library/Android/sdk - * push.url=rtmp://push-demo-rtmp.aliyunlive.com/test/stream/keriatest?&auth_key=xxxx - * pull.url= - *

- * And then, we can parse it from `build.gradle` file, - * if `local.properties` hasn't the property, it will use the default value. - */ -public class PushDemoTestConstants { - private static final String PLACEHOLDER = "PLACEHOLDER"; - - /** - * Print version info for demo apk - */ - public static void printVersionInfo() { - Log.d("livepushdemo", "BUILD_TYPE--->" + BuildConfig.BUILD_TYPE); - Log.d("livepushdemo", "MTL_BUILD_ID--->" + BuildConfig.MTL_BUILD_ID); - Log.d("livepushdemo", "MTL_BUILD_TIMESTAMP--->" + BuildConfig.MTL_BUILD_TIMESTAMP); - } - - /** - * Get test push url, you won't need to scan url again!!! - *

- * put your test push url into `local.properties` - * such as: push.url=rtmp://xxx - * - * @return test push url - */ - public static String getTestPushUrl() { - Context context = ContextUtils.getContext(); - return (context != null) ? context.getString(R.string.test_push_url) : ""; - } - - /** - * Get test pull url, you won't need to scan url again!!! - *

- * put your test pull url into `local.properties` - * such as: pull.url=rtmp://xxx - * - * @return test push url - */ - public static String getTestPullUrl() { - Context context = ContextUtils.getContext(); - return (context != null) ? context.getString(R.string.test_pull_url) : ""; - } - - /** - * Get test interactive app id - *

- * put your app id into `local.properties` - * such as: interactive.appid=keriatest-appid - *

- * or, you can export it into system environment - * such as: export INTERACTIVE_APP_ID=keriatest-appid - * - * @return interactive app id - */ - public static String getTestInteractiveAppID() { - if (!checkIsPlaceholder(AliLiveUserSigGenerate.ALILIVE_APPID)) { - return AliLiveUserSigGenerate.ALILIVE_APPID; - } - - if(!TextUtils.isEmpty(SharedPreferenceUtils.getAppId(ContextUtils.getApplicationContext()))){ - return SharedPreferenceUtils.getAppId(ContextUtils.getApplicationContext()); - } - - if (!TextUtils.isEmpty(BuildConfig.INTERACTIVE_APP_ID)) { - return BuildConfig.INTERACTIVE_APP_ID; - } - - Context context = ContextUtils.getContext(); - if (context != null) { - return context.getString(R.string.interactive_appid); - } - - return AliLiveUserSigGenerate.ALILIVE_APPID; - } - - /** - * Get test interactive app key - *

- * put your app key into `local.properties` - * such as: interactive.appkey=keriatest-appkey - *

- * or, you can export it into system environment - * such as: export INTERACTIVE_APP_KEY=keriatest-appkey - * - * @return interactive app key - */ - public static String getTestInteractiveAppKey() { - if (!checkIsPlaceholder(AliLiveUserSigGenerate.ALILIVE_APPKEY)) { - return AliLiveUserSigGenerate.ALILIVE_APPKEY; - } - - if(!TextUtils.isEmpty(SharedPreferenceUtils.getAppKey(ContextUtils.getApplicationContext()))){ - return SharedPreferenceUtils.getAppKey(ContextUtils.getApplicationContext()); - } - - if (!TextUtils.isEmpty(BuildConfig.INTERACTIVE_APP_KEY)) { - return BuildConfig.INTERACTIVE_APP_KEY; - } - - Context context = ContextUtils.getContext(); - if (context != null) { - return context.getString(R.string.interactive_appkey); - } - - return AliLiveUserSigGenerate.ALILIVE_APPKEY; - } - - /** - * Get test interactive play domain - *

- * put your app key into `local.properties` - * such as: interactive.playdomain=pullkeriatest.alivecdn.com - *

- * or, you can export it into system environment - * such as: export INTERACTIVE_PLAY_DOMAIN=pullkeriatest.alivecdn.com - * - * @return interactive play domain - */ - public static String getTestInteractivePlayDomain() { - if (!checkIsPlaceholder(AliLiveUserSigGenerate.ALILIVE_PLAY_DOMAIN)) { - return AliLiveUserSigGenerate.ALILIVE_PLAY_DOMAIN; - } - - if(!TextUtils.isEmpty(SharedPreferenceUtils.getPlayDomain(ContextUtils.getApplicationContext()))){ - return SharedPreferenceUtils.getPlayDomain(ContextUtils.getApplicationContext()); - } - - if (!TextUtils.isEmpty(BuildConfig.INTERACTIVE_PLAY_DOMAIN)) { - return BuildConfig.INTERACTIVE_PLAY_DOMAIN; - } - - Context context = ContextUtils.getContext(); - if (context != null) { - return context.getString(R.string.interactive_play_domain); - } - - return AliLiveUserSigGenerate.ALILIVE_PLAY_DOMAIN; - } - - /** - * Check whether configuration value is placeholder or not - * - * @param configuration configuration value - * @return true, false - */ - public static boolean checkIsPlaceholder(String configuration) { - return TextUtils.isEmpty(configuration) || TextUtils.equals(configuration, PLACEHOLDER); - } -} diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/ButtonListAdapter.java b/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/ButtonListAdapter.java deleted file mode 100644 index 27cd67a0..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/ButtonListAdapter.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.alivc.live.pusher.widget; - -import android.annotation.SuppressLint; -import androidx.recyclerview.widget.RecyclerView; -import android.text.TextUtils; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; -import com.alivc.live.pusher.demo.R; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class ButtonListAdapter extends RecyclerView.Adapter { - private ButtonClickListener clickListener; - private final boolean isItemHide = false; - - public void setClickListener(ButtonClickListener clickListener) { - this.clickListener = clickListener; - mButtonEnableMap = new HashMap<>(); - } - - private final List mListDatas = new ArrayList<>(); - private Map mButtonEnableMap; - public void setData(List data){ - - if(data == null){ - return; - } - mListDatas.clear(); - mListDatas.addAll(data); - notifyDataSetChanged(); - } - - public List getData(){ - return mListDatas; - } - - - @Override - public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { - View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.live_recycle_button_item_view, parent, false); - ButtonHolder buttonHolder = new ButtonHolder(view); - return buttonHolder; - } - - @Override - public void onBindViewHolder(RecyclerView.ViewHolder holder, @SuppressLint("RecyclerView") final int position) { -// position 从 0开始 - ButtonHolder viewHolder= (ButtonHolder) holder; - viewHolder.textView.setText(mListDatas.get(position)); - if(isItemHide && position < mListDatas.size()-1){ - viewHolder.textView.setClickable(false); - viewHolder.textView.setVisibility(View.INVISIBLE); - } else { - viewHolder.textView.setClickable(true); - viewHolder.textView.setVisibility(View.VISIBLE); - } - if(TextUtils.isEmpty(mListDatas.get(position))){ - viewHolder.textView.setClickable(false); - viewHolder.textView.setVisibility(View.INVISIBLE); - } - viewHolder.textView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if(clickListener != null){ - clickListener.onButtonClick(mListDatas.get(position),position); - } - } - }); - boolean enable = true; - if (mButtonEnableMap.containsKey(mListDatas.get(position))){ - enable = mButtonEnableMap.get(mListDatas.get(position)); - } - viewHolder.textView.setEnabled(enable); - } - @Override - public int getItemCount() { - return mListDatas.size(); - } - - private class ButtonHolder extends RecyclerView.ViewHolder { - private final TextView textView; - public ButtonHolder(View itemView) { - super(itemView); - textView = itemView.findViewById(R.id.vip_item_text); - } - } -} - - diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/ButtonListView.java b/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/ButtonListView.java deleted file mode 100644 index 8c97aade..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/java/com/alivc/live/pusher/widget/ButtonListView.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.alivc.live.pusher.widget; - -import android.content.Context; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.FrameLayout; -import com.alivc.live.pusher.demo.R; - -import java.util.List; - -/** - * 底部按钮 - */ -public class ButtonListView extends FrameLayout { - private RecyclerView mRecyclerView; - private ButtonListAdapter mButtonListAdapter; - private ButtonClickListener clickListener; - - public void setClickListener(ButtonClickListener clickListener) { - this.clickListener = clickListener; - } - - - public ButtonListView(Context context) { - this(context, null); - } - - public ButtonListView(Context context,AttributeSet attrs) { - this(context, attrs, 0); - } - - public ButtonListView(Context context, AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - initView(context); - } - - public void setData(List data) { - mButtonListAdapter.setData(data); - } - private void initView(Context context) { - View view = LayoutInflater.from(context).inflate(R.layout.live_button_list, this, true); - initRecyclerView(view); - } - - private void initRecyclerView(View view) { - mRecyclerView = view.findViewById(R.id.live_button_recycle); - mButtonListAdapter = new ButtonListAdapter(); - mRecyclerView.setLayoutManager(new LinearLayoutManager(ButtonListView.this.getContext())); - mRecyclerView.setAdapter(mButtonListAdapter); - mRecyclerView.setItemAnimator(null); - mRecyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER); - mButtonListAdapter.setClickListener(new ButtonClickListener() { - @Override - public void onButtonClick(String message, int position) { - if(clickListener != null){ - clickListener.onButtonClick(message,position); - } - } - }); - } -} diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/anim/anim_layout_bottom_out.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/anim/anim_layout_bottom_out.xml deleted file mode 100644 index 298f4730..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/anim/anim_layout_bottom_out.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/anim/anim_trans_from_bottom.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/anim/anim_trans_from_bottom.xml deleted file mode 100644 index 1bf96d10..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/anim/anim_trans_from_bottom.xml +++ /dev/null @@ -1,3 +0,0 @@ - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/bg_interact_live_error.png b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/bg_interact_live_error.png deleted file mode 100644 index 11255b2a..00000000 Binary files a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/bg_interact_live_error.png and /dev/null differ diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/icon_animoji.png b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/icon_animoji.png deleted file mode 100644 index c531386f..00000000 Binary files a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/icon_animoji.png and /dev/null differ diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/icon_close.png b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/icon_close.png deleted file mode 100644 index 9bff926c..00000000 Binary files a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxhdpi/icon_close.png and /dev/null differ diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/repush_on.png b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/repush_on.png deleted file mode 100644 index 4bfc6231..00000000 Binary files a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable-xxxhdpi/repush_on.png and /dev/null differ diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/beauty_selector.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/beauty_selector.xml deleted file mode 100644 index 8606a02e..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/beauty_selector.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/music_loop_selector.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/music_loop_selector.xml deleted file mode 100644 index 706175f1..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/music_loop_selector.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/music_play_selector.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/music_play_selector.xml deleted file mode 100644 index 3c540efd..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/music_play_selector.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/music_volume_selector.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/music_volume_selector.xml deleted file mode 100644 index 021e891b..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/music_volume_selector.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_camera_flash.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_camera_flash.xml deleted file mode 100644 index 3e6941ba..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_camera_flash.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_camera.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_camera.xml deleted file mode 100644 index 361901bc..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_camera.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_mic.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_mic.xml deleted file mode 100644 index 2df08e87..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_mic.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_mix.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_mix.xml deleted file mode 100644 index 97b2c2ae..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_mix.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_privacy.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_privacy.xml deleted file mode 100644 index 76874c6c..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/drawable/selector_push_drawable_privacy.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_license.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_license.xml deleted file mode 100644 index f3084dcd..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/activity_license.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/live_recycle_button_item_view.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/live_recycle_button_item_view.xml deleted file mode 100644 index cef9361b..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/live_recycle_button_item_view.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_beauty.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_beauty.xml deleted file mode 100644 index 4683d38c..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/layout/push_beauty.xml +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/go.png b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/go.png deleted file mode 100644 index ce5ecb74..00000000 Binary files a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/go.png and /dev/null differ diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/line.png b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/line.png deleted file mode 100644 index 3d91f52f..00000000 Binary files a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/line.png and /dev/null differ diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/loop_icons.png b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/loop_icons.png deleted file mode 100644 index 24a7723f..00000000 Binary files a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/mipmap-xxhdpi/loop_icons.png and /dev/null differ diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/strings.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index 3fddfc58..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,301 +0,0 @@ - - 180P - 240P - 360P - 480P - 540P - 720P - 1080P - 48KHz - 44.1KHz - 32KHz - LC - HE-AAC - HEv2-AAC - AAC-LD - - 阿里云直播 - 版权信息 - 阿里云 copyright@2017,阿里巴巴集团 - 分辨率 - 视频目标码率 - 1200 - 视频最小码率 - 300 - 视频初始码率 - 音频码率 - 1000 - 采集帧率 - 20 - 音频采样率 - 音频编码 - 声道 - 单声道 - 双声道 - 视频编码器 - H264 - H265 - B帧个数 - 清晰度优先 - 流畅度优先 - 自定义 - 重连时长 - 重连次数 - 显示模式 - Portrait - HomeLeft - HomeRight - 前置摄像头 - 预览镜像 - 推流镜像 - 显示模式 - 拉伸 - 适合 - 剪裁 - 水印 - 开启水印 - 水印位置 - 纯音频 - 纯视频 - 音视频 - 音频硬编码 - 码率自适应 - 外部音视频 - 暂停图片 - 网络差图片 - 可变分辨率 - 自动对焦 - 开启美颜 - 开启Animoji - 视频硬编码 - 软编 - 异步接口 - 进入直播 - 开始预览 - 停止预览 - 暂停 - 恢复 - 停止推流 - 更多设置 - 重新推流 - 右滑查看log图表 - 左滑查看log - 分享 - 加贴纸 - 删贴纸 - 开启美颜 - 关闭美颜 - 美白 - 磨皮 - 红润 - 腮红 - 瘦脸 - 收下巴 - 大眼 - 采集 - 渲染 - 编码 - 推流 - 本地日志 - 麦克风音量 - - 各模块audio fps - 各模块video fps - 各模块bitrate - 视频编码 - 音频编码 - - 各模块buffer - 视频渲染 - 视频编码 - 视频上传 - 音频编码 - 音频上传 - - 开始预览 - 停止预览 - 开始推流 - 停止推流 - 暂停 - 恢复 - 关键帧间隔 - 推流地址 - 是否推流 - 窄带高清 - 音乐模式 - - 推流参数log: - - 没有权限使用摄像头,请开启摄像头权限 - 没有权限使用蓝牙,请开启蓝牙权限 - 没有权限使用录音,请开启录音权限 - 没有读取用户数据的权限,请开启该权限 - 没有文件写权限,请开启该权限 - 没有文件读权限,请开启该权限 - 没有蓝牙连接权限,请开启该权限 - 没有网络权限,请开启该权限 - - 提示 - 确定 - 重连 - - - 网络差,请退出或者重连 - 网络恢复 - 重连开始 - 重连失败 - 连接失败 - 发送消息 - 重连成功 - 发送数据超时 - 重启成功 - - 音乐文件打开失败 - - 系统错误: - SDK错误: - 码率参数设置错误! - 请输入推流地址 - 最小帧率 - - //背景音乐,耳返 - 无音乐 - 暂停 - 恢复 - 停止 - 开始 - 关循环 - 开循环 - 关静音 - 开静音 - 关耳返 - 开耳返 - 关降噪 - 开降噪 - 伴奏音量 - 人声音量 - 网络音乐 - - //老 demo 资源 - - 录屏工具 - 返回 - 隐私模式 - 隐私关 - 摄像头 - 摄像头关 - 混流 - 混流关 - 麦克风 - 麦克风关 - 录制中 - 录屏功能已停止 - 答题 - 有效时长 - 鉴权key - - 添加贴纸失败, id= - 分辨率自适应需开启码率自适应,详细请参考api文档 - 音乐操作 - 截图已保存 - 您的手机没有授予悬浮窗权限,请开启后再试 - 暂不开启 - 现在去开启 - 推流功能 - /次 - 发送帧率: - 发送码率: - 版本为:v - 推流连接中,请稍后 - 直播 - 录屏推流 - - 摄像头推流 - 本地视频推流 - 拉流播放 - 请输入拉流url - 请输入推流url - 确认 - 高级设置 - 视频码率和帧率仅在自定义模式下可以调整 - 自动重连 - 请输入 - 镜像 - 相机控制 - 美颜开关 - 图片推流 - 纯音或纯视频流 - 推流鉴权 - 其他功能 - 推流参数 - 推流中 - 未推流 - 推流方向 - 数据指标 - 音乐列表 - 本地视频统计信息 - 美颜开关关闭,请在设置开启后重试... - 美颜 - Animoji - 背景音乐 - 闪光灯 - 摄像头 - 截图 - 取消 - 重试 - 推流模式 - - 互动模式 - 正在下载外部音视频资源中,请等待 - - 音效 - 变声 - 混响 - - 老人 - 男孩 - 女孩 - 机器人 - 大魔王 - KTV - 回声 - - - 人声I - 人声II - 澡堂 - 明亮小房间 - 黑暗小房间 - 中等房间 - 大房间 - 教堂走廊 - - 阿里云\n移动推流 - 本Demo为用于展示阿里云移动推流sdk主要功能 - - - - 超低延时直播 - 播放地址 - 请输入RTS超低延时播放地址 - 播放地址可到视频直播控制台用地址生成器生成 - 开始播放 - 播放 - 停止 - TraceID获取 - 常见问题 - 播放失败 - 请前往 视频直播控制台 > 工具箱 > 自助问题排查,输入URL自助定位播放失败问题 - 播放卡顿/延时高 - step1 - 请前往视频直播控制台 > 流管理 > 流检测,分析您当前的推流网络环境是否良好(帧率或时间戳是否正常) - step2 - 若您的推流网络良好,请点击【TraceID获取】获取相关信息,并提交工单寻求帮助 - 复制 - 确认 - 关闭 - 网络建联不成功,当前未获取到TraceID信息 - 若您在体验Demo时碰到问题,请将以下信息通过工单的形式提交给售后 - 信息已复制 - 降级 - diff --git a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/strings.xml b/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/strings.xml deleted file mode 100644 index 6deb8cee..00000000 --- a/AliLivePushDemo/alivc-livepusher-demo/src/main/res/values/strings.xml +++ /dev/null @@ -1,300 +0,0 @@ - - 180P - 240P - 360P - 480P - 540P - 720P - 1080P - 48KHz - 44.1KHz - 32KHz - LC - HE-AAC - HEv2-AAC - AAC-LD - Music Mode - - AlivcLive - License declaration - © 2017 Copyright by Alibaba Cloud All rights reserved - Resolution - Target bitrate - 1200 - Min bitrate - 300 - Initial bitrate - Audio bitrate - 1000 - 64 - Captrue fps - 20 - Audio sampling rate - Audio profile - Sound track - Single track - Dual track - Video Encoder - H264 - H265 - B Frames - High quality priority - fluency priority - custom - Reconnection duration - Reconnection times - Orientation - Portrait - HomeLeft - HomeRight - Front camera - Preview mirror - Push mirror - Narrowband HD - DisplayMode - scaleToFill - aspectFit - aspectFill - Watermark - Watermark - Setting - Audio only - Video only - Default - Bitrate Control - Main Extern Stream - Pause Image - NetworkPoor Image - Variable Resolution - Auto focus - Beauty - Animoji - Hardware encode - Software encode - Audio Hardware enc - Asynchronous interface - Start pushing - Start preview - Stop preview - Pause - Resume - Stop pushing - More setting - Restart pushing - Slide right to view log chart - Slide left to view log - Share - DynamicAdd - DynamicRemove - Beauty on - Beauty off - Whitening - Smooth skin - Ruddy - CheekPink - SlimFace - ShortenFace - BigEye - Capture - Render - Encode - Push - Local log - Mic Volume - - Audio fps - Video fps - Bitrate - Video encode - Audio encode - - Buffer - Video render - Video encode - Video upload - Audio encode - Audio upload - - Start preview - Stop preview - Start pushing - Stop pushing - Pause - Resume - Gop - Push url - Pushing - - pusher log: - - Camera usage is not permitted, please open first - Bluetooth is not permitted to record, please open first - Audio is not permitted to record, please open first - Phone state is not permitted to read, please opend first - External storage is not permitted to write, please open first - External storage is not permitted to read, please open first - Bluetooth connect is not permitted to read, please open first - Internet is not permitted to push, please open first - - - Error tips - OK - Reconnect - - - The network is unstable, please quit or try again - The network has recovered - Start reconnecting - Reconnection failed - Connection failed - Send Message - Reconnection succeed - Sending data timeout - Restart successfully - - BGM File open Failed - - System error: - SDK error: - Bitrate setting error - Please enter url - Min fps - - No Music - Pause - Resume - Stop - Start - Close Loop - Open Loop - Close Mute - Open Mute - Close Ears - Open Ears - Close Denoise - Open Denoise - Accompaniment - Voice - Internet music - - //老 demo 资源 - - Screen tool - back - Privacy - Privacy Off - Camera - Camera Off - Mix - Mix Off - Mic - Mic Off - You can start other applications and start live... - The screen function has stopped. - Answer - Auth Time - Privacy Key - - Add dynamic failed, id= - Stream Ingest for Screen Recording - Stream Ingest for Camera - Stream Ingest for Video - Live Streaming - Enter the source URL. - Enter the ingest URL. - Confirm - To enable the system to automatically switch to the most suitable resolution, you must enable adaptive bitrate streaming. For more information, see the API reference. - Advanced Settings - You can adjust the video bitrate and frame rate only in custom mode. - Auto Reconnection - Enter - Mirroring - Camera Control - Retouching Switch - Ingest Standby Stream - Only Audio Or Video Stream - Url Auth Setting - Other Features - Stream Ingest Parameters - Ingesting... - Waiting for Stream Ingest... - Ingest To - Data Metrics - Music List - Statistics on Local Videos - Retouching is disabled. Enable retouching and then retry. - Retouching - Animoji - Background Music - Flash - Camera - Snapshot - Cancel - Retry - Music Operations - Screenshot saved - The floating window permission is required. Obtain the floating window permission and try again. - Enable Later - Enable Now - Stream Ingest Features - /Times - Sent Frame Rate - send Bitrate - version:v - pushing_wating - Live - Push Mode - - Interaction Mode - waiting for download external video resources - - Sound Effect - Change Voice - Reverb - Off - Old_man - Baby_Boy - Baby_Girl - Robot - Daimo - KTV - Echo - - Off - Vocal1 - Vocal2 - BathRoom - SmallRoom(bright) - SmallRoom(Dark) - MediumRoom - LargeRoom - ChurchHall - - 阿里云\n移动推流 - 本Demo为用于展示阿里云移动推流sdk主要功能 - - - Rts Live Streaming - URL - Please enter RTS ultra-low delay playback address - The playback address can be generated by the address generator in the live video console - Start playing - Play - Stop - TraceID acquisition - Common Problem - Playback Failed - Please go to the live video console>Toolbox>Self service problem troubleshooting, and enter the URL to locate the problem of playback failure - Play stuck / high delay - step1 - Please go to Live Video Console>Stream Management>Stream Detection to analyze whether your current streaming network environment is good (whether the frame rate or timestamp is normal) - step2 - If your streaming network is good, please click [TraceID Acquisition] to obtain relevant information and submit a work order for help - Copy - Confirm - Close - The network connection is not successful, and the TraceID information is not currently available - If you encounter problems when experiencing Demo, please submit the following information to the after-sales service in the form of work order - Information copied - Demote - diff --git a/AliLivePushDemo/beauty/proguard-rules.pro b/AliLivePushDemo/beauty/proguard-rules.pro deleted file mode 100644 index 481bb434..00000000 --- a/AliLivePushDemo/beauty/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/proguard-rules.pro b/AliLivePushDemo/beautyui/proguard-rules.pro deleted file mode 100644 index 481bb434..00000000 --- a/AliLivePushDemo/beautyui/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/AnimojiContainerView.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/AnimojiContainerView.java deleted file mode 100644 index c5395803..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/AnimojiContainerView.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.alivc.live.beautyui; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.view.animation.Animation; -import android.view.animation.TranslateAnimation; -import android.widget.FrameLayout; -import android.widget.ImageView; -import android.widget.LinearLayout; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; - -import com.alivc.live.beautyui.adapter.AnimojiItemAdapter; -import com.alivc.live.beautyui.bean.AnimojiItemBean; - -import java.util.ArrayList; - -public class AnimojiContainerView extends FrameLayout implements View.OnClickListener { - - private static final int VIEW_ANIMATION_DURATION_MS = 330; - - private AnimojiContainerViewCallback mCallback; - - private final AnimojiItemAdapter mAnimojiItemAdapter = new AnimojiItemAdapter(); - - public AnimojiContainerView(@NonNull Context context) { - super(context); - init(context); - } - - public AnimojiContainerView(@NonNull Context context, @Nullable AttributeSet attrs) { - super(context, attrs); - init(context); - } - - public AnimojiContainerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - init(context); - } - - public AnimojiContainerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { - super(context, attrs, defStyleAttr, defStyleRes); - init(context); - } - - private void init(Context context) { - initViews(context); - mAnimojiItemAdapter.setListener(new AnimojiItemAdapter.AnimojiItemListener() { - @Override - public void onItemClicked(@Nullable AnimojiItemBean itemBean) { - if (null != mCallback) { - mCallback.onItemClicked(itemBean); - } - } - }); - } - - public void setCallback(AnimojiContainerViewCallback callback) { - this.mCallback = callback; - } - - public void initData(ArrayList itemBeans) { - mAnimojiItemAdapter.initData(itemBeans); - } - - public void setVisibilityWithAnimation(boolean visible) { - float fromY = visible ? 1.0f : 0.0f; - float toY = visible ? 0.0f : 1.0f; - TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, fromY, Animation.RELATIVE_TO_SELF, toY); - animation.setDuration(VIEW_ANIMATION_DURATION_MS); - startAnimation(animation); - - int visibility = visible ? View.VISIBLE : View.GONE; - setVisibility(visibility); - } - - private void initViews(Context context) { - LayoutInflater.from(context).inflate(R.layout.layout_animoji_container, this, true); - RecyclerView recyclerView = findViewById(R.id.animoji_item_rv); - LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext()); - linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL); - recyclerView.setLayoutManager(linearLayoutManager); - recyclerView.setAdapter(mAnimojiItemAdapter); - recyclerView.setItemViewCacheSize(0); - setDrawingCacheEnabled(true); - setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH); - - LinearLayout resetBtn = findViewById(R.id.animoji_reset_btn); - ImageView putAwayBtn = findViewById(R.id.animoji_put_away_btn); - resetBtn.setOnClickListener(this); - putAwayBtn.setOnClickListener(this); - } - - /** - * Called when a view has been clicked. - * - * @param v The view that was clicked. - */ - @Override - public void onClick(View v) { - int id = v.getId(); - if (id == R.id.animoji_reset_btn) { - if (null != mCallback) { - mCallback.onTabReset(); - } - } else if (id == R.id.animoji_put_away_btn) { - if (null != mCallback) { - mCallback.onTabPutAway(); - } - } - } - - public interface AnimojiContainerViewCallback { - void onItemClicked(@Nullable AnimojiItemBean bean); - - void onTabPutAway(); - - void onTabReset(); - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/BeautyContainerView.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/BeautyContainerView.java deleted file mode 100644 index 378b04de..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/BeautyContainerView.java +++ /dev/null @@ -1,222 +0,0 @@ -package com.alivc.live.beautyui; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.view.animation.Animation; -import android.view.animation.TranslateAnimation; -import android.widget.FrameLayout; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import com.alivc.live.beautyui.bean.BeautyItemBean; -import com.alivc.live.beautyui.bean.BeautyTabBean; -import com.alivc.live.beautyui.component.BeautyTabContainerView; -import com.alivc.live.beautyui.listener.BeautyTabListener; - -import java.util.ArrayList; - -/** - * 美颜界面主View - * 里面包含:一级View(多TAB组成),二级View(单TAB组成,由点击一级View的Item弹出) - */ -public class BeautyContainerView extends FrameLayout { - - private static final String TAG = BeautyContainerView.class.getSimpleName(); - - private static final int VIEW_ANIMATION_DURATION_MS = 330; - - private BeautyTabContainerView mBeautyMainContainer; - private FrameLayout mBeautySecondaryContainer; - - private BeautyTabListener mBeautyTabListener; - - public ArrayList mSubTabViewCacheList = new ArrayList<>(); - - public BeautyContainerView(@NonNull Context context) { - super(context); - init(context); - } - - public BeautyContainerView(@NonNull Context context, @Nullable AttributeSet attrs) { - super(context, attrs); - init(context); - } - - public BeautyContainerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - init(context); - } - - public void setBeautyTabListener(BeautyTabListener BeautyTabListener) { - mBeautyTabListener = BeautyTabListener; - } - - public void setVisibilityWithAnimation(boolean visible) { - float fromY = visible ? 1.0f : 0.0f; - float toY = visible ? 0.0f : 1.0f; - TranslateAnimation animation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, fromY, Animation.RELATIVE_TO_SELF, toY); - animation.setDuration(VIEW_ANIMATION_DURATION_MS); - startAnimation(animation); - - int visibility = visible ? View.VISIBLE : View.GONE; - setVisibility(visibility); - } - - public void initData(BeautyUIDataInjectorInterface dataInjectorItf) { - if (dataInjectorItf != null && dataInjectorItf.getBeautyTabBeans() != null) { - mBeautyMainContainer.initData(dataInjectorItf.getBeautyTabBeans()); - } - } - - private void init(Context context) { - initViews(context); - } - - private void initViews(Context context) { - - LayoutInflater.from(context).inflate(R.layout.layout_beauty_container, this, true); - - mBeautyMainContainer = findViewById(R.id.layout_beauty_main_content); - - mBeautyMainContainer.setBeautyTabListener(new BeautyTabListener() { - - @Override - public void onTabItemDataChanged(@Nullable BeautyTabBean tabBean, @Nullable BeautyItemBean beautyItemBean) { - if (tabBean == null || beautyItemBean == null) return; - - if (beautyItemBean.getItemType() == BeautyItemBean.BeautyItemType.CONFIG_PAGE) { - showSecondaryContainer(beautyItemBean); - } else { - - if (mBeautyTabListener != null) { - mBeautyTabListener.onTabItemDataChanged(tabBean, beautyItemBean); - } - } - - } - - @Override - public void onTabPutAway(@Nullable BeautyTabBean tabBean) { - if (mBeautyTabListener != null) { - mBeautyTabListener.onTabPutAway(tabBean); - } - } - - @Override - public void onTabReset(@Nullable BeautyTabBean tabBean) { - resetAllSubTabs(tabBean); - } - }); - - mBeautySecondaryContainer = findViewById(R.id.layout_beauty_type_config); - } - - public void reset() { - mBeautyMainContainer.resetAllTabs(); - } - - private void resetAllSubTabs(@Nullable BeautyTabBean tabBean) { - if (tabBean == null) return; - for (BeautyItemBean itemBean : tabBean.getItemBeans()) { - // 现在需要找到当前TAB下的item有子TAB的,并重置它,单纯的子item已经在回调的地方`BeautyTabContainerView`里面重置了。 - if (itemBean.getItemType() == BeautyItemBean.BeautyItemType.CONFIG_PAGE) { - BeautyTabBean subTabBean = itemBean.getTabBean(); - BeautyTabContainerView view = getBeautySubTabViewFromCacheList(subTabBean); - if (view != null) { - view.resetCurrentTab(); - } - } - } - } - - private void showMainContainer() { - // remove all views from secondary container. - // just like `removeAllSubviews` on iOS platform. - if (mBeautySecondaryContainer != null) { - mBeautySecondaryContainer.removeAllViews(); - } - - // make main container visible again. - if (mBeautyMainContainer != null) { - mBeautyMainContainer.setVisibility(View.VISIBLE); - } - } - - private void showSecondaryContainer(@Nullable BeautyItemBean beautyItemBean) { - - if (beautyItemBean != null && beautyItemBean.getTabBean() != null && mBeautySecondaryContainer != null) { - // init a new config view, and put it onto secondary container. - BeautyTabContainerView containerView = getBeautySubTabViewContainer(beautyItemBean.getTabBean()); - mSubTabViewCacheList.add(containerView); - mBeautySecondaryContainer.addView(containerView); - - // make main container invisible. - if (mBeautyMainContainer != null) { - mBeautyMainContainer.setVisibility(View.GONE); - } - } - - } - - private BeautyTabContainerView getBeautySubTabViewContainer(@NonNull BeautyTabBean tabBean) { - BeautyTabContainerView containerView = getBeautySubTabViewFromCacheList(tabBean); - - if (containerView == null) { - containerView = initBeautySubTabViewContainer(tabBean); - } - - return containerView; - } - - // The reason for setting multiple views is, - // when we open it again, we can remember where we slid to before. - private BeautyTabContainerView initBeautySubTabViewContainer(@Nullable BeautyTabBean beautyTabBean) { - - BeautyTabContainerView containerView = new BeautyTabContainerView(getContext()); - containerView.initData(beautyTabBean); - - containerView.setBeautyTabListener(new BeautyTabListener() { - - @Override - public void onTabItemDataChanged(@Nullable BeautyTabBean tabBean, @Nullable BeautyItemBean beautyItemBean) { - if (tabBean == null || beautyItemBean == null) return; - if (mBeautyTabListener != null) { - mBeautyTabListener.onTabItemDataChanged(tabBean, beautyItemBean); - } - } - - @Override - public void onTabPutAway(@Nullable BeautyTabBean tabBean) { - showMainContainer(); - } - - @Override - public void onTabReset(@Nullable BeautyTabBean tabBean) { - - } - - }); - - return containerView; - } - - private BeautyTabContainerView getBeautySubTabViewFromCacheList(@Nullable BeautyTabBean beautyTabBean) { - if (beautyTabBean == null) return null; - - for (BeautyTabContainerView subTabView : mSubTabViewCacheList) { - ArrayList subTabBeans = subTabView.getBeautyTabBeans(); - if (subTabBeans != null) { - for (BeautyTabBean subTabBean : subTabBeans) { - if (subTabBean.getId() == beautyTabBean.getId()) { - return subTabView; - } - } - } - } - - return null; - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/BeautyUIDataInjectorFactory.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/BeautyUIDataInjectorFactory.java deleted file mode 100644 index f3f98554..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/BeautyUIDataInjectorFactory.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.alivc.live.beautyui; - -import androidx.annotation.NonNull; - -import com.alivc.live.beauty.constant.BeautySDKType; - -import java.lang.reflect.Constructor; -import java.lang.reflect.InvocationTargetException; - -public class BeautyUIDataInjectorFactory { - - public static BeautyUIDataInjectorInterface generateDataInjector(BeautySDKType type) { - BeautyUIDataInjectorInterface itf = null; - //非互动模式 - if (type == BeautySDKType.QUEEN) { - itf = reflectInit(BeautySDKType.QUEEN.getDataInjectorClassName()); - } - //互动模式 - if (type == BeautySDKType.INTERACT_QUEEN) { - itf = reflectInit(BeautySDKType.INTERACT_QUEEN.getDataInjectorClassName()); - } - return itf; - } - - private static BeautyUIDataInjectorInterface reflectInit(@NonNull String className) { - Object obj = null; - try { - Class cls = Class.forName(className); - Object[] values = {}; - Class[] params = {}; - Constructor constructor = cls.getDeclaredConstructor(params); - obj = constructor.newInstance(values); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (InstantiationException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } - - return (BeautyUIDataInjectorInterface) obj; - } - -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/BeautyUIDataInjectorInterface.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/BeautyUIDataInjectorInterface.java deleted file mode 100644 index b3ce6593..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/BeautyUIDataInjectorInterface.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.alivc.live.beautyui; - -import com.alivc.live.beautyui.bean.BeautyTabBean; - -import java.util.ArrayList; - -public interface BeautyUIDataInjectorInterface { - public ArrayList getBeautyTabBeans(); -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/adapter/AnimojiItemAdapter.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/adapter/AnimojiItemAdapter.java deleted file mode 100644 index b7966fa3..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/adapter/AnimojiItemAdapter.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.alivc.live.beautyui.adapter; - -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.RecyclerView; - -import com.alivc.live.beautyui.R; -import com.alivc.live.beautyui.bean.AnimojiItemBean; -import com.alivc.live.beautyui.component.CircleImageView; - -import java.util.ArrayList; - -public class AnimojiItemAdapter extends RecyclerView.Adapter { - - private final ArrayList mItemBeans = new ArrayList<>(); - - private static final String TAG = AnimojiItemAdapter.class.getSimpleName(); - - private AnimojiItemListener mItemListener; - - public void setListener(AnimojiItemListener listener) { - this.mItemListener = listener; - } - - public void initData(ArrayList itemBeans) { - mItemBeans.addAll(itemBeans); - notifyDataSetChanged(); - } - - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - return new AnimojiItemViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_beauty_item, parent, false)); - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - if (holder instanceof AnimojiItemViewHolder) { - final AnimojiItemBean itemBean = mItemBeans.get(position); - AnimojiItemViewHolder viewHolder = (AnimojiItemViewHolder) holder; - viewHolder.initData(itemBean); - viewHolder.itemView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (null != mItemListener) { - mItemListener.onItemClicked(itemBean); - } - } - }); - } - } - - @Override - public int getItemCount() { - return mItemBeans.size(); - } - - public interface AnimojiItemListener { - void onItemClicked(@Nullable AnimojiItemBean itemBean); - } - - static class AnimojiItemViewHolder extends RecyclerView.ViewHolder { - private CircleImageView mCircleIv; - private TextView mTitleTv; - - public AnimojiItemViewHolder(@NonNull View itemView) { - super(itemView); - initViews(itemView); - } - - private void initViews(View view) { - if (view == null) return; - mCircleIv = view.findViewById(R.id.image_iv); - mTitleTv = view.findViewById(R.id.beauty_mid_content_title_tv); - } - - public void initData(@Nullable AnimojiItemBean bean) { - if (null == bean) return; - if (null != mCircleIv && bean.getId() != 0) { - mCircleIv.setImageResource(bean.getId()); - } - if (null != mTitleTv) { - mTitleTv.setText(bean.getTitle()); - } - } - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/adapter/BeautyItemListAdapter.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/adapter/BeautyItemListAdapter.java deleted file mode 100644 index 2e46a67f..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/adapter/BeautyItemListAdapter.java +++ /dev/null @@ -1,197 +0,0 @@ -package com.alivc.live.beautyui.adapter; - -import android.content.Context; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.RecyclerView; - -import com.alivc.live.beautyui.R; -import com.alivc.live.beautyui.bean.BeautyItemBean; -import com.alivc.live.beautyui.component.CircleImageView; -import com.alivc.live.beautyui.listener.BeautyItemListener; - -import java.util.ArrayList; - -/** - * 美颜界面Item适配器 - */ -public class BeautyItemListAdapter extends RecyclerView.Adapter { - - private static final String TAG = BeautyItemListAdapter.class.getSimpleName(); - - private Context mContext; - private BeautyItemListener mBeautyItemListener; - - private final ArrayList itemBeans = new ArrayList(); - private final ArrayList defaultItemBeans = new ArrayList(); - - private BeautyItemBean mCurrentSelectedItemBean; - private boolean canMultiSelect; - - private BeautyItemListAdapter() { - } - - public BeautyItemListAdapter(Context context) { - mContext = context; - } - - public void setCanMultiSelect(boolean canMultiSelect) { - this.canMultiSelect = canMultiSelect; - } - - public void setItemBeans(ArrayList itemBeans) { - this.itemBeans.addAll(itemBeans); - - for (BeautyItemBean itemBean : itemBeans) { - this.defaultItemBeans.add(itemBean.clone()); - } - - notifyDataSetChanged(); - } - - public void setBeautyItemListener(BeautyItemListener listener) { - mBeautyItemListener = listener; - } - - public void resetAllItemViews() { - - for (int i = 0; i < itemBeans.size(); ++i) { - BeautyItemBean itemBean = itemBeans.get(i); - BeautyItemBean defaultItemBean = getDefaultItemBean(i); - - if (defaultItemBean != null && !itemBean.equals(defaultItemBean)) { - BeautyItemBean newItemBean = defaultItemBean.clone(); - itemBeans.set(i, newItemBean); - - BeautyItemBean.BeautyItemType itemType = newItemBean.getItemType(); - // only seek bar value & switch value should be callback and reset. - if (itemType == BeautyItemBean.BeautyItemType.SEEK_BAR || itemType == BeautyItemBean.BeautyItemType.SWITCH) { - mBeautyItemListener.onItemDataChanged(newItemBean); - } - - } - } - - notifyDataSetChanged(); - } - - @Nullable - private BeautyItemBean getDefaultItemBean(int index) { - if (index < defaultItemBeans.size()) { - return defaultItemBeans.get(index); - } - return null; - } - - @NonNull - @Override - public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - BeautyItemBean itemBean = itemBeans.get(viewType); - if (itemBean != null && itemBean.getItemType() == BeautyItemBean.BeautyItemType.DIVIDER) { - return new BeautyItemDividerViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_beauty_item_divider, parent, false)); - } else { - return new BeautyItemViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.layout_beauty_item, parent, false)); - } - } - - @Override - public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { - if (holder instanceof BeautyItemViewHolder) { - final BeautyItemBean itemBean = itemBeans.get(position); - - BeautyItemViewHolder viewHolder = (BeautyItemViewHolder) holder; - viewHolder.initData(mContext, itemBean); - - final BeautyItemBean.BeautyItemType itemType = itemBean.getItemType(); - viewHolder.itemView.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View view) { - if (itemType != BeautyItemBean.BeautyItemType.NONE && itemType != BeautyItemBean.BeautyItemType.DIVIDER) { - // When item list can't be multi selected, - // we should disable the status of current selected item. - if (!canMultiSelect && mCurrentSelectedItemBean != null && mCurrentSelectedItemBean != itemBean) { - mCurrentSelectedItemBean.setSelected(false); - // Callback the unselected item data back. - if (mBeautyItemListener != null) { - mBeautyItemListener.onItemDataChanged(mCurrentSelectedItemBean); - } - mCurrentSelectedItemBean = null; - } - - itemBean.setSelected(!itemBean.isSelected()); - mCurrentSelectedItemBean = itemBean; - - if (mBeautyItemListener != null) { - mBeautyItemListener.onItemClicked(itemBean); - } - - notifyDataSetChanged(); - } - } - }); - } - } - - @Override - public int getItemCount() { - return itemBeans.size(); - } - - @Override - public int getItemViewType(int position) { - return position; - } - - static class BeautyItemViewHolder extends RecyclerView.ViewHolder { - - private CircleImageView mCircleIv; - private TextView mTitleTv; - - public BeautyItemViewHolder(@NonNull View itemView) { - super(itemView); - initViews(itemView); - } - - private void initViews(View view) { - if (view == null) return; - mCircleIv = view.findViewById(R.id.image_iv); - mTitleTv = view.findViewById(R.id.beauty_mid_content_title_tv); - } - - public void initData(@Nullable Context context, @Nullable BeautyItemBean beautyItemBean) { - - if (context == null || beautyItemBean == null) return; - - // Only when the itemType is switch or seekbar, it will display whether selected or not. - BeautyItemBean.BeautyItemType itemType = beautyItemBean.getItemType(); - boolean showSelectedStatus = (itemType == BeautyItemBean.BeautyItemType.SWITCH || itemType == BeautyItemBean.BeautyItemType.SEEK_BAR); - boolean isSelected = showSelectedStatus && beautyItemBean.isSelected(); - - if (mCircleIv != null) { - if (beautyItemBean.getImageResId() != 0) { - int imageResId = isSelected ? beautyItemBean.getEnableImageResId() : beautyItemBean.getImageResId(); - mCircleIv.setImageResource(imageResId); - } else { - mCircleIv.setCircleBackgroundColor(context.getColor(R.color.color_bg_beauty_type_default)); - } - } - - if (mTitleTv != null) { - mTitleTv.setText(beautyItemBean.getTitle()); - mTitleTv.setSelected(isSelected); - } - - } - } - - static class BeautyItemDividerViewHolder extends RecyclerView.ViewHolder { - public BeautyItemDividerViewHolder(@NonNull View itemView) { - super(itemView); - } - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/adapter/BeautyTabPageAdapter.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/adapter/BeautyTabPageAdapter.java deleted file mode 100644 index e4b976dc..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/adapter/BeautyTabPageAdapter.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.alivc.live.beautyui.adapter; - -import android.view.View; -import android.view.ViewGroup; - -import androidx.annotation.NonNull; -import androidx.viewpager.widget.PagerAdapter; - -import com.alivc.live.beautyui.component.BeautyItemRecyclerView; - -import java.util.ArrayList; - -/** - * 美颜界面View适配器 - */ -public class BeautyTabPageAdapter extends PagerAdapter { - - public ArrayList viewCacheList = new ArrayList<>(); - - @Override - public int getCount() { - return viewCacheList.size(); - } - - @Override - public boolean isViewFromObject(@NonNull View view, @NonNull Object object) { - return view == object; - } - - @NonNull - @Override - public Object instantiateItem(@NonNull ViewGroup container, int position) { - View view = viewCacheList.get(position); - container.addView(view); - return view; - } - - @Override - public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { - container.removeView((View) object); - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/bean/AnimojiItemBean.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/bean/AnimojiItemBean.java deleted file mode 100644 index 5866efd9..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/bean/AnimojiItemBean.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.alivc.live.beautyui.bean; - -import java.util.Objects; - -public class AnimojiItemBean { - private int id; - - private String title; - - private String path; - - public AnimojiItemBean(int id, String title, String path) { - this.id = id; - this.title = title; - this.path = path; - } - - public int getId() { - return id; - } - - public void setId(int id) { - this.id = id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - AnimojiItemBean that = (AnimojiItemBean) o; - return id == that.id && - Objects.equals(title, that.title) && - Objects.equals(path, that.path); - } - - @Override - public int hashCode() { - return Objects.hash(id, title, path); - } - - @Override - public String toString() { - return "AnimojiItemBean{" + - "id=" + id + - ", title='" + title + '\'' + - ", path='" + path + '\'' + - '}'; - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/bean/BeautyItemBean.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/bean/BeautyItemBean.java deleted file mode 100644 index 5e26a97b..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/bean/BeautyItemBean.java +++ /dev/null @@ -1,322 +0,0 @@ -package com.alivc.live.beautyui.bean; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import java.util.Objects; - -/** - * 美颜Item UI bean - */ -public class BeautyItemBean implements Cloneable { - - public enum BeautyItemType { - - NONE(0), - - DIVIDER(1), - - SWITCH(2), - - SEEK_BAR(3), - - CONFIG_PAGE(4); - - private int value; - - public int getValue() { - return value; - } - - BeautyItemType(int value) { - this.value = value; - } - } - - public enum BeautyType { - BEAUTY_NONE, - /** - * 美颜 - */ - BEAUTY_PARAM, - /** - * 美型 - */ - BEAUTY_FACE_SHAPE, - /** - * 美妆 - */ - BEAUTY_MAKEUP, - /** - * 滤镜 - */ - BEAUTY_LUT, - /** - * 贴纸 - */ - BEAUTY_STICKER, - } - - private int id; - private BeautyType beautyType; - - private String title; - - private int imageResId; - - private BeautyItemType itemType; - - private int enableImageResId; - - // for BeautyItemType.SWITCH - private boolean isSelected = false; - - // for BeautyItemType.SEEK_BAR - // this value is progress bar value - private float maxValue = 0; - private float minValue = 0; - - private float realValue = 0; - private int seekValue = 0; - - // for BeautyItemType.CONFIG_PAGE - private BeautyTabBean tabBean; - - private String materialPath; - - public BeautyItemBean() { - this.itemType = BeautyItemType.DIVIDER; - } - - public BeautyItemBean(BeautyType beautyType, @NonNull String title, int imageResId) { - this.beautyType = beautyType; - this.title = title; - this.imageResId = imageResId; - this.enableImageResId = imageResId; - - this.itemType = BeautyItemType.NONE; - } - - public BeautyItemBean(int id, BeautyType beautyType, @NonNull String title) { - this.id = id; - this.beautyType = beautyType; - this.title = title; - - this.itemType = BeautyItemType.NONE; - } - - public BeautyItemBean(int id, BeautyType beautyType, @NonNull String title, boolean isSelected) { - this.id = id; - this.beautyType = beautyType; - this.title = title; - - this.itemType = BeautyItemType.SWITCH; - this.isSelected = isSelected; - } - - public BeautyItemBean(int id, BeautyType beautyType, @NonNull String title, int imageResId) { - this.id = id; - this.beautyType = beautyType; - this.title = title; - - this.imageResId = imageResId; - this.enableImageResId = imageResId; - - this.itemType = BeautyItemType.NONE; - } - - public BeautyItemBean(int id, BeautyType beautyType, @NonNull String title, int imageResId, boolean isSelected) { - this.id = id; - this.beautyType = beautyType; - this.title = title; - - this.imageResId = imageResId; - this.enableImageResId = imageResId; - - this.itemType = BeautyItemType.SWITCH; - this.isSelected = isSelected; - } - - public BeautyItemBean(int id, BeautyType beautyType, @NonNull String title, int imageResId, int enableImageResId, boolean isSelected) { - this.id = id; - this.beautyType = beautyType; - this.title = title; - - this.imageResId = imageResId; - this.enableImageResId = enableImageResId; - - this.itemType = BeautyItemType.SWITCH; - this.isSelected = isSelected; - } - - public BeautyItemBean(int id, BeautyType beautyType, @NonNull String title, int imageResId, int enableImageResId, float minValue, float maxValue, float value) { - this.id = id; - this.beautyType = beautyType; - this.title = title; - - this.imageResId = imageResId; - this.enableImageResId = enableImageResId; - - this.itemType = BeautyItemType.SEEK_BAR; - this.minValue = minValue; - this.maxValue = maxValue; - setRealValue(value); - } - - public BeautyItemBean(int id, BeautyType beautyType, @NonNull String title, int imageResId, int enableImageResId, @NonNull BeautyTabBean tabBean) { - this.id = id; - this.beautyType = beautyType; - this.title = title; - - this.imageResId = imageResId; - this.enableImageResId = enableImageResId; - - this.itemType = BeautyItemType.CONFIG_PAGE; - this.tabBean = tabBean; - } - - public int getId() { - return id; - } - - public BeautyType getBeautyType() { - return beautyType; - } - - public String getTitle() { - return title; - } - - public int getImageResId() { - return imageResId; - } - - public BeautyItemType getItemType() { - return itemType; - } - - public void setItemType(BeautyItemType itemType) { - this.itemType = itemType; - } - - public int getEnableImageResId() { - return enableImageResId; - } - - public void setEnableImageResId(int enableImageResId) { - this.enableImageResId = enableImageResId; - } - - public boolean isSelected() { - return isSelected; - } - - public void setSelected(boolean selected) { - isSelected = selected; - } - - public float getMaxValue() { - return maxValue; - } - - public void setMaxValue(float maxValue) { - this.maxValue = maxValue; - } - - public float getMinValue() { - return minValue; - } - - public void setMinValue(float minValue) { - this.minValue = minValue; - } - - public int getSeekValue() { - return seekValue; - } - - public void setSeekValue(int seekValue) { - this.seekValue = seekValue; - this.realValue = (maxValue - minValue) * seekValue / 100 + minValue; - } - - public float getRealValue() { - return realValue; - } - - public void setRealValue(float realValue) { - this.realValue = realValue; - this.seekValue = (int) ((realValue - minValue) * 100 / (maxValue - minValue)); - } - - public String getMaterialPath() { - return materialPath; - } - - public void setMaterialPath(String materialPath) { - this.materialPath = materialPath; - } - - @Nullable - public BeautyTabBean getTabBean() { - return tabBean; - } - - public void setTabBean(BeautyTabBean tabBean) { - this.tabBean = tabBean; - } - - @Override - public String toString() { - return "BeautyItemBean{" + - "id=" + id + - ", beautyType=" + beautyType + - ", title='" + title + '\'' + - ", imageResId=" + imageResId + - ", itemType=" + itemType + - ", enableImageResId=" + enableImageResId + - ", isSelected=" + isSelected + - ", maxValue=" + maxValue + - ", minValue=" + minValue + - ", realValue=" + realValue + - ", seekValue=" + seekValue + - ", tabBean=" + tabBean + - ", materialPath='" + materialPath + '\'' + - '}'; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - BeautyItemBean itemBean = (BeautyItemBean) o; - return id == itemBean.id && - imageResId == itemBean.imageResId && - enableImageResId == itemBean.enableImageResId && - isSelected == itemBean.isSelected && - Float.compare(itemBean.maxValue, maxValue) == 0 && - Float.compare(itemBean.minValue, minValue) == 0 && - Float.compare(itemBean.realValue, realValue) == 0 && - seekValue == itemBean.seekValue && - beautyType == itemBean.beautyType && - Objects.equals(title, itemBean.title) && - itemType == itemBean.itemType && - Objects.equals(tabBean, itemBean.tabBean) && - Objects.equals(materialPath, itemBean.materialPath); - } - - @Override - public int hashCode() { - return Objects.hash(id, beautyType, title, imageResId, itemType, enableImageResId, isSelected, maxValue, minValue, realValue, seekValue, tabBean, materialPath); - } - - @NonNull - @Override - public BeautyItemBean clone() { - try { - return (BeautyItemBean) super.clone(); - } catch (CloneNotSupportedException e) { - throw new AssertionError(); - } - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/bean/BeautyTabBean.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/bean/BeautyTabBean.java deleted file mode 100644 index be416089..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/bean/BeautyTabBean.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.alivc.live.beautyui.bean; - -import androidx.annotation.NonNull; - -import java.util.ArrayList; -import java.util.Objects; - -/** - * 美颜TAB UI bean - */ -public class BeautyTabBean implements Cloneable { - - private final int id; - private String title; - - private boolean canMultiSelect; - private boolean isResetShow; - - private ArrayList itemBeans; - - public BeautyTabBean(final int id, String title, ArrayList itemBeans) { - this.id = id; - this.title = title; - this.itemBeans = itemBeans; - } - - public BeautyTabBean(final int id, String title, boolean canMultiSelect, boolean isResetShow, ArrayList itemBeans) { - this.id = id; - this.title = title; - this.canMultiSelect = canMultiSelect; - this.isResetShow = isResetShow; - this.itemBeans = itemBeans; - } - - public int getId() { - return id; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public boolean isCanMultiSelect() { - return canMultiSelect; - } - - public void setCanMultiSelect(boolean canMultiSelect) { - this.canMultiSelect = canMultiSelect; - } - - public boolean isResetShow() { - return isResetShow; - } - - public void setResetShow(boolean resetShow) { - isResetShow = resetShow; - } - - public ArrayList getItemBeans() { - return itemBeans; - } - - public void setItemBeans(ArrayList itemBeans) { - this.itemBeans = itemBeans; - } - - @Override - public String toString() { - return "BeautyTabBean{" + - "id=" + id + - ", title='" + title + '\'' + - ", canMultiSelect=" + canMultiSelect + - ", isResetShow=" + isResetShow + - ", itemBeans=" + itemBeans + - '}'; - } - - @NonNull - @Override - public BeautyTabBean clone() { - ArrayList itemBeans = new ArrayList(); - for (BeautyItemBean bean : this.itemBeans) { - itemBeans.add(bean.clone()); - } - return new BeautyTabBean(this.id, this.title, this.canMultiSelect, this.isResetShow, itemBeans); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - BeautyTabBean tabBean = (BeautyTabBean) o; - return id == tabBean.id && - canMultiSelect == tabBean.canMultiSelect && - isResetShow == tabBean.isResetShow && - Objects.equals(title, tabBean.title) && - Objects.equals(itemBeans, tabBean.itemBeans); - } - - @Override - public int hashCode() { - return Objects.hash(id, title, canMultiSelect, isResetShow, itemBeans); - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/BeautyItemRecyclerView.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/BeautyItemRecyclerView.java deleted file mode 100644 index 6ca6ce67..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/BeautyItemRecyclerView.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.alivc.live.beautyui.component; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.FrameLayout; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.LinearLayoutManager; -import androidx.recyclerview.widget.RecyclerView; - -import com.alivc.live.beautyui.R; -import com.alivc.live.beautyui.adapter.BeautyItemListAdapter; -import com.alivc.live.beautyui.bean.BeautyItemBean; -import com.alivc.live.beautyui.listener.BeautyItemListener; - -import java.util.ArrayList; - -/** - * 美颜多Item的横向Recyclerview - */ -public class BeautyItemRecyclerView extends FrameLayout { - - private static final String TAG = BeautyItemRecyclerView.class.getSimpleName(); - - private RecyclerView mRecyclerView; - - private final BeautyItemListAdapter mBeautyItemListAdapter = new BeautyItemListAdapter(getContext()); - - private BeautyItemListener mBeautyItemListener; - - public BeautyItemRecyclerView(@NonNull Context context) { - super(context); - - initViews(context); - } - - public BeautyItemRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs) { - super(context, attrs); - - initViews(context); - } - - public BeautyItemRecyclerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - - initViews(context); - } - - public void setCanMultiSelect(boolean canMultiSelect) { - mBeautyItemListAdapter.setCanMultiSelect(canMultiSelect); - } - - public void setItemBeans(ArrayList itemBeans) { - mBeautyItemListAdapter.setItemBeans(itemBeans); - } - - public void setBeautyItemListener(BeautyItemListener listener) { - mBeautyItemListener = listener; - } - - public void resetAllItemViews() { - mBeautyItemListAdapter.resetAllItemViews(); - } - - private void initViews(Context context) { - LayoutInflater.from(context).inflate(R.layout.layout_beauty_item_list_recyclerview, this, true); - initRecyclerView(); - } - - private void initRecyclerView() { - mRecyclerView = findViewById(R.id.beauty_item_rv); - LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext()); - linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL); - mRecyclerView.setLayoutManager(linearLayoutManager); - mRecyclerView.setAdapter(mBeautyItemListAdapter); - mRecyclerView.setItemViewCacheSize(0); - setDrawingCacheEnabled(true); - setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH); - - mBeautyItemListAdapter.setBeautyItemListener(new BeautyItemListener() { - @Override - public void onItemClicked(@Nullable BeautyItemBean beautyItemBean) { - if (mBeautyItemListener != null) { - mBeautyItemListener.onItemClicked(beautyItemBean); - } - } - - @Override - public void onItemDataChanged(@Nullable BeautyItemBean beautyItemBean) { - if (mBeautyItemListener != null) { - mBeautyItemListener.onItemDataChanged(beautyItemBean); - } - } - }); - } - -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/BeautyTabContainerView.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/BeautyTabContainerView.java deleted file mode 100644 index 70b90a39..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/BeautyTabContainerView.java +++ /dev/null @@ -1,353 +0,0 @@ -package com.alivc.live.beautyui.component; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.FrameLayout; -import android.widget.ImageView; -import android.widget.LinearLayout; -import android.widget.SeekBar; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; - -import com.alivc.live.beautyui.R; -import com.alivc.live.beautyui.adapter.BeautyTabPageAdapter; -import com.alivc.live.beautyui.bean.BeautyItemBean; -import com.alivc.live.beautyui.bean.BeautyTabBean; -import com.alivc.live.beautyui.listener.BeautyItemListener; -import com.alivc.live.beautyui.listener.BeautyTabListener; -import com.google.android.material.tabs.TabLayout; - -import java.util.ArrayList; - -/** - * 美颜TabLayout,包括:顶部调节SeekBar,中间TabLayout,ViewPager,和底部重置、收起按钮 - */ -public class BeautyTabContainerView extends FrameLayout implements View.OnClickListener { - - private static final String TAG = BeautyTabContainerView.class.getSimpleName(); - - // top adjust view - private TextView mTopAdjustTitleTv; - private SeekBar mTopAdjustValueSb; - private ImageView mBeautyCompareIv; - - // mid content view - private TabLayout mTabLayout; - - // bottom ctrl view - private LinearLayout mBeautyResetBtn; - private ImageView mBeautyPutAwayBtn; - - private final BeautyTabPageAdapter mBeautyPageAdapter = new BeautyTabPageAdapter(); - private final ArrayList mBeautyTabBeans = new ArrayList<>(); - - private BeautyTabListener mBeautyTabListener; - - private BeautyItemBean mBeautyItemBean; - - public BeautyTabContainerView(@NonNull Context context) { - super(context); - init(context); - } - - public BeautyTabContainerView(@NonNull Context context, @Nullable AttributeSet attrs) { - super(context, attrs); - init(context); - } - - public BeautyTabContainerView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { - super(context, attrs, defStyleAttr); - init(context); - } - - private void init(Context context) { - initViews(context); - } - - private void initViews(Context context) { - LayoutInflater.from(context).inflate(R.layout.layout_beauty_tab_container, this, true); - initTopAdjustViews(); - initMidContentViews(); - initBottomControlViews(); - } - - private void initTopAdjustViews() { - mTopAdjustTitleTv = findViewById(R.id.beauty_top_adjust_title_tv); - mTopAdjustValueSb = findViewById(R.id.beauty_top_adjust_value_sb); - mBeautyCompareIv = findViewById(R.id.beauty_compare_iv); - // todo: feature not supported - mBeautyCompareIv.setVisibility(View.INVISIBLE); - - mTopAdjustValueSb.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() { - @Override - public void onProgressChanged(SeekBar seekBar, int i, boolean b) { - if (mBeautyItemBean != null) { - mBeautyItemBean.setSeekValue(seekBar.getProgress()); - } - if (mBeautyTabListener != null) { - mBeautyTabListener.onTabItemDataChanged(getCurrentTabBean(), mBeautyItemBean); - } - } - - @Override - public void onStartTrackingTouch(SeekBar seekBar) { - - } - - @Override - public void onStopTrackingTouch(SeekBar seekBar) { - } - }); - } - - private void initMidContentViews() { - BeautyViewPager viewPager = findViewById(R.id.beauty_mid_content_view_pager); - viewPager.setOffscreenPageLimit(4); - viewPager.setAdapter(mBeautyPageAdapter); - viewPager.setCurrentItem(0); - - mTabLayout = findViewById(R.id.beauty_mid_content_tab_layout); - mTabLayout.setTabMode(TabLayout.MODE_SCROLLABLE); - mTabLayout.setupWithViewPager(viewPager); - - mTabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() { - @Override - public void onTabSelected(TabLayout.Tab tab) { - onCurrentTabChanged(); - } - - @Override - public void onTabUnselected(TabLayout.Tab tab) { - - } - - @Override - public void onTabReselected(TabLayout.Tab tab) { - - } - }); - } - - private void initBottomControlViews() { - mBeautyResetBtn = findViewById(R.id.beauty_reset_btn); - mBeautyResetBtn.setOnClickListener(this); - - mBeautyPutAwayBtn = findViewById(R.id.beauty_put_away_btn); - mBeautyPutAwayBtn.setOnClickListener(this); - } - - public void setBeautyTabListener(BeautyTabListener beautyTabListener) { - mBeautyTabListener = beautyTabListener; - } - - public void initData(BeautyTabBean tabBean) { - mBeautyTabBeans.clear(); - mBeautyTabBeans.add(tabBean); - updateTabBeans(); - } - - public void initData(ArrayList tabBeans) { - mBeautyTabBeans.clear(); - mBeautyTabBeans.addAll(tabBeans); - updateTabBeans(); - } - - private void updateTabBeans() { - - ArrayList viewCacheList = new ArrayList<>(); - for (BeautyTabBean tabBean : mBeautyTabBeans) { - viewCacheList.add(getPageView(tabBean)); - } - - mBeautyPageAdapter.viewCacheList.clear(); - mBeautyPageAdapter.viewCacheList.addAll(viewCacheList); - mBeautyPageAdapter.notifyDataSetChanged(); - - for (int i = 0; i < mBeautyTabBeans.size(); ++i) { - BeautyTabBean tabBean = mBeautyTabBeans.get(i); - TabLayout.Tab tab = mTabLayout.getTabAt(i); - if (tab != null) { - tab.setCustomView(getTabView(tabBean)); - tab.setId(tabBean.getId()); - } - } - - // if tab count is 1, hide the tab indicator. - if (mBeautyTabBeans.size() < 2) { - mTabLayout.setSelectedTabIndicatorHeight(0); - } - - } - - public void resetAllTabs() { - ArrayList beautyTabBeans = getBeautyTabBeans(); - final int tabCount = beautyTabBeans.size(); - for (int index = 0; index < tabCount; ++index) { - BeautyTabBean tabBean = getTabBeanByPosition(index); - if (index < mBeautyPageAdapter.viewCacheList.size()) { - hideValueSeekBar(); - - BeautyItemRecyclerView recyclerView = mBeautyPageAdapter.viewCacheList.get(index); - recyclerView.resetAllItemViews(); - - if (mBeautyTabListener != null) { - mBeautyTabListener.onTabReset(tabBean); - } - } - } - } - - // This is a bad design, - // We should reset the data instead of the view, - // because there can be multiple data, but it's better to have only one view. - public void resetCurrentTab() { - // Reset all the item data of the current tab and callback to reset all the item data of its subtab recursively. - int index = mTabLayout.getSelectedTabPosition(); - if (index < mBeautyPageAdapter.viewCacheList.size()) { - hideValueSeekBar(); - - BeautyItemRecyclerView recyclerView = mBeautyPageAdapter.viewCacheList.get(index); - recyclerView.resetAllItemViews(); - - if (mBeautyTabListener != null) { - mBeautyTabListener.onTabReset(getCurrentTabBean()); - } - } - - mBeautyItemBean = null; - } - - @Nullable - public BeautyTabBean getCurrentTabBean() { - int index = mTabLayout.getSelectedTabPosition(); - return getTabBeanByPosition(index); - } - - public BeautyTabBean getTabBeanByPosition(int position) { - if (mTabLayout != null) { - if (position >= 0 && mBeautyTabBeans.size() > position) { - return mBeautyTabBeans.get(position); - } - } - return null; - } - - public ArrayList getBeautyTabBeans() { - return mBeautyTabBeans; - } - - private View getTabView(@NonNull BeautyTabBean tabBean) { - View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_beauty_tab_title, null); - TextView titleView = view.findViewById(R.id.title_tv); - titleView.setText(tabBean.getTitle()); - return view; - } - - private BeautyItemRecyclerView getPageView(BeautyTabBean tabBean) { - BeautyItemRecyclerView beautyItemRecyclerView = new BeautyItemRecyclerView(getContext()); - beautyItemRecyclerView.setBeautyItemListener(new BeautyItemListener() { - @Override - public void onItemClicked(@Nullable BeautyItemBean beautyItemBean) { - if (beautyItemBean == null) return; - mBeautyItemBean = beautyItemBean; - doItemDataChanged(beautyItemBean); - } - - @Override - public void onItemDataChanged(@Nullable BeautyItemBean beautyItemBean) { - if (beautyItemBean == null) return; - doItemDataChanged(beautyItemBean); - } - - }); - beautyItemRecyclerView.setCanMultiSelect(tabBean.isCanMultiSelect()); - beautyItemRecyclerView.setItemBeans(tabBean.getItemBeans()); - return beautyItemRecyclerView; - } - - @Override - public void onClick(View view) { - int id = view.getId(); - if (id == R.id.beauty_reset_btn) { - resetCurrentTab(); - } else if (id == R.id.beauty_put_away_btn) { - doPutAway(); - } - } - - private void doPutAway() { - - if (mBeautyTabListener != null) { - mBeautyTabListener.onTabPutAway(getCurrentTabBean()); - } - - mBeautyItemBean = null; - - } - - private void doItemDataChanged(@NonNull BeautyItemBean beautyItemBean) { - if (mBeautyTabListener != null) { - mBeautyTabListener.onTabItemDataChanged(getCurrentTabBean(), beautyItemBean); - } - - if (beautyItemBean.getItemType() == BeautyItemBean.BeautyItemType.SEEK_BAR && beautyItemBean.isSelected()) { - showValueSeekBar(beautyItemBean); - } else { - hideValueSeekBar(); - } - - } - - private void showValueSeekBar(@Nullable BeautyItemBean itemBean) { - if (itemBean == null) return; - - if (mTopAdjustValueSb != null) { - mTopAdjustValueSb.setProgress(itemBean.getSeekValue()); - mTopAdjustValueSb.setVisibility(View.VISIBLE); - } - - if (mTopAdjustTitleTv != null) { - mTopAdjustTitleTv.setText(itemBean.getTitle()); - mTopAdjustTitleTv.setVisibility(View.VISIBLE); - } - } - - private void hideValueSeekBar() { - if (mTopAdjustValueSb != null) { - mTopAdjustValueSb.setVisibility(View.GONE); - } - - if (mTopAdjustTitleTv != null) { - mTopAdjustTitleTv.setVisibility(View.GONE); - } - } - - private void onCurrentTabChanged() { - BeautyTabBean tabBean = getCurrentTabBean(); - if (tabBean == null) return; - - hideValueSeekBar(); - - /// pick the first select item - for (BeautyItemBean itemBean : tabBean.getItemBeans()) { - if (itemBean.isSelected()) { - mBeautyItemBean = itemBean; - if (itemBean.getItemType() == BeautyItemBean.BeautyItemType.SEEK_BAR) { - showValueSeekBar(itemBean); - } - break; - } - } - - // update reset btn status. - if (tabBean.isResetShow()) { - mBeautyResetBtn.setVisibility(View.VISIBLE); - } else { - mBeautyResetBtn.setVisibility(View.GONE); - } - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/BeautyViewPager.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/BeautyViewPager.java deleted file mode 100644 index cfe28ea5..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/BeautyViewPager.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.alivc.live.beautyui.component; - -import android.content.Context; -import android.util.AttributeSet; -import android.view.MotionEvent; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.viewpager.widget.ViewPager; - -/** - * 美颜Tab对应的ViewPager,禁止ViewPager滑动、禁止滑动动画 - */ -class BeautyViewPager extends ViewPager { - public BeautyViewPager(@NonNull Context context) { - super(context); - } - - public BeautyViewPager(@NonNull Context context, @Nullable AttributeSet attrs) { - super(context, attrs); - } - - @Override - public boolean onTouchEvent(MotionEvent ev) { - // can not scroll by view page - return false; - } - - @Override - public boolean onInterceptTouchEvent(MotionEvent ev) { - // can not scroll by view page - return false; - } - - @Override - public void setCurrentItem(int item) { - // disable scroll view animation - super.setCurrentItem(item, false); - } - - @Override - public void setCurrentItem(int item, boolean smoothScroll) { - super.setCurrentItem(item, smoothScroll); - } -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/CircleImageView.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/CircleImageView.java deleted file mode 100644 index 4f77acfb..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/component/CircleImageView.java +++ /dev/null @@ -1,518 +0,0 @@ -/* - * Copyright 2014 - 2020 Henning Dodenhof - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.alivc.live.beautyui.component; - -import android.annotation.SuppressLint; -import android.content.Context; -import android.content.res.TypedArray; -import android.graphics.Bitmap; -import android.graphics.BitmapShader; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.ColorFilter; -import android.graphics.Matrix; -import android.graphics.Outline; -import android.graphics.Paint; -import android.graphics.Rect; -import android.graphics.RectF; -import android.graphics.Shader; -import android.graphics.drawable.BitmapDrawable; -import android.graphics.drawable.ColorDrawable; -import android.graphics.drawable.Drawable; -import android.net.Uri; -import android.os.Build; -import android.util.AttributeSet; -import android.view.MotionEvent; -import android.view.View; -import android.view.ViewOutlineProvider; - -import androidx.annotation.ColorInt; -import androidx.annotation.ColorRes; -import androidx.annotation.DrawableRes; -import androidx.annotation.NonNull; -import androidx.annotation.RequiresApi; - -import com.alivc.live.beautyui.R; - -/** - * CircleImageView - *

- * reference: https://github.com/hdodenhof/CircleImageView - */ -public class CircleImageView extends androidx.appcompat.widget.AppCompatImageView { - - private static final ScaleType SCALE_TYPE = ScaleType.CENTER_CROP; - - private static final Bitmap.Config BITMAP_CONFIG = Bitmap.Config.ARGB_8888; - private static final int COLORDRAWABLE_DIMENSION = 2; - - private static final int DEFAULT_BORDER_WIDTH = 0; - private static final int DEFAULT_BORDER_COLOR = Color.BLACK; - private static final int DEFAULT_CIRCLE_BACKGROUND_COLOR = Color.TRANSPARENT; - private static final int DEFAULT_IMAGE_ALPHA = 255; - private static final boolean DEFAULT_BORDER_OVERLAY = false; - - private final RectF mDrawableRect = new RectF(); - private final RectF mBorderRect = new RectF(); - - private final Matrix mShaderMatrix = new Matrix(); - private final Paint mBitmapPaint = new Paint(); - private final Paint mBorderPaint = new Paint(); - private final Paint mCircleBackgroundPaint = new Paint(); - - private int mBorderColor = DEFAULT_BORDER_COLOR; - private int mBorderWidth = DEFAULT_BORDER_WIDTH; - private int mCircleBackgroundColor = DEFAULT_CIRCLE_BACKGROUND_COLOR; - private int mImageAlpha = DEFAULT_IMAGE_ALPHA; - - private Bitmap mBitmap; - private Canvas mBitmapCanvas; - - private float mDrawableRadius; - private float mBorderRadius; - - private ColorFilter mColorFilter; - - private boolean mInitialized; - private boolean mRebuildShader; - private boolean mDrawableDirty; - - private boolean mBorderOverlay; - private boolean mDisableCircularTransformation; - - public CircleImageView(Context context) { - super(context); - - init(); - } - - public CircleImageView(Context context, AttributeSet attrs) { - this(context, attrs, 0); - } - - public CircleImageView(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - - TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CircleImageView, defStyle, 0); - - mBorderWidth = a.getDimensionPixelSize(R.styleable.CircleImageView_civ_border_width, DEFAULT_BORDER_WIDTH); - mBorderColor = a.getColor(R.styleable.CircleImageView_civ_border_color, DEFAULT_BORDER_COLOR); - mBorderOverlay = a.getBoolean(R.styleable.CircleImageView_civ_border_overlay, DEFAULT_BORDER_OVERLAY); - mCircleBackgroundColor = a.getColor(R.styleable.CircleImageView_civ_circle_background_color, DEFAULT_CIRCLE_BACKGROUND_COLOR); - - a.recycle(); - - init(); - } - - private void init() { - mInitialized = true; - - super.setScaleType(SCALE_TYPE); - - mBitmapPaint.setAntiAlias(true); - mBitmapPaint.setDither(true); - mBitmapPaint.setFilterBitmap(true); - mBitmapPaint.setAlpha(mImageAlpha); - mBitmapPaint.setColorFilter(mColorFilter); - - mBorderPaint.setStyle(Paint.Style.STROKE); - mBorderPaint.setAntiAlias(true); - mBorderPaint.setColor(mBorderColor); - mBorderPaint.setStrokeWidth(mBorderWidth); - - mCircleBackgroundPaint.setStyle(Paint.Style.FILL); - mCircleBackgroundPaint.setAntiAlias(true); - mCircleBackgroundPaint.setColor(mCircleBackgroundColor); - - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - setOutlineProvider(new OutlineProvider()); - } - } - - @Override - public void setScaleType(ScaleType scaleType) { - if (scaleType != SCALE_TYPE) { - throw new IllegalArgumentException(String.format("ScaleType %s not supported.", scaleType)); - } - } - - @Override - public void setAdjustViewBounds(boolean adjustViewBounds) { - if (adjustViewBounds) { - throw new IllegalArgumentException("adjustViewBounds not supported."); - } - } - - @SuppressLint("CanvasSize") - @Override - protected void onDraw(Canvas canvas) { - if (mDisableCircularTransformation) { - super.onDraw(canvas); - return; - } - - if (mCircleBackgroundColor != Color.TRANSPARENT) { - canvas.drawCircle(mDrawableRect.centerX(), mDrawableRect.centerY(), mDrawableRadius, mCircleBackgroundPaint); - } - - if (mBitmap != null) { - if (mDrawableDirty && mBitmapCanvas != null) { - mDrawableDirty = false; - Drawable drawable = getDrawable(); - drawable.setBounds(0, 0, mBitmapCanvas.getWidth(), mBitmapCanvas.getHeight()); - drawable.draw(mBitmapCanvas); - } - - if (mRebuildShader) { - mRebuildShader = false; - - BitmapShader bitmapShader = new BitmapShader(mBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP); - bitmapShader.setLocalMatrix(mShaderMatrix); - - mBitmapPaint.setShader(bitmapShader); - } - - canvas.drawCircle(mDrawableRect.centerX(), mDrawableRect.centerY(), mDrawableRadius, mBitmapPaint); - } - - if (mBorderWidth > 0) { - canvas.drawCircle(mBorderRect.centerX(), mBorderRect.centerY(), mBorderRadius, mBorderPaint); - } - } - - @Override - public void invalidateDrawable(@NonNull Drawable dr) { - mDrawableDirty = true; - invalidate(); - } - - @Override - protected void onSizeChanged(int w, int h, int oldw, int oldh) { - super.onSizeChanged(w, h, oldw, oldh); - updateDimensions(); - invalidate(); - } - - @Override - public void setPadding(int left, int top, int right, int bottom) { - super.setPadding(left, top, right, bottom); - updateDimensions(); - invalidate(); - } - - @Override - public void setPaddingRelative(int start, int top, int end, int bottom) { - super.setPaddingRelative(start, top, end, bottom); - updateDimensions(); - invalidate(); - } - - public int getBorderColor() { - return mBorderColor; - } - - public void setBorderColor(@ColorInt int borderColor) { - if (borderColor == mBorderColor) { - return; - } - - mBorderColor = borderColor; - mBorderPaint.setColor(borderColor); - invalidate(); - } - - public int getCircleBackgroundColor() { - return mCircleBackgroundColor; - } - - public void setCircleBackgroundColor(@ColorInt int circleBackgroundColor) { - if (circleBackgroundColor == mCircleBackgroundColor) { - return; - } - - mCircleBackgroundColor = circleBackgroundColor; - mCircleBackgroundPaint.setColor(circleBackgroundColor); - invalidate(); - } - - /** - * @deprecated Use {@link #setCircleBackgroundColor(int)} instead - */ - @Deprecated - public void setCircleBackgroundColorResource(@ColorRes int circleBackgroundRes) { - setCircleBackgroundColor(getContext().getResources().getColor(circleBackgroundRes)); - } - - public int getBorderWidth() { - return mBorderWidth; - } - - public void setBorderWidth(int borderWidth) { - if (borderWidth == mBorderWidth) { - return; - } - - mBorderWidth = borderWidth; - mBorderPaint.setStrokeWidth(borderWidth); - updateDimensions(); - invalidate(); - } - - public boolean isBorderOverlay() { - return mBorderOverlay; - } - - public void setBorderOverlay(boolean borderOverlay) { - if (borderOverlay == mBorderOverlay) { - return; - } - - mBorderOverlay = borderOverlay; - updateDimensions(); - invalidate(); - } - - public boolean isDisableCircularTransformation() { - return mDisableCircularTransformation; - } - - public void setDisableCircularTransformation(boolean disableCircularTransformation) { - if (disableCircularTransformation == mDisableCircularTransformation) { - return; - } - - mDisableCircularTransformation = disableCircularTransformation; - - if (disableCircularTransformation) { - mBitmap = null; - mBitmapCanvas = null; - mBitmapPaint.setShader(null); - } else { - initializeBitmap(); - } - - invalidate(); - } - - @Override - public void setImageBitmap(Bitmap bm) { - super.setImageBitmap(bm); - initializeBitmap(); - invalidate(); - } - - @Override - public void setImageDrawable(Drawable drawable) { - super.setImageDrawable(drawable); - initializeBitmap(); - invalidate(); - } - - @Override - public void setImageResource(@DrawableRes int resId) { - super.setImageResource(resId); - initializeBitmap(); - invalidate(); - } - - @Override - public void setImageURI(Uri uri) { - super.setImageURI(uri); - initializeBitmap(); - invalidate(); - } - - @Override - public void setImageAlpha(int alpha) { - alpha &= 0xFF; - - if (alpha == mImageAlpha) { - return; - } - - mImageAlpha = alpha; - - // This might be called during ImageView construction before - // member initialization has finished on API level >= 16. - if (mInitialized) { - mBitmapPaint.setAlpha(alpha); - invalidate(); - } - } - - @Override - public int getImageAlpha() { - return mImageAlpha; - } - - @Override - public void setColorFilter(ColorFilter cf) { - if (cf == mColorFilter) { - return; - } - - mColorFilter = cf; - - // This might be called during ImageView construction before - // member initialization has finished on API level <= 19. - if (mInitialized) { - mBitmapPaint.setColorFilter(cf); - invalidate(); - } - } - - @Override - public ColorFilter getColorFilter() { - return mColorFilter; - } - - private Bitmap getBitmapFromDrawable(Drawable drawable) { - if (drawable == null) { - return null; - } - - if (drawable instanceof BitmapDrawable) { - return ((BitmapDrawable) drawable).getBitmap(); - } - - try { - Bitmap bitmap; - - if (drawable instanceof ColorDrawable) { - bitmap = Bitmap.createBitmap(COLORDRAWABLE_DIMENSION, COLORDRAWABLE_DIMENSION, BITMAP_CONFIG); - } else { - bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), BITMAP_CONFIG); - } - - Canvas canvas = new Canvas(bitmap); - drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight()); - drawable.draw(canvas); - return bitmap; - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - private void initializeBitmap() { - mBitmap = getBitmapFromDrawable(getDrawable()); - - if (mBitmap != null && mBitmap.isMutable()) { - mBitmapCanvas = new Canvas(mBitmap); - } else { - mBitmapCanvas = null; - } - - if (!mInitialized) { - return; - } - - if (mBitmap != null) { - updateShaderMatrix(); - } else { - mBitmapPaint.setShader(null); - } - } - - private void updateDimensions() { - mBorderRect.set(calculateBounds()); - mBorderRadius = Math.min((mBorderRect.height() - mBorderWidth) / 2.0f, (mBorderRect.width() - mBorderWidth) / 2.0f); - - mDrawableRect.set(mBorderRect); - if (!mBorderOverlay && mBorderWidth > 0) { - mDrawableRect.inset(mBorderWidth - 1.0f, mBorderWidth - 1.0f); - } - mDrawableRadius = Math.min(mDrawableRect.height() / 2.0f, mDrawableRect.width() / 2.0f); - - updateShaderMatrix(); - } - - private RectF calculateBounds() { - int availableWidth = getWidth() - getPaddingLeft() - getPaddingRight(); - int availableHeight = getHeight() - getPaddingTop() - getPaddingBottom(); - - int sideLength = Math.min(availableWidth, availableHeight); - - float left = getPaddingLeft() + (availableWidth - sideLength) / 2f; - float top = getPaddingTop() + (availableHeight - sideLength) / 2f; - - return new RectF(left, top, left + sideLength, top + sideLength); - } - - private void updateShaderMatrix() { - if (mBitmap == null) { - return; - } - - float scale; - float dx = 0; - float dy = 0; - - mShaderMatrix.set(null); - - int bitmapHeight = mBitmap.getHeight(); - int bitmapWidth = mBitmap.getWidth(); - - if (bitmapWidth * mDrawableRect.height() > mDrawableRect.width() * bitmapHeight) { - scale = mDrawableRect.height() / (float) bitmapHeight; - dx = (mDrawableRect.width() - bitmapWidth * scale) * 0.5f; - } else { - scale = mDrawableRect.width() / (float) bitmapWidth; - dy = (mDrawableRect.height() - bitmapHeight * scale) * 0.5f; - } - - mShaderMatrix.setScale(scale, scale); - mShaderMatrix.postTranslate((int) (dx + 0.5f) + mDrawableRect.left, (int) (dy + 0.5f) + mDrawableRect.top); - - mRebuildShader = true; - } - - @SuppressLint("ClickableViewAccessibility") - @Override - public boolean onTouchEvent(MotionEvent event) { - if (mDisableCircularTransformation) { - return super.onTouchEvent(event); - } - - return inTouchableArea(event.getX(), event.getY()) && super.onTouchEvent(event); - } - - private boolean inTouchableArea(float x, float y) { - if (mBorderRect.isEmpty()) { - return true; - } - - return Math.pow(x - mBorderRect.centerX(), 2) + Math.pow(y - mBorderRect.centerY(), 2) <= Math.pow(mBorderRadius, 2); - } - - @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) - private class OutlineProvider extends ViewOutlineProvider { - - @Override - public void getOutline(View view, Outline outline) { - if (mDisableCircularTransformation) { - ViewOutlineProvider.BACKGROUND.getOutline(view, outline); - } else { - Rect bounds = new Rect(); - mBorderRect.roundOut(bounds); - outline.setRoundRect(bounds, bounds.width() / 2.0f); - } - } - - } - -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/listener/BeautyItemListener.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/listener/BeautyItemListener.java deleted file mode 100644 index 892280cf..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/listener/BeautyItemListener.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.alivc.live.beautyui.listener; - -import androidx.annotation.Nullable; - -import com.alivc.live.beautyui.bean.BeautyItemBean; - -/** - * 美颜Item事件回调 - */ -public interface BeautyItemListener { - - public abstract void onItemClicked(@Nullable BeautyItemBean beautyItemBean); - - public abstract void onItemDataChanged(@Nullable BeautyItemBean beautyItemBean); - -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/listener/BeautyTabListener.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/listener/BeautyTabListener.java deleted file mode 100644 index 4b32d20b..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/listener/BeautyTabListener.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.alivc.live.beautyui.listener; - - -import androidx.annotation.Nullable; - -import com.alivc.live.beautyui.bean.BeautyItemBean; -import com.alivc.live.beautyui.bean.BeautyTabBean; - -/** - * 美颜Tab事件回调 - */ -public interface BeautyTabListener { - - public abstract void onTabItemDataChanged(@Nullable BeautyTabBean tabBean, @Nullable BeautyItemBean beautyItemBean); - - public abstract void onTabPutAway(@Nullable BeautyTabBean tabBean); - - public abstract void onTabReset(@Nullable BeautyTabBean tabBean); - -} diff --git a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/manager/BeautyUIManager.java b/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/manager/BeautyUIManager.java deleted file mode 100644 index 2ab22d14..00000000 --- a/AliLivePushDemo/beautyui/src/main/java/com/alivc/live/beautyui/manager/BeautyUIManager.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.alivc.live.beautyui.manager; - -import android.util.Log; - -import androidx.annotation.Nullable; - -import com.alivc.live.beautyui.bean.BeautyItemBean; -import com.alivc.live.beauty.BeautyInterface; - -/** - * 当美颜UI响应用户操作后,调用美颜相关的接口 - */ -public class BeautyUIManager { - private static final String TAG = BeautyUIManager.class.getSimpleName(); - - public static void onTabItemDataChanged(@Nullable BeautyInterface beautyManager, @Nullable BeautyItemBean beautyItemBean) { - if (beautyItemBean == null) return; - - BeautyItemBean.BeautyType beautyType = beautyItemBean.getBeautyType(); - if (beautyManager == null || beautyType == null) return; - - final int id = beautyItemBean.getId(); - final String title = beautyItemBean.getTitle(); - final boolean isSelected = beautyItemBean.isSelected(); - final float value = beautyItemBean.getRealValue(); - final String materialPath = beautyItemBean.getMaterialPath(); - - // 检测函数调用耗时,目前2ms以下,可能是异步调用的原因。 - long start = System.currentTimeMillis(); - - switch (beautyType) { - case BEAUTY_PARAM: - beautyManager.setBeautyParams(id, value); - Log.d(TAG, "set beauty param: " + title + ", " + id + ", " + isSelected + ", " + value + ", cost: " + (System.currentTimeMillis() - start)); - break; - case BEAUTY_FACE_SHAPE: - beautyManager.setFaceShapeParams(id, value); - Log.d(TAG, "set beauty faceshape: " + title + ", " + id + ", " + isSelected + ", " + value + ", cost: " + (System.currentTimeMillis() - start)); - break; - case BEAUTY_MAKEUP: - if (materialPath != null) { - beautyManager.setMakeupParams(id, isSelected ? materialPath : ""); - Log.d(TAG, "set beauty makeup: " + title + ", " + id + ", " + isSelected + ", " + materialPath + ", cost: " + (System.currentTimeMillis() - start)); - } - break; - case BEAUTY_LUT: - beautyManager.setFilterParams(isSelected ? materialPath : null); - Log.d(TAG, "set beauty lut: " + title + ", " + isSelected + ", " + materialPath + ", cost: " + (System.currentTimeMillis() - start)); - break; - case BEAUTY_STICKER: - if (materialPath != null) { - if (isSelected) { - beautyManager.setMaterialParams(materialPath); - } else { - beautyManager.removeMaterialParams(materialPath); - } - Log.d(TAG, "set beauty sticker: " + title + ", " + isSelected + ", " + materialPath + ", cost: " + (System.currentTimeMillis() - start)); - } - break; - default: - break; - } - } -} diff --git a/AliLivePushDemo/beautyui/src/main/res/drawable-xxhdpi/icon_beauty_compare.png b/AliLivePushDemo/beautyui/src/main/res/drawable-xxhdpi/icon_beauty_compare.png deleted file mode 100644 index 380f22df..00000000 Binary files a/AliLivePushDemo/beautyui/src/main/res/drawable-xxhdpi/icon_beauty_compare.png and /dev/null differ diff --git a/AliLivePushDemo/beautyui/src/main/res/drawable-xxhdpi/icon_beauty_put_away.png b/AliLivePushDemo/beautyui/src/main/res/drawable-xxhdpi/icon_beauty_put_away.png deleted file mode 100644 index 2a452c9b..00000000 Binary files a/AliLivePushDemo/beautyui/src/main/res/drawable-xxhdpi/icon_beauty_put_away.png and /dev/null differ diff --git a/AliLivePushDemo/beautyui/src/main/res/drawable-xxhdpi/icon_beauty_reset.png b/AliLivePushDemo/beautyui/src/main/res/drawable-xxhdpi/icon_beauty_reset.png deleted file mode 100644 index 7c8dbe94..00000000 Binary files a/AliLivePushDemo/beautyui/src/main/res/drawable-xxhdpi/icon_beauty_reset.png and /dev/null differ diff --git a/AliLivePushDemo/beautyui/src/main/res/drawable/layer_beauty_progressbar_bg.xml b/AliLivePushDemo/beautyui/src/main/res/drawable/layer_beauty_progressbar_bg.xml deleted file mode 100644 index c173a9f2..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/drawable/layer_beauty_progressbar_bg.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/drawable/selector_beauty_item.xml b/AliLivePushDemo/beautyui/src/main/res/drawable/selector_beauty_item.xml deleted file mode 100644 index 8e8c6c75..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/drawable/selector_beauty_item.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/drawable/shape_beauty_seekbar_dot.xml b/AliLivePushDemo/beautyui/src/main/res/drawable/shape_beauty_seekbar_dot.xml deleted file mode 100644 index 67fc1f3a..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/drawable/shape_beauty_seekbar_dot.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/layout/layout_animoji_container.xml b/AliLivePushDemo/beautyui/src/main/res/layout/layout_animoji_container.xml deleted file mode 100644 index f3c01929..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/layout/layout_animoji_container.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_bottom_control.xml b/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_bottom_control.xml deleted file mode 100644 index d1724370..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_bottom_control.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_container.xml b/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_container.xml deleted file mode 100644 index 4ecf5203..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_container.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_item.xml b/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_item.xml deleted file mode 100644 index bf94decf..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_item.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_item_divider.xml b/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_item_divider.xml deleted file mode 100644 index f42741a9..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_item_divider.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_item_list_recyclerview.xml b/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_item_list_recyclerview.xml deleted file mode 100644 index b8d98e8c..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_item_list_recyclerview.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_tab_container.xml b/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_tab_container.xml deleted file mode 100644 index 7d97aec6..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_tab_container.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_tab_title.xml b/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_tab_title.xml deleted file mode 100644 index 118442a6..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_tab_title.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_top_adjust.xml b/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_top_adjust.xml deleted file mode 100644 index 3813b5c8..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/layout/layout_beauty_top_adjust.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/values/attrs.xml b/AliLivePushDemo/beautyui/src/main/res/values/attrs.xml deleted file mode 100644 index 0c57b2a2..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/values/attrs.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/values/colors.xml b/AliLivePushDemo/beautyui/src/main/res/values/colors.xml deleted file mode 100644 index bc0c703e..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/values/colors.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - #66000000 - #1AFFFFFF - #1AFFFFFF - #FFD8D8D8 - #FFD8D8D8 - #1AD8D8D8 - #FF5B5A5D - - #1AED99 - #ffffffff - #FF000000 - #00000000 - #fff - - - #0057e7 - #008744 - #d62d20 - #ffa700 - - #4285F4 - #34A853 - #EA4335 - #FBBC05 - - \ No newline at end of file diff --git a/AliLivePushDemo/beautyui/src/main/res/values/strings.xml b/AliLivePushDemo/beautyui/src/main/res/values/strings.xml deleted file mode 100644 index 94355db9..00000000 --- a/AliLivePushDemo/beautyui/src/main/res/values/strings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - 重置 - - 美颜 - 美妆 - 滤镜 - 贴纸 - - \ No newline at end of file diff --git a/AliLivePushDemo/build.gradle b/AliLivePushDemo/build.gradle index ab25991d..26513989 100644 --- a/AliLivePushDemo/build.gradle +++ b/AliLivePushDemo/build.gradle @@ -1,15 +1,19 @@ buildscript { repositories { - google() - mavenCentral() + //阿里云镜像 + maven { url 'https://maven.aliyun.com/repository/public' } + maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } + maven { url 'https://maven.aliyun.com/repository/grails-core'} maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } maven { url "https://maven.aliyun.com/repository/releases" } maven { url "https://maven.aliyun.com/nexus/content/repositories/releases" } + google() + mavenCentral() } apply from: 'AndroidThirdParty/config.gradle' apply from: './sdk_type_config.gradle' dependencies { - classpath 'com.kezong:fat-aar:1.3.3' + classpath 'com.github.kezong:fat-aar:1.3.8' classpath externalAndroidBuildGradlePlugin classpath externalAndroidKotlinPlugin } @@ -17,11 +21,15 @@ buildscript { allprojects { repositories { - mavenCentral() - google() + //阿里云镜像 + maven { url 'https://maven.aliyun.com/repository/public' } + maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } + maven { url 'https://maven.aliyun.com/repository/grails-core'} maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' } maven { url "https://maven.aliyun.com/repository/releases" } maven { url 'https://maven.aliyun.com/nexus/content/repositories/releases/' } + mavenCentral() + google() flatDir { dirs 'libs' } diff --git a/AliLivePushDemo/commonbiz/.gitignore b/AliLivePushDemo/commonbiz/.gitignore deleted file mode 100644 index d1638636..00000000 --- a/AliLivePushDemo/commonbiz/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build/ \ No newline at end of file diff --git a/AliLivePushDemo/commonbiz/proguard-rules.pro b/AliLivePushDemo/commonbiz/proguard-rules.pro deleted file mode 100644 index 481bb434..00000000 --- a/AliLivePushDemo/commonbiz/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/AliLivePushDemo/commonbiz/src/androidTest/java/com/alivc/live/commonbiz/ExampleInstrumentedTest.java b/AliLivePushDemo/commonbiz/src/androidTest/java/com/alivc/live/commonbiz/ExampleInstrumentedTest.java deleted file mode 100644 index 4dab2abb..00000000 --- a/AliLivePushDemo/commonbiz/src/androidTest/java/com/alivc/live/commonbiz/ExampleInstrumentedTest.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.alivc.live.commonbiz; - -import android.content.Context; - -import androidx.test.platform.app.InstrumentationRegistry; -import androidx.test.ext.junit.runners.AndroidJUnit4; - -import org.junit.Test; -import org.junit.runner.RunWith; - -import static org.junit.Assert.*; - -/** - * Instrumented test, which will execute on an Android device. - * - * @see Testing documentation - */ -@RunWith(AndroidJUnit4.class) -public class ExampleInstrumentedTest { - @Test - public void useAppContext() { - // Context of the app under test. - Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); - assertEquals("com.alivc.live.commonbiz.test", appContext.getPackageName()); - } -} \ No newline at end of file diff --git a/AliLivePushDemo/commonbiz/src/test/java/com/alivc/live/commonbiz/ExampleUnitTest.java b/AliLivePushDemo/commonbiz/src/test/java/com/alivc/live/commonbiz/ExampleUnitTest.java deleted file mode 100644 index e9375eb2..00000000 --- a/AliLivePushDemo/commonbiz/src/test/java/com/alivc/live/commonbiz/ExampleUnitTest.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.alivc.live.commonbiz; - -import org.junit.Test; - -import static org.junit.Assert.*; - -/** - * Example local unit test, which will execute on the development machine (host). - * - * @see Testing documentation - */ -public class ExampleUnitTest { - @Test - public void addition_isCorrect() { - assertEquals(4, 2 + 2); - } -} \ No newline at end of file diff --git a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/ContextUtils.java b/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/ContextUtils.java deleted file mode 100644 index 97429109..00000000 --- a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/ContextUtils.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.alivc.live.utils; - -import android.annotation.SuppressLint; -import android.content.Context; - -import androidx.annotation.NonNull; - -/** - * Created by keria on 2022/4/6. - */ -public class ContextUtils { - @SuppressLint("StaticFieldLeak") - private static Context sContext = null; - - @SuppressLint("StaticFieldLeak") - private static Context sSafeContext = null; - - public static void setContext(@NonNull Context context) { - sContext = context; - sSafeContext = new SafeToastContext(context); - } - - public static Context getContext() { - return sContext; - } - - public static Context getApplicationContext() { - return sContext; - } - - public static Context getSafeToastContext() { - return sSafeContext; - } -} diff --git a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/FastClickUtil.java b/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/FastClickUtil.java deleted file mode 100644 index 212f1a0a..00000000 --- a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/FastClickUtil.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.alivc.live.utils; - -public class FastClickUtil { - private static long lastClickTime; - //两次点击按钮之间的点击间隔不能少于2500毫秒 - public synchronized static boolean isFastClick() { - long time = System.currentTimeMillis(); - if (time - lastClickTime < 2000) { - return true; - } - lastClickTime = time; - return false; - } -} diff --git a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/SafeToastContext.java b/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/SafeToastContext.java deleted file mode 100644 index a0658266..00000000 --- a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/SafeToastContext.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.alivc.live.utils; - -import android.content.Context; -import android.content.ContextWrapper; -import android.util.Log; -import android.view.Display; -import android.view.View; -import android.view.ViewGroup; -import android.view.WindowManager; - -import androidx.annotation.NonNull; - -/** - * Created by keria on 2022/4/6. - */ -final class SafeToastContext extends ContextWrapper { - SafeToastContext(@NonNull Context base) { - super(base); - } - - @Override - public Context getApplicationContext() { - return new ApplicationContextWrapper(getBaseContext().getApplicationContext()); - } - - private static final class ApplicationContextWrapper extends ContextWrapper { - - private ApplicationContextWrapper(@NonNull Context base) { - super(base); - } - - @Override - public Object getSystemService(@NonNull String name) { - if (Context.WINDOW_SERVICE.equals(name)) { - return new WindowManagerWrapper((WindowManager) getBaseContext().getSystemService(name)); - } - return super.getSystemService(name); - } - } - - private static final class WindowManagerWrapper implements WindowManager { - - private static final String TAG = "WindowManagerWrapper"; - @NonNull - private final WindowManager base; - - private WindowManagerWrapper(@NonNull WindowManager base) { - this.base = base; - } - - @Override - public Display getDefaultDisplay() { - return base.getDefaultDisplay(); - } - - @Override - public void removeViewImmediate(View view) { - base.removeViewImmediate(view); - } - - @Override - public void addView(View view, ViewGroup.LayoutParams params) { - try { - Log.d(TAG, "WindowManager's addView(view, params) has been hooked."); - base.addView(view, params); - } catch (BadTokenException e) { - Log.i(TAG, e.getMessage()); - } catch (Throwable throwable) { - Log.e(TAG, throwable.toString()); - } - } - - @Override - public void updateViewLayout(View view, ViewGroup.LayoutParams params) { - base.updateViewLayout(view, params); - } - - @Override - public void removeView(View view) { - base.removeView(view); - } - } -} \ No newline at end of file diff --git a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/SharedPrefUtils.java b/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/SharedPrefUtils.java deleted file mode 100644 index a7ebf92e..00000000 --- a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/SharedPrefUtils.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.alivc.live.utils; - -import android.content.Context; -import android.content.SharedPreferences; - -import androidx.annotation.NonNull; - -/** - * Created by keria on 2022/10/12. - *

- * Android数据持久化 - */ -public class SharedPrefUtils { - - private static final String PREF_APP = "livepush"; - - private SharedPrefUtils() { - } - - /** - * Gets boolean data. - * - * @param context the context - * @param key the key - * @param val default value - * @return the boolean data - */ - public static boolean getBooleanData(@NonNull Context context, String key, boolean val) { - return getSharedPref(context).getBoolean(key, val); - } - - /** - * Gets int data. - * - * @param context the context - * @param key the key - * @param val default value - * @return the int data - */ - public static int getIntData(@NonNull Context context, String key, int val) { - return getSharedPref(context).getInt(key, val); - } - - /** - * Gets string data. - * - * @param context the context - * @param key the key - * @param val default value - * @return the string data - */ - public static String getStringData(@NonNull Context context, String key, String val) { - return getSharedPref(context).getString(key, val); - } - - /** - * Save data. - * - * @param context the context - * @param key the key - * @param val default value - */ - public static void saveData(@NonNull Context context, String key, String val) { - getSharedPrefEditor(context).putString(key, val).apply(); - } - - /** - * Save data. - * - * @param context the context - * @param key the key - * @param val default value - */ - public static void saveData(@NonNull Context context, String key, int val) { - getSharedPrefEditor(context).putInt(key, val).apply(); - } - - /** - * Save data. - * - * @param context the context - * @param key the key - * @param val default value - */ - public static void saveData(@NonNull Context context, String key, boolean val) { - getSharedPrefEditor(context).putBoolean(key, val).apply(); - } - - /** - * Clear all data - * - * @param context the context - */ - public static void clear(@NonNull Context context) { - getSharedPrefEditor(context).clear(); - } - - private static SharedPreferences getSharedPref(@NonNull Context context) { - return context.getSharedPreferences(PREF_APP, Context.MODE_PRIVATE); - } - - private static SharedPreferences.Editor getSharedPrefEditor(@NonNull Context context) { - return getSharedPref(context).edit(); - } -} diff --git a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/StatusBarUtil.java b/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/StatusBarUtil.java deleted file mode 100644 index 59a48103..00000000 --- a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/StatusBarUtil.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.alivc.live.utils; - -import android.annotation.TargetApi; -import android.app.Activity; -import android.graphics.Color; -import android.os.Build; -import android.view.View; -import android.view.Window; -import android.view.WindowManager; - -import androidx.annotation.ColorInt; -import androidx.core.view.ViewCompat; - -public class StatusBarUtil { - /** - * 沉浸式状态栏。 - * 支持 4.4 以上版本的 MIUI 和 Flyme,以及 5.0 以上版本的其他 Android。 - * - * @param activity 需要被设置沉浸式状态栏的 Activity。 - */ - public static void translucent(Activity activity, @ColorInt int colorOn5x) { - try { - Window window = activity.getWindow(); - translucent(window, colorOn5x); - }catch (Exception e){ - e.printStackTrace(); - } - - } - - @TargetApi(19) - private static void translucent(Window window, @ColorInt int colorOn5x) { - if (isNotchOfficialSupport()) { - handleDisplayCutoutMode(window); - } - int systemUiVisibility = window.getDecorView().getSystemUiVisibility(); - systemUiVisibility |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE; - window.getDecorView().setSystemUiVisibility(systemUiVisibility); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - // android 6以后可以改状态栏字体颜色,因此可以自行设置为透明 - window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); - window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); - window.setStatusBarColor(Color.TRANSPARENT); - } - } - - - - @TargetApi(28) - private static void handleDisplayCutoutMode(final Window window) { - View decorView = window.getDecorView(); - if (decorView != null) { - if (ViewCompat.isAttachedToWindow(decorView)) { - realHandleDisplayCutoutMode(window, decorView); - } else { - decorView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() { - @Override - public void onViewAttachedToWindow(View v) { - v.removeOnAttachStateChangeListener(this); - realHandleDisplayCutoutMode(window, v); - } - - @Override - public void onViewDetachedFromWindow(View v) { - - } - }); - } - } - } - - @TargetApi(28) - private static void realHandleDisplayCutoutMode(Window window, View decorView) { - if (decorView.getRootWindowInsets() != null && - decorView.getRootWindowInsets().getDisplayCutout() != null) { - WindowManager.LayoutParams params = window.getAttributes(); - params.layoutInDisplayCutoutMode = WindowManager.LayoutParams - .LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; - window.setAttributes(params); - } - } - - public static boolean isNotchOfficialSupport(){ - return Build.VERSION.SDK_INT >= Build.VERSION_CODES.P; - } -} diff --git a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/TextFormatUtil.java b/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/TextFormatUtil.java deleted file mode 100644 index 605dd191..00000000 --- a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/TextFormatUtil.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.alivc.live.utils; - -import android.content.Context; - -public class TextFormatUtil { - - public static final String REGULAR = "[0-9a-zA-Z]{1,20}"; - - public static String getTextFormat(Context context, int id, Object... o){ - String s = context.getResources().getString(id); - - return String.format(s, o); - } - public static String getTextFormat(Context context, String paramString, Object... o){ - int id = context.getResources().getIdentifier(paramString, "string", context.getPackageName()); - String s = context.getResources().getString(id); - return String.format(s, o); - } - public static String getTextFormat(Context context, int id){ - return context.getResources().getString(id); - } - public static String[] getTextArray(Context context, int id){ - - return context.getResources().getStringArray(id); - } - public static int[] getIntArray(Context context, int id){ - - return context.getResources().getIntArray(id); - } - - -} diff --git a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/ToastUtils.java b/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/ToastUtils.java deleted file mode 100644 index 4a42a7b9..00000000 --- a/AliLivePushDemo/commonutils/src/main/java/com/alivc/live/utils/ToastUtils.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.alivc.live.utils; - -import android.os.Handler; -import android.os.Looper; -import android.text.TextUtils; -import android.widget.Toast; - -public class ToastUtils { - - public static void show(final String content) { - if (!TextUtils.isEmpty(content)) { - new Handler(Looper.getMainLooper()).post(new Runnable() { - - @Override - public void run() { - Toast.makeText(ContextUtils.getSafeToastContext(), content, Toast.LENGTH_SHORT).show(); - } - }); - } - } - -} diff --git a/AliLivePushDemo/config-stable.gradle b/AliLivePushDemo/config-stable.gradle deleted file mode 100644 index 6bb66335..00000000 --- a/AliLivePushDemo/config-stable.gradle +++ /dev/null @@ -1,31 +0,0 @@ - -def loadProperties(filename) { - def fis - try { - fis = new FileInputStream(filename) - } catch (IOException e) { - return null - } - def props = new Properties() - props.load(fis) - return props -} - -ext { - localProperties = loadProperties('local.properties') - - androidMinSdkVersion = 21 - androidTargetSdkVersion = 30 - androidCompileSdkVersion = 32 - androidBuildToolsVersion = "30.0.3" - - projectVersion = '3.0.2' - - externalAndroidBuildGradlePlugin = 'com.android.tools.build:gradle:3.6.2' - externalAndroidAppCompatV7 = 'androidx.appcompat:appcompat:1.2.0' - externalAndroidCardView = 'com.android.support:cardview-v7:21.0.+' - externalAndroidMultiDex = 'com.android.support:multidex:1.0.3' - externalAndroidRecyclerView = 'com.android.support:recyclerview-v7:23.4.0' - externalAndroidSupportV13 = 'com.android.support:support-v13:23.4.0' - externalAndroidSupportV4 = 'com.android.support:support-v4:23.4.0' -} diff --git a/AliLivePushDemo/gradle.properties b/AliLivePushDemo/gradle.properties index fa96a457..31d4093d 100644 --- a/AliLivePushDemo/gradle.properties +++ b/AliLivePushDemo/gradle.properties @@ -6,10 +6,10 @@ # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 android.useAndroidX=true android.enableJetifier=true -livePushSdkSourceCode=/Users/geekeraven/AliyunProject/AliLivePushSDK/sources/android/alivc-livepusher-lib +livePushSdkSourceCode='' #是否使用一体化包 allInOne=false #SDK类型 diff --git a/AliLivePushDemo/imageutil/proguard-rules.pro b/AliLivePushDemo/imageutil/proguard-rules.pro deleted file mode 100644 index 481bb434..00000000 --- a/AliLivePushDemo/imageutil/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/AliLivePushDemo/imageutil/src/main/AndroidManifest.xml b/AliLivePushDemo/imageutil/src/main/AndroidManifest.xml deleted file mode 100644 index f06d6d71..00000000 --- a/AliLivePushDemo/imageutil/src/main/AndroidManifest.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/AliLivePushDemo/imageutil/src/main/java/com/alivc/live/imageutil/ImageFormatUtils.java b/AliLivePushDemo/imageutil/src/main/java/com/alivc/live/imageutil/ImageFormatUtils.java deleted file mode 100644 index 0aa3eb98..00000000 --- a/AliLivePushDemo/imageutil/src/main/java/com/alivc/live/imageutil/ImageFormatUtils.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.alivc.live.imageutil; - -public class ImageFormatUtils { - - static { - try { - System.loadLibrary("imageutil"); - } catch (Throwable throwable) { - } - } - - public static byte[] getNV21(long dataFrameY, long dataFrameU, long dataFrameV, int width, int height, int strideY, int strideU, int strideV) { - return nativeGetNV21(dataFrameY, dataFrameU, dataFrameV, width, height, strideY, strideU, strideV); - } - - private static native byte[] nativeGetNV21(long dataFrameY, long dataFrameU, long dataFrameV, int width, int height, int strideY, int strideU, int strideV); -} diff --git a/AliLivePushDemo/imageutil/src/main/jni/AliLiveJni.cpp b/AliLivePushDemo/imageutil/src/main/jni/AliLiveJni.cpp deleted file mode 100644 index 4f4c5411..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/AliLiveJni.cpp +++ /dev/null @@ -1,50 +0,0 @@ -// -// Created by lifujun on 2020/7/21. -// -#include -#include "platformUtils/JniEnv.h" -#include "utils/ImageFormatUtils.h" - -int initJavaInfo(JNIEnv *pEnv); - -void unInitJavaInfo(JNIEnv *pEnv); - -extern "C" -JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) { - JniEnv::init(vm); - JniEnv Jenv; - JNIEnv *mEnv = Jenv.getEnv(); -#ifdef USE_ARES - ares_library_init_jvm(vm); -#endif - int result = initJavaInfo(mEnv); - - if (result == JNI_FALSE) { - return JNI_FALSE; - } - - return JNI_VERSION_1_4; -} - -int initJavaInfo(JNIEnv *pEnv) { - ImageFormatUtils::init(pEnv); - - if (ImageFormatUtils::registerMethod(pEnv) == JNI_FALSE) { - return JNI_FALSE; - } - - return JNI_TRUE; -} - - -extern "C" -JNIEXPORT void JNI_OnUnload(JavaVM *vm, void *reserved) { - JniEnv Jenv; - JNIEnv *env = Jenv.getEnv(); - unInitJavaInfo(env); -} - -void unInitJavaInfo(JNIEnv *pEnv) { - - ImageFormatUtils::unInit(pEnv); -} diff --git a/AliLivePushDemo/imageutil/src/main/jni/platformUtils/JniEnv.cpp b/AliLivePushDemo/imageutil/src/main/jni/platformUtils/JniEnv.cpp deleted file mode 100644 index c40e6a38..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/platformUtils/JniEnv.cpp +++ /dev/null @@ -1,80 +0,0 @@ -// -// Created by lifujun on 2019/9/24. -// - -#include -#include -#include -#include -#include "JniEnv.h" - -#define MAX_TASK_NAME_LEN (16) - -static int attachCount = 0; - -static pthread_key_t g_threadKey; -JavaVM *g_vm = nullptr; - -JniEnv::JniEnv() : mEnv(nullptr) { - int status; - - if (g_vm == nullptr) - return; - - status = (g_vm)->GetEnv((void **) &mEnv, JNI_VERSION_1_4); - - if (status >= 0) - return; - - JavaVMAttachArgs lJavaVMAttachArgs; - lJavaVMAttachArgs.version = JNI_VERSION_1_4; - int size = MAX_TASK_NAME_LEN + 1; - char *name = static_cast(malloc(size)); - memset(name, 0, size); - - if (prctl(PR_GET_NAME, (unsigned long) name, 0, 0, 0) != 0) { - strcpy(name, ""); - } else { - name[MAX_TASK_NAME_LEN] = 0; - } - -// AF_LOGI("attach Thread name = %s \n", name); - lJavaVMAttachArgs.name = name; - lJavaVMAttachArgs.group = nullptr; - status = (g_vm)->AttachCurrentThread(&mEnv, &lJavaVMAttachArgs); - free(name); - - if (status < 0) { -// AF_LOGI("failed to attach current thread \n"); - return; - } - - attachCount++; -// AF_LOGE("AttachCurrentThread tid=%d , attachCount = %d \n", gettid(), attachCount); - pthread_setspecific(g_threadKey, mEnv); -} - -JniEnv::~JniEnv() { - if (g_vm == nullptr) - return; -} - -JNIEnv *JniEnv::getEnv() { - return mEnv; -} - -void JniEnv::JNI_ThreadDestroyed(void *value) { - /* The thread is being destroyed, detach it from the Java VM and set the ThreadKey value to nullptr as required */ - JNIEnv *env = (JNIEnv *) value; - - if (env != nullptr && g_vm != nullptr) { - attachCount--; - g_vm->DetachCurrentThread(); - pthread_setspecific(g_threadKey, nullptr); - } -} - -void JniEnv::init(JavaVM *vm) { - g_vm = vm; - pthread_key_create(&g_threadKey, JNI_ThreadDestroyed); -} diff --git a/AliLivePushDemo/imageutil/src/main/jni/platformUtils/JniEnv.h b/AliLivePushDemo/imageutil/src/main/jni/platformUtils/JniEnv.h deleted file mode 100644 index c70ceaf6..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/platformUtils/JniEnv.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// Created by lifujun on 2019/9/24. -// - -#ifndef SOURCE_JNIENV_H -#define SOURCE_JNIENV_H - -#include - -class JniEnv { -public: - JniEnv(); - - ~JniEnv(); - - JNIEnv *getEnv(); - -public: - static void init(JavaVM *vm); - -private: - static void JNI_ThreadDestroyed(void *value); - -private: - JNIEnv *mEnv; - -}; - - -#endif //SOURCE_JNIENV_H diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv.h deleted file mode 100644 index e54b4c68..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_H_ -#define INCLUDE_LIBYUV_H_ - -#include "libyuv/basic_types.h" -#include "libyuv/compare.h" -#include "libyuv/convert.h" -#include "libyuv/convert_argb.h" -#include "libyuv/convert_from.h" -#include "libyuv/convert_from_argb.h" -#include "libyuv/cpu_id.h" -#include "libyuv/mjpeg_decoder.h" -#include "libyuv/planar_functions.h" -#include "libyuv/rotate.h" -#include "libyuv/rotate_argb.h" -#include "libyuv/row.h" -#include "libyuv/scale.h" -#include "libyuv/scale_argb.h" -#include "libyuv/scale_row.h" -//#include "libyuv/version.h" -#include "libyuv/video_common.h" - -#endif // INCLUDE_LIBYUV_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/basic_types.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/basic_types.h deleted file mode 100644 index 7d98bb93..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/basic_types.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_BASIC_TYPES_H_ -#define INCLUDE_LIBYUV_BASIC_TYPES_H_ - -#include // for NULL, size_t - -#if defined(_MSC_VER) && (_MSC_VER < 1600) -#include // for uintptr_t on x86 -#else -#include // for uintptr_t -#endif - -#ifndef GG_LONGLONG -#ifndef INT_TYPES_DEFINED -#define INT_TYPES_DEFINED -#ifdef COMPILER_MSVC -typedef unsigned __int64 uint64; -typedef __int64 int64; -#ifndef INT64_C -#define INT64_C(x) x##I64 -#endif -#ifndef UINT64_C -#define UINT64_C(x) x##UI64 -#endif -#define INT64_F "I64" -#else // COMPILER_MSVC -#if defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) -typedef unsigned long uint64; // NOLINT -typedef long int64; // NOLINT -#ifndef INT64_C -#define INT64_C(x) x##L -#endif -#ifndef UINT64_C -#define UINT64_C(x) x##UL -#endif -#define INT64_F "l" -#else // defined(__LP64__) && !defined(__OpenBSD__) && !defined(__APPLE__) -typedef unsigned long long uint64; // NOLINT -typedef long long int64; // NOLINT -#ifndef INT64_C -#define INT64_C(x) x##LL -#endif -#ifndef UINT64_C -#define UINT64_C(x) x##ULL -#endif -#define INT64_F "ll" -#endif // __LP64__ -#endif // COMPILER_MSVC -typedef unsigned int uint32; -typedef int int32; -typedef unsigned short uint16; // NOLINT -typedef short int16; // NOLINT -typedef unsigned char uint8; -typedef signed char int8; -#endif // INT_TYPES_DEFINED -#endif // GG_LONGLONG - -// Detect compiler is for x86 or x64. -#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ - defined(_M_IX86) -#define CPU_X86 1 -#endif -// Detect compiler is for ARM. -#if defined(__arm__) || defined(_M_ARM) -#define CPU_ARM 1 -#endif - -#ifndef ALIGNP -#ifdef __cplusplus -#define ALIGNP(p, t) \ - reinterpret_cast( \ - ((reinterpret_cast(p) + ((t)-1)) & ~((t)-1))) -#else -#define ALIGNP(p, t) \ - (uint8*)((((uintptr_t)(p) + ((t)-1)) & ~((t)-1))) /* NOLINT */ -#endif -#endif - -#if !defined(LIBYUV_API) -#if defined(_WIN32) || defined(__CYGWIN__) -#if defined(LIBYUV_BUILDING_SHARED_LIBRARY) -#define LIBYUV_API __declspec(dllexport) -#elif defined(LIBYUV_USING_SHARED_LIBRARY) -#define LIBYUV_API __declspec(dllimport) -#else -#define LIBYUV_API -#endif // LIBYUV_BUILDING_SHARED_LIBRARY -#elif defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__APPLE__) && \ - (defined(LIBYUV_BUILDING_SHARED_LIBRARY) || \ - defined(LIBYUV_USING_SHARED_LIBRARY)) -#define LIBYUV_API __attribute__((visibility("default"))) -#else -#define LIBYUV_API -#endif // __GNUC__ -#endif // LIBYUV_API - -#define LIBYUV_BOOL int -#define LIBYUV_FALSE 0 -#define LIBYUV_TRUE 1 - -// Visual C x86 or GCC little endian. -#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || \ - defined(_M_IX86) || defined(__arm__) || defined(_M_ARM) || \ - (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) -#define LIBYUV_LITTLE_ENDIAN -#endif - -#endif // INCLUDE_LIBYUV_BASIC_TYPES_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/compare.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/compare.h deleted file mode 100644 index 14091693..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/compare.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_COMPARE_H_ -#define INCLUDE_LIBYUV_COMPARE_H_ - -#include "basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Compute a hash for specified memory. Seed of 5381 recommended. -LIBYUV_API -uint32 HashDjb2(const uint8* src, uint64 count, uint32 seed); - -// Hamming Distance -LIBYUV_API -uint64 ComputeHammingDistance(const uint8* src_a, - const uint8* src_b, - int count); - -// Scan an opaque argb image and return fourcc based on alpha offset. -// Returns FOURCC_ARGB, FOURCC_BGRA, or 0 if unknown. -LIBYUV_API -uint32 ARGBDetect(const uint8* argb, int stride_argb, int width, int height); - -// Sum Square Error - used to compute Mean Square Error or PSNR. -LIBYUV_API -uint64 ComputeSumSquareError(const uint8* src_a, const uint8* src_b, int count); - -LIBYUV_API -uint64 ComputeSumSquareErrorPlane(const uint8* src_a, - int stride_a, - const uint8* src_b, - int stride_b, - int width, - int height); - -static const int kMaxPsnr = 128; - -LIBYUV_API -double SumSquareErrorToPsnr(uint64 sse, uint64 count); - -LIBYUV_API -double CalcFramePsnr(const uint8* src_a, - int stride_a, - const uint8* src_b, - int stride_b, - int width, - int height); - -LIBYUV_API -double I420Psnr(const uint8* src_y_a, - int stride_y_a, - const uint8* src_u_a, - int stride_u_a, - const uint8* src_v_a, - int stride_v_a, - const uint8* src_y_b, - int stride_y_b, - const uint8* src_u_b, - int stride_u_b, - const uint8* src_v_b, - int stride_v_b, - int width, - int height); - -LIBYUV_API -double CalcFrameSsim(const uint8* src_a, - int stride_a, - const uint8* src_b, - int stride_b, - int width, - int height); - -LIBYUV_API -double I420Ssim(const uint8* src_y_a, - int stride_y_a, - const uint8* src_u_a, - int stride_u_a, - const uint8* src_v_a, - int stride_v_a, - const uint8* src_y_b, - int stride_y_b, - const uint8* src_u_b, - int stride_u_b, - const uint8* src_v_b, - int stride_v_b, - int width, - int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_COMPARE_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/compare_row.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/compare_row.h deleted file mode 100644 index 507014dc..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/compare_row.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2013 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_COMPARE_ROW_H_ -#define INCLUDE_LIBYUV_COMPARE_ROW_H_ - -#include "basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif - -// Visual C 2012 required for AVX2. -#if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ - _MSC_VER >= 1700 -#define VISUALC_HAS_AVX2 1 -#endif // VisualStudio >= 2012 - -// clang >= 3.4.0 required for AVX2. -#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) -#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) -#define CLANG_HAS_AVX2 1 -#endif // clang >= 3.4 -#endif // __clang__ - -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) -#define HAS_HASHDJB2_AVX2 -#endif - -// The following are available for Visual C and GCC: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(__x86_64__) || defined(__i386__) || defined(_M_IX86)) -#define HAS_HASHDJB2_SSE41 -#define HAS_SUMSQUAREERROR_SSE2 -#define HAS_HAMMINGDISTANCE_X86 -#endif - -// The following are available for Visual C and clangcl 32 bit: -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) -#define HAS_HASHDJB2_AVX2 -#define HAS_SUMSQUAREERROR_AVX2 -#endif - -// The following are available for Neon: -#if !defined(LIBYUV_DISABLE_NEON) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -#define HAS_SUMSQUAREERROR_NEON -#endif - -// The following are available for Neon 64 bit: -#if !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) -#define HAS_HAMMINGDISTANCE_NEON -#endif - -uint32 HammingDistance_C(const uint8* src_a, const uint8* src_b, int count); -uint32 HammingDistance_X86(const uint8* src_a, const uint8* src_b, int count); -uint32 HammingDistance_NEON(const uint8* src_a, const uint8* src_b, int count); - -uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count); -uint32 SumSquareError_SSE2(const uint8* src_a, const uint8* src_b, int count); -uint32 SumSquareError_AVX2(const uint8* src_a, const uint8* src_b, int count); -uint32 SumSquareError_NEON(const uint8* src_a, const uint8* src_b, int count); - -uint32 HashDjb2_C(const uint8* src, int count, uint32 seed); -uint32 HashDjb2_SSE41(const uint8* src, int count, uint32 seed); -uint32 HashDjb2_AVX2(const uint8* src, int count, uint32 seed); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_COMPARE_ROW_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert.h deleted file mode 100644 index 0cc3add4..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert.h +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_H_ -#define INCLUDE_LIBYUV_CONVERT_H_ - -#include "basic_types.h" - -#include "rotate.h" // For enum RotationMode. - -// TODO(fbarchard): fix WebRTC source to include following libyuv headers: -#include "convert_argb.h" // For WebRTC I420ToARGB. b/620 -#include "convert_from.h" // For WebRTC ConvertFromI420. b/620 -#include "planar_functions.h" // For WebRTC I420Rect, CopyPlane. b/618 - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Convert I444 to I420. -LIBYUV_API -int I444ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert I422 to I420. -LIBYUV_API -int I422ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Copy I420 to I420. -#define I420ToI420 I420Copy -LIBYUV_API -int I420Copy(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert I400 (grey) to I420. -LIBYUV_API -int I400ToI420(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -#define J400ToJ420 I400ToI420 - -// Convert NV12 to I420. -LIBYUV_API -int NV12ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_uv, - int src_stride_uv, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert NV21 to I420. -LIBYUV_API -int NV21ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_vu, - int src_stride_vu, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert YUY2 to I420. -LIBYUV_API -int YUY2ToI420(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert UYVY to I420. -LIBYUV_API -int UYVYToI420(const uint8* src_uyvy, - int src_stride_uyvy, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert M420 to I420. -LIBYUV_API -int M420ToI420(const uint8* src_m420, - int src_stride_m420, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert Android420 to I420. -LIBYUV_API -int Android420ToI420(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - int pixel_stride_uv, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// ARGB little endian (bgra in memory) to I420. -LIBYUV_API -int ARGBToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// BGRA little endian (argb in memory) to I420. -LIBYUV_API -int BGRAToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// ABGR little endian (rgba in memory) to I420. -LIBYUV_API -int ABGRToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGBA little endian (abgr in memory) to I420. -LIBYUV_API -int RGBAToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB little endian (bgr in memory) to I420. -LIBYUV_API -int RGB24ToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB big endian (rgb in memory) to I420. -LIBYUV_API -int RAWToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB16 (RGBP fourcc) little endian to I420. -LIBYUV_API -int RGB565ToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB15 (RGBO fourcc) little endian to I420. -LIBYUV_API -int ARGB1555ToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// RGB12 (R444 fourcc) little endian to I420. -LIBYUV_API -int ARGB4444ToI420(const uint8* src_frame, - int src_stride_frame, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -#ifdef HAVE_JPEG -// src_width/height provided by capture. -// dst_width/height for clipping determine final size. -LIBYUV_API -int MJPGToI420(const uint8* sample, - size_t sample_size, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int src_width, - int src_height, - int dst_width, - int dst_height); - -// Query size of MJPG in pixels. -LIBYUV_API -int MJPGSize(const uint8* sample, size_t sample_size, int* width, int* height); -#endif - -// Convert camera sample to I420 with cropping, rotation and vertical flip. -// "src_size" is needed to parse MJPG. -// "dst_stride_y" number of bytes in a row of the dst_y plane. -// Normally this would be the same as dst_width, with recommended alignment -// to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. The caller should -// allocate the I420 buffer according to rotation. -// "dst_stride_u" number of bytes in a row of the dst_u plane. -// Normally this would be the same as (dst_width + 1) / 2, with -// recommended alignment to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. -// "crop_x" and "crop_y" are starting position for cropping. -// To center, crop_x = (src_width - dst_width) / 2 -// crop_y = (src_height - dst_height) / 2 -// "src_width" / "src_height" is size of src_frame in pixels. -// "src_height" can be negative indicating a vertically flipped image source. -// "crop_width" / "crop_height" is the size to crop the src to. -// Must be less than or equal to src_width/src_height -// Cropping parameters are pre-rotation. -// "rotation" can be 0, 90, 180 or 270. -// "format" is a fourcc. ie 'I420', 'YUY2' -// Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. -LIBYUV_API -int ConvertToI420(const uint8* src_frame, - size_t src_size, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int crop_x, - int crop_y, - int src_width, - int src_height, - int crop_width, - int crop_height, - enum RotationMode rotation, - uint32 format); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert_argb.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert_argb.h deleted file mode 100644 index 28a39951..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert_argb.h +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_ -#define INCLUDE_LIBYUV_CONVERT_ARGB_H_ - -#include "basic_types.h" - -#include "rotate.h" // For enum RotationMode. - -// TODO(fbarchard): This set of functions should exactly match convert.h -// TODO(fbarchard): Add tests. Create random content of right size and convert -// with C vs Opt and or to I420 and compare. -// TODO(fbarchard): Some of these functions lack parameter setting. - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Alias. -#define ARGBToARGB ARGBCopy - -// Copy ARGB to ARGB. -LIBYUV_API -int ARGBCopy(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I420 to ARGB. -LIBYUV_API -int I420ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Duplicate prototype for function in convert_from.h for remoting. -LIBYUV_API -int I420ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I422 to ARGB. -LIBYUV_API -int I422ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I444 to ARGB. -LIBYUV_API -int I444ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J444 to ARGB. -LIBYUV_API -int J444ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I444 to ABGR. -LIBYUV_API -int I444ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert I420 with Alpha to preattenuated ARGB. -LIBYUV_API -int I420AlphaToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - const uint8* src_a, - int src_stride_a, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height, - int attenuate); - -// Convert I420 with Alpha to preattenuated ABGR. -LIBYUV_API -int I420AlphaToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - const uint8* src_a, - int src_stride_a, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height, - int attenuate); - -// Convert I400 (grey) to ARGB. Reverse of ARGBToI400. -LIBYUV_API -int I400ToARGB(const uint8* src_y, - int src_stride_y, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J400 (jpeg grey) to ARGB. -LIBYUV_API -int J400ToARGB(const uint8* src_y, - int src_stride_y, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Alias. -#define YToARGB I400ToARGB - -// Convert NV12 to ARGB. -LIBYUV_API -int NV12ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_uv, - int src_stride_uv, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert NV21 to ARGB. -LIBYUV_API -int NV21ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_vu, - int src_stride_vu, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert M420 to ARGB. -LIBYUV_API -int M420ToARGB(const uint8* src_m420, - int src_stride_m420, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert YUY2 to ARGB. -LIBYUV_API -int YUY2ToARGB(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert UYVY to ARGB. -LIBYUV_API -int UYVYToARGB(const uint8* src_uyvy, - int src_stride_uyvy, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J420 to ARGB. -LIBYUV_API -int J420ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J422 to ARGB. -LIBYUV_API -int J422ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert J420 to ABGR. -LIBYUV_API -int J420ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert J422 to ABGR. -LIBYUV_API -int J422ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert H420 to ARGB. -LIBYUV_API -int H420ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert H422 to ARGB. -LIBYUV_API -int H422ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert H420 to ABGR. -LIBYUV_API -int H420ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert H422 to ABGR. -LIBYUV_API -int H422ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// BGRA little endian (argb in memory) to ARGB. -LIBYUV_API -int BGRAToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// ABGR little endian (rgba in memory) to ARGB. -LIBYUV_API -int ABGRToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGBA little endian (abgr in memory) to ARGB. -LIBYUV_API -int RGBAToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Deprecated function name. -#define BG24ToARGB RGB24ToARGB - -// RGB little endian (bgr in memory) to ARGB. -LIBYUV_API -int RGB24ToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGB big endian (rgb in memory) to ARGB. -LIBYUV_API -int RAWToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGB16 (RGBP fourcc) little endian to ARGB. -LIBYUV_API -int RGB565ToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGB15 (RGBO fourcc) little endian to ARGB. -LIBYUV_API -int ARGB1555ToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// RGB12 (R444 fourcc) little endian to ARGB. -LIBYUV_API -int ARGB4444ToARGB(const uint8* src_frame, - int src_stride_frame, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -#ifdef HAVE_JPEG -// src_width/height provided by capture -// dst_width/height for clipping determine final size. -LIBYUV_API -int MJPGToARGB(const uint8* sample, - size_t sample_size, - uint8* dst_argb, - int dst_stride_argb, - int src_width, - int src_height, - int dst_width, - int dst_height); -#endif - -// Convert camera sample to ARGB with cropping, rotation and vertical flip. -// "src_size" is needed to parse MJPG. -// "dst_stride_argb" number of bytes in a row of the dst_argb plane. -// Normally this would be the same as dst_width, with recommended alignment -// to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. The caller should -// allocate the I420 buffer according to rotation. -// "dst_stride_u" number of bytes in a row of the dst_u plane. -// Normally this would be the same as (dst_width + 1) / 2, with -// recommended alignment to 16 bytes for better efficiency. -// If rotation of 90 or 270 is used, stride is affected. -// "crop_x" and "crop_y" are starting position for cropping. -// To center, crop_x = (src_width - dst_width) / 2 -// crop_y = (src_height - dst_height) / 2 -// "src_width" / "src_height" is size of src_frame in pixels. -// "src_height" can be negative indicating a vertically flipped image source. -// "crop_width" / "crop_height" is the size to crop the src to. -// Must be less than or equal to src_width/src_height -// Cropping parameters are pre-rotation. -// "rotation" can be 0, 90, 180 or 270. -// "format" is a fourcc. ie 'I420', 'YUY2' -// Returns 0 for successful; -1 for invalid parameter. Non-zero for failure. -LIBYUV_API -int ConvertToARGB(const uint8* src_frame, - size_t src_size, - uint8* dst_argb, - int dst_stride_argb, - int crop_x, - int crop_y, - int src_width, - int src_height, - int crop_width, - int crop_height, - enum RotationMode rotation, - uint32 format); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_ARGB_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert_from.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert_from.h deleted file mode 100644 index 5059c07a..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert_from.h +++ /dev/null @@ -1,277 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_FROM_H_ -#define INCLUDE_LIBYUV_CONVERT_FROM_H_ - -#include "basic_types.h" -#include "rotate.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// See Also convert.h for conversions from formats to I420. - -// I420Copy in convert to I420ToI420. - -LIBYUV_API -int I420ToI422(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -LIBYUV_API -int I420ToI444(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Copy to I400. Source can be I420, I422, I444, I400, NV12 or NV21. -LIBYUV_API -int I400Copy(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -LIBYUV_API -int I420ToNV12(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -LIBYUV_API -int I420ToNV21(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_vu, - int dst_stride_vu, - int width, - int height); - -LIBYUV_API -int I420ToYUY2(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToUYVY(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToARGB(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -LIBYUV_API -int I420ToBGRA(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -LIBYUV_API -int I420ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -LIBYUV_API -int I420ToRGBA(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_rgba, - int dst_stride_rgba, - int width, - int height); - -LIBYUV_API -int I420ToRGB24(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToRAW(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToRGB565(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I422ToRGB565(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -// Convert I420 To RGB565 with 4x4 dither matrix (16 bytes). -// Values in dither matrix from 0 to 7 recommended. -// The order of the dither matrix is first byte is upper left. - -LIBYUV_API -int I420ToRGB565Dither(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - const uint8* dither4x4, - int width, - int height); - -LIBYUV_API -int I420ToARGB1555(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -LIBYUV_API -int I420ToARGB4444(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -// Convert I420 to specified format. -// "dst_sample_stride" is bytes in a row for the destination. Pass 0 if the -// buffer has contiguous rows. Can be negative. A multiple of 16 is optimal. -LIBYUV_API -int ConvertFromI420(const uint8* y, - int y_stride, - const uint8* u, - int u_stride, - const uint8* v, - int v_stride, - uint8* dst_sample, - int dst_sample_stride, - int width, - int height, - uint32 format); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_FROM_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert_from_argb.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert_from_argb.h deleted file mode 100644 index 367021f9..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/convert_from_argb.h +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ -#define INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ - -#include "basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Copy ARGB to ARGB. -#define ARGBToARGB ARGBCopy -LIBYUV_API -int ARGBCopy(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert ARGB To BGRA. -LIBYUV_API -int ARGBToBGRA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_bgra, - int dst_stride_bgra, - int width, - int height); - -// Convert ARGB To ABGR. -LIBYUV_API -int ARGBToABGR(const uint8* src_argb, - int src_stride_argb, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert ARGB To RGBA. -LIBYUV_API -int ARGBToRGBA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgba, - int dst_stride_rgba, - int width, - int height); - -// Convert ARGB To RGB24. -LIBYUV_API -int ARGBToRGB24(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgb24, - int dst_stride_rgb24, - int width, - int height); - -// Convert ARGB To RAW. -LIBYUV_API -int ARGBToRAW(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgb, - int dst_stride_rgb, - int width, - int height); - -// Convert ARGB To RGB565. -LIBYUV_API -int ARGBToRGB565(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgb565, - int dst_stride_rgb565, - int width, - int height); - -// Convert ARGB To RGB565 with 4x4 dither matrix (16 bytes). -// Values in dither matrix from 0 to 7 recommended. -// The order of the dither matrix is first byte is upper left. -// TODO(fbarchard): Consider pointer to 2d array for dither4x4. -// const uint8(*dither)[4][4]; -LIBYUV_API -int ARGBToRGB565Dither(const uint8* src_argb, - int src_stride_argb, - uint8* dst_rgb565, - int dst_stride_rgb565, - const uint8* dither4x4, - int width, - int height); - -// Convert ARGB To ARGB1555. -LIBYUV_API -int ARGBToARGB1555(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb1555, - int dst_stride_argb1555, - int width, - int height); - -// Convert ARGB To ARGB4444. -LIBYUV_API -int ARGBToARGB4444(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb4444, - int dst_stride_argb4444, - int width, - int height); - -// Convert ARGB To I444. -LIBYUV_API -int ARGBToI444(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB To I422. -LIBYUV_API -int ARGBToI422(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB To I420. (also in convert.h) -LIBYUV_API -int ARGBToI420(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB to J420. (JPeg full range I420). -LIBYUV_API -int ARGBToJ420(const uint8* src_argb, - int src_stride_argb, - uint8* dst_yj, - int dst_stride_yj, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB to J422. -LIBYUV_API -int ARGBToJ422(const uint8* src_argb, - int src_stride_argb, - uint8* dst_yj, - int dst_stride_yj, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert ARGB to J400. (JPeg full range). -LIBYUV_API -int ARGBToJ400(const uint8* src_argb, - int src_stride_argb, - uint8* dst_yj, - int dst_stride_yj, - int width, - int height); - -// Convert ARGB to I400. -LIBYUV_API -int ARGBToI400(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Convert ARGB to G. (Reverse of J400toARGB, which replicates G back to ARGB) -LIBYUV_API -int ARGBToG(const uint8* src_argb, - int src_stride_argb, - uint8* dst_g, - int dst_stride_g, - int width, - int height); - -// Convert ARGB To NV12. -LIBYUV_API -int ARGBToNV12(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -// Convert ARGB To NV21. -LIBYUV_API -int ARGBToNV21(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_vu, - int dst_stride_vu, - int width, - int height); - -// Convert ARGB To NV21. -LIBYUV_API -int ARGBToNV21(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - uint8* dst_vu, - int dst_stride_vu, - int width, - int height); - -// Convert ARGB To YUY2. -LIBYUV_API -int ARGBToYUY2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_yuy2, - int dst_stride_yuy2, - int width, - int height); - -// Convert ARGB To UYVY. -LIBYUV_API -int ARGBToUYVY(const uint8* src_argb, - int src_stride_argb, - uint8* dst_uyvy, - int dst_stride_uyvy, - int width, - int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CONVERT_FROM_ARGB_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/cpu_id.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/cpu_id.h deleted file mode 100644 index e9edde63..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/cpu_id.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_CPU_ID_H_ -#define INCLUDE_LIBYUV_CPU_ID_H_ - -#include "basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Internal flag to indicate cpuid requires initialization. -static const int kCpuInitialized = 0x1; - -// These flags are only valid on ARM processors. -static const int kCpuHasARM = 0x2; -static const int kCpuHasNEON = 0x4; -// 0x8 reserved for future ARM flag. - -// These flags are only valid on x86 processors. -static const int kCpuHasX86 = 0x10; -static const int kCpuHasSSE2 = 0x20; -static const int kCpuHasSSSE3 = 0x40; -static const int kCpuHasSSE41 = 0x80; -static const int kCpuHasSSE42 = 0x100; // unused at this time. -static const int kCpuHasAVX = 0x200; -static const int kCpuHasAVX2 = 0x400; -static const int kCpuHasERMS = 0x800; -static const int kCpuHasFMA3 = 0x1000; -static const int kCpuHasAVX3 = 0x2000; -static const int kCpuHasF16C = 0x4000; - -// 0x8000 reserved for future X86 flags. - -// These flags are only valid on MIPS processors. -static const int kCpuHasMIPS = 0x10000; -static const int kCpuHasDSPR2 = 0x20000; -static const int kCpuHasMSA = 0x40000; - -// Optional init function. TestCpuFlag does an auto-init. -// Returns cpu_info flags. -LIBYUV_API -int InitCpuFlags(void); - -// Detect CPU has SSE2 etc. -// Test_flag parameter should be one of kCpuHas constants above. -// Returns non-zero if instruction set is detected -static __inline int TestCpuFlag(int test_flag) { - LIBYUV_API extern int cpu_info_; -#ifdef __ATOMIC_RELAXED - int cpu_info = __atomic_load_n(&cpu_info_, __ATOMIC_RELAXED); -#else - int cpu_info = cpu_info_; -#endif - return (!cpu_info ? InitCpuFlags() : cpu_info) & test_flag; -} - -// Internal function for parsing /proc/cpuinfo. -LIBYUV_API -int ArmCpuCaps(const char* cpuinfo_name); - -// For testing, allow CPU flags to be disabled. -// ie MaskCpuFlags(~kCpuHasSSSE3) to disable SSSE3. -// MaskCpuFlags(-1) to enable all cpu specific optimizations. -// MaskCpuFlags(1) to disable all cpu specific optimizations. -// MaskCpuFlags(0) to reset state so next call will auto init. -// Returns cpu_info flags. -LIBYUV_API -int MaskCpuFlags(int enable_flags); - -// Low level cpuid for X86. Returns zeros on other CPUs. -// eax is the info type that you want. -// ecx is typically the cpu number, and should normally be zero. -LIBYUV_API -void CpuId(int eax, int ecx, int* cpu_info); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_CPU_ID_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/macros_msa.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/macros_msa.h deleted file mode 100644 index 61be352e..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/macros_msa.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright 2016 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_MACROS_MSA_H_ -#define INCLUDE_LIBYUV_MACROS_MSA_H_ - -#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) -#include -#include - -#if (__mips_isa_rev >= 6) -#define LW(psrc) \ - ({ \ - uint8* psrc_lw_m = (uint8*)(psrc); /* NOLINT */ \ - uint32 val_m; \ - asm volatile("lw %[val_m], %[psrc_lw_m] \n" \ - : [val_m] "=r"(val_m) \ - : [psrc_lw_m] "m"(*psrc_lw_m)); \ - val_m; \ - }) - -#if (__mips == 64) -#define LD(psrc) \ - ({ \ - uint8* psrc_ld_m = (uint8*)(psrc); /* NOLINT */ \ - uint64 val_m = 0; \ - asm volatile("ld %[val_m], %[psrc_ld_m] \n" \ - : [val_m] "=r"(val_m) \ - : [psrc_ld_m] "m"(*psrc_ld_m)); \ - val_m; \ - }) -#else // !(__mips == 64) -#define LD(psrc) \ - ({ \ - uint8* psrc_ld_m = (uint8*)(psrc); /* NOLINT */ \ - uint32 val0_m, val1_m; \ - uint64 val_m = 0; \ - val0_m = LW(psrc_ld_m); \ - val1_m = LW(psrc_ld_m + 4); \ - val_m = (uint64)(val1_m); /* NOLINT */ \ - val_m = (uint64)((val_m << 32) & 0xFFFFFFFF00000000); /* NOLINT */ \ - val_m = (uint64)(val_m | (uint64)val0_m); /* NOLINT */ \ - val_m; \ - }) -#endif // (__mips == 64) - -#define SW(val, pdst) \ - ({ \ - uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint32_t val_m = (val); \ - asm volatile("sw %[val_m], %[pdst_sw_m] \n" \ - : [pdst_sw_m] "=m"(*pdst_sw_m) \ - : [val_m] "r"(val_m)); \ - }) - -#if (__mips == 64) -#define SD(val, pdst) \ - ({ \ - uint8_t* pdst_sd_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint64_t val_m = (val); \ - asm volatile("sd %[val_m], %[pdst_sd_m] \n" \ - : [pdst_sd_m] "=m"(*pdst_sd_m) \ - : [val_m] "r"(val_m)); \ - }) -#else // !(__mips == 64) -#define SD(val, pdst) \ - ({ \ - uint8_t* pdst_sd_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint32_t val0_m, val1_m; \ - val0_m = (uint32_t)((val)&0x00000000FFFFFFFF); \ - val1_m = (uint32_t)(((val) >> 32) & 0x00000000FFFFFFFF); \ - SW(val0_m, pdst_sd_m); \ - SW(val1_m, pdst_sd_m + 4); \ - }) -#endif // !(__mips == 64) -#else // !(__mips_isa_rev >= 6) -#define LW(psrc) \ - ({ \ - uint8* psrc_lw_m = (uint8*)(psrc); /* NOLINT */ \ - uint32 val_m; \ - asm volatile("ulw %[val_m], %[psrc_lw_m] \n" \ - : [val_m] "=r"(val_m) \ - : [psrc_lw_m] "m"(*psrc_lw_m)); \ - val_m; \ - }) - -#if (__mips == 64) -#define LD(psrc) \ - ({ \ - uint8* psrc_ld_m = (uint8*)(psrc); /* NOLINT */ \ - uint64 val_m = 0; \ - asm volatile("uld %[val_m], %[psrc_ld_m] \n" \ - : [val_m] "=r"(val_m) \ - : [psrc_ld_m] "m"(*psrc_ld_m)); \ - val_m; \ - }) -#else // !(__mips == 64) -#define LD(psrc) \ - ({ \ - uint8* psrc_ld_m = (uint8*)(psrc); /* NOLINT */ \ - uint32 val0_m, val1_m; \ - uint64 val_m = 0; \ - val0_m = LW(psrc_ld_m); \ - val1_m = LW(psrc_ld_m + 4); \ - val_m = (uint64)(val1_m); /* NOLINT */ \ - val_m = (uint64)((val_m << 32) & 0xFFFFFFFF00000000); /* NOLINT */ \ - val_m = (uint64)(val_m | (uint64)val0_m); /* NOLINT */ \ - val_m; \ - }) -#endif // (__mips == 64) - -#define SW(val, pdst) \ - ({ \ - uint8_t* pdst_sw_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint32_t val_m = (val); \ - asm volatile("usw %[val_m], %[pdst_sw_m] \n" \ - : [pdst_sw_m] "=m"(*pdst_sw_m) \ - : [val_m] "r"(val_m)); \ - }) - -#define SD(val, pdst) \ - ({ \ - uint8_t* pdst_sd_m = (uint8_t*)(pdst); /* NOLINT */ \ - uint32_t val0_m, val1_m; \ - val0_m = (uint32_t)((val)&0x00000000FFFFFFFF); \ - val1_m = (uint32_t)(((val) >> 32) & 0x00000000FFFFFFFF); \ - SW(val0_m, pdst_sd_m); \ - SW(val1_m, pdst_sd_m + 4); \ - }) -#endif // (__mips_isa_rev >= 6) - -// TODO(fbarchard): Consider removing __VAR_ARGS versions. -#define LD_B(RTYPE, psrc) *((RTYPE*)(psrc)) /* NOLINT */ -#define LD_UB(...) LD_B(v16u8, __VA_ARGS__) - -#define ST_B(RTYPE, in, pdst) *((RTYPE*)(pdst)) = (in) /* NOLINT */ -#define ST_UB(...) ST_B(v16u8, __VA_ARGS__) - -#define ST_H(RTYPE, in, pdst) *((RTYPE*)(pdst)) = (in) /* NOLINT */ -#define ST_UH(...) ST_H(v8u16, __VA_ARGS__) - -/* Description : Load two vectors with 16 'byte' sized elements - Arguments : Inputs - psrc, stride - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Load 16 byte elements in 'out0' from (psrc) - Load 16 byte elements in 'out1' from (psrc + stride) -*/ -#define LD_B2(RTYPE, psrc, stride, out0, out1) \ - { \ - out0 = LD_B(RTYPE, (psrc)); \ - out1 = LD_B(RTYPE, (psrc) + stride); \ - } -#define LD_UB2(...) LD_B2(v16u8, __VA_ARGS__) - -#define LD_B4(RTYPE, psrc, stride, out0, out1, out2, out3) \ - { \ - LD_B2(RTYPE, (psrc), stride, out0, out1); \ - LD_B2(RTYPE, (psrc) + 2 * stride, stride, out2, out3); \ - } -#define LD_UB4(...) LD_B4(v16u8, __VA_ARGS__) - -/* Description : Store two vectors with stride each having 16 'byte' sized - elements - Arguments : Inputs - in0, in1, pdst, stride - Details : Store 16 byte elements from 'in0' to (pdst) - Store 16 byte elements from 'in1' to (pdst + stride) -*/ -#define ST_B2(RTYPE, in0, in1, pdst, stride) \ - { \ - ST_B(RTYPE, in0, (pdst)); \ - ST_B(RTYPE, in1, (pdst) + stride); \ - } -#define ST_UB2(...) ST_B2(v16u8, __VA_ARGS__) - -#define ST_B4(RTYPE, in0, in1, in2, in3, pdst, stride) \ - { \ - ST_B2(RTYPE, in0, in1, (pdst), stride); \ - ST_B2(RTYPE, in2, in3, (pdst) + 2 * stride, stride); \ - } -#define ST_UB4(...) ST_B4(v16u8, __VA_ARGS__) - -/* Description : Store vectors of 8 halfword elements with stride - Arguments : Inputs - in0, in1, pdst, stride - Details : Store 8 halfword elements from 'in0' to (pdst) - Store 8 halfword elements from 'in1' to (pdst + stride) -*/ -#define ST_H2(RTYPE, in0, in1, pdst, stride) \ - { \ - ST_H(RTYPE, in0, (pdst)); \ - ST_H(RTYPE, in1, (pdst) + stride); \ - } -#define ST_UH2(...) ST_H2(v8u16, __VA_ARGS__) - -// TODO(fbarchard): Consider using __msa_vshf_b and __msa_ilvr_b directly. -/* Description : Shuffle byte vector elements as per mask vector - Arguments : Inputs - in0, in1, in2, in3, mask0, mask1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Byte elements from 'in0' & 'in1' are copied selectively to - 'out0' as per control vector 'mask0' -*/ -#define VSHF_B2(RTYPE, in0, in1, in2, in3, mask0, mask1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_vshf_b((v16i8)mask0, (v16i8)in1, (v16i8)in0); \ - out1 = (RTYPE)__msa_vshf_b((v16i8)mask1, (v16i8)in3, (v16i8)in2); \ - } -#define VSHF_B2_UB(...) VSHF_B2(v16u8, __VA_ARGS__) - -/* Description : Interleave both left and right half of input vectors - Arguments : Inputs - in0, in1 - Outputs - out0, out1 - Return Type - as per RTYPE - Details : Right half of byte elements from 'in0' and 'in1' are - interleaved and written to 'out0' -*/ -#define ILVRL_B2(RTYPE, in0, in1, out0, out1) \ - { \ - out0 = (RTYPE)__msa_ilvr_b((v16i8)in0, (v16i8)in1); \ - out1 = (RTYPE)__msa_ilvl_b((v16i8)in0, (v16i8)in1); \ - } -#define ILVRL_B2_UB(...) ILVRL_B2(v16u8, __VA_ARGS__) - -#endif /* !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) */ - -#endif // INCLUDE_LIBYUV_MACROS_MSA_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/mjpeg_decoder.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/mjpeg_decoder.h deleted file mode 100644 index f3f26eaa..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/mjpeg_decoder.h +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_MJPEG_DECODER_H_ -#define INCLUDE_LIBYUV_MJPEG_DECODER_H_ - -#include "basic_types.h" - -#ifdef __cplusplus -// NOTE: For a simplified public API use convert.h MJPGToI420(). - -struct jpeg_common_struct; -struct jpeg_decompress_struct; -struct jpeg_source_mgr; - -namespace libyuv { - -#ifdef __cplusplus -extern "C" { -#endif - -LIBYUV_BOOL ValidateJpeg(const uint8* sample, size_t sample_size); - -#ifdef __cplusplus -} // extern "C" -#endif - -static const uint32 kUnknownDataSize = 0xFFFFFFFF; - -enum JpegSubsamplingType { - kJpegYuv420, - kJpegYuv422, - kJpegYuv444, - kJpegYuv400, - kJpegUnknown -}; - -struct Buffer { - const uint8* data; - int len; -}; - -struct BufferVector { - Buffer* buffers; - int len; - int pos; -}; - -struct SetJmpErrorMgr; - -// MJPEG ("Motion JPEG") is a pseudo-standard video codec where the frames are -// simply independent JPEG images with a fixed huffman table (which is omitted). -// It is rarely used in video transmission, but is common as a camera capture -// format, especially in Logitech devices. This class implements a decoder for -// MJPEG frames. -// -// See http://tools.ietf.org/html/rfc2435 -class LIBYUV_API MJpegDecoder { - public: - typedef void (*CallbackFunction)(void* opaque, - const uint8* const* data, - const int* strides, - int rows); - - static const int kColorSpaceUnknown; - static const int kColorSpaceGrayscale; - static const int kColorSpaceRgb; - static const int kColorSpaceYCbCr; - static const int kColorSpaceCMYK; - static const int kColorSpaceYCCK; - - MJpegDecoder(); - ~MJpegDecoder(); - - // Loads a new frame, reads its headers, and determines the uncompressed - // image format. - // Returns LIBYUV_TRUE if image looks valid and format is supported. - // If return value is LIBYUV_TRUE, then the values for all the following - // getters are populated. - // src_len is the size of the compressed mjpeg frame in bytes. - LIBYUV_BOOL LoadFrame(const uint8* src, size_t src_len); - - // Returns width of the last loaded frame in pixels. - int GetWidth(); - - // Returns height of the last loaded frame in pixels. - int GetHeight(); - - // Returns format of the last loaded frame. The return value is one of the - // kColorSpace* constants. - int GetColorSpace(); - - // Number of color components in the color space. - int GetNumComponents(); - - // Sample factors of the n-th component. - int GetHorizSampFactor(int component); - - int GetVertSampFactor(int component); - - int GetHorizSubSampFactor(int component); - - int GetVertSubSampFactor(int component); - - // Public for testability. - int GetImageScanlinesPerImcuRow(); - - // Public for testability. - int GetComponentScanlinesPerImcuRow(int component); - - // Width of a component in bytes. - int GetComponentWidth(int component); - - // Height of a component. - int GetComponentHeight(int component); - - // Width of a component in bytes with padding for DCTSIZE. Public for testing. - int GetComponentStride(int component); - - // Size of a component in bytes. - int GetComponentSize(int component); - - // Call this after LoadFrame() if you decide you don't want to decode it - // after all. - LIBYUV_BOOL UnloadFrame(); - - // Decodes the entire image into a one-buffer-per-color-component format. - // dst_width must match exactly. dst_height must be <= to image height; if - // less, the image is cropped. "planes" must have size equal to at least - // GetNumComponents() and they must point to non-overlapping buffers of size - // at least GetComponentSize(i). The pointers in planes are incremented - // to point to after the end of the written data. - // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. - LIBYUV_BOOL DecodeToBuffers(uint8** planes, int dst_width, int dst_height); - - // Decodes the entire image and passes the data via repeated calls to a - // callback function. Each call will get the data for a whole number of - // image scanlines. - // TODO(fbarchard): Add dst_x, dst_y to allow specific rect to be decoded. - LIBYUV_BOOL DecodeToCallback(CallbackFunction fn, - void* opaque, - int dst_width, - int dst_height); - - // The helper function which recognizes the jpeg sub-sampling type. - static JpegSubsamplingType JpegSubsamplingTypeHelper( - int* subsample_x, - int* subsample_y, - int number_of_components); - - private: - void AllocOutputBuffers(int num_outbufs); - void DestroyOutputBuffers(); - - LIBYUV_BOOL StartDecode(); - LIBYUV_BOOL FinishDecode(); - - void SetScanlinePointers(uint8** data); - LIBYUV_BOOL DecodeImcuRow(); - - int GetComponentScanlinePadding(int component); - - // A buffer holding the input data for a frame. - Buffer buf_; - BufferVector buf_vec_; - - jpeg_decompress_struct* decompress_struct_; - jpeg_source_mgr* source_mgr_; - SetJmpErrorMgr* error_mgr_; - - // LIBYUV_TRUE iff at least one component has scanline padding. (i.e., - // GetComponentScanlinePadding() != 0.) - LIBYUV_BOOL has_scanline_padding_; - - // Temporaries used to point to scanline outputs. - int num_outbufs_; // Outermost size of all arrays below. - uint8*** scanlines_; - int* scanlines_sizes_; - // Temporary buffer used for decoding when we can't decode directly to the - // output buffers. Large enough for just one iMCU row. - uint8** databuf_; - int* databuf_strides_; -}; - -} // namespace libyuv - -#endif // __cplusplus -#endif // INCLUDE_LIBYUV_MJPEG_DECODER_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/planar_functions.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/planar_functions.h deleted file mode 100644 index a6c5d0bb..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/planar_functions.h +++ /dev/null @@ -1,796 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ -#define INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ - -#include "basic_types.h" - -// TODO(fbarchard): Remove the following headers includes. -#include "convert.h" -#include "convert_argb.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Copy a plane of data. -LIBYUV_API -void CopyPlane(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -LIBYUV_API -void CopyPlane_16(const uint16* src_y, - int src_stride_y, - uint16* dst_y, - int dst_stride_y, - int width, - int height); - -// Set a plane of data to a 32 bit value. -LIBYUV_API -void SetPlane(uint8* dst_y, - int dst_stride_y, - int width, - int height, - uint32 value); - -// Split interleaved UV plane into separate U and V planes. -LIBYUV_API -void SplitUVPlane(const uint8* src_uv, - int src_stride_uv, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Merge separate U and V planes into one interleaved UV plane. -LIBYUV_API -void MergeUVPlane(const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -// Copy I400. Supports inverting. -LIBYUV_API -int I400ToI400(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -#define J400ToJ400 I400ToI400 - -// Copy I422 to I422. -#define I422ToI422 I422Copy -LIBYUV_API -int I422Copy(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Copy I444 to I444. -#define I444ToI444 I444Copy -LIBYUV_API -int I444Copy(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert YUY2 to I422. -LIBYUV_API -int YUY2ToI422(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Convert UYVY to I422. -LIBYUV_API -int UYVYToI422(const uint8* src_uyvy, - int src_stride_uyvy, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -LIBYUV_API -int YUY2ToNV12(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_y, - int dst_stride_y, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -LIBYUV_API -int UYVYToNV12(const uint8* src_uyvy, - int src_stride_uyvy, - uint8* dst_y, - int dst_stride_y, - uint8* dst_uv, - int dst_stride_uv, - int width, - int height); - -LIBYUV_API -int YUY2ToY(const uint8* src_yuy2, - int src_stride_yuy2, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Convert I420 to I400. (calls CopyPlane ignoring u/v). -LIBYUV_API -int I420ToI400(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Alias -#define J420ToJ400 I420ToI400 -#define I420ToI420Mirror I420Mirror - -// I420 mirror. -LIBYUV_API -int I420Mirror(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Alias -#define I400ToI400Mirror I400Mirror - -// I400 mirror. A single plane is mirrored horizontally. -// Pass negative height to achieve 180 degree rotation. -LIBYUV_API -int I400Mirror(const uint8* src_y, - int src_stride_y, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Alias -#define ARGBToARGBMirror ARGBMirror - -// ARGB mirror. -LIBYUV_API -int ARGBMirror(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert NV12 to RGB565. -LIBYUV_API -int NV12ToRGB565(const uint8* src_y, - int src_stride_y, - const uint8* src_uv, - int src_stride_uv, - uint8* dst_rgb565, - int dst_stride_rgb565, - int width, - int height); - -// I422ToARGB is in convert_argb.h -// Convert I422 to BGRA. -LIBYUV_API -int I422ToBGRA(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_bgra, - int dst_stride_bgra, - int width, - int height); - -// Convert I422 to ABGR. -LIBYUV_API -int I422ToABGR(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_abgr, - int dst_stride_abgr, - int width, - int height); - -// Convert I422 to RGBA. -LIBYUV_API -int I422ToRGBA(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_rgba, - int dst_stride_rgba, - int width, - int height); - -// Alias -#define RGB24ToRAW RAWToRGB24 - -LIBYUV_API -int RAWToRGB24(const uint8* src_raw, - int src_stride_raw, - uint8* dst_rgb24, - int dst_stride_rgb24, - int width, - int height); - -// Draw a rectangle into I420. -LIBYUV_API -int I420Rect(uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int x, - int y, - int width, - int height, - int value_y, - int value_u, - int value_v); - -// Draw a rectangle into ARGB. -LIBYUV_API -int ARGBRect(uint8* dst_argb, - int dst_stride_argb, - int x, - int y, - int width, - int height, - uint32 value); - -// Convert ARGB to gray scale ARGB. -LIBYUV_API -int ARGBGrayTo(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Make a rectangle of ARGB gray scale. -LIBYUV_API -int ARGBGray(uint8* dst_argb, - int dst_stride_argb, - int x, - int y, - int width, - int height); - -// Make a rectangle of ARGB Sepia tone. -LIBYUV_API -int ARGBSepia(uint8* dst_argb, - int dst_stride_argb, - int x, - int y, - int width, - int height); - -// Apply a matrix rotation to each ARGB pixel. -// matrix_argb is 4 signed ARGB values. -128 to 127 representing -2 to 2. -// The first 4 coefficients apply to B, G, R, A and produce B of the output. -// The next 4 coefficients apply to B, G, R, A and produce G of the output. -// The next 4 coefficients apply to B, G, R, A and produce R of the output. -// The last 4 coefficients apply to B, G, R, A and produce A of the output. -LIBYUV_API -int ARGBColorMatrix(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - const int8* matrix_argb, - int width, - int height); - -// Deprecated. Use ARGBColorMatrix instead. -// Apply a matrix rotation to each ARGB pixel. -// matrix_argb is 3 signed ARGB values. -128 to 127 representing -1 to 1. -// The first 4 coefficients apply to B, G, R, A and produce B of the output. -// The next 4 coefficients apply to B, G, R, A and produce G of the output. -// The last 4 coefficients apply to B, G, R, A and produce R of the output. -LIBYUV_API -int RGBColorMatrix(uint8* dst_argb, - int dst_stride_argb, - const int8* matrix_rgb, - int x, - int y, - int width, - int height); - -// Apply a color table each ARGB pixel. -// Table contains 256 ARGB values. -LIBYUV_API -int ARGBColorTable(uint8* dst_argb, - int dst_stride_argb, - const uint8* table_argb, - int x, - int y, - int width, - int height); - -// Apply a color table each ARGB pixel but preserve destination alpha. -// Table contains 256 ARGB values. -LIBYUV_API -int RGBColorTable(uint8* dst_argb, - int dst_stride_argb, - const uint8* table_argb, - int x, - int y, - int width, - int height); - -// Apply a luma/color table each ARGB pixel but preserve destination alpha. -// Table contains 32768 values indexed by [Y][C] where 7 it 7 bit luma from -// RGB (YJ style) and C is an 8 bit color component (R, G or B). -LIBYUV_API -int ARGBLumaColorTable(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - const uint8* luma_rgb_table, - int width, - int height); - -// Apply a 3 term polynomial to ARGB values. -// poly points to a 4x4 matrix. The first row is constants. The 2nd row is -// coefficients for b, g, r and a. The 3rd row is coefficients for b squared, -// g squared, r squared and a squared. The 4rd row is coefficients for b to -// the 3, g to the 3, r to the 3 and a to the 3. The values are summed and -// result clamped to 0 to 255. -// A polynomial approximation can be dirived using software such as 'R'. - -LIBYUV_API -int ARGBPolynomial(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - const float* poly, - int width, - int height); - -// Convert plane of 16 bit shorts to half floats. -// Source values are multiplied by scale before storing as half float. -LIBYUV_API -int HalfFloatPlane(const uint16* src_y, - int src_stride_y, - uint16* dst_y, - int dst_stride_y, - float scale, - int width, - int height); - -// Quantize a rectangle of ARGB. Alpha unaffected. -// scale is a 16 bit fractional fixed point scaler between 0 and 65535. -// interval_size should be a value between 1 and 255. -// interval_offset should be a value between 0 and 255. -LIBYUV_API -int ARGBQuantize(uint8* dst_argb, - int dst_stride_argb, - int scale, - int interval_size, - int interval_offset, - int x, - int y, - int width, - int height); - -// Copy ARGB to ARGB. -LIBYUV_API -int ARGBCopy(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Copy Alpha channel of ARGB to alpha of ARGB. -LIBYUV_API -int ARGBCopyAlpha(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Extract the alpha channel from ARGB. -LIBYUV_API -int ARGBExtractAlpha(const uint8* src_argb, - int src_stride_argb, - uint8* dst_a, - int dst_stride_a, - int width, - int height); - -// Copy Y channel to Alpha of ARGB. -LIBYUV_API -int ARGBCopyYToAlpha(const uint8* src_y, - int src_stride_y, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -typedef void (*ARGBBlendRow)(const uint8* src_argb0, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -// Get function to Alpha Blend ARGB pixels and store to destination. -LIBYUV_API -ARGBBlendRow GetARGBBlend(); - -// Alpha Blend ARGB images and store to destination. -// Source is pre-multiplied by alpha using ARGBAttenuate. -// Alpha of destination is set to 255. -LIBYUV_API -int ARGBBlend(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Alpha Blend plane and store to destination. -// Source is not pre-multiplied by alpha. -LIBYUV_API -int BlendPlane(const uint8* src_y0, - int src_stride_y0, - const uint8* src_y1, - int src_stride_y1, - const uint8* alpha, - int alpha_stride, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Alpha Blend YUV images and store to destination. -// Source is not pre-multiplied by alpha. -// Alpha is full width x height and subsampled to half size to apply to UV. -LIBYUV_API -int I420Blend(const uint8* src_y0, - int src_stride_y0, - const uint8* src_u0, - int src_stride_u0, - const uint8* src_v0, - int src_stride_v0, - const uint8* src_y1, - int src_stride_y1, - const uint8* src_u1, - int src_stride_u1, - const uint8* src_v1, - int src_stride_v1, - const uint8* alpha, - int alpha_stride, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height); - -// Multiply ARGB image by ARGB image. Shifted down by 8. Saturates to 255. -LIBYUV_API -int ARGBMultiply(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Add ARGB image with ARGB image. Saturates to 255. -LIBYUV_API -int ARGBAdd(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Subtract ARGB image (argb1) from ARGB image (argb0). Saturates to 0. -LIBYUV_API -int ARGBSubtract(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert I422 to YUY2. -LIBYUV_API -int I422ToYUY2(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -// Convert I422 to UYVY. -LIBYUV_API -int I422ToUYVY(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_frame, - int dst_stride_frame, - int width, - int height); - -// Convert unattentuated ARGB to preattenuated ARGB. -LIBYUV_API -int ARGBAttenuate(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Convert preattentuated ARGB to unattenuated ARGB. -LIBYUV_API -int ARGBUnattenuate(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Internal function - do not call directly. -// Computes table of cumulative sum for image where the value is the sum -// of all values above and to the left of the entry. Used by ARGBBlur. -LIBYUV_API -int ARGBComputeCumulativeSum(const uint8* src_argb, - int src_stride_argb, - int32* dst_cumsum, - int dst_stride32_cumsum, - int width, - int height); - -// Blur ARGB image. -// dst_cumsum table of width * (height + 1) * 16 bytes aligned to -// 16 byte boundary. -// dst_stride32_cumsum is number of ints in a row (width * 4). -// radius is number of pixels around the center. e.g. 1 = 3x3. 2=5x5. -// Blur is optimized for radius of 5 (11x11) or less. -LIBYUV_API -int ARGBBlur(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int32* dst_cumsum, - int dst_stride32_cumsum, - int width, - int height, - int radius); - -// Multiply ARGB image by ARGB value. -LIBYUV_API -int ARGBShade(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height, - uint32 value); - -// Interpolate between two images using specified amount of interpolation -// (0 to 255) and store to destination. -// 'interpolation' is specified as 8 bit fraction where 0 means 100% src0 -// and 255 means 1% src0 and 99% src1. -LIBYUV_API -int InterpolatePlane(const uint8* src0, - int src_stride0, - const uint8* src1, - int src_stride1, - uint8* dst, - int dst_stride, - int width, - int height, - int interpolation); - -// Interpolate between two ARGB images using specified amount of interpolation -// Internally calls InterpolatePlane with width * 4 (bpp). -LIBYUV_API -int ARGBInterpolate(const uint8* src_argb0, - int src_stride_argb0, - const uint8* src_argb1, - int src_stride_argb1, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height, - int interpolation); - -// Interpolate between two YUV images using specified amount of interpolation -// Internally calls InterpolatePlane on each plane where the U and V planes -// are half width and half height. -LIBYUV_API -int I420Interpolate(const uint8* src0_y, - int src0_stride_y, - const uint8* src0_u, - int src0_stride_u, - const uint8* src0_v, - int src0_stride_v, - const uint8* src1_y, - int src1_stride_y, - const uint8* src1_u, - int src1_stride_u, - const uint8* src1_v, - int src1_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int width, - int height, - int interpolation); - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif -// The following are available on all x86 platforms: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) -#define HAS_ARGBAFFINEROW_SSE2 -#endif - -// Row function for copying pixels from a source with a slope to a row -// of destination. Useful for scaling, rotation, mirror, texture mapping. -LIBYUV_API -void ARGBAffineRow_C(const uint8* src_argb, - int src_argb_stride, - uint8* dst_argb, - const float* uv_dudv, - int width); -LIBYUV_API -void ARGBAffineRow_SSE2(const uint8* src_argb, - int src_argb_stride, - uint8* dst_argb, - const float* uv_dudv, - int width); - -// Shuffle ARGB channel order. e.g. BGRA to ARGB. -// shuffler is 16 bytes and must be aligned. -LIBYUV_API -int ARGBShuffle(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_argb, - int dst_stride_argb, - const uint8* shuffler, - int width, - int height); - -// Sobel ARGB effect with planar output. -LIBYUV_API -int ARGBSobelToPlane(const uint8* src_argb, - int src_stride_argb, - uint8* dst_y, - int dst_stride_y, - int width, - int height); - -// Sobel ARGB effect. -LIBYUV_API -int ARGBSobel(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -// Sobel ARGB effect w/ Sobel X, Sobel, Sobel Y in ARGB. -LIBYUV_API -int ARGBSobelXY(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int width, - int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/rotate.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/rotate.h deleted file mode 100644 index 47e235de..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/rotate.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROTATE_H_ -#define INCLUDE_LIBYUV_ROTATE_H_ - -#include "basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Supported rotation. -typedef enum RotationMode { - kRotate0 = 0, // No rotation. - kRotate90 = 90, // Rotate 90 degrees clockwise. - kRotate180 = 180, // Rotate 180 degrees. - kRotate270 = 270, // Rotate 270 degrees clockwise. - - // Deprecated. - kRotateNone = 0, - kRotateClockwise = 90, - kRotateCounterClockwise = 270, -} RotationModeEnum; - -// Rotate I420 frame. -LIBYUV_API -int I420Rotate(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int src_width, - int src_height, - enum RotationMode mode); - -// Rotate NV12 input and store in I420. -LIBYUV_API -int NV12ToI420Rotate(const uint8* src_y, - int src_stride_y, - const uint8* src_uv, - int src_stride_uv, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int src_width, - int src_height, - enum RotationMode mode); - -// Rotate a plane by 0, 90, 180, or 270. -LIBYUV_API -int RotatePlane(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int src_width, - int src_height, - enum RotationMode mode); - -// Rotate planes by 90, 180, 270. Deprecated. -LIBYUV_API -void RotatePlane90(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -LIBYUV_API -void RotatePlane180(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -LIBYUV_API -void RotatePlane270(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -LIBYUV_API -void RotateUV90(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -// Rotations for when U and V are interleaved. -// These functions take one input pointer and -// split the data into two buffers while -// rotating them. Deprecated. -LIBYUV_API -void RotateUV180(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -LIBYUV_API -void RotateUV270(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -// The 90 and 270 functions are based on transposes. -// Doing a transpose with reversing the read/write -// order will result in a rotation by +- 90 degrees. -// Deprecated. -LIBYUV_API -void TransposePlane(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -LIBYUV_API -void TransposeUV(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROTATE_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/rotate_argb.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/rotate_argb.h deleted file mode 100644 index aca77aa3..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/rotate_argb.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ -#define INCLUDE_LIBYUV_ROTATE_ARGB_H_ - -#include "basic_types.h" -#include "rotate.h" // For RotationMode. - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Rotate ARGB frame -LIBYUV_API -int ARGBRotate(const uint8* src_argb, - int src_stride_argb, - uint8* dst_argb, - int dst_stride_argb, - int src_width, - int src_height, - enum RotationMode mode); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/rotate_row.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/rotate_row.h deleted file mode 100644 index 0aba25f7..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/rotate_row.h +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright 2013 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROTATE_ROW_H_ -#define INCLUDE_LIBYUV_ROTATE_ROW_H_ - -#include "basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif -// The following are available for Visual C and clangcl 32 bit: -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) -#define HAS_TRANSPOSEWX8_SSSE3 -#define HAS_TRANSPOSEUVWX8_SSE2 -#endif - -// The following are available for GCC 32 or 64 bit but not NaCL for 64 bit: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(__i386__) || \ - (defined(__x86_64__) && !defined(__native_client__))) -#define HAS_TRANSPOSEWX8_SSSE3 -#endif - -// The following are available for 64 bit GCC but not NaCL: -#if !defined(LIBYUV_DISABLE_X86) && !defined(__native_client__) && \ - defined(__x86_64__) -#define HAS_TRANSPOSEWX8_FAST_SSSE3 -#define HAS_TRANSPOSEUVWX8_SSE2 -#endif - -#if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -#define HAS_TRANSPOSEWX8_NEON -#define HAS_TRANSPOSEUVWX8_NEON -#endif - -#if !defined(LIBYUV_DISABLE_DSPR2) && !defined(__native_client__) && \ - defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_TRANSPOSEWX8_DSPR2 -#define HAS_TRANSPOSEUVWX8_DSPR2 -#endif // defined(__mips__) - -#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) -#define HAS_TRANSPOSEWX16_MSA -#define HAS_TRANSPOSEUVWX16_MSA -#endif - -void TransposeWxH_C(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width, - int height); - -void TransposeWx8_C(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx16_C(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_NEON(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_SSSE3(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Fast_SSSE3(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_DSPR2(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Fast_DSPR2(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx16_MSA(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); - -void TransposeWx8_Any_NEON(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Any_SSSE3(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Fast_Any_SSSE3(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx8_Any_DSPR2(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); -void TransposeWx16_Any_MSA(const uint8* src, - int src_stride, - uint8* dst, - int dst_stride, - int width); - -void TransposeUVWxH_C(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width, - int height); - -void TransposeUVWx8_C(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx16_C(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_SSE2(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_NEON(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_DSPR2(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx16_MSA(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); - -void TransposeUVWx8_Any_SSE2(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_Any_NEON(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx8_Any_DSPR2(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); -void TransposeUVWx16_Any_MSA(const uint8* src, - int src_stride, - uint8* dst_a, - int dst_stride_a, - uint8* dst_b, - int dst_stride_b, - int width); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROTATE_ROW_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/row.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/row.h deleted file mode 100644 index 481e0927..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/row.h +++ /dev/null @@ -1,3161 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_ROW_H_ -#define INCLUDE_LIBYUV_ROW_H_ - -#include // For malloc. - -#include "basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#define IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a)-1))) - -#define align_buffer_64(var, size) \ - uint8* var##_mem = (uint8*)(malloc((size) + 63)); /* NOLINT */ \ - uint8* var = (uint8*)(((intptr_t)(var##_mem) + 63) & ~63) /* NOLINT */ - -#define free_aligned_buffer_64(var) \ - free(var##_mem); \ - var = 0 - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif -// True if compiling for SSSE3 as a requirement. -#if defined(__SSSE3__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 3)) -#define LIBYUV_SSSE3_ONLY -#endif - -#if defined(__native_client__) -#define LIBYUV_DISABLE_NEON -#endif -// clang >= 3.5.0 required for Arm64. -#if defined(__clang__) && defined(__aarch64__) && !defined(LIBYUV_DISABLE_NEON) -#if (__clang_major__ < 3) || (__clang_major__ == 3 && (__clang_minor__ < 5)) -#define LIBYUV_DISABLE_NEON -#endif // clang >= 3.5 -#endif // __clang__ - -// GCC >= 4.7.0 required for AVX2. -#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) -#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7)) -#define GCC_HAS_AVX2 1 -#endif // GNUC >= 4.7 -#endif // __GNUC__ - -// clang >= 3.4.0 required for AVX2. -#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) -#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) -#define CLANG_HAS_AVX2 1 -#endif // clang >= 3.4 -#endif // __clang__ - -// Visual C 2012 required for AVX2. -#if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ - _MSC_VER >= 1700 -#define VISUALC_HAS_AVX2 1 -#endif // VisualStudio >= 2012 - -// The following are available on all x86 platforms: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) -// Conversions: -#define HAS_ABGRTOUVROW_SSSE3 -#define HAS_ABGRTOYROW_SSSE3 -#define HAS_ARGB1555TOARGBROW_SSE2 -#define HAS_ARGB4444TOARGBROW_SSE2 -#define HAS_ARGBEXTRACTALPHAROW_SSE2 -#define HAS_ARGBSETROW_X86 -#define HAS_ARGBSHUFFLEROW_SSE2 -#define HAS_ARGBSHUFFLEROW_SSSE3 -#define HAS_ARGBTOARGB1555ROW_SSE2 -#define HAS_ARGBTOARGB4444ROW_SSE2 -#define HAS_ARGBTORAWROW_SSSE3 -#define HAS_ARGBTORGB24ROW_SSSE3 -#define HAS_ARGBTORGB565DITHERROW_SSE2 -#define HAS_ARGBTORGB565ROW_SSE2 -#define HAS_ARGBTOUV444ROW_SSSE3 -#define HAS_ARGBTOUVJROW_SSSE3 -#define HAS_ARGBTOUVROW_SSSE3 -#define HAS_ARGBTOYJROW_SSSE3 -#define HAS_ARGBTOYROW_SSSE3 -#define HAS_BGRATOUVROW_SSSE3 -#define HAS_BGRATOYROW_SSSE3 -#define HAS_COPYROW_ERMS -#define HAS_COPYROW_SSE2 -#define HAS_H422TOARGBROW_SSSE3 -#define HAS_HALFFLOATROW_SSE2 -#define HAS_I400TOARGBROW_SSE2 -#define HAS_I422TOARGB1555ROW_SSSE3 -#define HAS_I422TOARGB4444ROW_SSSE3 -#define HAS_I422TOARGBROW_SSSE3 -#define HAS_I422TORGB24ROW_SSSE3 -#define HAS_I422TORGB565ROW_SSSE3 -#define HAS_I422TORGBAROW_SSSE3 -#define HAS_I422TOUYVYROW_SSE2 -#define HAS_I422TOYUY2ROW_SSE2 -#define HAS_I444TOARGBROW_SSSE3 -#define HAS_J400TOARGBROW_SSE2 -#define HAS_J422TOARGBROW_SSSE3 -#define HAS_MERGEUVROW_SSE2 -#define HAS_MIRRORROW_SSSE3 -#define HAS_MIRRORUVROW_SSSE3 -#define HAS_NV12TOARGBROW_SSSE3 -#define HAS_NV12TORGB565ROW_SSSE3 -#define HAS_NV21TOARGBROW_SSSE3 -#define HAS_RAWTOARGBROW_SSSE3 -#define HAS_RAWTORGB24ROW_SSSE3 -#define HAS_RAWTOYROW_SSSE3 -#define HAS_RGB24TOARGBROW_SSSE3 -#define HAS_RGB24TOYROW_SSSE3 -#define HAS_RGB565TOARGBROW_SSE2 -#define HAS_RGBATOUVROW_SSSE3 -#define HAS_RGBATOYROW_SSSE3 -#define HAS_SETROW_ERMS -#define HAS_SETROW_X86 -#define HAS_SPLITUVROW_SSE2 -#define HAS_UYVYTOARGBROW_SSSE3 -#define HAS_UYVYTOUV422ROW_SSE2 -#define HAS_UYVYTOUVROW_SSE2 -#define HAS_UYVYTOYROW_SSE2 -#define HAS_YUY2TOARGBROW_SSSE3 -#define HAS_YUY2TOUV422ROW_SSE2 -#define HAS_YUY2TOUVROW_SSE2 -#define HAS_YUY2TOYROW_SSE2 - -// Effects: -#define HAS_ARGBADDROW_SSE2 -#define HAS_ARGBAFFINEROW_SSE2 -#define HAS_ARGBATTENUATEROW_SSSE3 -#define HAS_ARGBBLENDROW_SSSE3 -#define HAS_ARGBCOLORMATRIXROW_SSSE3 -#define HAS_ARGBCOLORTABLEROW_X86 -#define HAS_ARGBCOPYALPHAROW_SSE2 -#define HAS_ARGBCOPYYTOALPHAROW_SSE2 -#define HAS_ARGBGRAYROW_SSSE3 -#define HAS_ARGBLUMACOLORTABLEROW_SSSE3 -#define HAS_ARGBMIRRORROW_SSE2 -#define HAS_ARGBMULTIPLYROW_SSE2 -#define HAS_ARGBPOLYNOMIALROW_SSE2 -#define HAS_ARGBQUANTIZEROW_SSE2 -#define HAS_ARGBSEPIAROW_SSSE3 -#define HAS_ARGBSHADEROW_SSE2 -#define HAS_ARGBSUBTRACTROW_SSE2 -#define HAS_ARGBUNATTENUATEROW_SSE2 -#define HAS_BLENDPLANEROW_SSSE3 -#define HAS_COMPUTECUMULATIVESUMROW_SSE2 -#define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2 -#define HAS_INTERPOLATEROW_SSSE3 -#define HAS_RGBCOLORTABLEROW_X86 -#define HAS_SOBELROW_SSE2 -#define HAS_SOBELTOPLANEROW_SSE2 -#define HAS_SOBELXROW_SSE2 -#define HAS_SOBELXYROW_SSE2 -#define HAS_SOBELYROW_SSE2 - -// The following functions fail on gcc/clang 32 bit with fpic and framepointer. -// caveat: clangcl uses row_win.cc which works. -#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ - defined(_MSC_VER) -// TODO(fbarchard): fix build error on android_full_debug=1 -// https://code.google.com/p/libyuv/issues/detail?id=517 -#define HAS_I422ALPHATOARGBROW_SSSE3 -#endif -#endif - -// The following are available on all x86 platforms, but -// require VS2012, clang 3.4 or gcc 4.7. -// The code supports NaCL but requires a new compiler and validator. -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \ - defined(GCC_HAS_AVX2)) -#define HAS_ARGBCOPYALPHAROW_AVX2 -#define HAS_ARGBCOPYYTOALPHAROW_AVX2 -#define HAS_ARGBEXTRACTALPHAROW_AVX2 -#define HAS_ARGBMIRRORROW_AVX2 -#define HAS_ARGBPOLYNOMIALROW_AVX2 -#define HAS_ARGBSHUFFLEROW_AVX2 -#define HAS_ARGBTORGB565DITHERROW_AVX2 -#define HAS_ARGBTOUVJROW_AVX2 -#define HAS_ARGBTOUVROW_AVX2 -#define HAS_ARGBTOYJROW_AVX2 -#define HAS_ARGBTOYROW_AVX2 -#define HAS_COPYROW_AVX -#define HAS_H422TOARGBROW_AVX2 -#define HAS_HALFFLOATROW_AVX2 -// #define HAS_HALFFLOATROW_F16C // Enable to test halffloat cast -#define HAS_I400TOARGBROW_AVX2 -#define HAS_I422TOARGB1555ROW_AVX2 -#define HAS_I422TOARGB4444ROW_AVX2 -#define HAS_I422TOARGBROW_AVX2 -#define HAS_I422TORGB24ROW_AVX2 -#define HAS_I422TORGB565ROW_AVX2 -#define HAS_I422TORGBAROW_AVX2 -#define HAS_I444TOARGBROW_AVX2 -#define HAS_INTERPOLATEROW_AVX2 -#define HAS_J422TOARGBROW_AVX2 -#define HAS_MERGEUVROW_AVX2 -#define HAS_MIRRORROW_AVX2 -#define HAS_NV12TOARGBROW_AVX2 -#define HAS_NV12TORGB565ROW_AVX2 -#define HAS_NV21TOARGBROW_AVX2 -#define HAS_SPLITUVROW_AVX2 -#define HAS_UYVYTOARGBROW_AVX2 -#define HAS_UYVYTOUV422ROW_AVX2 -#define HAS_UYVYTOUVROW_AVX2 -#define HAS_UYVYTOYROW_AVX2 -#define HAS_YUY2TOARGBROW_AVX2 -#define HAS_YUY2TOUV422ROW_AVX2 -#define HAS_YUY2TOUVROW_AVX2 -#define HAS_YUY2TOYROW_AVX2 - -// Effects: -#define HAS_ARGBADDROW_AVX2 -#define HAS_ARGBATTENUATEROW_AVX2 -#define HAS_ARGBMULTIPLYROW_AVX2 -#define HAS_ARGBSUBTRACTROW_AVX2 -#define HAS_ARGBUNATTENUATEROW_AVX2 -#define HAS_BLENDPLANEROW_AVX2 - -#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \ - defined(_MSC_VER) -// TODO(fbarchard): fix build error on android_full_debug=1 -// https://code.google.com/p/libyuv/issues/detail?id=517 -#define HAS_I422ALPHATOARGBROW_AVX2 -#endif -#endif - -// The following are available for AVX2 Visual C and clangcl 32 bit: -// TODO(fbarchard): Port to gcc. -#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2)) -#define HAS_ARGB1555TOARGBROW_AVX2 -#define HAS_ARGB4444TOARGBROW_AVX2 -#define HAS_ARGBTOARGB1555ROW_AVX2 -#define HAS_ARGBTOARGB4444ROW_AVX2 -#define HAS_ARGBTORGB565ROW_AVX2 -#define HAS_J400TOARGBROW_AVX2 -#define HAS_RGB565TOARGBROW_AVX2 -#endif - -// The following are also available on x64 Visual C. -#if !defined(LIBYUV_DISABLE_X86) && defined(_MSC_VER) && defined(_M_X64) && \ - (!defined(__clang__) || defined(__SSSE3__)) -#define HAS_I422ALPHATOARGBROW_SSSE3 -#define HAS_I422TOARGBROW_SSSE3 -#endif - -// The following are available on Neon platforms: -#if !defined(LIBYUV_DISABLE_NEON) && \ - (defined(__aarch64__) || defined(__ARM_NEON__) || defined(LIBYUV_NEON)) -#define HAS_ABGRTOUVROW_NEON -#define HAS_ABGRTOYROW_NEON -#define HAS_ARGB1555TOARGBROW_NEON -#define HAS_ARGB1555TOUVROW_NEON -#define HAS_ARGB1555TOYROW_NEON -#define HAS_ARGB4444TOARGBROW_NEON -#define HAS_ARGB4444TOUVROW_NEON -#define HAS_ARGB4444TOYROW_NEON -#define HAS_ARGBEXTRACTALPHAROW_NEON -#define HAS_ARGBSETROW_NEON -#define HAS_ARGBTOARGB1555ROW_NEON -#define HAS_ARGBTOARGB4444ROW_NEON -#define HAS_ARGBTORAWROW_NEON -#define HAS_ARGBTORGB24ROW_NEON -#define HAS_ARGBTORGB565DITHERROW_NEON -#define HAS_ARGBTORGB565ROW_NEON -#define HAS_ARGBTOUV444ROW_NEON -#define HAS_ARGBTOUVJROW_NEON -#define HAS_ARGBTOUVROW_NEON -#define HAS_ARGBTOYJROW_NEON -#define HAS_ARGBTOYROW_NEON -#define HAS_BGRATOUVROW_NEON -#define HAS_BGRATOYROW_NEON -#define HAS_COPYROW_NEON -#define HAS_HALFFLOATROW_NEON -#define HAS_I400TOARGBROW_NEON -#define HAS_I422ALPHATOARGBROW_NEON -#define HAS_I422TOARGB1555ROW_NEON -#define HAS_I422TOARGB4444ROW_NEON -#define HAS_I422TOARGBROW_NEON -#define HAS_I422TORGB24ROW_NEON -#define HAS_I422TORGB565ROW_NEON -#define HAS_I422TORGBAROW_NEON -#define HAS_I422TOUYVYROW_NEON -#define HAS_I422TOYUY2ROW_NEON -#define HAS_I444TOARGBROW_NEON -#define HAS_J400TOARGBROW_NEON -#define HAS_MERGEUVROW_NEON -#define HAS_MIRRORROW_NEON -#define HAS_MIRRORUVROW_NEON -#define HAS_NV12TOARGBROW_NEON -#define HAS_NV12TORGB565ROW_NEON -#define HAS_NV21TOARGBROW_NEON -#define HAS_RAWTOARGBROW_NEON -#define HAS_RAWTORGB24ROW_NEON -#define HAS_RAWTOUVROW_NEON -#define HAS_RAWTOYROW_NEON -#define HAS_RGB24TOARGBROW_NEON -#define HAS_RGB24TOUVROW_NEON -#define HAS_RGB24TOYROW_NEON -#define HAS_RGB565TOARGBROW_NEON -#define HAS_RGB565TOUVROW_NEON -#define HAS_RGB565TOYROW_NEON -#define HAS_RGBATOUVROW_NEON -#define HAS_RGBATOYROW_NEON -#define HAS_SETROW_NEON -#define HAS_SPLITUVROW_NEON -#define HAS_UYVYTOARGBROW_NEON -#define HAS_UYVYTOUV422ROW_NEON -#define HAS_UYVYTOUVROW_NEON -#define HAS_UYVYTOYROW_NEON -#define HAS_YUY2TOARGBROW_NEON -#define HAS_YUY2TOUV422ROW_NEON -#define HAS_YUY2TOUVROW_NEON -#define HAS_YUY2TOYROW_NEON - -// Effects: -#define HAS_ARGBADDROW_NEON -#define HAS_ARGBATTENUATEROW_NEON -#define HAS_ARGBBLENDROW_NEON -#define HAS_ARGBCOLORMATRIXROW_NEON -#define HAS_ARGBGRAYROW_NEON -#define HAS_ARGBMIRRORROW_NEON -#define HAS_ARGBMULTIPLYROW_NEON -#define HAS_ARGBQUANTIZEROW_NEON -#define HAS_ARGBSEPIAROW_NEON -#define HAS_ARGBSHADEROW_NEON -#define HAS_ARGBSHUFFLEROW_NEON -#define HAS_ARGBSUBTRACTROW_NEON -#define HAS_INTERPOLATEROW_NEON -#define HAS_SOBELROW_NEON -#define HAS_SOBELTOPLANEROW_NEON -#define HAS_SOBELXROW_NEON -#define HAS_SOBELXYROW_NEON -#define HAS_SOBELYROW_NEON -#endif - -// The following are available on Mips platforms: -#if !defined(LIBYUV_DISABLE_DSPR2) && defined(__mips__) && \ - (_MIPS_SIM == _MIPS_SIM_ABI32) && (__mips_isa_rev < 6) -#define HAS_COPYROW_MIPS -#if defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_I422TOARGBROW_DSPR2 -#define HAS_INTERPOLATEROW_DSPR2 -#define HAS_MIRRORROW_DSPR2 -#define HAS_MIRRORUVROW_DSPR2 -#define HAS_SPLITUVROW_DSPR2 -#define HAS_RGB24TOARGBROW_DSPR2 -#define HAS_RAWTOARGBROW_DSPR2 -#define HAS_RGB565TOARGBROW_DSPR2 -#define HAS_ARGB1555TOARGBROW_DSPR2 -#define HAS_ARGB4444TOARGBROW_DSPR2 -#define HAS_I444TOARGBROW_DSPR2 -#define HAS_I422TOARGB4444ROW_DSPR2 -#define HAS_I422TOARGB1555ROW_DSPR2 -#define HAS_NV12TOARGBROW_DSPR2 -#define HAS_BGRATOUVROW_DSPR2 -#define HAS_BGRATOYROW_DSPR2 -#define HAS_ABGRTOUVROW_DSPR2 -#define HAS_ARGBTOYROW_DSPR2 -#define HAS_ABGRTOYROW_DSPR2 -#define HAS_RGBATOUVROW_DSPR2 -#define HAS_RGBATOYROW_DSPR2 -#define HAS_ARGBTOUVROW_DSPR2 -#endif -#endif - -#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) -#define HAS_ARGBMIRRORROW_MSA -#define HAS_I422TOUYVYROW_MSA -#define HAS_I422TOYUY2ROW_MSA -#define HAS_MIRRORROW_MSA -#define HAS_UYVYTOUVROW_MSA -#define HAS_UYVYTOYROW_MSA -#define HAS_YUY2TOUV422ROW_MSA -#define HAS_YUY2TOUVROW_MSA -#define HAS_YUY2TOYROW_MSA -#define HAS_ARGB4444TOARGBROW_MSA -#define HAS_ARGBTOYROW_MSA -#define HAS_ARGBTOUVROW_MSA -#define HAS_I422TOARGBROW_MSA -#define HAS_I422TORGBAROW_MSA -#define HAS_I422ALPHATOARGBROW_MSA -#define HAS_I422TORGB24ROW_MSA -#define HAS_ARGBTORGB24ROW_MSA -#define HAS_ARGBTORAWROW_MSA -#define HAS_ARGBTORGB565ROW_MSA -#define HAS_ARGBTOARGB1555ROW_MSA -#define HAS_ARGBTOARGB4444ROW_MSA -#define HAS_ARGBTOUV444ROW_MSA -#define HAS_ARGBMULTIPLYROW_MSA -#define HAS_ARGBADDROW_MSA -#define HAS_ARGBSUBTRACTROW_MSA -#define HAS_ARGBATTENUATEROW_MSA -#define HAS_ARGBTORGB565DITHERROW_MSA -#define HAS_ARGBSHUFFLEROW_MSA -#define HAS_ARGBSHADEROW_MSA -#define HAS_ARGBGRAYROW_MSA -#define HAS_ARGBSEPIAROW_MSA -#define HAS_ARGB1555TOARGBROW_MSA -#define HAS_RGB565TOARGBROW_MSA -#define HAS_RGB24TOARGBROW_MSA -#define HAS_RAWTOARGBROW_MSA -#define HAS_ARGB1555TOYROW_MSA -#define HAS_RGB565TOYROW_MSA -#define HAS_RGB24TOYROW_MSA -#define HAS_RAWTOYROW_MSA -#define HAS_ARGB1555TOUVROW_MSA -#define HAS_RGB565TOUVROW_MSA -#define HAS_RGB24TOUVROW_MSA -#define HAS_RAWTOUVROW_MSA -#define HAS_NV12TOARGBROW_MSA -#define HAS_NV12TORGB565ROW_MSA -#define HAS_NV21TOARGBROW_MSA -#define HAS_SOBELROW_MSA -#define HAS_SOBELTOPLANEROW_MSA -#define HAS_SOBELXYROW_MSA -#define HAS_ARGBTOYJROW_MSA -#define HAS_BGRATOYROW_MSA -#define HAS_ABGRTOYROW_MSA -#define HAS_RGBATOYROW_MSA -#define HAS_ARGBTOUVJROW_MSA -#define HAS_BGRATOUVROW_MSA -#define HAS_ABGRTOUVROW_MSA -#define HAS_RGBATOUVROW_MSA -#define HAS_I444TOARGBROW_MSA -#define HAS_I400TOARGBROW_MSA -#define HAS_J400TOARGBROW_MSA -#define HAS_YUY2TOARGBROW_MSA -#define HAS_UYVYTOARGBROW_MSA -#define HAS_INTERPOLATEROW_MSA -#define HAS_ARGBSETROW_MSA -#define HAS_RAWTORGB24ROW_MSA -#define HAS_MERGEUVROW_MSA -#endif - -#if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) -#if defined(VISUALC_HAS_AVX2) -#define SIMD_ALIGNED(var) __declspec(align(32)) var -#else -#define SIMD_ALIGNED(var) __declspec(align(16)) var -#endif -typedef __declspec(align(16)) int16 vec16[8]; -typedef __declspec(align(16)) int32 vec32[4]; -typedef __declspec(align(16)) int8 vec8[16]; -typedef __declspec(align(16)) uint16 uvec16[8]; -typedef __declspec(align(16)) uint32 uvec32[4]; -typedef __declspec(align(16)) uint8 uvec8[16]; -typedef __declspec(align(32)) int16 lvec16[16]; -typedef __declspec(align(32)) int32 lvec32[8]; -typedef __declspec(align(32)) int8 lvec8[32]; -typedef __declspec(align(32)) uint16 ulvec16[16]; -typedef __declspec(align(32)) uint32 ulvec32[8]; -typedef __declspec(align(32)) uint8 ulvec8[32]; -#elif !defined(__pnacl__) && (defined(__GNUC__) || defined(__clang__)) -// Caveat GCC 4.2 to 4.7 have a known issue using vectors with const. -#if defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2) -#define SIMD_ALIGNED(var) var __attribute__((aligned(32))) -#else -#define SIMD_ALIGNED(var) var __attribute__((aligned(16))) -#endif -typedef int16 __attribute__((vector_size(16))) vec16; -typedef int32 __attribute__((vector_size(16))) vec32; -typedef int8 __attribute__((vector_size(16))) vec8; -typedef uint16 __attribute__((vector_size(16))) uvec16; -typedef uint32 __attribute__((vector_size(16))) uvec32; -typedef uint8 __attribute__((vector_size(16))) uvec8; -typedef int16 __attribute__((vector_size(32))) lvec16; -typedef int32 __attribute__((vector_size(32))) lvec32; -typedef int8 __attribute__((vector_size(32))) lvec8; -typedef uint16 __attribute__((vector_size(32))) ulvec16; -typedef uint32 __attribute__((vector_size(32))) ulvec32; -typedef uint8 __attribute__((vector_size(32))) ulvec8; -#else -#define SIMD_ALIGNED(var) var -typedef int16 vec16[8]; -typedef int32 vec32[4]; -typedef int8 vec8[16]; -typedef uint16 uvec16[8]; -typedef uint32 uvec32[4]; -typedef uint8 uvec8[16]; -typedef int16 lvec16[16]; -typedef int32 lvec32[8]; -typedef int8 lvec8[32]; -typedef uint16 ulvec16[16]; -typedef uint32 ulvec32[8]; -typedef uint8 ulvec8[32]; -#endif - -#if defined(__aarch64__) -// This struct is for Arm64 color conversion. -struct YuvConstants { - uvec16 kUVToRB; - uvec16 kUVToRB2; - uvec16 kUVToG; - uvec16 kUVToG2; - vec16 kUVBiasBGR; - vec32 kYToRgb; -}; -#elif defined(__arm__) -// This struct is for ArmV7 color conversion. -struct YuvConstants { - uvec8 kUVToRB; - uvec8 kUVToG; - vec16 kUVBiasBGR; - vec32 kYToRgb; -}; -#else -// This struct is for Intel color conversion. -struct YuvConstants { - int8 kUVToB[32]; - int8 kUVToG[32]; - int8 kUVToR[32]; - int16 kUVBiasB[16]; - int16 kUVBiasG[16]; - int16 kUVBiasR[16]; - int16 kYToRgb[16]; -}; - -// Offsets into YuvConstants structure -#define KUVTOB 0 -#define KUVTOG 32 -#define KUVTOR 64 -#define KUVBIASB 96 -#define KUVBIASG 128 -#define KUVBIASR 160 -#define KYTORGB 192 -#endif - -// Conversion matrix for YUV to RGB -extern const struct YuvConstants SIMD_ALIGNED(kYuvI601Constants); // BT.601 -extern const struct YuvConstants SIMD_ALIGNED(kYuvJPEGConstants); // JPeg -extern const struct YuvConstants SIMD_ALIGNED(kYuvH709Constants); // BT.709 - -// Conversion matrix for YVU to BGR -extern const struct YuvConstants SIMD_ALIGNED(kYvuI601Constants); // BT.601 -extern const struct YuvConstants SIMD_ALIGNED(kYvuJPEGConstants); // JPeg -extern const struct YuvConstants SIMD_ALIGNED(kYvuH709Constants); // BT.709 - -#if defined(__APPLE__) || defined(__x86_64__) || defined(__llvm__) -#define OMITFP -#else -#define OMITFP __attribute__((optimize("omit-frame-pointer"))) -#endif - -// NaCL macros for GCC x86 and x64. -#if defined(__native_client__) -#define LABELALIGN ".p2align 5\n" -#else -#define LABELALIGN -#endif -#if defined(__native_client__) && defined(__x86_64__) -// r14 is used for MEMOP macros. -#define NACL_R14 "r14", -#define BUNDLELOCK ".bundle_lock\n" -#define BUNDLEUNLOCK ".bundle_unlock\n" -#define MEMACCESS(base) "%%nacl:(%%r15,%q" #base ")" -#define MEMACCESS2(offset, base) "%%nacl:" #offset "(%%r15,%q" #base ")" -#define MEMLEA(offset, base) #offset "(%q" #base ")" -#define MEMLEA3(offset, index, scale) #offset "(,%q" #index "," #scale ")" -#define MEMLEA4(offset, base, index, scale) \ - #offset "(%q" #base ",%q" #index "," #scale ")" -#define MEMMOVESTRING(s, d) "%%nacl:(%q" #s "),%%nacl:(%q" #d "), %%r15" -#define MEMSTORESTRING(reg, d) "%%" #reg ",%%nacl:(%q" #d "), %%r15" -#define MEMOPREG(opcode, offset, base, index, scale, reg) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ - " (%%r15,%%r14),%%" #reg "\n" BUNDLEUNLOCK -#define MEMOPMEM(opcode, reg, offset, base, index, scale) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ - " %%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK -#define MEMOPARG(opcode, offset, base, index, scale, arg) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ - " (%%r15,%%r14),%" #arg "\n" BUNDLEUNLOCK -#define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #opcode \ - " (%%r15,%%r14),%%" #reg1 ",%%" #reg2 "\n" BUNDLEUNLOCK -#define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ - BUNDLELOCK \ - "lea " #offset "(%q" #base ",%q" #index "," #scale "),%%r14d\n" #op \ - " $" #sel ",%%" #reg ",(%%r15,%%r14)\n" BUNDLEUNLOCK -#else // defined(__native_client__) && defined(__x86_64__) -#define NACL_R14 -#define BUNDLEALIGN -#define MEMACCESS(base) "(%" #base ")" -#define MEMACCESS2(offset, base) #offset "(%" #base ")" -#define MEMLEA(offset, base) #offset "(%" #base ")" -#define MEMLEA3(offset, index, scale) #offset "(,%" #index "," #scale ")" -#define MEMLEA4(offset, base, index, scale) \ - #offset "(%" #base ",%" #index "," #scale ")" -#define MEMMOVESTRING(s, d) -#define MEMSTORESTRING(reg, d) -#define MEMOPREG(opcode, offset, base, index, scale, reg) \ - #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg "\n" -#define MEMOPMEM(opcode, reg, offset, base, index, scale) \ - #opcode " %%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n" -#define MEMOPARG(opcode, offset, base, index, scale, arg) \ - #opcode " " #offset "(%" #base ",%" #index "," #scale "),%" #arg "\n" -#define VMEMOPREG(opcode, offset, base, index, scale, reg1, reg2) \ - #opcode " " #offset "(%" #base ",%" #index "," #scale "),%%" #reg1 \ - ",%%" #reg2 "\n" -#define VEXTOPMEM(op, sel, reg, offset, base, index, scale) \ - #op " $" #sel ",%%" #reg "," #offset "(%" #base ",%" #index "," #scale ")\n" -#endif // defined(__native_client__) && defined(__x86_64__) - -#if defined(__arm__) || defined(__aarch64__) -#undef MEMACCESS -#if defined(__native_client__) -#define MEMACCESS(base) ".p2align 3\nbic %" #base ", #0xc0000000\n" -#else -#define MEMACCESS(base) -#endif -#endif - -// Intel Code Analizer markers. Insert IACA_START IACA_END around code to be -// measured and then run with iaca -64 libyuv_unittest. -// IACA_ASM_START amd IACA_ASM_END are equivalents that can be used within -// inline assembly blocks. -// example of iaca: -// ~/iaca-lin64/bin/iaca.sh -64 -analysis LATENCY out/Release/libyuv_unittest - -#if defined(__x86_64__) || defined(__i386__) - -#define IACA_ASM_START \ - ".byte 0x0F, 0x0B\n" \ - " movl $111, %%ebx\n" \ - ".byte 0x64, 0x67, 0x90\n" - -#define IACA_ASM_END \ - " movl $222, %%ebx\n" \ - ".byte 0x64, 0x67, 0x90\n" \ - ".byte 0x0F, 0x0B\n" - -#define IACA_SSC_MARK(MARK_ID) \ - __asm__ __volatile__("\n\t movl $" #MARK_ID \ - ", %%ebx" \ - "\n\t .byte 0x64, 0x67, 0x90" \ - : \ - : \ - : "memory"); - -#define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B"); - -#else /* Visual C */ -#define IACA_UD_BYTES \ - { __asm _emit 0x0F __asm _emit 0x0B } - -#define IACA_SSC_MARK(x) \ - { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 } - -#define IACA_VC64_START __writegsbyte(111, 111); -#define IACA_VC64_END __writegsbyte(222, 222); -#endif - -#define IACA_START \ - { \ - IACA_UD_BYTES \ - IACA_SSC_MARK(111) \ - } -#define IACA_END \ - { \ - IACA_SSC_MARK(222) \ - IACA_UD_BYTES \ - } - -void I444ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_NEON(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_NEON(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_NEON(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_NEON(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_DSPR2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); - -void I422ToARGBRow_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_MSA(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_MSA(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_MSA(const uint8* src_y, - const uint8* src_uv, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_MSA(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_MSA(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_MSA(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); - -void ARGBToYRow_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int width); -void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYRow_MSA(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_MSA(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToUV444Row_NEON(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_NEON(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUV444Row_MSA(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_MSA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_NEON(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_NEON(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_NEON(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_NEON(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB24ToUVRow_NEON(const uint8* src_rgb24, - int src_stride_rgb24, - uint8* dst_u, - uint8* dst_v, - int width); -void RAWToUVRow_NEON(const uint8* src_raw, - int src_stride_raw, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB565ToUVRow_NEON(const uint8* src_rgb565, - int src_stride_rgb565, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, - int src_stride_argb1555, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, - int src_stride_argb4444, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_MSA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_MSA(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_MSA(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_MSA(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB24ToUVRow_MSA(const uint8* src_rgb24, - int src_stride_rgb24, - uint8* dst_u, - uint8* dst_v, - int width); -void RAWToUVRow_MSA(const uint8* src_raw, - int src_stride_raw, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB565ToUVRow_MSA(const uint8* src_rgb565, - int src_stride_rgb565, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB1555ToUVRow_MSA(const uint8* src_argb1555, - int src_stride_argb1555, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width); -void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width); -void BGRAToYRow_MSA(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_MSA(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_MSA(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_MSA(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_MSA(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_MSA(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_MSA(const uint8* src_argb1555, uint8* dst_y, int width); -void BGRAToUVRow_DSPR2(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToYRow_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToUVRow_DSPR2(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToYRow_DSPR2(const uint8* src_argb, uint8* dst_y, int width); -void ABGRToYRow_DSPR2(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToUVRow_DSPR2(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToYRow_DSPR2(const uint8* src_rgba, uint8* dst_y, int width); -void ARGBToUVRow_DSPR2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToYRow_C(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_C(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_C(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_C(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_C(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_C(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_C(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_C(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_C(const uint8* src_argb1555, uint8* dst_y, int width); -void ARGB4444ToYRow_C(const uint8* src_argb4444, uint8* dst_y, int width); -void ARGBToYRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_Any_SSSE3(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_Any_SSSE3(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_Any_SSSE3(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_Any_SSSE3(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_Any_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_Any_SSSE3(const uint8* src_raw, uint8* dst_y, int width); -void ARGBToYRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYJRow_Any_NEON(const uint8* src_argb, uint8* dst_y, int width); -void BGRAToYRow_Any_NEON(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_Any_NEON(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_Any_NEON(const uint8* src_rgba, uint8* dst_y, int width); -void RGB24ToYRow_Any_NEON(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_Any_NEON(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_Any_NEON(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, - uint8* dst_y, - int width); -void BGRAToYRow_Any_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); -void ARGBToYRow_Any_DSPR2(const uint8* src_argb, uint8* dst_y, int width); -void ABGRToYRow_Any_DSPR2(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_Any_DSPR2(const uint8* src_rgba, uint8* dst_y, int width); -void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, - uint8* dst_y, - int width); -void BGRAToYRow_Any_MSA(const uint8* src_bgra, uint8* dst_y, int width); -void ABGRToYRow_Any_MSA(const uint8* src_abgr, uint8* dst_y, int width); -void RGBAToYRow_Any_MSA(const uint8* src_rgba, uint8* dst_y, int width); -void ARGBToYJRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width); -void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width); -void RGB24ToYRow_Any_MSA(const uint8* src_rgb24, uint8* dst_y, int width); -void RAWToYRow_Any_MSA(const uint8* src_raw, uint8* dst_y, int width); -void RGB565ToYRow_Any_MSA(const uint8* src_rgb565, uint8* dst_y, int width); -void ARGB1555ToYRow_Any_MSA(const uint8* src_argb1555, uint8* dst_y, int width); - -void ARGBToUVRow_AVX2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_AVX2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_SSSE3(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_SSSE3(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_SSSE3(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_SSSE3(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_SSSE3(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_Any_AVX2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_Any_AVX2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_Any_SSSE3(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_Any_SSSE3(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_Any_SSSE3(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_Any_SSSE3(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_Any_SSSE3(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUV444Row_Any_NEON(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_Any_NEON(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUV444Row_Any_MSA(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_Any_MSA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_Any_NEON(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_Any_NEON(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_Any_NEON(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_Any_NEON(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB24ToUVRow_Any_NEON(const uint8* src_rgb24, - int src_stride_rgb24, - uint8* dst_u, - uint8* dst_v, - int width); -void RAWToUVRow_Any_NEON(const uint8* src_raw, - int src_stride_raw, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB565ToUVRow_Any_NEON(const uint8* src_rgb565, - int src_stride_rgb565, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555, - int src_stride_argb1555, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444, - int src_stride_argb4444, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_Any_MSA(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_Any_MSA(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_Any_MSA(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_Any_MSA(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB24ToUVRow_Any_MSA(const uint8* src_rgb24, - int src_stride_rgb24, - uint8* dst_u, - uint8* dst_v, - int width); -void RAWToUVRow_Any_MSA(const uint8* src_raw, - int src_stride_raw, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB565ToUVRow_Any_MSA(const uint8* src_rgb565, - int src_stride_rgb565, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB1555ToUVRow_Any_MSA(const uint8* src_argb1555, - int src_stride_argb1555, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_Any_DSPR2(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_Any_DSPR2(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_Any_DSPR2(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_Any_DSPR2(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_C(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_C(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVRow_C(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUVJRow_C(const uint8* src_argb, - int src_stride_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void BGRAToUVRow_C(const uint8* src_bgra, - int src_stride_bgra, - uint8* dst_u, - uint8* dst_v, - int width); -void ABGRToUVRow_C(const uint8* src_abgr, - int src_stride_abgr, - uint8* dst_u, - uint8* dst_v, - int width); -void RGBAToUVRow_C(const uint8* src_rgba, - int src_stride_rgba, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB24ToUVRow_C(const uint8* src_rgb24, - int src_stride_rgb24, - uint8* dst_u, - uint8* dst_v, - int width); -void RAWToUVRow_C(const uint8* src_raw, - int src_stride_raw, - uint8* dst_u, - uint8* dst_v, - int width); -void RGB565ToUVRow_C(const uint8* src_rgb565, - int src_stride_rgb565, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB1555ToUVRow_C(const uint8* src_argb1555, - int src_stride_argb1555, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGB4444ToUVRow_C(const uint8* src_argb4444, - int src_stride_argb4444, - uint8* dst_u, - uint8* dst_v, - int width); - -void ARGBToUV444Row_SSSE3(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); -void ARGBToUV444Row_Any_SSSE3(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); - -void ARGBToUV444Row_C(const uint8* src_argb, - uint8* dst_u, - uint8* dst_v, - int width); - -void MirrorRow_AVX2(const uint8* src, uint8* dst, int width); -void MirrorRow_SSSE3(const uint8* src, uint8* dst, int width); -void MirrorRow_NEON(const uint8* src, uint8* dst, int width); -void MirrorRow_DSPR2(const uint8* src, uint8* dst, int width); -void MirrorRow_MSA(const uint8* src, uint8* dst, int width); -void MirrorRow_C(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_SSSE3(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); -void MirrorRow_Any_MSA(const uint8* src, uint8* dst, int width); - -void MirrorUVRow_SSSE3(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void MirrorUVRow_NEON(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void MirrorUVRow_DSPR2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void MirrorUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); - -void ARGBMirrorRow_AVX2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_SSE2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_NEON(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_MSA(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_C(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_AVX2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_SSE2(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_NEON(const uint8* src, uint8* dst, int width); -void ARGBMirrorRow_Any_MSA(const uint8* src, uint8* dst, int width); - -void SplitUVRow_C(const uint8* src_uv, uint8* dst_u, uint8* dst_v, int width); -void SplitUVRow_SSE2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_AVX2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_NEON(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_DSPR2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_Any_SSE2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_Any_AVX2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_Any_NEON(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); -void SplitUVRow_Any_DSPR2(const uint8* src_uv, - uint8* dst_u, - uint8* dst_v, - int width); - -void MergeUVRow_C(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_SSE2(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_AVX2(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_NEON(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_MSA(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_Any_SSE2(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_Any_AVX2(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_Any_NEON(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); -void MergeUVRow_Any_MSA(const uint8* src_u, - const uint8* src_v, - uint8* dst_uv, - int width); - -void CopyRow_SSE2(const uint8* src, uint8* dst, int count); -void CopyRow_AVX(const uint8* src, uint8* dst, int count); -void CopyRow_ERMS(const uint8* src, uint8* dst, int count); -void CopyRow_NEON(const uint8* src, uint8* dst, int count); -void CopyRow_MIPS(const uint8* src, uint8* dst, int count); -void CopyRow_C(const uint8* src, uint8* dst, int count); -void CopyRow_Any_SSE2(const uint8* src, uint8* dst, int count); -void CopyRow_Any_AVX(const uint8* src, uint8* dst, int count); -void CopyRow_Any_NEON(const uint8* src, uint8* dst, int count); - -void CopyRow_16_C(const uint16* src, uint16* dst, int count); - -void ARGBCopyAlphaRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBCopyAlphaRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBCopyAlphaRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBCopyAlphaRow_Any_SSE2(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBCopyAlphaRow_Any_AVX2(const uint8* src_argb, - uint8* dst_argb, - int width); - -void ARGBExtractAlphaRow_C(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_SSE2(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_AVX2(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width); -void ARGBExtractAlphaRow_Any_SSE2(const uint8* src_argb, - uint8* dst_a, - int width); -void ARGBExtractAlphaRow_Any_AVX2(const uint8* src_argb, - uint8* dst_a, - int width); -void ARGBExtractAlphaRow_Any_NEON(const uint8* src_argb, - uint8* dst_a, - int width); - -void ARGBCopyYToAlphaRow_C(const uint8* src_y, uint8* dst_argb, int width); -void ARGBCopyYToAlphaRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void ARGBCopyYToAlphaRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void ARGBCopyYToAlphaRow_Any_SSE2(const uint8* src_y, - uint8* dst_argb, - int width); -void ARGBCopyYToAlphaRow_Any_AVX2(const uint8* src_y, - uint8* dst_argb, - int width); - -void SetRow_C(uint8* dst, uint8 v8, int count); -void SetRow_X86(uint8* dst, uint8 v8, int count); -void SetRow_ERMS(uint8* dst, uint8 v8, int count); -void SetRow_NEON(uint8* dst, uint8 v8, int count); -void SetRow_Any_X86(uint8* dst, uint8 v8, int count); -void SetRow_Any_NEON(uint8* dst, uint8 v8, int count); - -void ARGBSetRow_C(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_X86(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_NEON(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_Any_NEON(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_MSA(uint8* dst_argb, uint32 v32, int count); -void ARGBSetRow_Any_MSA(uint8* dst_argb, uint32 v32, int count); - -// ARGBShufflers for BGRAToARGB etc. -void ARGBShuffleRow_C(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_SSE2(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_SSSE3(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_AVX2(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_NEON(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_MSA(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_Any_SSE2(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_Any_SSSE3(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_Any_AVX2(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_Any_NEON(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); -void ARGBShuffleRow_Any_MSA(const uint8* src_argb, - uint8* dst_argb, - const uint8* shuffler, - int width); - -void RGB24ToARGBRow_SSSE3(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_SSSE3(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_SSE2(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_SSE2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_SSE2(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444, - uint8* dst_argb, - int width); - -void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int width); -void RGB24ToARGBRow_MSA(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToARGBRow_MSA(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); -void RAWToRGB24Row_MSA(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int width); -void RGB565ToARGBRow_MSA(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_MSA(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void RGB24ToARGBRow_DSPR2(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_DSPR2(const uint8* src_raw, uint8* dst_argb, int width); -void RGB565ToARGBRow_DSPR2(const uint8* src_rgb565, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_DSPR2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_DSPR2(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_MSA(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void RGB24ToARGBRow_C(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_C(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_C(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_C(const uint8* src_rgb, uint8* dst_argb, int width); -void ARGB1555ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGB4444ToARGBRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void RGB24ToARGBRow_Any_SSSE3(const uint8* src_rgb24, - uint8* dst_argb, - int width); -void RAWToARGBRow_Any_SSSE3(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_Any_SSSE3(const uint8* src_raw, uint8* dst_rgb24, int width); - -void RGB565ToARGBRow_Any_SSE2(const uint8* src_rgb565, - uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_SSE2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_SSE2(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void RGB565ToARGBRow_Any_AVX2(const uint8* src_rgb565, - uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444, - uint8* dst_argb, - int width); - -void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, - uint8* dst_argb, - int width); -void RGB24ToARGBRow_Any_MSA(const uint8* src_rgb24, uint8* dst_argb, int width); -void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToARGBRow_Any_MSA(const uint8* src_raw, uint8* dst_argb, int width); -void RAWToRGB24Row_Any_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); -void RAWToRGB24Row_Any_MSA(const uint8* src_raw, uint8* dst_rgb24, int width); -void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, - uint8* dst_argb, - int width); -void RGB565ToARGBRow_Any_MSA(const uint8* src_rgb565, - uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_MSA(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444, - uint8* dst_argb, - int width); -void RGB24ToARGBRow_Any_DSPR2(const uint8* src_rgb24, - uint8* dst_argb, - int width); -void RAWToARGBRow_Any_DSPR2(const uint8* src_raw, uint8* dst_argb, int width); -void RGB565ToARGBRow_Any_DSPR2(const uint8* src_rgb565, - uint8* dst_argb, - int width); -void ARGB1555ToARGBRow_Any_DSPR2(const uint8* src_argb1555, - uint8* dst_argb, - int width); -void ARGB4444ToARGBRow_Any_DSPR2(const uint8* src_argb4444, - uint8* dst_argb, - int width); - -void ARGB4444ToARGBRow_Any_MSA(const uint8* src_argb4444, - uint8* dst_argb, - int width); - -void ARGBToRGB24Row_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); - -void ARGBToRGB565DitherRow_C(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB565DitherRow_SSE2(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB565DitherRow_AVX2(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); - -void ARGBToRGB565Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); - -void ARGBToRGB24Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565DitherRow_NEON(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB24Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565DitherRow_MSA(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); - -void ARGBToRGBARow_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB24Row_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_C(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB4444Row_C(const uint8* src_argb, uint8* dst_rgb, int width); - -void J400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_MSA(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); -void J400ToARGBRow_Any_MSA(const uint8* src_y, uint8* dst_argb, int width); - -void I444ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_C(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_C(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_C(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_C(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_C(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_C(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_SSSE3(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_AVX2(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_SSSE3(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_SSSE3(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_AVX2(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_AVX2(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_SSSE3(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_AVX2(const uint8* y_buf, - const uint8* u_buf, - const uint8* v_buf, - const uint8* a_buf, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_SSSE3(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_AVX2(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_SSSE3(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_AVX2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_SSSE3(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_SSSE3(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_AVX2(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_AVX2(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgba, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_SSSE3(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_AVX2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); - -void I400ToARGBRow_C(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_NEON(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_MSA(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_SSE2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_AVX2(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_NEON(const uint8* src_y, uint8* dst_argb, int width); -void I400ToARGBRow_Any_MSA(const uint8* src_y, uint8* dst_argb, int width); - -// ARGB preattenuated alpha blend. -void ARGBBlendRow_SSSE3(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBBlendRow_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBBlendRow_C(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -// Unattenuated planar alpha blend. -void BlendPlaneRow_SSSE3(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); -void BlendPlaneRow_Any_SSSE3(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); -void BlendPlaneRow_AVX2(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); -void BlendPlaneRow_Any_AVX2(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); -void BlendPlaneRow_C(const uint8* src0, - const uint8* src1, - const uint8* alpha, - uint8* dst, - int width); - -// ARGB multiply images. Same API as Blend, but these require -// pointer and width alignment for SSE2. -void ARGBMultiplyRow_C(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_Any_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_Any_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_Any_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBMultiplyRow_Any_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -// ARGB add images. -void ARGBAddRow_C(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_Any_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_Any_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_Any_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBAddRow_Any_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -// ARGB subtract images. Same API as Blend, but these require -// pointer and width alignment for SSE2. -void ARGBSubtractRow_C(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_Any_SSE2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_Any_AVX2(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_Any_NEON(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); -void ARGBSubtractRow_Any_MSA(const uint8* src_argb, - const uint8* src_argb1, - uint8* dst_argb, - int width); - -void ARGBToRGB24Row_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_Any_SSSE3(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_Any_SSE2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_SSE2(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_SSE2(const uint8* src_argb, - uint8* dst_rgb, - int width); - -void ARGBToRGB565DitherRow_Any_SSE2(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB565DitherRow_Any_AVX2(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); - -void ARGBToRGB565Row_Any_AVX2(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_AVX2(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_AVX2(const uint8* src_argb, - uint8* dst_rgb, - int width); - -void ARGBToRGB24Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_Any_NEON(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_NEON(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_NEON(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToRGB565DitherRow_Any_NEON(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); -void ARGBToRGB24Row_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRAWRow_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToRGB565Row_Any_MSA(const uint8* src_argb, uint8* dst_rgb, int width); -void ARGBToARGB1555Row_Any_MSA(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToARGB4444Row_Any_MSA(const uint8* src_argb, - uint8* dst_rgb, - int width); -void ARGBToRGB565DitherRow_Any_MSA(const uint8* src_argb, - uint8* dst_rgb, - const uint32 dither4, - int width); - -void I444ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - const uint8* src_a, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_NEON(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_NEON(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_NEON(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_NEON(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_Any_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I411ToARGBRow_Any_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_DSPR2(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_DSPR2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I444ToARGBRow_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGBRow_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGBARow_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422AlphaToARGBRow_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - const uint8* src_a, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB24Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb24, - const struct YuvConstants* yuvconstants, - int width); -void I422ToRGB565Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_rgb565, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB4444Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb4444, - const struct YuvConstants* yuvconstants, - int width); -void I422ToARGB1555Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_argb1555, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToARGBRow_Any_MSA(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV12ToRGB565Row_Any_MSA(const uint8* src_y, - const uint8* src_uv, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void NV21ToARGBRow_Any_MSA(const uint8* src_y, - const uint8* src_vu, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void YUY2ToARGBRow_Any_MSA(const uint8* src_yuy2, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); -void UYVYToARGBRow_Any_MSA(const uint8* src_uyvy, - uint8* dst_argb, - const struct YuvConstants* yuvconstants, - int width); - -void YUY2ToYRow_AVX2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_AVX2(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_AVX2(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_SSE2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_SSE2(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_SSE2(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_NEON(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_NEON(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_NEON(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_MSA(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_MSA(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_MSA(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_C(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_C(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_C(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_Any_AVX2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_AVX2(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_Any_AVX2(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_Any_SSE2(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_SSE2(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_Any_SSE2(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_Any_NEON(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_NEON(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_Any_NEON(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToYRow_Any_MSA(const uint8* src_yuy2, uint8* dst_y, int width); -void YUY2ToUVRow_Any_MSA(const uint8* src_yuy2, - int stride_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void YUY2ToUV422Row_Any_MSA(const uint8* src_yuy2, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_AVX2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_AVX2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_SSE2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_SSE2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_SSE2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_AVX2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_AVX2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_AVX2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_NEON(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_NEON(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_NEON(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_MSA(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_MSA(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_MSA(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); - -void UYVYToYRow_C(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_C(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_C(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_Any_AVX2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_AVX2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_Any_AVX2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_Any_SSE2(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_SSE2(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_Any_SSE2(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_Any_NEON(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_NEON(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_Any_NEON(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToYRow_Any_MSA(const uint8* src_uyvy, uint8* dst_y, int width); -void UYVYToUVRow_Any_MSA(const uint8* src_uyvy, - int stride_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); -void UYVYToUV422Row_Any_MSA(const uint8* src_uyvy, - uint8* dst_u, - uint8* dst_v, - int width); - -void I422ToYUY2Row_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_C(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_Any_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_Any_SSE2(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_Any_NEON(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); -void I422ToYUY2Row_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_yuy2, - int width); -void I422ToUYVYRow_Any_MSA(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - uint8* dst_uyvy, - int width); - -// Effects related row functions. -void ARGBAttenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_NEON(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_MSA(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBAttenuateRow_Any_SSE2(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_SSSE3(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_AVX2(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_NEON(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBAttenuateRow_Any_MSA(const uint8* src_argb, - uint8* dst_argb, - int width); - -// Inverse table for unattenuate, shared by C and SSE2. -extern const uint32 fixed_invtbl8[256]; -void ARGBUnattenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBUnattenuateRow_SSE2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBUnattenuateRow_AVX2(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBUnattenuateRow_Any_SSE2(const uint8* src_argb, - uint8* dst_argb, - int width); -void ARGBUnattenuateRow_Any_AVX2(const uint8* src_argb, - uint8* dst_argb, - int width); - -void ARGBGrayRow_C(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBGrayRow_SSSE3(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBGrayRow_NEON(const uint8* src_argb, uint8* dst_argb, int width); -void ARGBGrayRow_MSA(const uint8* src_argb, uint8* dst_argb, int width); - -void ARGBSepiaRow_C(uint8* dst_argb, int width); -void ARGBSepiaRow_SSSE3(uint8* dst_argb, int width); -void ARGBSepiaRow_NEON(uint8* dst_argb, int width); -void ARGBSepiaRow_MSA(uint8* dst_argb, int width); - -void ARGBColorMatrixRow_C(const uint8* src_argb, - uint8* dst_argb, - const int8* matrix_argb, - int width); -void ARGBColorMatrixRow_SSSE3(const uint8* src_argb, - uint8* dst_argb, - const int8* matrix_argb, - int width); -void ARGBColorMatrixRow_NEON(const uint8* src_argb, - uint8* dst_argb, - const int8* matrix_argb, - int width); - -void ARGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width); -void ARGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width); - -void RGBColorTableRow_C(uint8* dst_argb, const uint8* table_argb, int width); -void RGBColorTableRow_X86(uint8* dst_argb, const uint8* table_argb, int width); - -void ARGBQuantizeRow_C(uint8* dst_argb, - int scale, - int interval_size, - int interval_offset, - int width); -void ARGBQuantizeRow_SSE2(uint8* dst_argb, - int scale, - int interval_size, - int interval_offset, - int width); -void ARGBQuantizeRow_NEON(uint8* dst_argb, - int scale, - int interval_size, - int interval_offset, - int width); - -void ARGBShadeRow_C(const uint8* src_argb, - uint8* dst_argb, - int width, - uint32 value); -void ARGBShadeRow_SSE2(const uint8* src_argb, - uint8* dst_argb, - int width, - uint32 value); -void ARGBShadeRow_NEON(const uint8* src_argb, - uint8* dst_argb, - int width, - uint32 value); -void ARGBShadeRow_MSA(const uint8* src_argb, - uint8* dst_argb, - int width, - uint32 value); - -// Used for blur. -void CumulativeSumToAverageRow_SSE2(const int32* topleft, - const int32* botleft, - int width, - int area, - uint8* dst, - int count); -void ComputeCumulativeSumRow_SSE2(const uint8* row, - int32* cumsum, - const int32* previous_cumsum, - int width); - -void CumulativeSumToAverageRow_C(const int32* topleft, - const int32* botleft, - int width, - int area, - uint8* dst, - int count); -void ComputeCumulativeSumRow_C(const uint8* row, - int32* cumsum, - const int32* previous_cumsum, - int width); - -LIBYUV_API -void ARGBAffineRow_C(const uint8* src_argb, - int src_argb_stride, - uint8* dst_argb, - const float* uv_dudv, - int width); -LIBYUV_API -void ARGBAffineRow_SSE2(const uint8* src_argb, - int src_argb_stride, - uint8* dst_argb, - const float* uv_dudv, - int width); - -// Used for I420Scale, ARGBScale, and ARGBInterpolate. -void InterpolateRow_C(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_SSSE3(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_AVX2(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_NEON(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_DSPR2(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_MSA(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_Any_NEON(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_Any_SSSE3(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_Any_AVX2(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_Any_DSPR2(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); -void InterpolateRow_Any_MSA(uint8* dst_ptr, - const uint8* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); - -void InterpolateRow_16_C(uint16* dst_ptr, - const uint16* src_ptr, - ptrdiff_t src_stride_ptr, - int width, - int source_y_fraction); - -// Sobel images. -void SobelXRow_C(const uint8* src_y0, - const uint8* src_y1, - const uint8* src_y2, - uint8* dst_sobelx, - int width); -void SobelXRow_SSE2(const uint8* src_y0, - const uint8* src_y1, - const uint8* src_y2, - uint8* dst_sobelx, - int width); -void SobelXRow_NEON(const uint8* src_y0, - const uint8* src_y1, - const uint8* src_y2, - uint8* dst_sobelx, - int width); -void SobelYRow_C(const uint8* src_y0, - const uint8* src_y1, - uint8* dst_sobely, - int width); -void SobelYRow_SSE2(const uint8* src_y0, - const uint8* src_y1, - uint8* dst_sobely, - int width); -void SobelYRow_NEON(const uint8* src_y0, - const uint8* src_y1, - uint8* dst_sobely, - int width); -void SobelRow_C(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_MSA(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelToPlaneRow_C(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelToPlaneRow_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelToPlaneRow_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelToPlaneRow_MSA(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelXYRow_C(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelXYRow_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelXYRow_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelXYRow_MSA(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_Any_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_Any_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelRow_Any_MSA(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelToPlaneRow_Any_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelToPlaneRow_Any_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelToPlaneRow_Any_MSA(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_y, - int width); -void SobelXYRow_Any_SSE2(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelXYRow_Any_NEON(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); -void SobelXYRow_Any_MSA(const uint8* src_sobelx, - const uint8* src_sobely, - uint8* dst_argb, - int width); - -void ARGBPolynomialRow_C(const uint8* src_argb, - uint8* dst_argb, - const float* poly, - int width); -void ARGBPolynomialRow_SSE2(const uint8* src_argb, - uint8* dst_argb, - const float* poly, - int width); -void ARGBPolynomialRow_AVX2(const uint8* src_argb, - uint8* dst_argb, - const float* poly, - int width); - -// Scale and convert to half float. -void HalfFloatRow_C(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_SSE2(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_Any_SSE2(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloatRow_AVX2(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_Any_AVX2(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloatRow_F16C(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_Any_F16C(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloat1Row_F16C(const uint16* src, uint16* dst, float scale, int width); -void HalfFloat1Row_Any_F16C(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloatRow_NEON(const uint16* src, uint16* dst, float scale, int width); -void HalfFloatRow_Any_NEON(const uint16* src, - uint16* dst, - float scale, - int width); -void HalfFloat1Row_NEON(const uint16* src, uint16* dst, float scale, int width); -void HalfFloat1Row_Any_NEON(const uint16* src, - uint16* dst, - float scale, - int width); - -void ARGBLumaColorTableRow_C(const uint8* src_argb, - uint8* dst_argb, - int width, - const uint8* luma, - uint32 lumacoeff); -void ARGBLumaColorTableRow_SSSE3(const uint8* src_argb, - uint8* dst_argb, - int width, - const uint8* luma, - uint32 lumacoeff); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_ROW_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/scale.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/scale.h deleted file mode 100644 index 91a7e018..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/scale.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_SCALE_H_ -#define INCLUDE_LIBYUV_SCALE_H_ - -#include "basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -// Supported filtering. -typedef enum FilterMode { - kFilterNone = 0, // Point sample; Fastest. - kFilterLinear = 1, // Filter horizontally only. - kFilterBilinear = 2, // Faster than box, but lower quality scaling down. - kFilterBox = 3 // Highest quality. -} FilterModeEnum; - -// Scale a YUV plane. -LIBYUV_API -void ScalePlane(const uint8* src, - int src_stride, - int src_width, - int src_height, - uint8* dst, - int dst_stride, - int dst_width, - int dst_height, - enum FilterMode filtering); - -LIBYUV_API -void ScalePlane_16(const uint16* src, - int src_stride, - int src_width, - int src_height, - uint16* dst, - int dst_stride, - int dst_width, - int dst_height, - enum FilterMode filtering); - -// Scales a YUV 4:2:0 image from the src width and height to the -// dst width and height. -// If filtering is kFilterNone, a simple nearest-neighbor algorithm is -// used. This produces basic (blocky) quality at the fastest speed. -// If filtering is kFilterBilinear, interpolation is used to produce a better -// quality image, at the expense of speed. -// If filtering is kFilterBox, averaging is used to produce ever better -// quality image, at further expense of speed. -// Returns 0 if successful. - -LIBYUV_API -int I420Scale(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - int src_width, - int src_height, - uint8* dst_y, - int dst_stride_y, - uint8* dst_u, - int dst_stride_u, - uint8* dst_v, - int dst_stride_v, - int dst_width, - int dst_height, - enum FilterMode filtering); - -LIBYUV_API -int I420Scale_16(const uint16* src_y, - int src_stride_y, - const uint16* src_u, - int src_stride_u, - const uint16* src_v, - int src_stride_v, - int src_width, - int src_height, - uint16* dst_y, - int dst_stride_y, - uint16* dst_u, - int dst_stride_u, - uint16* dst_v, - int dst_stride_v, - int dst_width, - int dst_height, - enum FilterMode filtering); - -#ifdef __cplusplus -// Legacy API. Deprecated. -LIBYUV_API -int Scale(const uint8* src_y, - const uint8* src_u, - const uint8* src_v, - int src_stride_y, - int src_stride_u, - int src_stride_v, - int src_width, - int src_height, - uint8* dst_y, - uint8* dst_u, - uint8* dst_v, - int dst_stride_y, - int dst_stride_u, - int dst_stride_v, - int dst_width, - int dst_height, - LIBYUV_BOOL interpolate); - -// Legacy API. Deprecated. -LIBYUV_API -int ScaleOffset(const uint8* src_i420, - int src_width, - int src_height, - uint8* dst_i420, - int dst_width, - int dst_height, - int dst_yoffset, - LIBYUV_BOOL interpolate); - -// For testing, allow disabling of specialized scalers. -LIBYUV_API -void SetUseReferenceImpl(LIBYUV_BOOL use); -#endif // __cplusplus - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_SCALE_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/scale_argb.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/scale_argb.h deleted file mode 100644 index b6395377..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/scale_argb.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2012 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_SCALE_ARGB_H_ -#define INCLUDE_LIBYUV_SCALE_ARGB_H_ - -#include "basic_types.h" -#include "scale.h" // For FilterMode - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -LIBYUV_API -int ARGBScale(const uint8* src_argb, - int src_stride_argb, - int src_width, - int src_height, - uint8* dst_argb, - int dst_stride_argb, - int dst_width, - int dst_height, - enum FilterMode filtering); - -// Clipped scale takes destination rectangle coordinates for clip values. -LIBYUV_API -int ARGBScaleClip(const uint8* src_argb, - int src_stride_argb, - int src_width, - int src_height, - uint8* dst_argb, - int dst_stride_argb, - int dst_width, - int dst_height, - int clip_x, - int clip_y, - int clip_width, - int clip_height, - enum FilterMode filtering); - -// Scale with YUV conversion to ARGB and clipping. -LIBYUV_API -int YUVToARGBScaleClip(const uint8* src_y, - int src_stride_y, - const uint8* src_u, - int src_stride_u, - const uint8* src_v, - int src_stride_v, - uint32 src_fourcc, - int src_width, - int src_height, - uint8* dst_argb, - int dst_stride_argb, - uint32 dst_fourcc, - int dst_width, - int dst_height, - int clip_x, - int clip_y, - int clip_width, - int clip_height, - enum FilterMode filtering); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_SCALE_ARGB_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/scale_row.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/scale_row.h deleted file mode 100644 index 872481d2..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/scale_row.h +++ /dev/null @@ -1,929 +0,0 @@ -/* - * Copyright 2013 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef INCLUDE_LIBYUV_SCALE_ROW_H_ -#define INCLUDE_LIBYUV_SCALE_ROW_H_ - -#include "basic_types.h" -#include "scale.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -#if defined(__pnacl__) || defined(__CLR_VER) || \ - (defined(__i386__) && !defined(__SSE2__)) -#define LIBYUV_DISABLE_X86 -#endif -// MemorySanitizer does not support assembly code yet. http://crbug.com/344505 -#if defined(__has_feature) -#if __has_feature(memory_sanitizer) -#define LIBYUV_DISABLE_X86 -#endif -#endif - -// GCC >= 4.7.0 required for AVX2. -#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) -#if (__GNUC__ > 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ >= 7)) -#define GCC_HAS_AVX2 1 -#endif // GNUC >= 4.7 -#endif // __GNUC__ - -// clang >= 3.4.0 required for AVX2. -#if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) -#if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4)) -#define CLANG_HAS_AVX2 1 -#endif // clang >= 3.4 -#endif // __clang__ - -// Visual C 2012 required for AVX2. -#if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \ - _MSC_VER >= 1700 -#define VISUALC_HAS_AVX2 1 -#endif // VisualStudio >= 2012 - -// The following are available on all x86 platforms: -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) -#define HAS_FIXEDDIV1_X86 -#define HAS_FIXEDDIV_X86 -#define HAS_SCALEARGBCOLS_SSE2 -#define HAS_SCALEARGBCOLSUP2_SSE2 -#define HAS_SCALEARGBFILTERCOLS_SSSE3 -#define HAS_SCALEARGBROWDOWN2_SSE2 -#define HAS_SCALEARGBROWDOWNEVEN_SSE2 -#define HAS_SCALECOLSUP2_SSE2 -#define HAS_SCALEFILTERCOLS_SSSE3 -#define HAS_SCALEROWDOWN2_SSSE3 -#define HAS_SCALEROWDOWN34_SSSE3 -#define HAS_SCALEROWDOWN38_SSSE3 -#define HAS_SCALEROWDOWN4_SSSE3 -#define HAS_SCALEADDROW_SSE2 -#endif - -// The following are available on all x86 platforms, but -// require VS2012, clang 3.4 or gcc 4.7. -// The code supports NaCL but requires a new compiler and validator. -#if !defined(LIBYUV_DISABLE_X86) && \ - (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2) || \ - defined(GCC_HAS_AVX2)) -#define HAS_SCALEADDROW_AVX2 -#define HAS_SCALEROWDOWN2_AVX2 -#define HAS_SCALEROWDOWN4_AVX2 -#endif - -// The following are available on Neon platforms: -#if !defined(LIBYUV_DISABLE_NEON) && !defined(__native_client__) && \ - (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__)) -#define HAS_SCALEARGBCOLS_NEON -#define HAS_SCALEARGBROWDOWN2_NEON -#define HAS_SCALEARGBROWDOWNEVEN_NEON -#define HAS_SCALEFILTERCOLS_NEON -#define HAS_SCALEROWDOWN2_NEON -#define HAS_SCALEROWDOWN34_NEON -#define HAS_SCALEROWDOWN38_NEON -#define HAS_SCALEROWDOWN4_NEON -#define HAS_SCALEARGBFILTERCOLS_NEON -#endif - -// The following are available on Mips platforms: -#if !defined(LIBYUV_DISABLE_DSPR2) && !defined(__native_client__) && \ - defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) -#define HAS_SCALEROWDOWN2_DSPR2 -#define HAS_SCALEROWDOWN4_DSPR2 -#define HAS_SCALEROWDOWN34_DSPR2 -#define HAS_SCALEROWDOWN38_DSPR2 -#define HAS_SCALEADDROW_DSPR2 -#endif - -#if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa) -#define HAS_SCALEARGBROWDOWN2_MSA -#define HAS_SCALEARGBROWDOWNEVEN_MSA -#define HAS_SCALEROWDOWN2_MSA -#define HAS_SCALEROWDOWN4_MSA -#define HAS_SCALEROWDOWN38_MSA -#define HAS_SCALEADDROW_MSA -#endif - -// Scale ARGB vertically with bilinear interpolation. -void ScalePlaneVertical(int src_height, - int dst_width, - int dst_height, - int src_stride, - int dst_stride, - const uint8* src_argb, - uint8* dst_argb, - int x, - int y, - int dy, - int bpp, - enum FilterMode filtering); - -void ScalePlaneVertical_16(int src_height, - int dst_width, - int dst_height, - int src_stride, - int dst_stride, - const uint16* src_argb, - uint16* dst_argb, - int x, - int y, - int dy, - int wpp, - enum FilterMode filtering); - -// Simplify the filtering based on scale factors. -enum FilterMode ScaleFilterReduce(int src_width, - int src_height, - int dst_width, - int dst_height, - enum FilterMode filtering); - -// Divide num by div and return as 16.16 fixed point result. -int FixedDiv_C(int num, int div); -int FixedDiv_X86(int num, int div); -// Divide num - 1 by div - 1 and return as 16.16 fixed point result. -int FixedDiv1_C(int num, int div); -int FixedDiv1_X86(int num, int div); -#ifdef HAS_FIXEDDIV_X86 -#define FixedDiv FixedDiv_X86 -#define FixedDiv1 FixedDiv1_X86 -#else -#define FixedDiv FixedDiv_C -#define FixedDiv1 FixedDiv1_C -#endif - -// Compute slope values for stepping. -void ScaleSlope(int src_width, - int src_height, - int dst_width, - int dst_height, - enum FilterMode filtering, - int* x, - int* y, - int* dx, - int* dy); - -void ScaleRowDown2_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown2Linear_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Linear_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown2Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_Odd_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown4_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown4Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown34_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown34_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown34_0_Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* d, - int dst_width); -void ScaleRowDown34_0_Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* d, - int dst_width); -void ScaleRowDown34_1_Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* d, - int dst_width); -void ScaleRowDown34_1_Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* d, - int dst_width); -void ScaleCols_C(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); -void ScaleCols_16_C(uint16* dst_ptr, - const uint16* src_ptr, - int dst_width, - int x, - int dx); -void ScaleColsUp2_C(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int, - int); -void ScaleColsUp2_16_C(uint16* dst_ptr, - const uint16* src_ptr, - int dst_width, - int, - int); -void ScaleFilterCols_C(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); -void ScaleFilterCols_16_C(uint16* dst_ptr, - const uint16* src_ptr, - int dst_width, - int x, - int dx); -void ScaleFilterCols64_C(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); -void ScaleFilterCols64_16_C(uint16* dst_ptr, - const uint16* src_ptr, - int dst_width, - int x, - int dx); -void ScaleRowDown38_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown38_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst, - int dst_width); -void ScaleRowDown38_3_Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst_ptr, - int dst_width); -void ScaleRowDown38_2_Box_C(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_2_Box_16_C(const uint16* src_ptr, - ptrdiff_t src_stride, - uint16* dst_ptr, - int dst_width); -void ScaleAddRow_C(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_16_C(const uint16* src_ptr, uint32* dst_ptr, int src_width); -void ScaleARGBRowDown2_C(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_C(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_C(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_C(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_C(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBCols_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBCols64_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBColsUp2_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int, - int); -void ScaleARGBFilterCols_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBFilterCols64_C(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); - -// Specialized scalers for x86. -void ScaleRowDown2_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Linear_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Linear_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleRowDown34_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_1_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_0_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_2_Box_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Linear_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_Odd_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Linear_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown2Box_Odd_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_Any_AVX2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleRowDown34_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_1_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_0_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_2_Box_Any_SSSE3(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleAddRow_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_SSE2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_AVX2(const uint8* src_ptr, uint16* dst_ptr, int src_width); - -void ScaleFilterCols_SSSE3(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); -void ScaleColsUp2_SSE2(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); - -// ARGB Column functions -void ScaleARGBCols_SSE2(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBFilterCols_SSSE3(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBColsUp2_SSE2(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBFilterCols_NEON(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBCols_NEON(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBFilterCols_Any_NEON(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); -void ScaleARGBCols_Any_NEON(uint8* dst_argb, - const uint8* src_argb, - int dst_width, - int x, - int dx); - -// ARGB Row functions -void ScaleARGBRowDown2_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleARGBRowDown2_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleARGBRowDown2_Any_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2Linear_Any_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDown2Box_Any_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - uint8_t* dst_argb, - int dst_width); - -void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - int32_t src_stepx, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_MSA(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_Any_NEON(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); -void ScaleARGBRowDownEven_Any_MSA(const uint8_t* src_argb, - ptrdiff_t src_stride, - int32_t src_stepx, - uint8_t* dst_argb, - int dst_width); -void ScaleARGBRowDownEvenBox_Any_MSA(const uint8* src_argb, - ptrdiff_t src_stride, - int src_stepx, - uint8* dst_argb, - int dst_width); - -// ScaleRowDown2Box also used by planar functions -// NEON downscalers with interpolation. - -// Note - not static due to reuse in convert for 444 to 420. -void ScaleRowDown2_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Linear_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); - -void ScaleRowDown4_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -// Down scale from 4 to 3 pixels. Use the neon multilane read/write -// to load up the every 4th pixel into a 4 different registers. -// Point samples 32 pixels to 24 pixels. -void ScaleRowDown34_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_0_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_1_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -// 32 -> 12 -void ScaleRowDown38_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32x3 -> 12x1 -void ScaleRowDown38_3_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32x2 -> 12x1 -void ScaleRowDown38_2_Box_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleRowDown2_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Linear_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_Odd_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown4Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_0_Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown34_1_Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32 -> 12 -void ScaleRowDown38_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32x3 -> 12x1 -void ScaleRowDown38_3_Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -// 32x2 -> 12x1 -void ScaleRowDown38_2_Box_Any_NEON(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); - -void ScaleAddRow_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_NEON(const uint8* src_ptr, uint16* dst_ptr, int src_width); - -void ScaleFilterCols_NEON(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); - -void ScaleFilterCols_Any_NEON(uint8* dst_ptr, - const uint8* src_ptr, - int dst_width, - int x, - int dx); - -void ScaleRowDown2_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown2Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown4Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown34_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown34_0_Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* d, - int dst_width); -void ScaleRowDown34_1_Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* d, - int dst_width); -void ScaleRowDown38_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst, - int dst_width); -void ScaleRowDown38_2_Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_DSPR2(const uint8* src_ptr, - ptrdiff_t src_stride, - uint8* dst_ptr, - int dst_width); -void ScaleAddRow_DSPR2(const uint8* src_ptr, uint16* dst_ptr, int src_width); -void ScaleAddRow_Any_DSPR2(const uint8* src_ptr, - uint16* dst_ptr, - int src_width); - -void ScaleRowDown2_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown2Linear_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown2Box_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown4_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown4Box_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown38_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown38_2_Box_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width); -void ScaleAddRow_MSA(const uint8_t* src_ptr, uint16_t* dst_ptr, int src_width); -void ScaleRowDown2_Any_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown2Linear_Any_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown2Box_Any_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown4_Any_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown4Box_Any_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown38_Any_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst, - int dst_width); -void ScaleRowDown38_2_Box_Any_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width); -void ScaleRowDown38_3_Box_Any_MSA(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width); -void ScaleAddRow_Any_MSA(const uint8_t* src_ptr, - uint16_t* dst_ptr, - int src_width); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_SCALE_ROW_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/video_common.h b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/video_common.h deleted file mode 100644 index ff346fd1..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/include/libyuv/video_common.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright 2011 The LibYuv Project Authors. All rights reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// Common definitions for video, including fourcc and VideoFormat. - -#ifndef INCLUDE_LIBYUV_VIDEO_COMMON_H_ -#define INCLUDE_LIBYUV_VIDEO_COMMON_H_ - -#include "basic_types.h" - -#ifdef __cplusplus -namespace libyuv { -extern "C" { -#endif - -////////////////////////////////////////////////////////////////////////////// -// Definition of FourCC codes -////////////////////////////////////////////////////////////////////////////// - -// Convert four characters to a FourCC code. -// Needs to be a macro otherwise the OS X compiler complains when the kFormat* -// constants are used in a switch. -#ifdef __cplusplus -#define FOURCC(a, b, c, d) \ - ((static_cast(a)) | (static_cast(b) << 8) | \ - (static_cast(c) << 16) | (static_cast(d) << 24)) -#else -#define FOURCC(a, b, c, d) \ - (((uint32)(a)) | ((uint32)(b) << 8) | /* NOLINT */ \ - ((uint32)(c) << 16) | ((uint32)(d) << 24)) /* NOLINT */ -#endif - -// Some pages discussing FourCC codes: -// http://www.fourcc.org/yuv.php -// http://v4l2spec.bytesex.org/spec/book1.htm -// http://developer.apple.com/quicktime/icefloe/dispatch020.html -// http://msdn.microsoft.com/library/windows/desktop/dd206750.aspx#nv12 -// http://people.xiph.org/~xiphmont/containers/nut/nut4cc.txt - -// FourCC codes grouped according to implementation efficiency. -// Primary formats should convert in 1 efficient step. -// Secondary formats are converted in 2 steps. -// Auxilliary formats call primary converters. -enum FourCC { - // 8 Primary YUV formats: 5 planar, 2 biplanar, 2 packed. - FOURCC_I420 = FOURCC('I', '4', '2', '0'), - FOURCC_I422 = FOURCC('I', '4', '2', '2'), - FOURCC_I444 = FOURCC('I', '4', '4', '4'), - FOURCC_I411 = FOURCC('I', '4', '1', '1'), // deprecated. - FOURCC_I400 = FOURCC('I', '4', '0', '0'), - FOURCC_NV21 = FOURCC('N', 'V', '2', '1'), - FOURCC_NV12 = FOURCC('N', 'V', '1', '2'), - FOURCC_YUY2 = FOURCC('Y', 'U', 'Y', '2'), - FOURCC_UYVY = FOURCC('U', 'Y', 'V', 'Y'), - - // 1 Secondary YUV format: row biplanar. - FOURCC_M420 = FOURCC('M', '4', '2', '0'), - FOURCC_Q420 = FOURCC('Q', '4', '2', '0'), // deprecated. - - // 9 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp. - FOURCC_ARGB = FOURCC('A', 'R', 'G', 'B'), - FOURCC_BGRA = FOURCC('B', 'G', 'R', 'A'), - FOURCC_ABGR = FOURCC('A', 'B', 'G', 'R'), - FOURCC_24BG = FOURCC('2', '4', 'B', 'G'), - FOURCC_RAW = FOURCC('r', 'a', 'w', ' '), - FOURCC_RGBA = FOURCC('R', 'G', 'B', 'A'), - FOURCC_RGBP = FOURCC('R', 'G', 'B', 'P'), // rgb565 LE. - FOURCC_RGBO = FOURCC('R', 'G', 'B', 'O'), // argb1555 LE. - FOURCC_R444 = FOURCC('R', '4', '4', '4'), // argb4444 LE. - - // 4 Secondary RGB formats: 4 Bayer Patterns. deprecated. - FOURCC_RGGB = FOURCC('R', 'G', 'G', 'B'), - FOURCC_BGGR = FOURCC('B', 'G', 'G', 'R'), - FOURCC_GRBG = FOURCC('G', 'R', 'B', 'G'), - FOURCC_GBRG = FOURCC('G', 'B', 'R', 'G'), - - // 1 Primary Compressed YUV format. - FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'), - - // 5 Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias. - FOURCC_YV12 = FOURCC('Y', 'V', '1', '2'), - FOURCC_YV16 = FOURCC('Y', 'V', '1', '6'), - FOURCC_YV24 = FOURCC('Y', 'V', '2', '4'), - FOURCC_YU12 = FOURCC('Y', 'U', '1', '2'), // Linux version of I420. - FOURCC_J420 = FOURCC('J', '4', '2', '0'), - FOURCC_J400 = FOURCC('J', '4', '0', '0'), // unofficial fourcc - FOURCC_H420 = FOURCC('H', '4', '2', '0'), // unofficial fourcc - - // 14 Auxiliary aliases. CanonicalFourCC() maps these to canonical fourcc. - FOURCC_IYUV = FOURCC('I', 'Y', 'U', 'V'), // Alias for I420. - FOURCC_YU16 = FOURCC('Y', 'U', '1', '6'), // Alias for I422. - FOURCC_YU24 = FOURCC('Y', 'U', '2', '4'), // Alias for I444. - FOURCC_YUYV = FOURCC('Y', 'U', 'Y', 'V'), // Alias for YUY2. - FOURCC_YUVS = FOURCC('y', 'u', 'v', 's'), // Alias for YUY2 on Mac. - FOURCC_HDYC = FOURCC('H', 'D', 'Y', 'C'), // Alias for UYVY. - FOURCC_2VUY = FOURCC('2', 'v', 'u', 'y'), // Alias for UYVY on Mac. - FOURCC_JPEG = FOURCC('J', 'P', 'E', 'G'), // Alias for MJPG. - FOURCC_DMB1 = FOURCC('d', 'm', 'b', '1'), // Alias for MJPG on Mac. - FOURCC_BA81 = FOURCC('B', 'A', '8', '1'), // Alias for BGGR. - FOURCC_RGB3 = FOURCC('R', 'G', 'B', '3'), // Alias for RAW. - FOURCC_BGR3 = FOURCC('B', 'G', 'R', '3'), // Alias for 24BG. - FOURCC_CM32 = FOURCC(0, 0, 0, 32), // Alias for BGRA kCMPixelFormat_32ARGB - FOURCC_CM24 = FOURCC(0, 0, 0, 24), // Alias for RAW kCMPixelFormat_24RGB - FOURCC_L555 = FOURCC('L', '5', '5', '5'), // Alias for RGBO. - FOURCC_L565 = FOURCC('L', '5', '6', '5'), // Alias for RGBP. - FOURCC_5551 = FOURCC('5', '5', '5', '1'), // Alias for RGBO. - - // 1 Auxiliary compressed YUV format set aside for capturer. - FOURCC_H264 = FOURCC('H', '2', '6', '4'), - - // Match any fourcc. - FOURCC_ANY = -1, -}; - -enum FourCCBpp { - // Canonical fourcc codes used in our code. - FOURCC_BPP_I420 = 12, - FOURCC_BPP_I422 = 16, - FOURCC_BPP_I444 = 24, - FOURCC_BPP_I411 = 12, - FOURCC_BPP_I400 = 8, - FOURCC_BPP_NV21 = 12, - FOURCC_BPP_NV12 = 12, - FOURCC_BPP_YUY2 = 16, - FOURCC_BPP_UYVY = 16, - FOURCC_BPP_M420 = 12, - FOURCC_BPP_Q420 = 12, - FOURCC_BPP_ARGB = 32, - FOURCC_BPP_BGRA = 32, - FOURCC_BPP_ABGR = 32, - FOURCC_BPP_RGBA = 32, - FOURCC_BPP_24BG = 24, - FOURCC_BPP_RAW = 24, - FOURCC_BPP_RGBP = 16, - FOURCC_BPP_RGBO = 16, - FOURCC_BPP_R444 = 16, - FOURCC_BPP_RGGB = 8, - FOURCC_BPP_BGGR = 8, - FOURCC_BPP_GRBG = 8, - FOURCC_BPP_GBRG = 8, - FOURCC_BPP_YV12 = 12, - FOURCC_BPP_YV16 = 16, - FOURCC_BPP_YV24 = 24, - FOURCC_BPP_YU12 = 12, - FOURCC_BPP_J420 = 12, - FOURCC_BPP_J400 = 8, - FOURCC_BPP_H420 = 12, - FOURCC_BPP_MJPG = 0, // 0 means unknown. - FOURCC_BPP_H264 = 0, - FOURCC_BPP_IYUV = 12, - FOURCC_BPP_YU16 = 16, - FOURCC_BPP_YU24 = 24, - FOURCC_BPP_YUYV = 16, - FOURCC_BPP_YUVS = 16, - FOURCC_BPP_HDYC = 16, - FOURCC_BPP_2VUY = 16, - FOURCC_BPP_JPEG = 1, - FOURCC_BPP_DMB1 = 1, - FOURCC_BPP_BA81 = 8, - FOURCC_BPP_RGB3 = 24, - FOURCC_BPP_BGR3 = 24, - FOURCC_BPP_CM32 = 32, - FOURCC_BPP_CM24 = 24, - - // Match any fourcc. - FOURCC_BPP_ANY = 0, // 0 means unknown. -}; - -// Converts fourcc aliases into canonical ones. -LIBYUV_API uint32 CanonicalFourCC(uint32 fourcc); - -#ifdef __cplusplus -} // extern "C" -} // namespace libyuv -#endif - -#endif // INCLUDE_LIBYUV_VIDEO_COMMON_H_ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/lib/arm64-v8a/libyuv.a b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/lib/arm64-v8a/libyuv.a deleted file mode 100644 index 992af62a..00000000 Binary files a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/lib/arm64-v8a/libyuv.a and /dev/null differ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/lib/armeabi-v7a/libyuv.a b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/lib/armeabi-v7a/libyuv.a deleted file mode 100644 index 0730f5bb..00000000 Binary files a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/lib/armeabi-v7a/libyuv.a and /dev/null differ diff --git a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/lib/armeabi/libyuv.a b/AliLivePushDemo/imageutil/src/main/jni/prebuilt/lib/armeabi/libyuv.a deleted file mode 100644 index 0730f5bb..00000000 Binary files a/AliLivePushDemo/imageutil/src/main/jni/prebuilt/lib/armeabi/libyuv.a and /dev/null differ diff --git a/AliLivePushDemo/imageutil/src/main/jni/utils/ImageFormatUtils.cpp b/AliLivePushDemo/imageutil/src/main/jni/utils/ImageFormatUtils.cpp deleted file mode 100644 index 88b89e7a..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/utils/ImageFormatUtils.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// -// Created by lifujun on 2020/7/21. -// - -#include -#include "ImageFormatUtils.h" - - -static char *ImageFormatUtilsPath = (char *) ("com/alilive/imageutil/ImageFormatUtils"); - -static JNINativeMethod imageformat_method_table[] = { - {"nativeGetNV21", "(JJJIIIII)[B", (void *) ImageFormatUtils::java_GetNV21}, -}; - -jclass gj_ImageFormatUtils_Class = nullptr; - -void ImageFormatUtils::init(JNIEnv *pEnv) { - if (gj_ImageFormatUtils_Class == nullptr) { - jclass pJclass = pEnv->FindClass(ImageFormatUtilsPath); - gj_ImageFormatUtils_Class = (jclass) pEnv->NewGlobalRef( - pJclass); - pEnv->DeleteLocalRef(pJclass); - } -} - -void ImageFormatUtils::unInit(JNIEnv *pEnv) { - if (gj_ImageFormatUtils_Class != nullptr) { - pEnv->DeleteGlobalRef(gj_ImageFormatUtils_Class); - gj_ImageFormatUtils_Class = nullptr; - } -} - -int ImageFormatUtils::registerMethod(JNIEnv *pEnv) { - if (gj_ImageFormatUtils_Class == nullptr) { - return JNI_FALSE; - } - if (pEnv->RegisterNatives(gj_ImageFormatUtils_Class, imageformat_method_table, - sizeof(imageformat_method_table) / sizeof(JNINativeMethod)) < 0) { - return JNI_FALSE; - } - - return JNI_TRUE; -} - -jbyteArray -ImageFormatUtils::java_GetNV21(JNIEnv *env, jclass jclazz, jlong y, jlong u, jlong v, jint width, - jint height, - jint strideY, jint strideU, jint strideV) { - - - int dataLen = strideY * height * 3 / 2; - uint8* nv21_data = static_cast(malloc(dataLen)); - - - uint8 *nv21_y_data = nv21_data; - uint8 *nv21_uv_data = nv21_data + strideY * height; - - libyuv::I420ToNV21( - (const uint8 *) y, strideY, - (const uint8 *) u, strideU, - (const uint8 *) v, strideV, - (uint8 *) nv21_y_data, strideY, - (uint8 *) nv21_uv_data, strideY, - width, height); - - jbyteArray bufArray = env->NewByteArray(dataLen); - env->SetByteArrayRegion(bufArray, 0, dataLen, (jbyte *) (nv21_data)); - - free(nv21_data); - - return bufArray; -} diff --git a/AliLivePushDemo/imageutil/src/main/jni/utils/ImageFormatUtils.h b/AliLivePushDemo/imageutil/src/main/jni/utils/ImageFormatUtils.h deleted file mode 100644 index 486f12c3..00000000 --- a/AliLivePushDemo/imageutil/src/main/jni/utils/ImageFormatUtils.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Created by lifujun on 2020/7/21. -// - -#ifndef NOVA_IMAGEFORMATUTILS_H -#define NOVA_IMAGEFORMATUTILS_H - -#include - -class ImageFormatUtils { - -public: - static void init(JNIEnv *pEnv); - - static void unInit(JNIEnv *pEnv); - - static int registerMethod(JNIEnv *pEnv); - - static jbyteArray java_GetNV21(JNIEnv *env, jclass jclazz, jlong y, jlong u, jlong v, jint width , jint height,jint strideY, jint strideU, jint strideV); -}; - - -#endif //NOVA_IMAGEFORMATUTILS_H diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveSettingActivity.java b/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveSettingActivity.java deleted file mode 100644 index 67fced86..00000000 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/InteractLiveSettingActivity.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.aliyun.interactive_live; - -import android.os.Bundle; -import android.widget.Button; -import android.widget.ImageView; -import android.widget.Switch; - -import androidx.appcompat.app.AppCompatActivity; - -import com.aliyun.interactive_common.utils.LivePushGlobalConfig; - -public class InteractLiveSettingActivity extends AppCompatActivity { - - - private ImageView mBackImageView; - private Switch mMultiInteractSwitch; - private Button mCommitButton; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_interact_live_setting); - - initView(); - initListener(); - } - - private void initView(){ - mBackImageView = findViewById(R.id.iv_back); - mCommitButton = findViewById(R.id.btn_commit); - mMultiInteractSwitch = findViewById(R.id.multi_interaction_control); - - mMultiInteractSwitch.setChecked(LivePushGlobalConfig.IS_MULTI_INTERACT); - } - - private void initListener(){ - mBackImageView.setOnClickListener(view -> { - finish(); - }); - mCommitButton.setOnClickListener(view -> finish()); - mMultiInteractSwitch.setOnCheckedChangeListener((compoundButton, b) -> LivePushGlobalConfig.IS_MULTI_INTERACT = b); - } -} \ No newline at end of file diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/bean/MultiAlivcLivePlayer.java b/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/bean/MultiAlivcLivePlayer.java deleted file mode 100644 index 96376656..00000000 --- a/AliLivePushDemo/interactive/interactive_live/src/main/java/com/aliyun/interactive_live/bean/MultiAlivcLivePlayer.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.aliyun.interactive_live.bean; - -import android.content.Context; - -import com.alivc.live.annotations.AlivcLiveMode; -import com.alivc.live.player.AlivcLivePlayInfoListener; -import com.alivc.live.player.AlivcLivePlayerImpl; -import com.alivc.live.player.annotations.AlivcLivePlayError; -import com.aliyun.interactive_common.listener.MultiInteractLivePushPullListener; - -/** - * AlivcLivePlayer 封装类,用于多人连麦互动 - */ -public class MultiAlivcLivePlayer extends AlivcLivePlayerImpl implements AlivcLivePlayInfoListener{ - - private MultiInteractLivePushPullListener mListener; - private boolean mIsPlaying = false; - private String mAudienceId; - - public MultiAlivcLivePlayer(Context context, AlivcLiveMode mode) { - super(context, mode); - setPlayInfoListener(this); - } - - public void setMultiInteractPlayInfoListener(MultiInteractLivePushPullListener listener){ - this.mListener = listener; - } - - @Override - public void onPlayStarted() { - mIsPlaying = true; - if(mListener != null){ - mListener.onPullSuccess(mAudienceId); - } - } - - @Override - public void onPlayStopped() { - mIsPlaying = false; - if(mListener != null){ - mListener.onPullStop(mAudienceId); - } - } - - @Override - public void onFirstVideoFrameDrawn() { - } - - @Override - public void onError(AlivcLivePlayError alivcLivePlayError, String s) { - mIsPlaying = false; - if(mListener != null){ - mListener.onPullError(mAudienceId,alivcLivePlayError,s); - } - } - - public boolean isPulling(){ - return mIsPlaying; - } - - public void setAudienceId(String audienceId) { - this.mAudienceId = audienceId; - } - - public String getAudienceId(){ - return mAudienceId; - } -} diff --git a/AliLivePushDemo/interactive/interactive_live/src/main/res/layout/activity_interact_live_setting.xml b/AliLivePushDemo/interactive/interactive_live/src/main/res/layout/activity_interact_live_setting.xml deleted file mode 100644 index df7fc284..00000000 --- a/AliLivePushDemo/interactive/interactive_live/src/main/res/layout/activity_interact_live_setting.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -