videorenderer: CB2 playing failed when changed from DTV to MM [1/1]

PD#TV-77127

Problem:
playing failed when changed from DTV to MM or
changed from MM to DTV
because videotunnal is busy when DTV is open

Solution:
we should open videotunel when DTV begin playing
fix ion memory leak

Verify:
AR321

Build Tag:
Buildroot_DRM_PatchBuild-1603

Commits:
buildroot/package/amlogic/linuxdrm/media_hal:
version: 3.9.19-g4f1a365(build:1603)
4f1a365 videorenderer: CB2 playing failed when changed from DTV to MM [1/1]

Git Hash-Object:
9e0c553a8319b93522385a7301365745cda50829
prebuilt/aarch64.lp64./libmediahal_tsplayer.so
9d52890d9484c449aef1a5893d1384adda1a1736
prebuilt/aarch64.lp64./libmediahal_videodec.so
6537a33dc2630a32528a2b5edd780966983c3dc8
prebuilt/aarch64.lp64./libmediahal_videorender.so
833c839dff0b0744d84acd9b0e7d63e16fbb2ff7
prebuilt/aarch64.lp64./videorender_server
2ac7d418e56c907eeb2a7822d9abfb5744f8a5f9
prebuilt/arm.aapcs-linux.hard/libmediahal_tsplayer.so
b89ead76ac42330af96cf9cf46fb22ce153e3218
prebuilt/arm.aapcs-linux.hard/libmediahal_videodec.so
9dbb09703e3ae7e46bfef4f007e93d01aea8a5a9
prebuilt/arm.aapcs-linux.hard/libmediahal_videorender.so
aea1526e1e0629ad31120a12163c47ff989c20b5
prebuilt/arm.aapcs-linux.hard/videorender_server
5829067cf7fe8b985a5428df030a5c4851afc2ef
prebuilt/noarch/include/render_lib.h
1ca826176cfafb9564a33264c9d5e21327a430e7
version.txt

