summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-19 23:32:34 +0200
committerwm4 <wm4@nowhere>2014-10-19 23:48:40 +0200
commit9ba66418790f184339ad3a891f525d54459d6369 (patch)
tree0ddfa7df4ba0e7684ee9b12938c0dc07f4c5f64b /video
parentc6dca55665e2710163437f09c04033d4b30e2e1a (diff)
downloadmpv-9ba66418790f184339ad3a891f525d54459d6369.tar.bz2
mpv-9ba66418790f184339ad3a891f525d54459d6369.tar.xz
Set thread name for debugging
Especially with other components (libavcodec, OSX stuff), the thread list can get quite populated. Setting the thread name helps when debugging. Since this is not portable, we check the OS variants in waf configure. old-configure just gets a special-case for glibc, since doing a full check here would probably be a waste of effort.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo.c3
-rw-r--r--video/out/w32_common.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/video/out/vo.c b/video/out/vo.c
index fcc15e4008..9f6021282f 100644
--- a/video/out/vo.c
+++ b/video/out/vo.c
@@ -47,6 +47,7 @@
#include "video/vfcap.h"
#include "sub/osd.h"
#include "osdep/io.h"
+#include "osdep/threads.h"
extern const struct vo_driver video_out_x11;
extern const struct vo_driver video_out_vdpau;
@@ -666,6 +667,8 @@ static void *vo_thread(void *ptr)
struct vo *vo = ptr;
struct vo_internal *in = vo->in;
+ mpthread_set_name("vo");
+
int r = vo->driver->preinit(vo) ? -1 : 0;
mp_rendezvous(vo, r); // init barrier
if (r < 0)
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index 541000a7f9..600aa26716 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -34,6 +34,7 @@
#include "win_state.h"
#include "w32_common.h"
#include "osdep/io.h"
+#include "osdep/threads.h"
#include "osdep/w32_keyboard.h"
#include "misc/dispatch.h"
#include "misc/rendezvous.h"
@@ -990,6 +991,8 @@ static void *gui_thread(void *ptr)
bool ole_ok = false;
int res = 0;
+ mpthread_set_name("win32 window");
+
HINSTANCE hInstance = GetModuleHandleW(NULL);
WNDCLASSEXW wcex = {