Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8c61100
feat(core): use a pool for frame to lower memory allocation
ThibaultBee Jan 23, 2026
20b0435
refactor(*): merge FrameWithCloseable with MutableFrame to avoid memo…
ThibaultBee Jan 24, 2026
d389b0d
chore(core): frame copy use frame from pool for memory optimization
ThibaultBee Jan 25, 2026
4afc99f
chore(core): codec: reusable extra for memory optimization
ThibaultBee Jan 25, 2026
2e781ba
refactor(core): move dummy endpoint to main source for test purpose
ThibaultBee Jan 25, 2026
9d25478
refactor(core): avoid slice to skip start code to reduce memory alloc…
ThibaultBee Jan 26, 2026
b2d6c9f
feat(core): pool make frame put back themself in the pool after close
ThibaultBee Jan 27, 2026
cc08337
feat(core): add a raw frame pool to reuse raw frame
ThibaultBee Jan 27, 2026
0e18b1c
feat(*): avoid to duplicate extra for each frames
ThibaultBee Jan 28, 2026
c15e48b
refactor(core): camera: move `applyRepeatingSessionSync` method to th…
ThibaultBee Jan 21, 2026
9d03ffe
feat(core): add a flow to get the current physical camera Id
ThibaultBee Jan 21, 2026
57da895
refactor(core): camera: move session callback out of session controller
ThibaultBee Jan 23, 2026
404c32f
feat(core): add custom audio effect API in the audio processor
ThibaultBee Jan 23, 2026
92b10e7
fix(core): processor: duplicate raw buffer dispatching
ThibaultBee Feb 2, 2026
e768bcf
refactor(core): rename `clone` to `deepCopy`
ThibaultBee Feb 2, 2026
6a2cf12
fix(core): processor: consumer audio effect must receive a deep copy …
ThibaultBee Feb 2, 2026
3e1ed75
fix(core): processor: use `CopyOnWriteArrayList` instead of MutableLi…
ThibaultBee Feb 2, 2026
ecb4d15
feat(ui): add a composable preview view
ThibaultBee Jan 30, 2026
a83b5ec
feat(core): camera: add a way to access the TotalCaptureResult
ThibaultBee Feb 3, 2026
841ddc5
fix(core): camera: internalizes constructor of camera settings
ThibaultBee Feb 3, 2026
453b5b2
feat(core): camera: add an API to set torch strength level
ThibaultBee Feb 3, 2026
a77b9fa
refactor(core): camera: use lazy initializer for available properties
ThibaultBee Feb 3, 2026
a76c80b
refactor(*): add listener for camera zoom
ThibaultBee Feb 3, 2026
6267632
fix(core): camera: prefix torch strength level range with available
ThibaultBee Feb 3, 2026
c5a5632
feat(core): make SingleStreamer inputs non nullable
ThibaultBee Feb 4, 2026
31eaa48
feat(core): make DualStreamer inputs non nullable
ThibaultBee Feb 4, 2026
cc456b1
chore(version):bump to 3.2.0 snapshot
ThibaultBee Feb 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ plugins {
}

allprojects {
val versionCode by extra { 3_001_000 }
val versionName by extra { "3.1.0" }
val versionCode by extra { 3_002_000 }
val versionName by extra { "3.2.0" }

group = "io.github.thibaultbee.streampack"
version = versionName
version = "$versionName-SNAPSHOT"
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package io.github.thibaultbee.streampack.core.elements.sources

import android.content.Context
import io.github.thibaultbee.streampack.core.elements.data.RawFrame
import io.github.thibaultbee.streampack.core.elements.sources.audio.AudioSourceConfig
import io.github.thibaultbee.streampack.core.elements.sources.audio.IAudioSourceInternal
import io.github.thibaultbee.streampack.core.elements.utils.pool.IReadOnlyRawFrameFactory
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import java.nio.ByteBuffer

class StubAudioSource : IAudioSourceInternal {
private val _isStreamingFlow = MutableStateFlow(false)
Expand All @@ -15,13 +14,11 @@ class StubAudioSource : IAudioSourceInternal {
private val _configurationFlow = MutableStateFlow<AudioSourceConfig?>(null)
val configurationFlow = _configurationFlow.asStateFlow()

override fun fillAudioFrame(frame: RawFrame): RawFrame {
return frame
override val minBufferSize = 0
override fun fillAudioFrame(buffer: ByteBuffer): Long {
return 0L
}

override fun getAudioFrame(frameFactory: IReadOnlyRawFrameFactory) =
frameFactory.create(8192, 0)

override suspend fun startStream() {
_isStreamingFlow.value = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import io.github.thibaultbee.streampack.core.elements.sources.video.ISurfaceSour
import io.github.thibaultbee.streampack.core.elements.sources.video.IVideoFrameSourceInternal
import io.github.thibaultbee.streampack.core.elements.sources.video.IVideoSourceInternal
import io.github.thibaultbee.streampack.core.elements.sources.video.VideoSourceConfig
import io.github.thibaultbee.streampack.core.elements.utils.pool.IReadOnlyRawFrameFactory
import io.github.thibaultbee.streampack.core.elements.utils.time.Timebase
import io.github.thibaultbee.streampack.core.pipelines.IVideoDispatcherProvider
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import java.nio.ByteBuffer

class StubVideoSurfaceSource(override val timebase: Timebase = Timebase.REALTIME) :
StubVideoSource(),
Expand Down Expand Up @@ -44,8 +44,9 @@ class StubVideoSurfaceSource(override val timebase: Timebase = Timebase.REALTIME
}

class StubVideoFrameSource : StubVideoSource(), IVideoFrameSourceInternal {
override fun getVideoFrame(frameFactory: IReadOnlyRawFrameFactory) =
frameFactory.create(8192, 0L)
override fun getVideoFrame(buffer: ByteBuffer): Long {
return 0L
}

class Factory : IVideoSourceInternal.Factory {
override suspend fun create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class StreamerPipelineTest {
)
streamerPipeline.addOutput(output)

val audioSource = streamerPipeline.audioInput?.sourceFlow?.value as IAudioSourceInternal
val videoSource = streamerPipeline.videoInput?.sourceFlow?.value as IVideoSourceInternal
val audioSource = streamerPipeline.audioInput.sourceFlow.value as IAudioSourceInternal
val videoSource = streamerPipeline.videoInput.sourceFlow.value as IVideoSourceInternal

streamerPipeline.startStream()
assertTrue(streamerPipeline.isStreamingFlow.first { it })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import android.util.Log
import androidx.core.net.toFile
import androidx.test.platform.app.InstrumentationRegistry
import io.github.thibaultbee.streampack.core.configuration.mediadescriptor.UriMediaDescriptor
import io.github.thibaultbee.streampack.core.elements.data.RawFrame
import io.github.thibaultbee.streampack.core.elements.data.MutableRawFrame
import io.github.thibaultbee.streampack.core.elements.encoders.AudioCodecConfig
import io.github.thibaultbee.streampack.core.elements.encoders.VideoCodecConfig
import io.github.thibaultbee.streampack.core.elements.endpoints.DummyEndpoint
Expand Down Expand Up @@ -317,7 +317,7 @@ class EncodingPipelineOutputTest {

try {
output.queueAudioFrame(
RawFrame(
MutableRawFrame(
ByteBuffer.allocateDirect(16384),
Random.nextLong()
)
Expand All @@ -330,14 +330,11 @@ class EncodingPipelineOutputTest {
output.startStream(descriptor)

output.queueAudioFrame(
RawFrame(
MutableRawFrame(
ByteBuffer.allocateDirect(16384),
Random.nextLong()
)
)

// Wait for frame to be received
assertNotNull(dummyEndpoint.frameFlow.filterNotNull().first())
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import io.github.thibaultbee.streampack.core.streamer.dual.utils.DualStreamerCon
import io.github.thibaultbee.streampack.core.streamer.utils.StreamerUtils
import io.github.thibaultbee.streampack.core.streamer.utils.VideoUtils
import io.github.thibaultbee.streampack.core.streamers.dual.cameraDualStreamer
import io.github.thibaultbee.streampack.core.streamers.dual.setConfig
import io.github.thibaultbee.streampack.core.utils.DeviceTest
import io.github.thibaultbee.streampack.core.utils.FileUtils
import kotlinx.coroutines.runBlocking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import io.github.thibaultbee.streampack.core.streamer.single.utils.SingleStreame
import io.github.thibaultbee.streampack.core.streamer.utils.StreamerUtils
import io.github.thibaultbee.streampack.core.streamer.utils.VideoUtils
import io.github.thibaultbee.streampack.core.streamers.single.cameraSingleStreamer
import io.github.thibaultbee.streampack.core.streamers.single.setConfig
import io.github.thibaultbee.streampack.core.utils.DeviceTest
import io.github.thibaultbee.streampack.core.utils.FileUtils
import kotlinx.coroutines.runBlocking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import io.github.thibaultbee.streampack.core.streamer.utils.VideoUtils
import io.github.thibaultbee.streampack.core.streamers.single.AudioConfig
import io.github.thibaultbee.streampack.core.streamers.single.VideoConfig
import io.github.thibaultbee.streampack.core.streamers.single.cameraSingleStreamer
import io.github.thibaultbee.streampack.core.streamers.single.setConfig
import io.github.thibaultbee.streampack.core.utils.DeviceTest
import io.github.thibaultbee.streampack.core.utils.FileUtils
import kotlinx.coroutines.runBlocking
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import io.github.thibaultbee.streampack.core.streamer.surface.SurfaceViewTestAct
import io.github.thibaultbee.streampack.core.streamers.single.AudioConfig
import io.github.thibaultbee.streampack.core.streamers.single.cameraSingleStreamer
import io.github.thibaultbee.streampack.core.streamers.single.VideoConfig
import io.github.thibaultbee.streampack.core.streamers.single.setConfig
import io.github.thibaultbee.streampack.core.utils.FileUtils
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.test.runTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import io.github.thibaultbee.streampack.core.interfaces.startStream
import io.github.thibaultbee.streampack.core.streamers.single.AudioConfig
import io.github.thibaultbee.streampack.core.streamers.single.SingleStreamer
import io.github.thibaultbee.streampack.core.streamers.single.VideoConfig
import io.github.thibaultbee.streampack.core.streamers.single.setConfig
import io.github.thibaultbee.streampack.core.utils.DeviceTest
import kotlinx.coroutines.test.runTest
import org.junit.After
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import io.github.thibaultbee.streampack.core.configuration.mediadescriptor.Media
import io.github.thibaultbee.streampack.core.interfaces.ICloseableStreamer
import io.github.thibaultbee.streampack.core.interfaces.startStream
import io.github.thibaultbee.streampack.core.streamers.dual.DualStreamer
import io.github.thibaultbee.streampack.core.streamers.single.SingleStreamer
import io.github.thibaultbee.streampack.core.streamers.single.ISingleStreamer
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.withContext
Expand All @@ -14,7 +14,7 @@ import kotlin.time.Duration.Companion.seconds

object StreamerUtils {
suspend fun runSingleStream(
streamer: SingleStreamer,
streamer: ISingleStreamer,
descriptor: MediaDescriptor,
duration: Duration,
pollDuration: Duration = 1.seconds
Expand Down
Loading
Loading