summaryrefslogtreecommitdiffstats
path: root/osdep/windows_utils.c
Commit message (Collapse)AuthorAgeFilesLines
* win32: implement shell link target resolvingnanahi2024-03-191-0/+22
| | | | | Adds a function to resolve the target of a shell link (Windows shortcut) for use by other parts of mpv.
* various: sort some standard headersNRK2023-10-201-2/+2
| | | | | | | | | | | | since i was going to fix the include order of stdatomic, might as well sort the surrouding includes in accordance with the project's coding style. some headers can sometime require specific include order. standard library headers usually don't. but mpv might "hack into" the standard headers (e.g pthreads) so that complicates things a bit more. hopefully nothing breaks. if it does, the style guide is to blame.
* various: remove ATOMIC_VAR_INITNRK2023-10-201-1/+1
| | | | | | | | | | | the fallback needed it due to the struct wrapper. but the fallback is now removed so it's no longer needed. as for standard atomics, it was never really needed either, was useless and then made obsolete in C17 and removed in C23. ref: https://gustedt.wordpress.com/2018/08/06/c17-obsoletes-atomic_var_init/ ref: https://en.cppreference.com/w/c/atomic/ATOMIC_VAR_INIT
* osdep: remove atomic.hNRK2023-10-201-1/+1
| | | | | | | replace it with <stdatomic.h> and replace the mp_atomic_* typedefs with explicit _Atomic qualified types. also add missing config.h includes on some files.
* subprocess-win: update to mp_subprocess2James Ross-Gowan2020-07-201-0/+69
| | | | | | | | | | | | | | | | | | | This fixes the "run" and "subprocess" commands on Windows, including youtube-dl support. Unix-like FD inheritance is emulated on Windows by using an undocumented data structure[1] that gets passed to the newly created process in STARTUPINFO.lpReserved2. It consists of two sparse arrays listing the HANDLE and internal CRT flags corresponding to each FD. This structure is used and understood primarily by MSVCRT, but there are other runtimes and frameworks that can write it, like libuv. The code for creating asynchronous "anonymous" pipes in Windows has been enhanced and moved into windows_utils.c. This is mainly an artifact of an unfinished future change to support anonymous IPC clients in Windows. Right now, it's still only used in subprocess-win.c [1]: https://www.catch22.net/tuts/undocumented-createprocess
* vo_opengl: angle: rewrite with custom swap chainJames Ross-Gowan2017-02-071-0/+8
| | | | | | | | | | | | | This replaces the old backend that exclusively used EGL windowing with one that can also use ANGLE's ability to render to directly to a texture. The advantage of this is that it allows mpv to create the swap chain itself and this allows mpv to use a flip-mode swap chain on a HWND (which avoids problems with DirectComposition) and to use a longer swap chain that has six backbuffers by default (which reportedly fixes problems with rendering 24fps video on 24Hz monitors.) Also, "screenshot window" should now work on DXGI 1.2 and up (Windows 8 and up.)
* windows_utils: try and use FormatMessage for errors.Kevin Mitchell2016-02-171-2/+22
| | | | | | This is useful in particular for GetLastError, unfortunately, it's stil pretty dumb with regards to WASAPI or D3D specific errors, so keep the hresult_to_string switch.
* dxva2: use mp_HESULT_to_str on FAILED(hr)Kevin Mitchell2016-02-161-0/+35
|
* ao_wasapi: move out some utility functionswm42016-01-111-0/+97
Note that hresult_to_str() (coming from wasapi_explain_err()) is mostly wasapi-specific, but since HRESULT error codes are unique, it can be extended for any other use.