fix: web camera
This commit is contained in:
		@@ -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();
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user