Commit 36017f9c authored by Steve Lhomme's avatar Steve Lhomme
Browse files

modules: add a fancy name to internal threads

parent a2e0adec
Pipeline #222078 passed with stage
in 15 minutes and 20 seconds
......@@ -157,6 +157,8 @@ static void *Thread (void *data)
size_t bytes;
int canc, val;
vlc_thread_set_name("vlc-alsa");
canc = vlc_savecancel ();
bytes = snd_pcm_frames_to_bytes (pcm, sys->period_size);
val = snd_pcm_start (pcm);
......
......@@ -70,6 +70,8 @@ vlc_access_cache_Thread(void *data)
{
struct vlc_access_cache *cache = data;
vlc_thread_set_name("vlc-axs-cache");
vlc_mutex_lock(&cache->lock);
while (cache->running)
{
......
......@@ -323,6 +323,8 @@ static void* Raw1394EventThread( void *obj )
int result = 0;
int canc = vlc_savecancel();
vlc_thread_set_name("vlc-dv-1394");
AVCPlay( p_access, p_sys->i_node );
vlc_cleanup_push( Raw1394EventThreadCleanup, p_ev );
vlc_restorecancel( canc );
......
......@@ -791,6 +791,8 @@ static void *vlc_h2_recv_thread(void *data)
struct vlc_h2_parser *parser;
int canc, val;
vlc_thread_set_name("vlc-h2-recv");
canc = vlc_savecancel();
parser = vlc_h2_parse_init(conn, &vlc_h2_parser_callbacks);
if (unlikely(parser == NULL))
......
......@@ -260,6 +260,8 @@ static void *vlc_h2_output_thread(void *data)
struct vlc_h2_output *out = data;
struct vlc_h2_frame *frame;
vlc_thread_set_name("vlc-h2-send");
while ((frame = vlc_h2_output_dequeue(out)) != NULL)
{
if (vlc_h2_frame_send(out->tls, frame))
......@@ -288,6 +290,8 @@ static void *vlc_h2_client_output_thread(void *data)
static const char http2_hello[] = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
struct vlc_h2_output *out = data;
vlc_thread_set_name("vlc-h2-csend");
if (vlc_https_send(out->tls, http2_hello, 24) < 24)
{
vlc_mutex_lock(&out->lock);
......
......@@ -1587,6 +1587,8 @@ static void *KeepAliveThread( void *p_data )
stream_t *p_access = p_data;
access_sys_t *p_sys = p_access->p_sys;
vlc_thread_set_name("vlc-mms-keep");
do /* Send keep-alive every ten seconds */
mms_CommandSend( p_access, 0x1b, 0, 0, NULL, 0 );
while (vlc_sem_timedwait( &p_sys->keep_alive.sem,
......
......@@ -336,6 +336,8 @@ static void *DemuxThread( void *p_data )
vlc_tick_t i_next_frame_date = vlc_tick_now() + p_sys->i_frame_interval;
int i_ret;
vlc_thread_set_name("vlc-rdp");
for(;;)
{
i_ret = 0;
......
......@@ -105,6 +105,8 @@ void *rtp_dgram_thread (void *opaque)
vlc_tick_t deadline = VLC_TICK_INVALID;
struct vlc_dtls *rtp_sock = sys->rtp_sock;
vlc_thread_set_name("vlc-rtp");
for (;;)
{
struct pollfd ufd[1];
......
......@@ -441,6 +441,9 @@ static void *satip_thread(void *data) {
vlc_tick_t last_recv = vlc_tick_now();
ssize_t len;
vlc_tick_t next_keepalive = vlc_tick_now() + vlc_tick_from_sec(sys->keepalive_interval);
vlc_thread_set_name("vlc-satip");
#ifdef HAVE_RECVMMSG
struct mmsghdr msgs[VLEN];
struct iovec iovecs[VLEN];
......
......@@ -238,6 +238,8 @@ static void *Thread(void *data)
struct pollfd ufd[1];
unsigned interval = lroundf(CLOCK_FREQ / (sys->rate * 1000.f));
vlc_thread_set_name("vlc-scr-wayland");
int canc = vlc_savecancel();
vlc_cleanup_push(cleanup_wl_display_read, display);
......
......@@ -65,6 +65,8 @@ static void *MmapThread(void *data)
struct pollfd ufd[2];
nfds_t numfds = 1;
vlc_thread_set_name("vlc-axs-v4lmmap");
ufd[0].fd = fd;
ufd[0].events = POLLIN;
......@@ -116,6 +118,8 @@ static void *ReadThread(void *data)
struct pollfd ufd[2];
nfds_t numfds = 1;
vlc_thread_set_name("vlc-axs-v4l");
ufd[0].fd = fd;
ufd[0].events = POLLIN;
......
......@@ -341,6 +341,8 @@ static void *DemuxThread( void *p_data )
vlc_tick_t i_next_frame_date = vlc_tick_now() + p_sys->i_frame_interval;
int i_status;
vlc_thread_set_name("vlc-vnc");
for(;;)
{
i_status = WaitForMessage( p_sys->p_client, p_sys->i_frame_interval );
......
......@@ -1907,6 +1907,8 @@ AudioTrack_Thread( void *p_data )
JNIEnv *env = GET_ENV();
vlc_tick_t i_last_time_blocked = 0;
vlc_thread_set_name("vlc-audiotrack");
if( !env )
return NULL;
......
......@@ -1109,6 +1109,8 @@ static void * PlayedDataEraser( void * data )
vlc_tick_t ticksleep;
HRESULT dsresult;
vlc_thread_set_name("vlc-directsound");
for(;;)
{
int canc = vlc_savecancel();
......
......@@ -1055,6 +1055,8 @@ static void *MMThread(void *data)
aout_sys_t *sys = aout->sys;
IMMDeviceEnumerator *it = sys->it;
vlc_thread_set_name("vlc-mmdevice");
EnterMTA();
IMMDeviceEnumerator_RegisterEndpointNotificationCallback(it,
&sys->device_events);
......
......@@ -992,6 +992,8 @@ static void *DecoderThread( void *data )
decoder_t *p_dec = data;
decoder_sys_t *p_sys = p_dec->p_sys;
vlc_thread_set_name("vlc-dmo");
if( DecOpen( p_dec ) )
return NULL; /* failed */
......
......@@ -1402,6 +1402,8 @@ static void *OutThread(void *data)
decoder_t *p_dec = data;
decoder_sys_t *p_sys = p_dec->p_sys;
vlc_thread_set_name("vlc-mediacodec");
vlc_mutex_lock(&p_sys->lock);
while (!p_sys->b_aborted)
{
......
......@@ -448,6 +448,8 @@ static void *cli_client_thread(void *data)
intf_thread_t *intf = cl->intf;
char cmd[MAX_LINE_LENGTH + 1];
vlc_thread_set_name("vlc-cli-client");
while (fgets(cmd, sizeof (cmd), cl->stream) != NULL)
{
int canc = vlc_savecancel();
......@@ -534,6 +536,8 @@ static void *Run(void *data)
intf_thread_t *intf = data;
intf_sys_t *sys = intf->p_sys;
vlc_thread_set_name("vlc-cli-server");
assert(sys->pi_socket_listen != NULL);
for (;;)
......@@ -753,6 +757,8 @@ static void *Run( void *data )
intf_thread_t *p_intf = data;
intf_sys_t *p_sys = p_intf->p_sys;
vlc_thread_set_name("vlc-cli-server");
char p_buffer[ MAX_LINE_LENGTH + 1 ];
int i_size = 0;
......
......@@ -847,6 +847,8 @@ static void *Run( void *data )
intf_thread_t *p_intf = data;
intf_sys_t *p_sys = p_intf->p_sys;
vlc_thread_set_name("vlc-ctrl-dbus");
int canc = vlc_savecancel();
vlc_tick_t events_last_date = VLC_TICK_INVALID;
......
......@@ -113,6 +113,8 @@ static void *Thread( void *p_data )
{
MSG message;
vlc_thread_set_name("vlc-hotkeys-win");
intf_thread_t *p_intf = p_data;
intf_sys_t *p_sys = p_intf->p_sys;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment