## ThibaultBee/StreamPack — 3.1.2…3.2.0

_123 commits._

### Features
- **feat(data): include timestamp in video filename generation** (c4a8954)
- **feat(demos): camera: implement camera source switching with popup menu and update video source handling** (e54e215)
- **feat(demos): camera: add toggle button for muting/unmuting video and update related functionality** (6d74b37)
- **feat(core): add isMuted property to control video stream muting** (2a28659)
- **feat(ui): log preview size when starting the preview** (5395864)
- **feat(metrics): refactor RtmpEndpointMetrics to use RtmpRawMetrics and improve metrics handling** (8cb385d)
- **feat(metrics): refactor SrtEndpointMetrics import path and update related references** (566d03e)
- **feat(metrics): add bitrate and packet loss metrics to PreviewViewModel** (28ddacf)
- **feat(metrics): introduce EmptyEndpointMetrics for graceful handling of unsupported metrics** (ec28d67)
- **feat(metrics): set default interval for metricsFlow to 1000 milliseconds** (ec2ff02)
- **feat(metrics): clarify documentation and adjust constructor visibility in EndpointMetricsTracker** (83057d8)
- **feat(metrics): refine bitrate adjustment thresholds for improved control during network fluctuations** (d806132)
- **feat(metrics): enhance WithEndpointMetrics interface for better type safety and consistency** (3f363e0)
- **feat(metrics): update polling time parameters to use Duration type for consistency** (83db3dc)
- **feat(metrics): enhance bitrate adjustment logic to prevent increases during network saturation** (876cb00)
- **feat(metrics): add metricsFlow function to emit tracked metrics over time** (56a9ab2)
- **feat(metrics): replace bitrate regulator controller methods with a factory property** (91d8043)
- **feat(metrics): integrate EndpointMetricsTracker into bitrate regulators** (a39e388)
- **feat(core): introducing a metrics tracker** (aece97a)
- **feat(*): add a dedicated `WithMetrics` interface.** (80ffa23)
- **feat(*): add metrics and regulator for RTMP** (68b57c2)
- **Add configurable RTMP settings via MediaDescriptior.customData** (8fed0bd)
- **feat(*): add a UriMediaDescriptor for the content resolver** (b349cb7)
- **feat(core): streamer: add the audio input mode as a parameter for single streamer** (cb1e495)
- **feat(core): lifecycle: add support for audio capture** (e1e236a)
- **feat(core): audioInput: add a specific start capture to run the audio without the stream like to display a vumeter** (2956c9e)
- **feat(core): add a specific error message when scheme or extension are empty** (9f0ed24)
- **feat(core): camera: add an API to reset all the camera settings** (5d199ca)
- **feat(core): camera: in settings, add `defaultStrengthLevel` API** (e5fe910)
- **feat(core): camera: in settings, add `totalCaptureResultFlow` instead of `applyRepeatingSession`** (63a17da)
- **feat(core): make DualStreamer inputs non nullable** (5656481)
- **feat(core): make SingleStreamer inputs non nullable** (f8ac011)
- **feat(core): camera: add an API to set torch strength level** (2b8c601)
- **feat(core): camera: add a way to access the TotalCaptureResult** (6c0a892)
- **feat(ui): add a composable preview view** (9b5c76b)
- **feat(core): add custom audio effect API in the audio processor** (883145a)
- **feat(core): add a flow to get the current physical camera Id** (f507477)
- **feat(*): avoid to duplicate extra for each frames** (484c295)
- **feat(core): add a raw frame pool to reuse raw frame** (898fab6)
- **feat(core): pool make frame put back themself in the pool after close** (ede098c)
- **feat(core): use a pool for frame to lower memory allocation** (1cd8d8f)

### Fixes
- **fix(srt): handle exceptions when checking packet timestamp against connection time** (e559f46)
- **fix(srt): verify connection for metrics to avoid displaying bad metrics** (81faa1d)
- **fix(*): change the order of the stopStream** (295af98)
- **fix(ui): add permission check for camera tap focus functionality** (fe2f02d)
- **fix(demos): camera: update permission handling for live-streaming and rename audio configuration method** (d7cd362)
- **fix(demos): camera: ensure correct rotation is applied when creating single streamers** (023d35d)
- **fix(core): emit initial rotation in RotationFlowProvider to prevent hanging flow operators** (7630ed8)
- **fix(core): emit closed state for camera disconnection in CameraUtils** (3c5683d)
- **fix(core): use getter for audio and video input in dual streamers to avoid a crash on video only dual streamers** (a4c5768)
- **fix(core): handle invalid EndpointType id in fromId function** (f36930d)
- **fix(*): fallback to `Any` (instead of generics) for the dynamic endpoint** (5fd9559)
- **fix(rtmp): remove ConnectInfo from MediaDescriptor customData to avoid struggle with type erasure** (8ff2ef5)
- **fix(core): processor: verify isReleased state in the mutex** (9719bc0)
- **fix(core): output: the coroutine scope should run on the supervisor scope to avoid cancelling all children jobs when an exception happens** (6d78225)
- **fix(core): in audio and video inputs, verify isReleased state in before and in the mutex** (193fe71)
- **fix(core): in StreamerLifeCycleObserver, fix the startAudioCapture when source is emitted** (c754cb1)
- **fix(core): in EncodingPipelineOutput try/catch onStopStream to avoid crash during release** (1626b8d)
- **fix(core): in StreamerLifeCycleObserver try/catch all calls to streamer methods** (c44b818)
- **fix(core): try/catch stopStream and stopCapture when audio/video input is released** (a535822)
- **fix(ui): move onZoomRatioOnPinchChanged to the main thread** (1572252)
- **fix(core): output: avoid a deadlock when stopping the stream and then queueAudioFrame is called** (031a8ce)
- **fix(core): processor: add the `MutableList` to the `IAudioFrameProcessor`** (fcdd3e7)
- **fix(core): camera: add RequiresPermission annotation for onTap** (94f3dc2)
- **fix(rtmp): to not push frame to the muxer if the connection is closed.** (cd62959)
- **fix(rtmp): fix few warnings in the media descriptor** (7fc52a3)
- **fix(core): properly returns media sink type exception** (c2784d6)
- **fix(core): lifecycle: correctly use NonCancellable** (fbe9042)
- **fix(core): camera: in settings, call awaitClose from the coroutine scope** (60db19e)
- **fix(core): camera: in settings, make the coroutine scope not accessible** (acf0022)
- **fix(ui): fix former comments on startPreview** (eb858ac)
- **fix(core): camera: prefix torch strength level range with available** (e235f9f)
- **fix(core): camera: internalizes constructor of camera settings** (0c32a48)
- **fix(core): processor: use `CopyOnWriteArrayList` instead of MutableList to avoid `ConcurrentModificationException`** (f0dcf66)
- **fix(core): processor: consumer audio effect must receive a deep copy of the current audio buffer.** (2023ae3)
- **fix(core): processor: duplicate raw buffer dispatching** (b084c8a)

