rotate ID3D11Texture2D (#9772)

* Rotate ID3D11Texture2D after duplication with d3d11 video processor.
* If display is not rotated, nothing will be created; If the rotation
  fails, it will use the old fallback logic

TODO:
* If changing from Landscape to Landscape(flipped) during capture, the resolution is
  not changed, video service fallback to gdi directly.

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2024-11-08 12:12:10 +08:00
committed by GitHub
parent 7978e0301d
commit 740c5358ab
3 changed files with 236 additions and 15 deletions

View File

@@ -971,6 +971,7 @@ fn handle_one_frame(
}
match e.to_string().as_str() {
scrap::codec::ENCODE_NEED_SWITCH => {
encoder.disable();
log::error!("switch due to encoder need switch");
bail!("SWITCH");
}