dvr: implement record [1/1]

PD#SWPL-18817

Problem:
New feature

Solution:
implement record

Verify:
Android Q + AC214

Change-Id: I08df9e9d62f4467ba8dc2cb61cceb09aeda7b6e9
Signed-off-by: Pengfei Liu <pengfei.liu@amlogic.com>
diff --git a/include/dvr_segment.h b/include/dvr_segment.h
index 746065d..7fb2178 100644
--- a/include/dvr_segment.h
+++ b/include/dvr_segment.h
@@ -1,3 +1,8 @@
+/*
+ * \file
+ * Segment operation module
+ */
+
 #ifndef _DVR_SEGMENT_H_
 #define _DVR_SEGMENT_H_
 
@@ -6,14 +11,40 @@
 #endif
 
 #include "dvr_types.h"
-#include "segment_file.h"
 
+/**\brief Delete a segment
+ * \param[in] location, The record file's location
+ * \param[in] segment_id, The segment's index
+ * \return DVR_SUCCESS On success
+ * \return Error code On failure
+ */
 int dvr_segment_delete(const char *location, uint64_t segment_id);
 
+/**\brief Get the segment list of a record file
+ * \param[in] location, The record file's location
+ * \param[out] p_segment_nb, Return the segments number
+ * \param[out] pp_segment_ids, Return the segments index
+ * \return DVR_SUCCESS On success
+ * \return Error code On failure
+ */
 int dvr_segment_get_list(const char *location, uint32_t *p_segment_nb, uint64_t **pp_segment_ids);
 
-int dvr_segment_get_info(const char *location, uint64_t segment_id, Segment_StoreInfo_t *p_info);
+/**\brief Get the segment's information
+ * \param[in] location, The record file's location
+ * \param[in] segment_id, The segment index
+ * \param[out] p_info, Return the segment's information
+ * \return DVR_SUCCESS On success
+ * \return Error code On failure
+ */
+int dvr_segment_get_info(const char *location, uint64_t segment_id, DVR_RecordSegmentInfo_t *p_info);
 
+/**\brief Link a segment group as the record file's list
+ * \param[in] location, The record file's location
+ * \param[in] nb_segments, The number of segments
+ * \param[in] p_segment_ids, The segments index in the group
+ * \return DVR_SUCCESS On success
+ * \return Error code On failure
+ */
 int dvr_segment_link(const char *location, uint32_t nb_segments, uint64_t *p_segment_ids);
 
 #ifdef __cplusplus