-
Notifications
You must be signed in to change notification settings - Fork 25
fix: use current time when replaying resync state after CasparCG reconnect #436
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
Draft
dedicatedbroadcastsolutions
wants to merge
6
commits into
Sofie-Automation:main
Choose a base branch
from
dedicatedbroadcastsolutions:fix/casparcg_reconnect_resolve
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+152
−39
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7dc62cb
fix: use current time when replaying resync state
dedicatedbroadcastsolutions 0621939
test: satisfy lint and sonar in resync replay regression
dedicatedbroadcastsolutions 0dfb016
fix: port caspar reconnect runtime guards from release51
dedicatedbroadcastsolutions 278f62c
fix(conductor): dedupe replay selection and unify replay time sampling
dedicatedbroadcastsolutions ff69e5b
fix(casparcg): align clearAllChannels fps with detected priority
dedicatedbroadcastsolutions 34d10e8
test(conductor): extract shared conductor factory in spec
dedicatedbroadcastsolutions File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: Sofie-Automation/sofie-timeline-state-resolver
Length of output: 498
🏁 Script executed:
Repository: Sofie-Automation/sofie-timeline-state-resolver
Length of output: 15578
🏁 Script executed:
Repository: Sofie-Automation/sofie-timeline-state-resolver
Length of output: 13780
🏁 Script executed:
Repository: Sofie-Automation/sofie-timeline-state-resolver
Length of output: 1580
🏁 Script executed:
Repository: Sofie-Automation/sofie-timeline-state-resolver
Length of output: 3055
🏁 Script executed:
Repository: Sofie-Automation/sofie-timeline-state-resolver
Length of output: 4219
🏁 Script executed:
Repository: Sofie-Automation/sofie-timeline-state-resolver
Length of output: 7320
Fix interlaced FPS detection logic.
Line 1005 incorrectly uses
channelRate(field rate) for interlaced content when it should useframeRate(frame rate). In broadcast terminology,1080i50means 50 fields/second, which equals 25 frames/second. Using the field rate (50) for thefpsparameter will double all frame-based calculations (seek, duration conversions), producing incorrect playout timing.Change line 1005 from:
to:
Both interlaced and progressive formats should use
frameRateas the canonical FPS value.🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current seek behavior for CasparCG requires field rate for interlaced content for proper seeking rather than frame rate. I decided the safest thing would be to patch here rather than patch casparcg and break other clients that use seek. I verified this in 1080i5994, but it probably holds true for 1080i50. Someone in PAL land should verify this. If casparcg differs between the two then it needs patched instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dedicatedbroadcastsolutions, thank you for the clarification! You're absolutely right—CasparCG uses field rate motion for interlaced video formats, so usingchannelRate(field rate) for interlaced content is the correct approach for proper seek behavior. I apologize for the confusion in my initial review.Your decision to handle this requirement in TSR rather than patching CasparCG itself makes sense to maintain compatibility with other clients that depend on the current seek behavior.
Suggestion: Consider adding a brief comment above line 1005 to document this non-obvious requirement for future maintainers:
This will help prevent similar confusion in future code reviews.
✏️ Learnings added