Skip to content

Conversation

@Alan-Jowett
Copy link
Member

@Alan-Jowett Alan-Jowett commented Nov 29, 2025

Note:

This PR is working, but media stream only functions when frame period is > timer granularity. Attempting with a frame rate > timer frequency results in failures in the media stream validation code.

This pull request introduces significant refactoring and enhancements to the media streaming functionality, especially around the IO pattern architecture and test suite. The changes primarily rename and split the previous "MediaStream" IO pattern into more explicit "MediaStreamPull" and "MediaStreamPush" variants, update related test code, and add a standard hash specialization for ctSockaddr. Below are the most important changes grouped by theme:

IO Pattern Refactoring and Enhancements

  • The IoPatternType::MediaStream enum value is renamed and split into MediaStreamPull and MediaStreamPush, providing clearer semantics for different streaming modes. All references in ctsConfig.cpp, ctsConfig.h, and ctsIOPattern.cpp are updated accordingly. [1] [2] [3] [4] [5] [6] [7] [8]
  • The IO pattern implementation is refactored: ctsIoPatternMediaStreamServer is replaced by ctsIoPatternMediaStreamSender and ctsIoPatternMediaStreamReceiver to match the new pull/push semantics. Instantiation logic is updated to use the appropriate class based on the pattern and whether the socket is in listening mode. [1] [2]

Unit Test Updates

  • The unit test ctsMediaStreamServerConnectedSocketUnitTest.cpp is updated to use ctsMediaStreamSender instead of the removed ctsMediaStreamServerConnectedSocket, including constructor and callback type changes. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
  • Test method calls are updated from ScheduleTask to QueueTask to reflect the new interface in ctsMediaStreamSender. [1] [2] [3] [4] [5]
  • The test project file is updated to compile against ctsMediaStreamSender.cpp instead of the removed ctsMediaStreamServerConnectedSocket.cpp.

General Library Improvements

  • A std::hash specialization for ctl::ctSockaddr is added, allowing it to be used as a key in unordered containers without requiring custom hash functors. [1] [2]
  • The type of the thread pool pointer in ctsConnectEx.cpp is generalized from ctThreadIocp to ctThreadIocp_base for improved abstraction.

These changes collectively modernize the media streaming architecture, clarify IO pattern usage, and improve test maintainability and code flexibility.

Alan Jowett added 8 commits November 29, 2025 15:34
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
@Alan-Jowett Alan-Jowett force-pushed the bidirectional_media_stream branch from 0d7a5db to 374f60d Compare November 30, 2025 23:59
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant