Skip to content

Conversation

@davidhuwmorgan
Copy link

input_http only works with mjpg-streamer because the boundary name is hard coded. Also it doesn't handle the mime type correctly. There is rather good description of how to do it at "https://stackoverflow.com/questions/47729941/mjpeg-over-http-specification". Thank you Remy Lebeau. The main loop no longer uses a byte by byte copy. Instead, it determines the length of the frame from the boundary header and then collects the individual TCP buffers, storing them using memcpy. Also fixed some of the error handling and added a timeout for the socket.

input_http only works with mjpg-streamer because the boundary name is hard coded.
Also it doesn't handle the mime type correctly. There is rather good description of how to do it at "https://stackoverflow.com/questions/47729941/mjpeg-over-http-specification". Thank you Remy Lebeau.
The main loop no longer uses a byte by byte copy. Instead, it determines the length of the frame from the boundary header and then collects the individual TCP buffers, storing them using memcpy.
Also fixed some of the error handling in the error handling and added a timeout for the socket.
Add readme file
@davidhuwmorgan
Copy link
Author

Also added change to output_http to allow streams to be included in web pages. The string matcher included the root directory ('/' ) which restricts streams to the root only. Now any stream requests that includes "action=stream" will be accepted.
I did not remove the restriction from any other request types.

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