Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/python_testing/TC_AVSMTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ async def precondition_one_allocated_video_stream(self, streamUsage: Globals.Enu
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=streamUsage,
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_AVSM_2_11.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ async def test_TC_AVSM_2_11(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down
4 changes: 2 additions & 2 deletions src/python_testing/TC_AVSM_2_13.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async def test_TC_AVSM_2_13(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportResolution,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down Expand Up @@ -222,7 +222,7 @@ async def test_TC_AVSM_2_13(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportResolution,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_AVSM_2_18.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async def test_TC_AVSM_2_18(self):
min_resolution = min_viewport_resolution
min_bit_rate = trade_off_point.minBitRate
max_bit_rate = trade_off_point.minBitRate
min_frame_rate = min(15, video_sensor_params.maxFPS)
min_frame_rate = min(self.matter_test_config.min_frame_rate, video_sensor_params.maxFPS)
max_frame_rate = video_sensor_params.maxFPS
key_frame_interval = 4000

Expand Down
18 changes: 9 additions & 9 deletions src/python_testing/TC_AVSM_2_7.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ async def test_TC_AVSM_2_7(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down Expand Up @@ -293,7 +293,7 @@ async def test_TC_AVSM_2_7(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down Expand Up @@ -370,7 +370,7 @@ async def test_TC_AVSM_2_7(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=outOfConstraintStreamUsage,
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down Expand Up @@ -403,7 +403,7 @@ async def test_TC_AVSM_2_7(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=notSupportedStreamUsage,
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down Expand Up @@ -486,7 +486,7 @@ async def test_TC_AVSM_2_7(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand All @@ -513,7 +513,7 @@ async def test_TC_AVSM_2_7(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand All @@ -540,7 +540,7 @@ async def test_TC_AVSM_2_7(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand All @@ -567,7 +567,7 @@ async def test_TC_AVSM_2_7(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=10,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand All @@ -594,7 +594,7 @@ async def test_TC_AVSM_2_7(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS + 10,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_AVSM_VideoStreamsPersistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async def test_TC_AVSM_VideoStreamsPersistence(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
Copy link
Copy Markdown
Contributor

@marktrayer marktrayer Jun 3, 2026

Choose a reason for hiding this comment

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

You need to also update the check where this value is read back from the allocated streams.

maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_AVSUMTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ async def video_stream_allocate_command(self, endpoint, expected_status: Status
response = await self.send_single_cmd(cmd=Clusters.CameraAvStreamManagement.Commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=Clusters.CameraAvStreamManagement.Structs.VideoResolutionStruct(width=aVideoSensorParams.sensorWidth,
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_PAVSTTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async def allocate_one_video_stream(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewport,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_WEBRTCPTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def allocate_one_video_stream(self):
videoStreamAllocateCmd = commands.VideoStreamAllocate(
streamUsage=Globals.Enums.StreamUsageEnum.kLiveView,
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=cluster.Structs.VideoResolutionStruct(
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_WEBRTC_1_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async def allocate_video_stream(self, endpoint):
cmd=CameraAvStreamManagement.Commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=CameraAvStreamManagement.Structs.VideoResolutionStruct(
Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/TC_WEBRTC_Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async def allocate_video_stream(self, endpoint, devCtrl=None, node_id=None):
cmd=CameraAvStreamManagement.Commands.VideoStreamAllocate(
streamUsage=aStreamUsagePriorities[0],
videoCodec=aRateDistortionTradeOffPoints[0].codec,
minFrameRate=min(15, aVideoSensorParams.maxFPS),
minFrameRate=min(self.matter_test_config.min_frame_rate, aVideoSensorParams.maxFPS),
maxFrameRate=aVideoSensorParams.maxFPS,
minResolution=aMinViewportRes,
maxResolution=CameraAvStreamManagement.Structs.VideoResolutionStruct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ class MatterTestConfig:

# Debug mode to capture attribute dump at end of test modules
debug: bool = False
min_frame_rate: int = 30
Comment thread
pidarped marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ def convert_args_to_matter_config(args: argparse.Namespace):
config.endpoint = args.endpoint # This can be None, the get_endpoint function allows the tests to supply a default
config.restart_flag_file = args.restart_flag_file
config.debug = args.debug
config.min_frame_rate = args.min_frame_rate
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.

How would a client normally get this information? If this needs to be provided manually, wouldn't that make it a trial and error game for any real client attempting to interact with a camera?


# Map CLI arg to the current config field name used by tests
config.pipe_name = args.app_pipe
Expand Down Expand Up @@ -975,6 +976,8 @@ def parse_matter_test_args(argv: Optional[list[str]] = None):
help="The full path of the file to use to signal a restart to the app")
basic_group.add_argument('--debug', action="store_true", default=False,
help="Run the script in debug mode. This is needed to capture attribute dump at end of test modules if there are problems found during testing.")
basic_group.add_argument('--min-frame-rate', type=int, default=30,
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.

Given that this only applies to camera tests, does this need to be a top-level argument? Why not use the int-arg input for this?

help='Minimum frame rate for video stream allocation (default: 30)')
Comment thread
pidarped marked this conversation as resolved.
basic_group.add_argument('--timeout', type=int, help="Test timeout in seconds")
basic_group.add_argument("--PICS", help="PICS file path", type=str)

Expand Down
Loading