Skip to content

Commit

Permalink
Merge branch 'release/sora-android-sdk-2023.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
miosakuma committed Aug 29, 2023
2 parents 94d1cfc + 3acd8b6 commit c5fc39b
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 5 deletions.
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@

## develop

## sora-andoroid-sdk-2023.2.0

- [UPDATE] システム条件を更新する
- Android Studio 2022.2.1 以降
- WebRTC SFU Sora 2023.1.0 以降
- Sora Android SDK 2023.2.0 以降
- @miosakuma
- [ADD] ビデオチャットにサンプルに映像コーデックのプロファイルを追加する
- @miosakuma
- [ADD] サイマルキャストサンプルの映像コーデックに VP9 と AV1 を追加する
- @szktty

## sora-andoroid-sdk-2023.1.0

- [UPDATE] システム条件を更新する
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Please read https://github.com/shiguredo/oss before use.
## システム条件

- Android 8.0 以降 (エミュレーターでの動作は保証しません)
- Android Studio 2022.1.1 以降
- WebRTC SFU Sora 2022.2.2 以降
- Sora Android SDK 2023.1.0 以降
- Android Studio 2022.2.1 以降
- WebRTC SFU Sora 2023.1.0 以降
- Sora Android SDK 2023.2.0 以降

## サンプルの使い方

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: "com.github.ben-manes.versions"

