VT: Added an interface to set JitterBufferTime.

Jitter buffer time can be adjusted according to packet jitter
situation. Jitter buffer time will be decided by upper layer
and then RTP Assemblers just apply a value of jitter time.

Added an interface to set video-param-jitter-buffer-time.
 - Minimum jitter buffer time = 40ms.
 - Maximum jitter buffer time = 3000ms.

Bug: 144795638
Bug: 165061754
Change-Id: Idc6ef462a91aab87c3f0ad46c504ebf0b89c36c4
Signed-off-by: Byeongjo Park <bjo.park@samsung.com>
diff --git a/media/libmediaplayerservice/nuplayer/RTPSource.cpp b/media/libmediaplayerservice/nuplayer/RTPSource.cpp
index a6601cd..3c3ad86 100644
--- a/media/libmediaplayerservice/nuplayer/RTPSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/RTPSource.cpp
@@ -114,6 +114,7 @@
         // index(i) should be started from 1. 0 is reserved for [root]
         mRTPConn->addStream(sockRtp, sockRtcp, desc, i + 1, notify, false);
         mRTPConn->setSelfID(info->mSelfID);
+        mRTPConn->setJbTime((info->mJbTime <= 3000 && info->mJbTime >= 40) ? info->mJbTime : 300);
         mRTPConn->setMinMaxBitrate(kMinVideoBitrate, info->mAS * 1000 /* kbps */);
 
         info->mRTPSocket = sockRtp;
@@ -656,6 +657,7 @@
         newTrackInfo.mIsAudio = isAudioKey;
         mTracks.push(newTrackInfo);
         info = &mTracks.editTop();
+        info->mJbTime = 300;
     }
 
     if (key == "rtp-param-mime-type") {
@@ -698,6 +700,8 @@
     } else if (key == "rtp-param-set-socket-network") {
         int64_t networkHandle = atoll(value);
         setSocketNetwork(networkHandle);
+    } else if (key == "rtp-param-jitter-buffer-time") {
+        info->mJbTime = atoi(value);
     }
 
     return OK;