1. 10 Jan, 2021 1 commit
    • James Westman's avatar
      viewfinder: Fix freeze when switching cameras · b5bd52a6
      James Westman authored
      This was caused by the custom image capture pipeline. I've switched back to
      using camerabin's image capture. I don't particularly like having to use a temp
      file, but it will work for now.
      
      Also, fix a bug in the tests.
      
      Fixes #12.
      b5bd52a6
  2. 16 Dec, 2020 1 commit
  3. 15 Dec, 2020 1 commit
  4. 28 Aug, 2020 1 commit
  5. 27 Aug, 2020 4 commits
    • James Westman's avatar
      tests: Add ApertureCamera tests · 56ae7f3b
      James Westman authored
      Also, fix a refcounting bug that came up during testing.
      56ae7f3b
    • James Westman's avatar
      device-manager: Minor fixes · f058f2b5
      James Westman authored
      - Documentation updates
      - Refcounting
      f058f2b5
    • James Westman's avatar
      Use ApertureCamera objects instead of indexes · b21c1fe8
      James Westman authored
      Instead of using device manager indexes to represent cameras, use the new
      ApertureCamera objects.
      b21c1fe8
    • James Westman's avatar
      Add ApertureCamera and ApertureDevice · 1a778db5
      James Westman authored
      ApertureCamera objects represent a camera connected to the system. They can be
      obtained using an ApertureDeviceManager. This makes for a cleaner API, because
      operations on a specific camera can be done with an ApertureCamera object
      rather than on the device manager using an index.
      
      It also paves the way for device-specific code using ApertureDevice. This is a
      class that is meant to be subclassed for different devices, such as the
      PinePhone or Librem 5, that Aperture might be used on. These implementations
      will provide features such as camera flash and support for trickier camera
      switching cases. The implementation is chosen at runtime based on things like
      device tree name.
      
      ApertureDevice is a private API. It is considered an implementation detail and
      is not meant to be stable. ApertureCamera is mostly public, and applications
      can use it to get information about the camera and do things like turn on/off
      the flash. It also has some internal methods for working with GStreamer.
      1a778db5
  6. 16 Aug, 2020 1 commit
  7. 14 Aug, 2020 6 commits
  8. 08 Jul, 2020 1 commit
    • James Westman's avatar
      tests: Make ZBar-dependent tests skippable · 49da8fd4
      James Westman authored
      This way, distributions that do not intend to make their Aperture package
      depend on ZBar and its GStreamer plugin (although they should) do not have to
      patch Aperture in order for the tests to pass.
      
      In environments where ZBar should be a dependency and its absence would be an
      issue, the `barcode_tests_skippable` option in Meson should be set to `false`.
      49da8fd4
  9. 30 Jun, 2020 3 commits
    • James Westman's avatar
      tests: Fix /viewfinder/disconnect_camera · b2157a22
      James Westman authored
      The callback was never initialized, which sometimes caused errors.
      b2157a22
    • James Westman's avatar
      tests: Test the new viewfinder API · 609b544b
      James Westman authored
      609b544b
    • James Westman's avatar
      viewfinder: Async functions; redo error handling · b16a4591
      James Westman authored
      - Make aperture_viewfinder_take_picture() and
      aperture_viewfinder_stop_recording() async functions. This replaces the old
      method, which was to emit signals when the operation was finished.
      
      - aperture_viewfinder_take_picture() no longer saves the image to a file. It
      only returns a pixbuf, and it is up to the application to save it.
      
      - Redo error handling. The async functions now return errors when they fail,
      instead of putting the viewfinder in the error state or doing nothing.
      
      - Taking pictures is now done with a gdkpixbufsink rather than the image-capture
      signal on the camerabin. This is simpler because it gives the viewfinder more
      control over the process.
      
      Fixes #7.
      b16a4591
  10. 20 Jun, 2020 7 commits
    • James Westman's avatar
      5e9f3224
    • James Westman's avatar
      pipeline-tee: Fix removing branches · 4c5b3f52
      James Westman authored
      When a branch was removed, often a GStreamer pipeline error would occur because
      the operation was not completed in the right order (due to concurrency in
      GStreamer).
      
      Solved by adding a pad probe, which schedules an async call, which changes the
      state and removes the branch from the pipeline. This ensures everything is
      done in the right order.
      4c5b3f52
    • James Westman's avatar
      tests: Add barcode detection test · fdb2ddae
      James Westman authored
      This test uses the dummy device provider to create a camera feed with a QR
      code, then make sure the code is detected by the viewfinder.
      fdb2ddae
    • James Westman's avatar
      tests: Add a viewfinder test · 284ffb03
      James Westman authored
      284ffb03
    • James Westman's avatar
      viewfinder: Add camera-added handler · 43947a12
      James Westman authored
      Previously, if there were no cameras plugged in and you plug one in, the
      viewfinder would not notice. It would remain in the NO_CAMERAS state and you
      wouldn't be able to use it again.
      
      The new on_camera_added() handler checks whether the viewfinder is in the
      NO_CAMERAS state, and if so, sets the viewfinder to use the new camera.
      43947a12
    • James Westman's avatar
      tests: Generate test coverage reports · 1f000a36
      James Westman authored
      Generate test coverage reports and upload them as artifacts in CI.
      1f000a36
    • James Westman's avatar
      tests: Add device manager tests · 3faf9419
      James Westman authored
      Device manager tests are run using a dummy device provider in GStreamer. This
      way, they can run in a predictable manner and work even on machines that do
      not have cameras attached. This will also be important later when specific
      camera feeds are needed, such as in barcode detection testing.
      
      Also, organized the tests directory. Each section of the tests gets its own
      file, and main.c is used for registering and running all of those tests.
      
      Added a utils.c file for various test utility functions.
      3faf9419
  11. 19 Jun, 2020 1 commit
  12. 13 Jun, 2020 1 commit
  13. 05 Jun, 2020 3 commits
  14. 03 Jun, 2020 1 commit
  15. 28 May, 2020 6 commits
  16. 27 May, 2020 2 commits
    • James Westman's avatar
      docs: Build the documentation · 35916fc7
      James Westman authored
      Build documentation using gtk-doc.
      
      Moved a few things around to make the docs better. Private headers now have
      their own directory. Added a couple missing SECTION: comments. Fixed
      any other documentation problems that were causing gtk-doc warnings.
      
      Docs are published to GitLab Pages using CI.
      
      Fixes #9.
      35916fc7
    • James Westman's avatar
      Don't require such a new version of GLib · 903480bb
      James Westman authored
      g_list_store_find() was introduced in GLib 2.64, which hasn't landed in some of
      the build images that will be used for CI. This commit introduces a temporary
      replacement for that function.
      903480bb