fix: web camera

This commit is contained in:
DLUTdky 2025-07-22 01:33:58 +08:00
parent e7c8d3fb9e
commit 8106f54ae7
1 changed files with 3 additions and 3 deletions

View File

@ -86,7 +86,7 @@ public class HttpVideoStreamService : BackgroundService
{
private static readonly NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
private HttpListener? _httpListener;
private readonly int _serverPort = 8080;
private readonly int _serverPort = 4321;
private readonly int _frameRate = 30; // 30 FPS
// 动态分辨率配置
@ -412,9 +412,9 @@ public class HttpVideoStreamService : BackgroundService
{
if (_usbCamera == null)
{
_usbCamera = new VideoCapture(0);
_usbCamera = new VideoCapture(1);
_usbCamera.Fps = _frameRate;
_usbCamera.FrameWidth = _frameWidth;
_usbCamera.FrameWidth = _frameWidth;
_usbCamera.FrameHeight = _frameHeight;
_usbCameraEnable = _usbCamera.IsOpened();
}