summaryrefslogtreecommitdiffstats
path: root/osdep/macosx_application.m
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 /osdep/macosx_application.m
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 'osdep/macosx_application.m')
-rw-r--r--osdep/macosx_application.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m
index 9b62eb68b2..37c3d40773 100644
--- a/osdep/macosx_application.m
+++ b/osdep/macosx_application.m
@@ -26,6 +26,7 @@
#import "osdep/macosx_application_objc.h"
#include "osdep/macosx_compat.h"
#import "osdep/macosx_events_objc.h"
+#include "osdep/threads.h"
#define MPV_PROTOCOL @"mpv://"
@@ -283,6 +284,7 @@ struct playback_thread_ctx {
static void *playback_thread(void *ctx_obj)
{
+ mpthread_set_name("playback core (OSX)");
@autoreleasepool {
struct playback_thread_ctx *ctx = (struct playback_thread_ctx*) ctx_obj;
ctx->mpv_main(*ctx->argc, *ctx->argv);