mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
19 lines
486 B
C++
19 lines
486 B
C++
#include "cscore.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "llvm/raw_ostream.h"
|
|
|
|
int main() {
|
|
llvm::outs() << "hostname: " << cs::GetHostname() << '\n';
|
|
llvm::outs() << "IPv4 network addresses:\n";
|
|
for (const auto& addr : cs::GetNetworkInterfaces())
|
|
llvm::outs() << " " << addr << '\n';
|
|
cs::USBCamera camera{"usbcam", 1};
|
|
camera.SetVideoMode(cs::VideoMode::kMJPEG, 320, 240, 30);
|
|
cs::MJPEGServer mjpegServer{"httpserver", 8081};
|
|
mjpegServer.SetSource(camera);
|
|
|
|
getchar();
|
|
}
|