Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-07-24 Thread Hendrik Leppkes
On Sun, Mar 8, 2015 at 12:09 PM, Peter wrote: > alright, that table didn't work out, just imagine this: > > .\test.exe type a.txt | .\test.exe works > .\test.exe cat a.txt | .\test.exeworks > Get-Content input-file.txt | .\test.exe works > .\test.exe cat

Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-08 Thread Peter
alright, that table didn't work out, just imagine this: .\test.exe : > So testing on Windows 8.1 the results seem identical > > ||shell||command > ||stdin->_cnt > 0||WaitForSingleObject|| > ||=||=||===||===

Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-08 Thread Peter
So testing on Windows 8.1 the results seem identical ||shell||command ||stdin->_cnt > 0||WaitForSingleObject|| ||=||=||===||===|| ||cmd.exe || .\test.exe _cnt > 0" in that location ? 2015-03-0

Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Peter
Sadly it seems WaitForSingleObject behavior with FILE handles is not well defined behavior either, I think I've read the words "strongly discouraged" I'm probably still gonna do some more tests to see if it actually breaks under some circumstances. But this is not the golden ticket solution either

Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Hendrik Leppkes
On Sun, Mar 8, 2015 at 1:01 AM, Reimar Döffinger wrote: > On 08.03.2015, at 00:46, Peter wrote: >> Alright, I may have been really stupid, for some reason I always passed >> "input_handle" to read and WaitForSingleObject instead of stdin, no clue >> what happened there in my head. >> >> Turns out

Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Reimar Döffinger
On 08.03.2015, at 00:46, Peter wrote: > Alright, I may have been really stupid, for some reason I always passed > "input_handle" to read and WaitForSingleObject instead of stdin, no clue > what happened there in my head. > > Turns out this actually works in my initial tests: > > https://github.c

Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Peter
Alright, I may have been really stupid, for some reason I always passed "input_handle" to read and WaitForSingleObject instead of stdin, no clue what happened there in my head. Turns out this actually works in my initial tests: https://github.com/Bigpet/FFmpeg/commit/93864dd0373bc6561be8e45f14f83

Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Peter
>It checks if there is data in the buffer. The point is to do a non-blocking >read on stdin. I don't know how else to do that for stdin. Using WaitForSingleObject with generic functions like read() from io.h or ReadFile doesn't work since WaitForSingleObject will trigger on mouse and windows even

Re: [FFmpeg-devel] Windows deprecated stdin reading method

2015-03-07 Thread Reimar Döffinger
On 07.03.2015, at 16:51, Peter wrote: > The issue is this patch > https://github.com/FFmpeg/FFmpeg/commit/ca4d71b149ebe32aeaf617ffccf362624b9aafb1 > which uses a member of the FILE struct which is not available in the > new C runtime (it's now just a struct with a void*). > > I do not quite know