Skip to content

RDKEMW-15473: Add FrameRate support and remove static assert#233

Open
kiruba115 wants to merge 1 commit intodevelopfrom
RDKEMW-15473-develop
Open

RDKEMW-15473: Add FrameRate support and remove static assert#233
kiruba115 wants to merge 1 commit intodevelopfrom
RDKEMW-15473-develop

Conversation

@kiruba115
Copy link
Copy Markdown
Contributor

RDKEMW-15473: Remove static assert which breaks compilation

….12.0 Remove unsupported framerates and only include framerates supported by all platforms

Remove static assert which breaks compilation
@kiruba115 kiruba115 requested a review from a team as a code owner March 25, 2026 17:46
Copilot AI review requested due to automatic review settings March 25, 2026 17:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes compile-time static_assert checks in the Device Settings FrameRate implementation to avoid a compilation break.

Changes:

  • Removed two static_asserts that verified _values / _names array sizes against dsVIDEO_FRAMERATE_MAX.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 79 to 81
namespace device {
static_assert(dsUTL_DIM(_values) == dsVIDEO_FRAMERATE_MAX, "Frame rate values array size mismatch");
static_assert(dsUTL_DIM(_names) == dsVIDEO_FRAMERATE_MAX, "Frame rate values array size mismatch");

const int FrameRate::kUnknown = dsVIDEO_FRAMERATE_UNKNOWN;
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

Removing the compile-time size checks for _values/_names drops the only guard that these lookup tables stay in sync with dsVIDEO_FRAMERATE_MAX. If the HAL adds a new frame-rate ID and dsVideoPortFrameRate_isValid() returns true for it, FrameRate(int id) will index past the end of these arrays.

Instead of deleting the checks, consider rewriting them in a way that compiles in this environment (e.g., use a sizeof(array)/sizeof(array[0]) expression or a small local constexpr helper) so mismatches are caught at build time.

Copilot uses AI. Check for mistakes.
Comment on lines 79 to 81
namespace device {
static_assert(dsUTL_DIM(_values) == dsVIDEO_FRAMERATE_MAX, "Frame rate values array size mismatch");
static_assert(dsUTL_DIM(_names) == dsVIDEO_FRAMERATE_MAX, "Frame rate values array size mismatch");

const int FrameRate::kUnknown = dsVIDEO_FRAMERATE_UNKNOWN;
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

PR title mentions "Add FrameRate support", but this change only removes two static_asserts. If additional FrameRate support changes are intended, they may be missing from this PR; otherwise, the title/description should be updated to reflect the actual change.

Copilot uses AI. Check for mistakes.
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