chore: sync repository to current working state
Some checks failed
Build and Test / Build Server (Linux) (push) Has been cancelled
Build and Test / Build Agent (Windows) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Build Summary (push) Has been cancelled
Run Tests / Test Server (push) Has been cancelled
Run Tests / Test Agent (push) Has been cancelled
Run Tests / Code Coverage (push) Has been cancelled
Run Tests / Lint and Format Check (push) Has been cancelled
Some checks failed
Build and Test / Build Server (Linux) (push) Has been cancelled
Build and Test / Build Agent (Windows) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Build Summary (push) Has been cancelled
Run Tests / Test Server (push) Has been cancelled
Run Tests / Test Agent (push) Has been cancelled
Run Tests / Code Coverage (push) Has been cancelled
Run Tests / Lint and Format Check (push) Has been cancelled
Brings azcomputerguru/guru-connect up to the authoritative working copy that had been maintained in the claudetools monorepo: Phase 1 security and infrastructure (middleware, metrics, utils, token blacklist, deployment scripts, security audits) plus the native-remote-control integration spec. Preserves the repo .gitignore, .cargo, and server/static/downloads. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -120,32 +120,72 @@ impl SessionManager {
|
||||
}
|
||||
|
||||
tracing::info!("Initializing streaming resources...");
|
||||
tracing::info!("Capture config: use_dxgi={}, gdi_fallback={}, fps={}",
|
||||
self.config.capture.use_dxgi, self.config.capture.gdi_fallback, self.config.capture.fps);
|
||||
|
||||
// Get primary display
|
||||
let primary_display = capture::primary_display()?;
|
||||
// Get primary display with panic protection
|
||||
tracing::debug!("Enumerating displays...");
|
||||
let primary_display = match std::panic::catch_unwind(|| capture::primary_display()) {
|
||||
Ok(result) => result?,
|
||||
Err(e) => {
|
||||
tracing::error!("Panic during display enumeration: {:?}", e);
|
||||
return Err(anyhow::anyhow!("Display enumeration panicked"));
|
||||
}
|
||||
};
|
||||
tracing::info!("Using display: {} ({}x{})",
|
||||
primary_display.name, primary_display.width, primary_display.height);
|
||||
|
||||
// Create capturer
|
||||
let capturer = capture::create_capturer(
|
||||
primary_display.clone(),
|
||||
self.config.capture.use_dxgi,
|
||||
self.config.capture.gdi_fallback,
|
||||
)?;
|
||||
// Create capturer with panic protection
|
||||
// Force GDI mode if DXGI fails or panics
|
||||
tracing::debug!("Creating capturer (DXGI={})...", self.config.capture.use_dxgi);
|
||||
let capturer = match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
|
||||
capture::create_capturer(
|
||||
primary_display.clone(),
|
||||
self.config.capture.use_dxgi,
|
||||
self.config.capture.gdi_fallback,
|
||||
)
|
||||
})) {
|
||||
Ok(result) => result?,
|
||||
Err(e) => {
|
||||
tracing::error!("Panic during capturer creation: {:?}", e);
|
||||
// Try GDI-only as last resort
|
||||
tracing::warn!("Attempting GDI-only capture after DXGI panic...");
|
||||
capture::create_capturer(primary_display.clone(), false, false)?
|
||||
}
|
||||
};
|
||||
self.capturer = Some(capturer);
|
||||
tracing::info!("Capturer created successfully");
|
||||
|
||||
// Create encoder
|
||||
let encoder = encoder::create_encoder(
|
||||
&self.config.encoding.codec,
|
||||
self.config.encoding.quality,
|
||||
)?;
|
||||
// Create encoder with panic protection
|
||||
tracing::debug!("Creating encoder (codec={}, quality={})...",
|
||||
self.config.encoding.codec, self.config.encoding.quality);
|
||||
let encoder = match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
|
||||
encoder::create_encoder(
|
||||
&self.config.encoding.codec,
|
||||
self.config.encoding.quality,
|
||||
)
|
||||
})) {
|
||||
Ok(result) => result?,
|
||||
Err(e) => {
|
||||
tracing::error!("Panic during encoder creation: {:?}", e);
|
||||
return Err(anyhow::anyhow!("Encoder creation panicked"));
|
||||
}
|
||||
};
|
||||
self.encoder = Some(encoder);
|
||||
tracing::info!("Encoder created successfully");
|
||||
|
||||
// Create input controller
|
||||
let input = InputController::new()?;
|
||||
// Create input controller with panic protection
|
||||
tracing::debug!("Creating input controller...");
|
||||
let input = match std::panic::catch_unwind(InputController::new) {
|
||||
Ok(result) => result?,
|
||||
Err(e) => {
|
||||
tracing::error!("Panic during input controller creation: {:?}", e);
|
||||
return Err(anyhow::anyhow!("Input controller creation panicked"));
|
||||
}
|
||||
};
|
||||
self.input = Some(input);
|
||||
|
||||
tracing::info!("Streaming resources initialized");
|
||||
tracing::info!("Streaming resources initialized successfully");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user