-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(*): move current streamer to single
- Loading branch information
1 parent
e89e80a
commit 1bc6416
Showing
109 changed files
with
669 additions
and
696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
core/src/androidTest/java/io/github/thibaultbee/streampack/core/data/AudioConfigTest.kt
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
core/src/androidTest/java/io/github/thibaultbee/streampack/core/data/VideoConfigTest.kt
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
...Test/java/io/github/thibaultbee/streampack/core/internal/encoders/AudioCodecConfigTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package io.github.thibaultbee.streampack.core.internal.encoders | ||
|
||
import android.media.AudioFormat | ||
import android.media.MediaFormat | ||
import org.junit.Assert | ||
import org.junit.Test | ||
|
||
class AudioCodecConfigTest { | ||
/** | ||
* This test required [Size] which is not available in unit test. | ||
*/ | ||
@Test | ||
fun equalsConfigTest() { | ||
val audioCodecConfig = AudioCodecConfig() | ||
|
||
Assert.assertEquals(audioCodecConfig, audioCodecConfig) | ||
Assert.assertEquals(audioCodecConfig, AudioCodecConfig()) | ||
Assert.assertNotEquals( | ||
audioCodecConfig, | ||
AudioCodecConfig(mimeType = MediaFormat.MIMETYPE_AUDIO_OPUS) | ||
) | ||
Assert.assertNotEquals(audioCodecConfig, AudioCodecConfig(startBitrate = 1_000)) | ||
Assert.assertNotEquals(audioCodecConfig, AudioCodecConfig(sampleRate = 48000)) | ||
Assert.assertNotEquals( | ||
audioCodecConfig, | ||
AudioCodecConfig(channelConfig = AudioFormat.CHANNEL_IN_MONO) | ||
) | ||
Assert.assertNotEquals( | ||
audioCodecConfig, | ||
AudioCodecConfig(byteFormat = AudioFormat.ENCODING_PCM_8BIT) | ||
) | ||
Assert.assertNotEquals(audioCodecConfig, AudioCodecConfig(profile = 1234)) | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...Test/java/io/github/thibaultbee/streampack/core/internal/encoders/VideoCodecConfigTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.github.thibaultbee.streampack.core.internal.encoders | ||
|
||
import android.media.MediaFormat | ||
import android.util.Size | ||
import org.junit.Assert | ||
import org.junit.Test | ||
|
||
class VideoCodecConfigTest { | ||
/** | ||
* This test required [Size] which is not available in unit test. | ||
*/ | ||
@Test | ||
fun equalsConfigTest() { | ||
val videoConfig = VideoCodecConfig() | ||
|
||
Assert.assertEquals(videoConfig, videoConfig) | ||
Assert.assertEquals(videoConfig, VideoCodecConfig()) | ||
Assert.assertNotEquals( | ||
videoConfig, | ||
VideoCodecConfig(mimeType = MediaFormat.MIMETYPE_VIDEO_HEVC) | ||
) | ||
Assert.assertNotEquals(videoConfig, VideoCodecConfig(startBitrate = 1_000)) | ||
Assert.assertNotEquals(videoConfig, VideoCodecConfig(resolution = Size(1920, 1080))) | ||
Assert.assertNotEquals(videoConfig, VideoCodecConfig(fps = 15)) | ||
Assert.assertNotEquals( | ||
videoConfig, | ||
VideoCodecConfig(profile = 1234, level = videoConfig.level) | ||
) // Level is inferred from profile | ||
Assert.assertNotEquals(videoConfig, VideoCodecConfig(level = 1234)) | ||
Assert.assertNotEquals(videoConfig, VideoCodecConfig(gopDuration = 1234f)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.