buildscript {
ext.kotlin_version = '1.8.10'
ext.sora_android_sdk_version = '2023.1.0'
ext.sora_android_sdk_version = '2023.2.0'

repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class SoraVideoChannel(
private var videoEnabled: Boolean = true,
private val videoWidth: Int = SoraVideoOption.FrameSize.Portrait.VGA.x,
private val videoHeight: Int = SoraVideoOption.FrameSize.Portrait.VGA.y,
private val videoVp9Params: Any? = null,
private val videoAv1Params: Any? = null,
private val videoH264Params: Any? = null,
private val simulcast: Boolean = false,
private val simulcastRid: SoraVideoOption.SimulcastRid? = null,
private val videoFPS: Int = 30,
Expand Down Expand Up @@ -276,6 +279,9 @@ class SoraVideoChannel(

videoCodec = this@SoraVideoChannel.videoCodec
videoBitrate = this@SoraVideoChannel.videoBitRate
videoVp9Params = this@SoraVideoChannel.videoVp9Params
videoAv1Params = this@SoraVideoChannel.videoAv1Params
videoH264Params = this@SoraVideoChannel.videoH264Params

audioCodec = this@SoraVideoChannel.audioCodec
audioBitrate = this@SoraVideoChannel.audioBitRate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SimulcastSetupActivity : AppCompatActivity() {
val TAG = SimulcastSetupActivity::class.simpleName
}

private val videoCodecOptions = listOf("VP8", "H264")
private val videoCodecOptions = listOf("VP8", "VP9", "H264", "AV1")
private val videoEnabledOptions = listOf("有効", "無効")
private val audioCodecOptions = listOf("OPUS")
private val audioEnabledOptions = listOf("有効", "無効")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class VideoChatRoomActivity : AppCompatActivity() {
private var videoBitRate: Int? = null
private var videoWidth: Int = SoraVideoOption.FrameSize.Portrait.VGA.x
private var videoHeight: Int = SoraVideoOption.FrameSize.Portrait.VGA.y
private var videoVp9Params: Any? = null
private var videoAv1Params: Any? = null
private var videoH264Params: Any? = null
private var multistream = true
private var spotlight = false
private var spotlightNumber: Int? = null
Expand Down Expand Up @@ -136,6 +139,26 @@ class VideoChatRoomActivity : AppCompatActivity() {
else -> false
}

videoVp9Params = when (val stringValue = intent.getStringExtra("VP9_PROFILE_ID")) {
"未指定" -> null
else -> object {
var profile_id: Int? = stringValue?.toIntOrNull()
}
}

videoAv1Params = when (val stringValue = intent.getStringExtra("AV1_PROFILE")) {
"未指定" -> null
else -> object {
var profile: Int? = stringValue?.toIntOrNull()
}
}

videoH264Params = when (val stringValue = intent.getStringExtra("H264_PROFILE_LEVEL_ID")) {
"未指定" -> null
else -> object {
var profile_level_id: String? = stringValue
}
}
resolutionAdjustment = when (intent.getStringExtra("RESOLUTION_ADJUSTMENT")) {
"16" -> SoraVideoOption.ResolutionAdjustment.MULTIPLE_OF_16
"8" -> SoraVideoOption.ResolutionAdjustment.MULTIPLE_OF_8
Expand Down Expand Up @@ -325,6 +348,9 @@ class VideoChatRoomActivity : AppCompatActivity() {
videoWidth = videoWidth,
videoHeight = videoHeight,
videoFPS = fps,
videoVp9Params = videoVp9Params,
videoAv1Params = videoAv1Params,
videoH264Params = videoH264Params,
fixedResolution = fixedResolution,
resolutionAdjustment = resolutionAdjustment,
videoCodec = videoCodec,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class VideoChatRoomSetupActivity : AppCompatActivity() {
"2000", "2500", "3000", "5000", "10000", "15000", "20000", "30000"
)
private val videoSizeOptions = SoraFrameSize.all.keys.toList()
private val vp9ProfileIdOptions = listOf("未指定", "0", "1", "2", "3")
private val av1ProfileOptions = listOf("未指定", "0", "1", "2")
private val h264ProfileLevelIdOptions = listOf("未指定", "42e01f", "42e020", "42e034")
private val fpsOptions = listOf("30", "10", "15", "20", "24", "60")
private val resolutionChangeOptions = listOf("可変", "固定")
private val resolutionAdjustmentOptions = listOf("未指定", "16", "8", "4", "2", "無効")
Expand Down Expand Up @@ -73,6 +76,12 @@ class VideoChatRoomSetupActivity : AppCompatActivity() {
binding.videoSizeSelection.name.text = "映像サイズ"
binding.videoSizeSelection.spinner.setItems(videoSizeOptions)
binding.videoSizeSelection.spinner.selectedIndex = 3
binding.vp9ProfileIdSelection.name.text = "VP9 プロファイル"
binding.vp9ProfileIdSelection.spinner.setItems(vp9ProfileIdOptions)
binding.av1ProfileSelection.name.text = "AV1 プロファイル"
binding.av1ProfileSelection.spinner.setItems(av1ProfileOptions)
binding.h264ProfileLevelIdSelection.name.text = "H264 プロファイル"
binding.h264ProfileLevelIdSelection.spinner.setItems(h264ProfileLevelIdOptions)
binding.fpsSelection.name.text = "フレームレート"
binding.fpsSelection.spinner.setItems(fpsOptions)
binding.resolutionChangeSelection.name.text = "解像度の変更"
Expand Down Expand Up @@ -110,6 +119,9 @@ class VideoChatRoomSetupActivity : AppCompatActivity() {
val audioStereo = selectedItem(binding.audioStereoSelection.spinner)
val videoBitRate = selectedItem(binding.videoBitRateSelection.spinner)
val videoSize = selectedItem(binding.videoSizeSelection.spinner)
val vp9ProfileId = selectedItem(binding.vp9ProfileIdSelection.spinner)
val av1Profile = selectedItem(binding.av1ProfileSelection.spinner)
val h264ProfileLevelId = selectedItem(binding.h264ProfileLevelIdSelection.spinner)
val fps = selectedItem(binding.fpsSelection.spinner)
val resolutionChange = selectedItem(binding.resolutionChangeSelection.spinner)
val resolutionAdjustment = selectedItem(binding.resolutionAdjustmentSelection.spinner)
Expand All @@ -132,6 +144,9 @@ class VideoChatRoomSetupActivity : AppCompatActivity() {
intent.putExtra("AUDIO_STEREO", audioStereo)
intent.putExtra("VIDEO_BIT_RATE", videoBitRate)
intent.putExtra("VIDEO_SIZE", videoSize)
intent.putExtra("VP9_PROFILE_ID", vp9ProfileId)
intent.putExtra("AV1_PROFILE", av1Profile)
intent.putExtra("H264_PROFILE_LEVEL_ID", h264ProfileLevelId)
intent.putExtra("FPS", fps)
intent.putExtra("RESOLUTION_CHANGE", resolutionChange)
intent.putExtra("RESOLUTION_ADJUSTMENT", resolutionAdjustment)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@
<include
layout="@layout/signaling_selection"
android:id="@+id/videoSizeSelection"/>
<include
layout="@layout/signaling_selection"
android:id="@+id/vp9ProfileIdSelection"/>
<include
layout="@layout/signaling_selection"
android:id="@+id/av1ProfileSelection"/>
<include
layout="@layout/signaling_selection"
android:id="@+id/h264ProfileLevelIdSelection"/>
<include
layout="@layout/signaling_selection"
android:id="@+id/resolutionChangeSelection"/>
Expand Down

0 comments on commit c5fc39b

Please sign in to comment.