fix: workaround physical display rotation (#9696)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-10-19 10:57:42 +08:00
committed by GitHub
parent 675ffe0381
commit 8c8a643cce
3 changed files with 21 additions and 6 deletions

View File

@@ -101,7 +101,12 @@ impl EncoderApi for VRamEncoder {
frame: EncodeInput,
ms: i64,
) -> ResultType<hbb_common::message_proto::VideoFrame> {
let texture = frame.texture()?;
let (texture, rotation) = frame.texture()?;
if rotation != 0 {
// to-do: support rotation
// Both the encoder and display(w,h) information need to be changed.
bail!("rotation not supported");
}
let mut vf = VideoFrame::new();
let mut frames = Vec::new();
for frame in self