Change-Id: I4b5030cab2ea52822f84e77f7915e1a74e04b1c4
Signed-off-by: DRM Auto Build <tao.guo@amlogic.com>
diff --git a/prebuilt/aarch64.lp64./libmediahal_tsplayer.so b/prebuilt/aarch64.lp64./libmediahal_tsplayer.so
index fab5702..9e0c553 100644
--- a/prebuilt/aarch64.lp64./libmediahal_tsplayer.so
+++ b/prebuilt/aarch64.lp64./libmediahal_tsplayer.so
Binary files differ
diff --git a/prebuilt/aarch64.lp64./libmediahal_videodec.so b/prebuilt/aarch64.lp64./libmediahal_videodec.so
index d18c036..9d52890 100644
--- a/prebuilt/aarch64.lp64./libmediahal_videodec.so
+++ b/prebuilt/aarch64.lp64./libmediahal_videodec.so
Binary files differ
diff --git a/prebuilt/aarch64.lp64./libmediahal_videorender.so b/prebuilt/aarch64.lp64./libmediahal_videorender.so
index c761890..6537a33 100644
--- a/prebuilt/aarch64.lp64./libmediahal_videorender.so
+++ b/prebuilt/aarch64.lp64./libmediahal_videorender.so
Binary files differ
diff --git a/prebuilt/aarch64.lp64./videorender_server b/prebuilt/aarch64.lp64./videorender_server
index 5b0a80c..833c839 100755
--- a/prebuilt/aarch64.lp64./videorender_server
+++ b/prebuilt/aarch64.lp64./videorender_server
Binary files differ
diff --git a/prebuilt/arm.aapcs-linux.hard/libmediahal_tsplayer.so b/prebuilt/arm.aapcs-linux.hard/libmediahal_tsplayer.so
index cdfdb3f..2ac7d41 100644
--- a/prebuilt/arm.aapcs-linux.hard/libmediahal_tsplayer.so
+++ b/prebuilt/arm.aapcs-linux.hard/libmediahal_tsplayer.so
Binary files differ
diff --git a/prebuilt/arm.aapcs-linux.hard/libmediahal_videodec.so b/prebuilt/arm.aapcs-linux.hard/libmediahal_videodec.so
index 2183f86..b89ead7 100644
--- a/prebuilt/arm.aapcs-linux.hard/libmediahal_videodec.so
+++ b/prebuilt/arm.aapcs-linux.hard/libmediahal_videodec.so
Binary files differ
diff --git a/prebuilt/arm.aapcs-linux.hard/libmediahal_videorender.so b/prebuilt/arm.aapcs-linux.hard/libmediahal_videorender.so
index e815edb..9dbb097 100644
--- a/prebuilt/arm.aapcs-linux.hard/libmediahal_videorender.so
+++ b/prebuilt/arm.aapcs-linux.hard/libmediahal_videorender.so
Binary files differ
diff --git a/prebuilt/arm.aapcs-linux.hard/videorender_server b/prebuilt/arm.aapcs-linux.hard/videorender_server
index 623b0c6..aea1526 100755
--- a/prebuilt/arm.aapcs-linux.hard/videorender_server
+++ b/prebuilt/arm.aapcs-linux.hard/videorender_server
Binary files differ
diff --git a/prebuilt/arm.aapcs-linux.softfp/libmediahal_tsplayer.so b/prebuilt/arm.aapcs-linux.softfp/libmediahal_tsplayer.so
index 3764fcc..d11e9b6 100644
--- a/prebuilt/arm.aapcs-linux.softfp/libmediahal_tsplayer.so
+++ b/prebuilt/arm.aapcs-linux.softfp/libmediahal_tsplayer.so
Binary files differ
diff --git a/prebuilt/arm.aapcs-linux.softfp/libmediahal_videorender.so b/prebuilt/arm.aapcs-linux.softfp/libmediahal_videorender.so
index eec484b..9ea7097 100644
--- a/prebuilt/arm.aapcs-linux.softfp/libmediahal_videorender.so
+++ b/prebuilt/arm.aapcs-linux.softfp/libmediahal_videorender.so
Binary files differ
diff --git a/prebuilt/arm.aapcs-linux.softfp/videorender_server b/prebuilt/arm.aapcs-linux.softfp/videorender_server
index 1376b1c..4b8195b 100755
--- a/prebuilt/arm.aapcs-linux.softfp/videorender_server
+++ b/prebuilt/arm.aapcs-linux.softfp/videorender_server
Binary files differ
diff --git a/prebuilt/noarch/include/render_lib.h b/prebuilt/noarch/include/render_lib.h
index bc9d22b..5829067 100644
--- a/prebuilt/noarch/include/render_lib.h
+++ b/prebuilt/noarch/include/render_lib.h
@@ -2,11 +2,20 @@
 #define __RENDER_LIB_H__
 #include <stdint.h>
 #include <stdlib.h>
+#include <stdarg.h>
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
+#define RLIB_LOG_LEVEL_ERROR   0
+#define RLIB_LOG_LEVEL_WARNING 1
+#define RLIB_LOG_LEVEL_INFO    2
+#define RLIB_LOG_LEVEL_DEBUG   3
+#define RLIB_LOG_LEVEL_TRACE1  4
+#define RLIB_LOG_LEVEL_TRACE2  5
+#define RLIB_LOG_LEVEL_TRACE3  6
+
 #define RENDER_MAX_PLANES 3
 
 /*allocate render buffer flag */
@@ -65,6 +74,7 @@
     KEY_IMMEDIATELY_OUTPUT, //set/get immediately output video frame to display, 0 is default value off, 1 is on
     KEY_STEP_DISPLAY_FRAME, //set/get step display frame,the value type is StepFrameInfo struct
     KEY_VIDEO_CROP, //set/get the video crop,value type is RenderWindowSize
+    KEY_SHOW_FRIST_FRAME_NOSYNC, //set/get show first frame asap,please set it if before invoking render_display_frame
     KEY_MEDIASYNC_INSTANCE_ID = 400, //set/get mediasync instance id, value type is int
     KEY_MEDIASYNC_PCR_PID, ///set/get mediasync pcr id ,value type is int
     KEY_MEDIASYNC_DEMUX_ID, //set/get mediasync demux id ,value type is int
