Skip to content

Restart video delay - #13054

Merged
DonLakeFlyer merged 2 commits into
Stable_V5.0from
RestartVideoDelay
Jun 21, 2025
Merged

DonLakeFlyer merged 2 commits into
Stable_V5.0from
RestartVideoDelay

Conversation

@DonLakeFlyer

@DonLakeFlyer DonLakeFlyer commented Jun 20, 2025 •

Copy link
Copy Markdown
Contributor

Only restart video ofter a 1 second delay. This way we don't hammer the main thread when the video server isn't there yet on the other end of the connection.

Fix #13051

This way we don't hammer the main thread with silly work
@DonLakeFlyer
DonLakeFlyer requested review from HTRamsey and Copilot June 20, 2025 16:43
@DonLakeFlyer

Copy link
Copy Markdown
Contributor Author

This need to go over to master as well

Copilot AI 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.

Pull Request Overview

Adds a one-second delay before restarting a video receiver to avoid overwhelming the main thread when the video server isn't ready, plus enhanced logging and safety checks.

  • Enhanced debug output in GstVideoReceiver::start and added parameter validation in the bus message callback.
  • Introduced a 1 s delayed restart in VideoManager via QTimer::singleShot.
  • Added the necessary #include .

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/VideoManager/VideoReceiver/GStreamer/GstVideoReceiver.cc Extended startup log; added null-check and critical logging in _onBusMessage.
src/VideoManager/VideoManager.cc Included QTimer; wrapped _startReceiver in a 1 s delayed lambda on stop completion.

@dakejahl

Copy link
Copy Markdown
Collaborator

I thought I fixed it here
https://github.com/mavlink/qgroundcontrol/pull/12787/files

but I guess timeout must be a different kind of failure

@DonLakeFlyer

Copy link
Copy Markdown
Contributor Author

Nope, that's only if there is a failure on stream setup. If the stream setup succeeds but then can't connect then the stream gets stopped and restarted. Different path.

@DonLakeFlyer
DonLakeFlyer merged commit 18c1fdf into Stable_V5.0 Jun 21, 2025
@DonLakeFlyer
DonLakeFlyer deleted the RestartVideoDelay branch June 21, 2025 16:47
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.

4 participants