Skip to content

[Camera] Adds support for camera app yaml test cases through camera-controller #213

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

Open
wants to merge 2 commits into
base: v2.13-develop
Choose a base branch
from

Conversation

chulspro
Copy link

Problem

  • For the Camera Controller
  • Add SDP User Prompt and Video Prompt support in certification-tool/backend.
  • Add WebSocket based communication between certification-tool/backend and certification-tool/frontend to transfer video frames produced by camera-controller.

Change overview

  • Adds support for user prompt pop-up to receive Offer SDP / ICECandidate values from the test operator.
  • Adds support Video Verification pop up to verify WebRTC connection with DUT.

Testing

  • Excute TestHarness and check WebRTC Requestor/Provider operations

s-gatti added 2 commits April 24, 2025 08:33
Signed-off-by: Sathvik K Gatti <[email protected]>
Signed-off-by: Suyambulingam Rathinasamy Muthupandi <[email protected]>
Signed-off-by: Charles Kim <[email protected]>
Signed-off-by: Sathvik K Gatti <[email protected]>
Signed-off-by: Suyambulingam Rathinasamy Muthupandi <[email protected]>
Signed-off-by: Charles Kim <[email protected]>
@chulspro
Copy link
Author

@antonio-amjr: Thank you for your guidance. Could you please review this PR?

Copy link
Contributor

@antonio-amjr antonio-amjr left a comment

Choose a reason for hiding this comment

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

Hey @chulspro,

I left some suggestions below. Let me know if those make sense.

Comment on lines +178 to +182
if yaml_step.command in [
"UserPrompt",
"PromptWithResponse",
"VerifyVideoStream",
]:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think someone mentioned before, but anyway I think that would be good to store this array in a variable to use whenever necessary.

# if any step has a UserPrompt, PromptWithResponse or VerifyVideoStream command,
# categorize as semi-automated
if any(
s.command in ["UserPrompt", "PromptWithResponse", "VerifyVideoStream"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as before:
I think someone mentioned before, but anyway I think that would be good to store this array in a variable to use whenever necessary.

Comment on lines +51 to +56
try:
await websocket.accept()
logger.info(f'Websocket connected: "{websocket}".')
except RuntimeError as e:
logger.info(f'Failed to connect with error: "{e}".')
raise e
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it ok to replace for something similar to the websocket_endpoint()?
Like:

Suggested change
try:
await websocket.accept()
logger.info(f'Websocket connected: "{websocket}".')
except RuntimeError as e:
logger.info(f'Failed to connect with error: "{e}".')
raise e
socket_connection_manager = SocketConnectionManager()
await socket_connection_manager.connect(websocket)

Comment on lines +59 to +66
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
sock.bind((UDP_SOCKET_INTERFACE, UDP_SOCKET_PORT))
logger.info("UDP socket bound successfully")
loop = asyncio.get_event_loop()
while True:
data, _ = await loop.run_in_executor(None, sock.recvfrom, 65536)
# send data to ws
await websocket.send_bytes(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to use SocketConnectionManager() to handle those operations with a new method?

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