@@ -251,6 +261,22 @@
 } RenderVideoFormat;
 
 /**
+ * set user log print function to render lib
+ * @param handle a handle of render lib that was opened
+ * @param callback log print callback function
+ * @return void
+*/
+void render_set_log_callback(void (*callback)(int,const char*, va_list));
+
+/**
+ * set render lib log level, default level is RLIB_LOG_LEVEL_INFO
+ * @param handle a handle of render lib that was opened
+ * @param level render lib log level
+ * @return void
+*/
+void render_set_log_level(int level);
+
+/**
  * open a render lib,render lib will open a compositer with the special
  * render name
  * @param name the render device name
diff --git a/version.txt b/version.txt
index afd3294..5df873f 100644
--- a/version.txt
+++ b/version.txt
@@ -1,10 +1,96 @@
 =========RELEALSE NOTE=================
 
-Version: V3.9.15-g2ea662a
+Version: V3.9.19-g4f1a365
 
 ========================================
 
 Git commit:
+commit 4f1a365debce3ebcd7f204f73c0ceecfa66c703b
+Author: fei.deng <fei.deng@amlogic.com>
+Date:   Thu Apr 13 06:59:06 2023 +0000
+
+    videorenderer: CB2 playing failed when changed from DTV to MM [1/1]
+    
+    PD#TV-77127
+    
+    Problem:
+    playing failed when changed from DTV to MM or
+    changed from MM to DTV
+    because videotunnal is busy when DTV is open
+    
+    Solution:
+    we should open videotunel when DTV begin playing
+    fix ion memory leak
+    
+    Verify:
+    AR321
+    
+    Change-Id: Ib82febed074eb8b62fd8e5a7529ff3420fb01152
+    Signed-off-by: fei.deng <fei.deng@amlogic.com>
+
+commit 079f9397c37ad2456ee7f26f657b69f6dce05624
+Author: fei.deng <fei.deng@amlogic.com>
+Date:   Thu Apr 13 03:03:58 2023 +0000
+
+    videorenderer: CF2 keep last frame on drm plugin [1/1]
+    
+    PD#OTT-39180
+    
+    Problem:
+    keep last frame on drm plugin
+    
+    Solution:
+    keep last frame on drm plugin
+    
+    Verify:
+    AP23A9
+    
+    Change-Id: Ib6c1dbb3b79ef6ab98fc770c448ef3b3a069965e
+    Signed-off-by: fei.deng <fei.deng@amlogic.com>
+
+commit 2dd83b7df88682e1643a592d22f2b15ef159f98d
+Author: fei.deng <fei.deng@amlogic.com>
+Date:   Tue Mar 21 08:21:42 2023 +0000
+
+    videorenderer: CB2 add logs callback and show first frame asap [1/1]
+    
+    PD#OTT-40594
+    
+    Problem:
+    1.render logs output to file or logcat, it is hard for debugging on webos
+    2.lge requests showing first frame asap
+    we redirect logs to gst with log callback function
+    
+    Solution:
+    1.we redirect logs to gst with log callback function
+    2.add showing first frame asap feature
+    
+    Verify:
+    ah212
+    
+    Change-Id: I8b1e2fc060970164eaf0046d7253e1e61c8cdced
+    Signed-off-by: fei.deng <fei.deng@amlogic.com>
+
+commit 466eb9ea723fc3723cff4ec880c266832b188330
+Author: fei.deng <fei.deng@amlogic.com>
+Date:   Mon Apr 10 12:53:47 2023 +0000
+
+    videorenderer: CB2 show or hide video [1/1]
+    
+    PD#OTT-39179
+    
+    Problem:
+    can't show or hide video on drm plugin
+    
+    Solution:
+    show or hide video frame
+    
+    Verify:
+    AP23A9
+    
+    Change-Id: I2d11326cbcf997755f10a7bd48c46a3f30d30f82
+    Signed-off-by: fei.deng <fei.deng@amlogic.com>
+
 commit 2ea662a6d6a857255c9e7869884676dbb3da42ca
 Author: fei.deng <fei.deng@amlogic.com>
 Date:   Thu Mar 30 02:38:39 2023 +0000
@@ -52,7 +138,7 @@
 Author: zhipeng.he <zhipeng.he@amlogic.com>
 Date:   Thu Mar 16 17:09:46 2023 +0800
 
-    mediasync: CB2 increase the start threshold on some case [1/1]
+    mediasync: CB2 increase the start threshold on case [1/1]
     
     PD#SWPL-99151
     
@@ -60,7 +146,7 @@
     audio insufficient cache sometimes
     
     Solution:
-    1.increase the start threshold on some case
+    1.increase the start threshold on case
     2.update code from master(ab894a5188a7e8fad6ac65a1bbb50a9cf7eafabb)
     
     Verify:
@@ -97,7 +183,7 @@
 Author: zhipeng.he <zhipeng.he@amlogic.com>
 Date:   Fri Mar 3 14:05:49 2023 +0800
 
-    mediasync: CB2 update mediasync code from android [1/1]
+    mediasync: CB2 update mediasync code from android trunck [1/1]
     
     PD#TV-70898
     
@@ -105,7 +191,7 @@
     after discontinue that av not sync
     
     Solution:
-    update mediasync code from android
+    update mediasync code from android trunck
     
     Verify:
     AH212
@@ -125,7 +211,7 @@
     demux size need to optimize
     
     Solution:
-    optimize demux size
+    ptimize demux size
     
     Verify:
     aq2432
@@ -133,93 +219,9 @@
     Change-Id: Ibbf524c9bd56b3a77334aa8448c5582df70b9d81
     Signed-off-by: zhipeng.he <zhipeng.he@amlogic.com>
 
-commit c2035414d2b22318697722a0c52aabfa55213363
-Author: zhipeng.he <zhipeng.he@amlogic.com>
-Date:   Fri Feb 24 16:50:45 2023 +0800
-
-    mediasync: CB2 holdtime not right when check isstartvideo [1/1]
-    
-    PD#TV-73727
-    
-    Problem:
-    holdtime not right when check isstartvideo
-    
-    Solution:
-    Set initial value for mStcParmUpdateCount,
-    adjust the holdtime value when exception
-    
-    Verify:
-    AT30A3-T962D4
-    
-    Change-Id: If1bd9df868ba80fff0551fb2f6c797b132fc4f87
-    Signed-off-by: zhipeng.he <zhipeng.he@amlogic.com>
-
-commit 702f885cffe9404cdbd03874d64b699a771d0fcf
-Author: zhipeng.he <zhipeng.he@amlogic.com>
-Date:   Mon Feb 20 20:39:34 2023 +0800
-
-    mediasync: CB2 audio has intermittentl after discontinue. [1/1]
-    
-    PD#SWPL-106912
-    
-    Problem:
-    audio discontinue enter too early
-    
-    Solution:
-    need to compare audiopts and current pcr to enter discontinue
-    
-    Verify:
-    AH212
-    
-    Change-Id: I5e80d1def0d362347480bfe43eec1041742c5cbd
-    Signed-off-by: zhipeng.he <zhipeng.he@amlogic.com>
-
-commit 11696ffe03b72750df4ff5b43066e593dc6ae417
-Author: fei.deng <fei.deng@amlogic.com>
-Date:   Wed Feb 15 04:04:04 2023 -0500
-
-    video_renderer: CB2 change display thread priority [1/1]
-    
-    PD#OTT-39212
-    
-    Problem:
-    now display thread priority is SCHED_RR, we need to
-    change it to SCHED_FIFO and its priority to 60
-    
-    Solution:
-    now display thread priority is SCHED_RR, we need to
-    change it to SCHED_FIFO and its priority to 60
-    
-    Verify:
-    ar321
-    
-    Change-Id: I91f4de10364659b401349abbe10bb729b3e410e7
-    Signed-off-by: fei.deng <fei.deng@amlogic.com>
-
-commit dce89258ccc0e4480c472440228406b33f0a2299
-Author: zhipeng.he <zhipeng.he@amlogic.com>
-Date:   Fri Feb 24 20:29:49 2023 +0800
-
-    tsplayer: CB2 check demux_type fail on kernel_5.15 [1/1]
-    
-    PD#SWPL-112497
-    
-    Problem:
-    check demux_type fail on kernel_5.15
-    
-    Solution:
-    1.Fix the demux driver path
-    2.Fix path of demux0_source node
-    
-    Verify:
-    AH212/T5D
-    
-    Change-Id: Idd28b9a68f775f2e5cacfa718af8f9d620a01333
-    Signed-off-by: zhipeng.he <zhipeng.he@amlogic.com>
-
 ========================================
 
-Release time: 2023-04-06-07-37
+Release time: 2023-04-14-12-20
 
 ========================================