Fix participant ISO recording, isolated audio, and Tiles frame handoff - #261
Merged
Merged
Conversation
| @@ -0,0 +1,72 @@ | |||
| #include "iso-audio-reader.h" | |||
| #include <algorithm> | |||
| void IsoAudioReader::read(uint32_t bytes, uint32_t generation) | |||
| const auto len=slot->byte_len, participant=slot->participant_id; | ||
| const auto rate=ring->sample_rate; const auto channels=ring->channels; | ||
| if (!len || len>ring->slot_bytes) break; | ||
| m_pcm.resize(len); std::memcpy(m_pcm.data(),slot+1,len); |
| IsoAudioReader(std::string uuid, uint32_t participant, Deliver deliver, Now now) | ||
| : m_uuid(std::move(uuid)), m_participant(participant), m_deliver(std::move(deliver)), m_now(std::move(now)) {} | ||
| ~IsoAudioReader() { shm_region_destroy(m_region); } | ||
| void read(uint32_t bytes, uint32_t generation); |
| } | ||
| inline void string(Bytes &out, uint32_t id, const char *value) | ||
| { | ||
| element(out, id, Bytes(value, value + std::strlen(value))); |
| string(audio, 0x86, "A_PCM/INT/LIT"); | ||
| double rate = 48000; | ||
| uint64_t bits; | ||
| std::memcpy(&bits, &rate, 8); |
| Video frame{w, h, ns, std::vector<uint8_t>(size_t(w) * h * 3 / 2)}; | ||
| auto *dst = frame.pixels.data(); | ||
| for (uint32_t row = 0; row < h; ++row) { | ||
| std::memcpy(dst, y + size_t(row) * sy, w); |
| } | ||
| for (auto *plane : {u, v}) | ||
| for (uint32_t row = 0; row < h / 2; ++row) { | ||
| std::memcpy(dst, plane + size_t(row) * suv, w / 2); |
| // A pending frame must remain byte-identical until another valid frame arrives. | ||
| template<class Reader> | ||
| bool tile_read_frame(std::vector<uint8_t> &pending, | ||
| std::vector<uint8_t> &candidate, Reader &&read) |
| bool tile_read_frame(std::vector<uint8_t> &pending, | ||
| std::vector<uint8_t> &candidate, Reader &&read) | ||
| { | ||
| if (!read(candidate)) return false; |
| auto *slot=reinterpret_cast<ShmAudioSlot *>(static_cast<char *>(regions[i].ptr)+ | ||
| shm_audio_slot_offset(*ring,ring->write_index%kAudioRingSlots)); | ||
| slot->sequence=1; slot->participant_id=speaker; slot->byte_len=960; | ||
| std::memcpy(slot+1,audio.data(),960); slot->sequence=2; ++ring->write_index; ring->notify=1; |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recordings now contain one fixed 1080p MP4 per participant with dedicated isolated AAC audio. Source resolution changes no longer split files, source Mix audio cannot enter an ISO, and recording subscriptions preserve Audience routing. The ISO panel explicitly selects feeds and waits for actual media before opening files. Tiles also preserves its last valid pending pixels when a shared-memory read is rejected.
Validation: Windows build and 72 CTest regressions pass. Real encoded fixtures cover eight NVENC tracks, format changes and gaps, color preservation, and flash/tone alignment within 20 ms. Alternating-speaker files decoded with digital silence during the other speaker's intervals. Final live Zoom soak remains uncompleted and is disclosed in the release notes. Includes v0.1.47 changelog.
Also updates site tooling to remove the vulnerable sharp dependency; npm audit reports zero vulnerabilities and npm run check passes.