Skip to content
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

Automatic GStreamer pipelines for testing cameras (New) #1676

Open
wants to merge 115 commits into
base: main
Choose a base branch
from

Conversation

tomli380576
Copy link
Contributor

@tomli380576 tomli380576 commented Jan 2, 2025

Description

This PR implements multiple GStreamer pipelines that tests if a camera is working properly. Given a source element and a Gst.Caps object, we can

  1. Take photos
  2. Record videos
  3. Show a viewfinder

The test script in provider/base/bin also iterates through all the elements and their caps using the output of Gst.DeviceMonitor.

Resolved issues

This is part of the new camera tests that we plan to implement https://warthogs.atlassian.net/browse/OEMQA-4698

  • Originally this was for testing MIPI cameras, but this more generic version handles USB cameras as well.

Documentation

Interpretation of the test result:

  • PASS means the following
    1. Cameras are visible to GStreamer (so applications like cheese, snapshot, and firefox with pipewire support enabled can see them)
    2. Each camera can execute the subcommand (photo, video, viewfinder) correctly using each of their advertised capability and produce a readable photo/video file if the subcommand is not viewfinder.
    3. The camera pipeline correctly terminates and there's no deadlock/hang inside the source element. (unfortunately this can't be handled by checkbox's timeout yet)

Tests

Unit tests

Real hardware:

  • 22.04 and 24.04 Laptops with USB cameras
  • 18.04 and 20.04 Virtual machines with v4l2 pass through

@tomli380576 tomli380576 marked this pull request as ready for review January 16, 2025 07:14
@tomli380576 tomli380576 marked this pull request as draft January 17, 2025 15:25
@tomli380576
Copy link
Contributor Author

Reverting back to draft because GLib's main loop doesn't seem to like checkbox's timeout, it causes the loop to hang for some reason

@tomli380576 tomli380576 marked this pull request as ready for review January 20, 2025 03:31
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.

1 participant