[feat] optimize macOS native video rendering

This commit is contained in:
dijunkun
2026-09-04 01:28:13 +08:00
parent 3f537ae63c
commit b031a3953e
4 changed files with 292 additions and 38 deletions
+4 -3
View File
@@ -141,9 +141,10 @@ int GuiRuntime::CreateConnectionPeer() {
sizeof(params_.log_path) - 1);
params_.log_path[sizeof(params_.log_path) - 1] = '\0';
params_.hardware_acceleration = config_center_->IsHardwareVideoCodec();
#if defined(_WIN32)
// Windows renderers retain pooled CPU NV12 frames or CUDA device frames and
// fall back to a packed CPU copy when native upload is unavailable.
#if defined(_WIN32) || defined(__APPLE__)
// Windows renderers retain pooled CPU NV12 frames or CUDA device frames;
// macOS retains VideoToolbox CVPixelBuffers for direct Metal sampling. Both
// platforms fall back to a packed CPU copy when native upload is unavailable.
params_.native_video_output = true;
#else
params_.native_video_output = false;