Fixed response descriptions for stream/RAM capture
This commit is contained in:
parent
c81c4eb64d
commit
00531a93bf
2 changed files with 24 additions and 5 deletions
|
|
@ -66,12 +66,15 @@ class CaptureAPI(ActionView):
|
|||
|
||||
|
||||
class RAMCaptureAPI(ActionView):
|
||||
"""
|
||||
Take a non-persistant image capture.
|
||||
"""
|
||||
"""Take a non-persistent image capture."""
|
||||
|
||||
args = BasicCaptureArgs()
|
||||
responses = {200: {"content_type": "image/jpeg"}}
|
||||
responses = {
|
||||
200: {
|
||||
"content_type": "image/jpeg",
|
||||
"description": "A JPEG image, representing the capture"
|
||||
}
|
||||
}
|
||||
|
||||
def post(self, args):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -17,7 +17,23 @@ class MjpegStream(PropertyView):
|
|||
Real-time MJPEG stream from the microscope camera
|
||||
"""
|
||||
|
||||
responses = {200: {"content_type": "multipart/x-mixed-replace"}}
|
||||
responses = {
|
||||
200: {
|
||||
"content_type": "multipart/x-mixed-replace",
|
||||
"description": (
|
||||
"An MJPEG stream of camera images.\n\n"
|
||||
"This endpoint will serve JPEG images sequentially, \n"
|
||||
"with each frame separated by `--frame` and a \n"
|
||||
"`Content-Type: image/jpeg` header.\n"
|
||||
"Using this endpoint as the `src` of an HTML `<img>` \n"
|
||||
"tag will result in the video stream displaying without \n"
|
||||
"further effort.\n\n"
|
||||
"If you save the stream to disk (e.g. with `curl`), be \n"
|
||||
"aware that the text in between frames may confuse some \n"
|
||||
"video players."
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
def get(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue