@rbernon The change which the blamed commit (unintentionally) introduced is that after loosing debug info critical sections started to use slower semaphore path. I sent a patch for that (https://gitlab.winehq.org/wine/wine/-/merge_requests/5379) which fixes mentioned 2 mf tests here. But I think that blamed patch most likely only uncovered a pre-existing race in either mf implementation or mf tests, I didn't debug that part.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5261#note_65695
This matches the Windows behavior: the contents/size of an IMMDeviceCollection do not change after it's created. Any unplugged devices remain in the collection (but with a changed state).
This shouldn't change anything on Wine since it currently doesn't add/remove devices after initialization, but is needed to add that in the future.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5376
Since we are adding more and more media formats to wg_format, the current wg_format struct is getting ugly.
Everytime we add a video format, we need to duplicate width, height, fps. Everytime we add a audio format, we need to duplicate channels, rate. So it would be better if we could share width, height, fps fields between different video formats, also share channels and rate fields between different audio formats.
What makes me found the current wg_format is not in a good shape is when I was writting code for Proton, I found that I need to write some code like this if want to get width/height/fps from a wg_format:
```
static bool get_video_info_from_wg_format(struct wg_format *format,
int32_t *width, int32_t *height, uint32_t *fps_n, uint32_t *fps_d)
{
switch (format->major_type)
{
case WG_MAJOR_TYPE_VIDEO:
*width = format->u.video.width;
*height = format->u.video.height;
*fps_n = format->u.video.fps_n;
*fps_d = format->u.video.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_CINEPAK:
*width = format->u.video_cinepak.width;
*height = format->u.video_cinepak.height;
*fps_n = format->u.video_cinepak.fps_n;
*fps_d = format->u.video_cinepak.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_H264:
*width = format->u.video_h264.width;
*height = format->u.video_h264.height;
*fps_n = format->u.video_h264.fps_n;
*fps_d = format->u.video_h264.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_WMV:
*width = format->u.video_wmv.width;
*height = format->u.video_wmv.height;
*fps_n = format->u.video_wmv.fps_n;
*fps_d = format->u.video_wmv.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_INDEO:
*width = format->u.video_indeo.width;
*height = format->u.video_indeo.height;
*fps_n = format->u.video_indeo.fps_n;
*fps_d = format->u.video_indeo.fps_d;
return true;
case WG_MAJOR_TYPE_VIDEO_MPEG1:
*width = format->u.video_mpeg1.width;
*height = format->u.video_mpeg1.height;
*fps_n = format->u.video_mpeg1.fps_n;
*fps_d = format->u.video_mpeg1.fps_d;
return true;
default:
GST_ERROR("Type %d is not a video format.\n", format->major_type);
return false;
}
}
```
Apparently, the code above is ugly. By refactoring wg_format, we can avoid code like this.
This patch is a draft now, it only contains unixlib.h code.
Zeb, I'd like to confirm that if this refactoring would be acceptable for you. If do, I'll continue finishing the remaining parts.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5369
When a process is made a system process, `release_thread_desktop( thread, 0 )` is called and we remove the process threads from their desktop thread list, as well as decrementing the desktop user count. Later, when the process gets killed on shutdown, `release_thread_desktop( thread, 1 )` is called, and we remove the thread list node again.
This is 1) wrong, we only want to decrement the desktop user count in this case, and 2) causes an invalid write and corrupts the list the second time we remove the entry.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5375
First part of Proton shared memory series. The full branch can be seen at https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories.
--
v27: win32u: Use the desktop shared data for GetCursorPos.
server: Move the last cursor time to the desktop session object.
server: Move the cursor position to the desktop session object.
win32u: Open desktop shared objects from session mapping.
server: Return the desktop object info in get_thread_desktop.
server: Allocate shared session object for desktops.
win32u: Open the global session shared mapping.
include: Add ReadNoFence64 inline helpers.
server: Create a global session shared mapping.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3103