Skip to content

Worker: New Consumer class handling all possible producer stream modes.#1731

Merged
jmillan merged 55 commits into
v3from
new_consumer
Jun 10, 2026
Merged

Worker: New Consumer class handling all possible producer stream modes.#1731
jmillan merged 55 commits into
v3from
new_consumer

Conversation

@jmillan

@jmillan jmillan commented Feb 16, 2026

Copy link
Copy Markdown
Member

New ProducerStreamManager interface with the following implementations:

  • SimpleProducerStreamManager: handles a single stream with no spatial or temporal layers.
  • SimulcastProducerStreamManager: handles N streams with 1 spatial and N temporal layers.
  • SvcProducerStreamManager: handles 1 stream with N spatial and M temporal layers.

This new class handles the different flavours of producers streams making Consumer agnostic. This allows:

  • Cleaner implementation: Producer streams details are hidden in the corresponding implementation.
  • Reduced code size: No more duplicated full consumer implementation.
  • Will allow to use the same Consumer and switch the ProducerStreamManager that sources it.

Consumer + SimpleProducerStreamManager replaces SimpleConsumer.
Consumer + SimulcastProducerStreamManager replaces SimulcastConsumer.
Consumer + SvcProducerStreamManager replaces SvcConsumer.
Consumer + PipeProducerStreamManager replaces PipeConsumer.

FUTURE (Other PR):

  • Make consumer pipe-able.

New ProducerStreamManager interface with the following implementations:
- SimpleProducerStreamManager: handles a single stream with no spatial or temporal layers.
- SimulcastProducerStreamManager: handles N streams with 1 spatial and N temporal layers.
- SvcProducerStreamManager: handles 1 stream with N spatial and M temporal layers.

Consumer + SimpleProducerStreamManager replaces SimpleConsumer.
Consumer + SimulcastProducerStreamManager replaces SimulcastConsumer.
Consumer + SvcProducerStreamManager replaces SvcConsumer.
@jmillan jmillan requested a review from ibc February 16, 2026 10:43
@jmillan jmillan marked this pull request as draft February 16, 2026 10:44
Comment thread worker/include/RTC/Consumer.hpp Outdated
Comment thread worker/include/RTC/Consumer.hpp
Comment thread worker/include/RTC/Consumer.hpp
Consumer::IsActive() checks:
- transportConnected
- paused
- producerPaused
- producerClosed

ProducerStreamManager::IsActive() checks:
- Consumer::IsActive()
- Whether producer streams are active

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread worker/src/RTC/Consumer.cpp Outdated
Comment thread worker/src/RTC/Consumer.cpp Outdated
ibc
ibc previously requested changes Feb 18, 2026
Comment thread worker/test/src/RTC/TestSimpleProducerStreamManager.cpp Outdated
Comment thread worker/test/src/RTC/TestSimpleProducerStreamManager.cpp Outdated
Comment thread worker/test/src/RTC/TestSimpleProducerStreamManager.cpp Outdated
@ibc ibc mentioned this pull request Feb 24, 2026
4 tasks

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread worker/src/RTC/SimulcastProducerStreamManager.cpp Outdated
Comment thread worker/src/RTC/SimulcastProducerStreamManager.cpp Outdated
Comment thread worker/src/RTC/SimulcastProducerStreamManager.cpp Outdated
Comment thread worker/src/RTC/SimulcastProducerStreamManager.cpp Outdated
Comment thread worker/src/RTC/SvcProducerStreamManager.cpp Outdated
Comment thread worker/src/RTC/SvcProducerStreamManager.cpp Outdated
Comment thread worker/src/RTC/SvcProducerStreamManager.cpp Outdated
jmillan and others added 8 commits March 20, 2026 15:25
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@jmillan jmillan marked this pull request as ready for review May 18, 2026 11:26
@ibc

ibc commented Jun 8, 2026

Copy link
Copy Markdown
Member

Please CHANGELOG entry.

@ibc ibc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initial review.

Comment thread worker/include/RTC/Consumer.hpp Outdated
Comment thread worker/include/RTC/ProducerStreamManager.hpp Outdated
Comment thread worker/include/RTC/ProducerStreamManager.hpp Outdated
Comment thread worker/src/RTC/SimulcastProducerStreamManager.cpp Outdated
Comment thread worker/src/RTC/Transport.cpp Outdated
Comment thread worker/test/src/RTC/TestPipeProducerStreamManager.cpp Outdated
Comment thread worker/test/src/RTC/TestPipeProducerStreamManager.cpp Outdated
@jmillan jmillan merged commit 9f56bb1 into v3 Jun 10, 2026
43 checks passed
@jmillan jmillan deleted the new_consumer branch June 10, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants