libdvr: audio play of timeshift is not smooth [1/1]

PD#TV-74714
PD#SWPL-116249

Problem:
Libdvr tasks are not named.

Solution:
Name libdvr tasks.

Verify:
Tested pass on T5D.

Signed-off-by: Wentao.MA <wentao.ma@amlogic.com>
Change-Id: Ib928fae2d9ee1af99678b90a0246bea86af6959c
diff --git a/src/dvr_playback.c b/src/dvr_playback.c
index 7c33d47..081dcb3 100644
--- a/src/dvr_playback.c
+++ b/src/dvr_playback.c
@@ -5,6 +5,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
+#include <sys/prctl.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <poll.h>
@@ -985,6 +986,8 @@
   DVR_Bool_t goto_rewrite = DVR_FALSE;
   int read = 0;
 
+  prctl(PR_SET_NAME,"DvrPlayback");
+
   const uint64_t write_timeout_ms = (uint64_t)dvr_prop_read_int("vendor.tv.libdvr.writetm",50);
   const int timeout = dvr_prop_read_int("vendor.tv.libdvr.waittm",200);
 
diff --git a/src/dvr_record.c b/src/dvr_record.c
index 4a39929..462ac75 100644
--- a/src/dvr_record.c
+++ b/src/dvr_record.c
@@ -10,6 +10,7 @@
 #include "record_device.h"
 #include "segment.h"
 #include <sys/time.h>
+#include <sys/prctl.h>
 #include "am_crypt.h"
 
 #define CHECK_PTS_MAX_COUNT  (20)
@@ -211,6 +212,8 @@
   DVR_NewDmxSecureBuffer_t new_dmx_secure_buf;
   int first_read = 0;
 
+  prctl(PR_SET_NAME,"DvrRecording");
+
   // Force to use LOCAL_CLOCK as index type if force_sysclock is on. Please
   // refer to SWPL-75327
   if (p_ctx->force_sysclock)
diff --git a/src/dvr_wrapper.c b/src/dvr_wrapper.c
index 6e6a1dc..0bb6bc3 100644
--- a/src/dvr_wrapper.c
+++ b/src/dvr_wrapper.c
@@ -6,6 +6,7 @@
 #include <time.h>
 #include <errno.h>
 #include <sys/time.h>
+#include <sys/prctl.h>
 #include <time.h>
 
 #include "dvr_types.h"
@@ -603,6 +604,8 @@
   DVR_WrapperThreadCtx_t *thread_ctx = (DVR_WrapperThreadCtx_t *)arg;
   DVR_WrapperEventCtx_t *evt;
 
+  prctl(PR_SET_NAME,"DvrWrapper");
+
   pthread_mutex_lock(&thread_ctx->lock);
 
   while (thread_ctx->running) {