edgexfoundry / device-usb-camera

Owner: Device WG
Apache License 2.0
12 stars 28 forks source link

feat: SetFps v4l2 + ffmpeg command #265

Closed ChristianDarr-personal closed 1 year ago

ChristianDarr-personal commented 1 year ago

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

Testing Instructions

Note, any commands executed need to include the query parameter PathIndex with the value set to the number representing the video path stream intended. For example: http://localhost:59982/api/v3/url?PathIndex=0. Also it is recommended to use the updated postman collection.

  1. Execute the FrameRateFormat api to see supported fps values. This shows all fps values for each resolution for each type of encoding. This can be useful for determining the values to set the camera fps.
  2. Execute the DataFormat api to see the supported fps values for the current video format and encoding.
  3. Execute the SetFrameRate api and see no errors.The fps is represented in a time per frame format, meaning the denominator divided by the numerator yields the fps value. I did this to maintain consistency with the internal data structures. You can leave the numerator out completely, and the denominator will represent the fps value.
  4. Execute the GetFrameRate api and see that the fps match.
  5. Test the video stream and/or raw device stream to see if the changes apply. Certain video players seem to reset the fps value themselves, so it may not be viable to see the fps value of the /dev/video stream reflected in them.

New Dependency Instructions (If applicable)

codecov-commenter commented 1 year ago

Codecov Report

Merging #265 (defad8f) into main (7adbeca) will decrease coverage by 0.74%. The diff coverage is 0.00%.

:exclamation: Current head defad8f differs from pull request most recent head db557b0. Consider uploading reports for the commit db557b0 to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff            @@
##            main    #265      +/-   ##
========================================
- Coverage   4.95%   4.21%   -0.74%     
========================================
  Files          8       8              
  Lines        908    1067     +159     
========================================
  Hits          45      45              
- Misses       863    1022     +159     
Files Changed Coverage Δ
internal/driver/device.go 6.15% <0.00%> (-5.28%) :arrow_down:
internal/driver/driver.go 3.79% <0.00%> (-0.52%) :arrow_down:
internal/driver/ffmpeg.go 16.50% <0.00%> (ø)
internal/driver/metadata.go 0.00% <0.00%> (ø)
vyshali-chitikeshi commented 1 year ago

Validation looks good with get frame rate, get video data format and set fps api's.

vyshali-chitikeshi commented 1 year ago

Validation looks good