Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance: RTCRtpSender.SyncApplicationFramerate #950

Merged
merged 7 commits into from
Sep 1, 2023

Conversation

karasusan
Copy link
Collaborator

@karasusan karasusan commented Jul 12, 2023

This implements Frame synchronization mode.
#803

@karasusan karasusan changed the title feat: RTCRtpSender.SyncApplicationFramerate performance: RTCRtpSender.SyncApplicationFramerate Jul 12, 2023
@karasusan karasusan force-pushed the fix/syncapplicationframerate branch from 401d407 to 688fa92 Compare August 8, 2023 08:49
{
taskQueue_ = std::make_unique<rtc::TaskQueue>(
taskQueueFactory->CreateTaskQueue("VideoFrameScheduler", TaskQueueFactory::Priority::NORMAL));
scheduler_ = std::make_unique<VideoFrameScheduler>(taskQueue_->Get());
scheduler_->Start(std::bind(&UnityVideoTrackSource::CaptureNextFrame, this));
scheduler_->Start(std::bind(&UnityVideoTrackSource::OnUpdateVideoFrame, this));

Choose a reason for hiding this comment

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

Shouldn't this line be wrapped with if (!syncApplicationFramerate_)?

Or alternatively, Start unconditionally but immediately Pause if syncApplicationFramerate_ is true? Since I see you're kind of relying on scheduler to be active, in the SetSyncApplicationFramerate function below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@vl4dimir
OK, I fixed the constructor to pause the scheduler at first and make syncApplicationFramerate_ true by default.

@karasusan karasusan marked this pull request as ready for review August 30, 2023 09:13
@karasusan karasusan merged commit 84718a6 into main Sep 1, 2023
@karasusan karasusan deleted the fix/syncapplicationframerate branch September 1, 2023 03:14
@vl4dimir
Copy link

vl4dimir commented Sep 5, 2023

@karasusan Thanks for fixing this! Is there a plan for when this will be packaged so we can try it out?

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.

2 participants