mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Implement frame timestamps and use wpi::Now() for generation.
This commit is contained in:
@@ -401,9 +401,7 @@ void MJPEGServerImpl::SendStream(wpi::raw_socket_ostream& os) {
|
||||
// print the individual mimetype and the length
|
||||
// sending the content-length fixes random stream disruption observed
|
||||
// with firefox
|
||||
double timestamp = std::chrono::duration_cast<std::chrono::seconds>(
|
||||
frame.time().time_since_epoch())
|
||||
.count();
|
||||
double timestamp = frame.time() / 10000000.0;
|
||||
header.clear();
|
||||
oss << "Content-Type: image/jpeg\r\n"
|
||||
<< "Content-Length: " << frame.size() << "\r\n"
|
||||
|
||||
Reference in New Issue
Block a user