fix: error forwarding in startStreaming#113
Merged
lenny-goodell merged 3 commits intoedgexfoundry:mainfrom Nov 14, 2022
Merged
Conversation
Signed-off-by: Darr, Christian <christian.darr@intel.com>
Signed-off-by: Darr, Christian <christian.darr@intel.com>
lenny-goodell
requested changes
Nov 9, 2022
Signed-off-by: Darr, Christian <christian.darr@intel.com>
farshidtz
approved these changes
Nov 13, 2022
Member
farshidtz
left a comment
There was a problem hiding this comment.
Looks good. Thanks for the fix!
I tested and could not reproduce the bug described in #23. It adds 1s delay to start requests, which is by design.
$ time curl -X PUT -d '{
"StartStreaming": {
"InputImageSize": "640x480",
"OutputVideoQuality": "5"
}
}' http://localhost:59882/api/v2/device/name/example-camera/StartStreaming
{"apiVersion":"v2","statusCode":200}
real 0m1.011s
user 0m0.004s
sys 0m0.004s
$ snap stop edgex-device-usb-camera.rtsp-simple-server
Stopped.
$ time curl -X PUT -d '{
"StartStreaming": {
"InputImageSize": "640x480",
"OutputVideoQuality": "5"
}
}' http://localhost:59882/api/v2/device/name/example-camera/StartStreaming
{"apiVersion":"v2","message":"request failed, status code: 500, err: {\"apiVersion\":\"v2\",\"message\":\"error writing DeviceResourece StartStreaming for example-camera -\\u003e the video streaming process for device example-camera has stopped, error: Failed Finish FFMPEG ([-nostats -loglevel 0 -y -s 640x480 -i /dev/video0 -qscale 5 -f rtsp -hls_list_size 0 rtsp://localhost:8554/stream/example-camera]) with exit status 1 message -\\u003e Failed Finish FFMPEG ([-nostats -loglevel 0 -y -s 640x480 -i /dev/video0 -qscale 5 -f rtsp -hls_list_size 0 rtsp://localhost:8554/stream/example-camera]) with exit status 1 message \",\"statusCode\":500}","statusCode":500}
real 0m0.518s
user 0m0.000s
sys 0m0.007s
ajcasagrande
approved these changes
Nov 14, 2022
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #23
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:
BREAKING CHANGE:describing the break)Testing Instructions
Make sure that the service is not streaming. Then, execute the startStreaming command, making sure that it should create an error (invalid input, etc). The rest response should be an error code with a description of the error.
New Dependency Instructions (If applicable)