libdvr: FF to the end,playback resumes for a long time.[1/1]

PD#SWPL-25122

Problem:
Fast forward to the end,playback resumes for a long time,

Solution:
1. change resume dur from 2s to 600ms when reach end occur.
2. add lock at get state api.
3. force store index info when stop segment.
4. del fsync api when store info and pts.

Verify:
verified on 215.


Change-Id: I024330aff3bab79f468780d722a749314c1ee14c
Signed-off-by: hualing chen <hualing.chen@amlogic.com>
diff --git a/include/segment.h b/include/segment.h
index 70babc1..19f0d60 100644
--- a/include/segment.h
+++ b/include/segment.h
@@ -62,6 +62,16 @@
  */
 ssize_t segment_write(Segment_Handle_t handle, void *buf, size_t count);
 
+/**\brief force Update the pts and offset when record
+ * \param[in] handle, Segment handle
+ * \param[in] pts, Current pts
+ * \param[in] offset, Current segment offset
+ * \return DVR_SUCCESS on success
+ * \return error code on failure
+ */
+int segment_update_pts_force(Segment_Handle_t handle, uint64_t pts, loff_t offset);
+
+
 /**\brief Update the pts and offset when record
  * \param[in] handle, Segment handle
  * \param[in] pts, Current pts