### Tests
- **test(core): workaround: disable test with webM because the VP9 encoder fails to start in the CI emulator** (b2ba4ff)
- **test(core): moving test on VP9 to 640x360** (0d8dad2)

### Docs
- **docs(Streamers.md): fix doc title** (06324ad)
- **docs(README.md): improve README.md header** (724bf24)
- **docs(README.md): add compose package info** (f2239af)

### Chore
- **chore(version): bump to 3.2.0** (a5d112d)
- **refactor(camera): rename toggleBackToFront to switchBackToFront and update camera selection logic** (c07cc5d)
- **refactor(core): replace suspendCoroutine by suspendCancellableCoroutine** (b6503e1)
- **refactor(core): camera: replace suspendCoroutine by suspendCancellableCoroutine** (d29933f)
- **refactor(demos): camera: improve streamer creation with a StreamerFactory** (c2e8625)
- **refactor(core): update DualStreamer interfaces to use specific output types for audio and video** (dc0d65c)
- **refactor(core): remove unnecessary null assertions for audio and video inputs in SingleStreamer** (ca06be7)
- **chore(demos): camera: remove unused imports from PreviewViewModel** (3bf7d69)
- **refactor(core): move dual streamer set config to their corresponding interfaces** (a4943a5)
- **chore(demos): camera: remove redundant audio input capture logic from PreviewViewModel** (fb3183a)
- **refactor(core): rename videoUriMediaDescriptor to mediaStoreMediaDescriptor and enhance functionality for audio support** (92adb49)
- **refactor(metrics): rename addBitrateRegulatorController to setBitrateRegulatorController for consistency** (ee49751)
- **refactor(metrics): remove outdated limitation comment from bitrate regulator controller** (357ad22)
- **refactor(metrics): rename packet and byte metrics for clarity for remote and local endpoint** (f636215)
- **refactor(*): improve metrics interfaces** (86d666c)
- **chore(srt): add missing header license** (b81af06)
- **refactor(rtmp): expose connectInfo as a val** (6758c54)
- **refactor(rtmp): narrow public connect-info API** (736341c)
- **refactor(core): replace SRT regulator controller by a direct factory** (de58e6e)
- **chore(ci): upgrade actions** (2d6ad4a)
- **chore(core): rename StreamerLifeCycleObserver `autotartAudioCapture` to `startAudioCaptureOnResume`** (db10649)
- **refactor(core): use AutoCloseable for Frame and RawFrame as it is non-IO resources.** (56efeee)
- **refactor(core): audioInput: factorize startCapture/startStream and stopCapture/stopStream** (4f7b4fc)
- **refactor(core): lifecycle: merge life cycle observer in a single class** (c68f23c)
- **refactor(core): camera: move capture request builder out of the session controller as it is not link to it** (86b6a75)
- **refactor(core): camera: pass a coroutine dispatcher instead of a coroutine scope** (f35a486)
- **refactor(core): make mutable frame and raw frame private to force user to use a pool** (c292b1f)
- **refactor(core): move snapshot API to a specific interface** (20cea0d)
- **refactor(core): camera: in settings, add `isLockAvailable` API** (f765453)
- **refactor(core): camera: in settings, use a shared flow to listen to callback flow** (b796d5b)
- **refactor(compose): rename PreviewView and add a zoom callback** (dc51df0)
- **chore(version):bump to 3.2.0 snapshot** (65da7d0)
- **refactor(*): add listener for camera zoom** (c6a8e69)
- **refactor(core): camera: use lazy initializer for available properties** (2fa35f4)
- **refactor(core): rename `clone` to `deepCopy`** (94532e8)
- **refactor(core): camera: move session callback out of session controller** (7792583)
- **refactor(core): camera: move `applyRepeatingSessionSync` method to the camera settings** (24239e9)
- **refactor(core): avoid slice to skip start code to reduce memory allocation** (9a0688d)
- **refactor(core): move dummy endpoint to main source for test purpose** (06fae73)
- **chore(core): codec: reusable extra for memory optimization** (5b12dbc)
- **chore(core): frame copy use frame from pool for memory optimization** (6f8a35e)
- **refactor(*): merge FrameWithCloseable with MutableFrame to avoid memory allocation** (ea80543)

_Recap by [Repo Wrapped](https://repowrapped.com/gh/ThibaultBee/StreamPack?utm_source=github-action)._