windows-capture icon indicating copy to clipboard operation
windows-capture copied to clipboard

[FEATURE ⭐] Simplify ``VideoEncoder::new_from_stream`` by not using ``IRandomAccessStream``

Open maxomatic458 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. 📝 No

Describe the solution you'd like 🔑 https://github.com/NiiightmareXD/windows-capture/blob/694f8aecbd4d0d8f0323ca96d2db633129e1bd1b/src/encoder.rs#L763-L767 In my opinion interaction with the windows API should be as minimal as possible, so maybe use a callback function, or a mpsc::Sender instead

maxomatic458 avatar Sep 10 '24 19:09 maxomatic458

is there maybe an example on how to use this function? Im unable to call Capture::start because the IRandomAccessStream does not implement Send how would i get the stream in the Capture struct then if not via the flags?

maxomatic458 avatar Sep 10 '24 20:09 maxomatic458

I'm not sure about this I want to give full access to the user but at the same time not exposing IRandomAccessStream is a good idea

NiiightmareXD avatar Sep 14 '24 07:09 NiiightmareXD