robmikh / displayrecorder

A utility to record displays.
MIT License
15 stars 7 forks source link

ARM64 version doesn't work #2

Open robmikh opened 3 years ago

robmikh commented 3 years ago

Testing v0.1.0 on a Surface Pro X ends with E_INVALIDARG:

thread 'main' panicked at 'HRESULT 0x80070057', src\main.rs:149:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
robmikh commented 3 years ago

E_INVALIDARG is coming from IMFTransform::ProcessInput:

0:011> kc
 # Call Site
00 KERNELBASE!RaiseException
01 combase!SendReport
02 combase!RoOriginateError
03 displayrecorder!windows::runtime::error::RoOriginateError
04 displayrecorder!windows::runtime::error::Error::new
05 displayrecorder!windows::runtime::error::{{impl}}::from
06 displayrecorder!core::convert::{{impl}}::into<windows::runtime::hresult::HRESULT,windows::runtime::error::Error>
07 displayrecorder!windows::runtime::hresult::HRESULT::ok
08 displayrecorder!windows::Windows::Win32::Media::MediaFoundation::IMFTransform::ProcessInput<windows::Windows::Win32::Media::MediaFoundation::IMFSample>
09 displayrecorder!displayrecorder::video::encoder::VideoEncoderInner::on_transform_input_requested
0a displayrecorder!displayrecorder::video::encoder::VideoEncoderInner::encode
0b displayrecorder!displayrecorder::video::encoder::{{impl}}::try_start::{{closure}}
0c displayrecorder!std::sys_common::backtrace::__rust_begin_short_backtrace<closure-0,enum$<core::result::Result<tuple<>, windows::runtime::error::Error>>>
0d displayrecorder!std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}<closure-0,enum$<core::result::Result<tuple<>, windows::runtime::error::Error>>>
0e displayrecorder!std::panic::{{impl}}::call_once<enum$<core::result::Result<tuple<>, windows::runtime::error::Error>>,closure-0>
0f displayrecorder!std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,enum$<core::result::Result<tuple<>, windows::runtime::error::Error>>>
10 displayrecorder!std::panicking::try::do_catch<std::panic::AssertUnwindSafe<closure-0>,enum$<core::result::Result<tuple<>, windows::runtime::error::Error>>>
11 displayrecorder!std::panicking::try<enum$<core::result::Result<tuple<>, windows::runtime::error::Error>>,std::panic::AssertUnwindSafe<closure-0>>
12 displayrecorder!std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,enum$<core::result::Result<tuple<>, windows::runtime::error::Error>>>
13 displayrecorder!std::thread::{{impl}}::spawn_unchecked::{{closure}}<closure-0,enum$<core::result::Result<tuple<>, windows::runtime::error::Error>>>
14 displayrecorder!core::ops::function::FnOnce::call_once<closure-0,tuple<>>
15 displayrecorder!alloc::boxed::{{impl}}::call_once
16 displayrecorder!alloc::boxed::{{impl}}::call_once
17 displayrecorder!std::sys::windows::thread::{{impl}}::new::thread_start
18 KERNEL32!BaseThreadInitThunk
19 ntdll!RtlUserThreadStart
robmikh commented 9 months ago

The Windows.Media.Transcoding backend works on ARM64.