-
-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into dependency-descriptor
- Loading branch information
Showing
27 changed files
with
396 additions
and
165 deletions.
There are no files selected for viewing
This file contains 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
Submodule libjuice
updated
11 files
+4 −17 | CMakeLists.txt | |
+1 −1 | Makefile | |
+2 −2 | README.md | |
+17 −15 | include/juice/juice.h | |
+43 −10 | src/agent.c | |
+1 −0 | src/agent.h | |
+10 −0 | src/juice.c | |
+1 −1 | src/log.c | |
+10 −4 | src/picohash.h | |
+0 −1 | src/thread.h | |
+5 −5 | test/server.c |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Copyright (c) 2024 Sean DuBois <[email protected]> | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
#ifndef RTC_PACING_HANDLER_H | ||
#define RTC_PACING_HANDLER_H | ||
|
||
#if RTC_ENABLE_MEDIA | ||
|
||
#include "mediahandler.hpp" | ||
#include "utils.hpp" | ||
|
||
#include <atomic> | ||
#include <queue> | ||
|
||
namespace rtc { | ||
|
||
// Paced sending of RTP packets. It takes a stream of RTP packets that can have an uneven bitrate | ||
// and delivers them in a smoother manner by sending a fixed size of them on an interval | ||
class RTC_CPP_EXPORT PacingHandler : public MediaHandler { | ||
public: | ||
PacingHandler(double bitsPerSecond, std::chrono::milliseconds sendInterval); | ||
|
||
void outgoing(message_vector &messages, const message_callback &send) override; | ||
|
||
private: | ||
std::atomic<bool> mHaveScheduled = false; | ||
|
||
double mBytesPerSecond; | ||
double mBudget; | ||
|
||
std::chrono::milliseconds mSendInterval; | ||
std::chrono::time_point<std::chrono::high_resolution_clock> mLastRun; | ||
|
||
std::mutex mMutex; | ||
std::queue<message_ptr> mRtpBuffer; | ||
|
||
void schedule(const message_callback &send); | ||
}; | ||
|
||
} // namespace rtc | ||
|
||
#endif // RTC_ENABLE_MEDIA | ||
|
||
#endif // RTC_PACING_HANDLER_H |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.