Add new field "timestamp_nsec" in MMCamcorderVideoStreamDataType 19/283419/2 accepted/tizen/unified/20221102.020607
authorJeongmo Yang <jm80.yang@samsung.com>
Sun, 23 Oct 2022 08:41:17 +0000 (17:41 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Sun, 23 Oct 2022 09:26:48 +0000 (18:26 +0900)
[Version] 0.10.278
[Issue Type] New feature

Change-Id: I8b5548ded608f2ec26944359bb58a6105b328657
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/include/mm_camcorder.h
src/mm_camcorder_gstcommon.c

index fb19bef..793d31d 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.277
+Version:    0.10.278
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index a171817..31d2127 100644 (file)
@@ -1871,23 +1871,24 @@ typedef struct {
                        int is_delta_frame;
                        int is_header_included;
                } encoded, depth, rgb;
-       } data;                         /**< pointer of captured stream */
-       MMCamStreamData data_type;      /**< data type */
-       unsigned int length_total;      /**< total length of stream buffer (in byte)*/
-       unsigned int num_planes;        /**< number of planes */
-       MMPixelFormatType format;       /**< image format */
-       int width;                      /**< width of video buffer */
-       int height;                     /**< height of video buffer */
-       unsigned int timestamp;         /**< timestamp of stream buffer (msec)*/
-       void *bo[BUFFER_MAX_PLANE_NUM]; /**< TBM buffer object */
-       void *internal_buffer;          /**< Internal buffer pointer */
-       int stride[BUFFER_MAX_PLANE_NUM];    /**< Stride of each plane */
-       int elevation[BUFFER_MAX_PLANE_NUM]; /**< Elevation of each plane */
-       int extra_stream_id;            /**< ID of extra preview stream */
-       int focus_state;                /**< Focus state */
-       int facing_direction;           /**< Facing direction */
-       int flip;                       /**< Flip */
-       int rotation;                   /**< Rotation */
+       } data;                             /**< pointer of captured stream */
+       MMCamStreamData data_type;          /**< data type */
+       unsigned int length_total;          /**< total length of stream buffer(byte) */
+       unsigned int num_planes;            /**< number of planes */
+       MMPixelFormatType format;           /**< image format */
+       int width;                          /**< width of video buffer */
+       int height;                         /**< height of video buffer */
+       unsigned int timestamp;             /**< timestamp of stream buffer(msec) */
+       void *bo[BUFFER_MAX_PLANE_NUM];     /**< TBM buffer object */
+       void *internal_buffer;              /**< Internal buffer pointer */
+       int stride[BUFFER_MAX_PLANE_NUM];   /**< Stride of each plane */
+       int elevation[BUFFER_MAX_PLANE_NUM];/**< Elevation of each plane */
+       int extra_stream_id;                /**< ID of extra preview stream */
+       int focus_state;                    /**< Focus state */
+       int facing_direction;               /**< Facing direction */
+       int flip;                           /**< Flip */
+       int rotation;                       /**< Rotation */
+       unsigned long long timestamp_nsec;  /**< timestamp of stream buffer(nsec) */
 } MMCamcorderVideoStreamDataType;
 
 
index e91f548..4b434d9 100644 (file)
@@ -486,6 +486,7 @@ gboolean _mmcamcorder_invoke_video_stream_cb(MMHandleType handle, GstSample *sam
        MMCAM_LOG_DEBUG("VideoStreamData : format[%d], resolution[%dx%d], stream_id[%d]",
                stream.format, stream.width, stream.height, stream_id);
 
+       stream.timestamp_nsec = GST_BUFFER_PTS(buffer);
        stream.timestamp = (unsigned int)(GST_BUFFER_PTS(buffer) / 1000000); /* nano sec -> milli sec */
        stream.extra_stream_id = stream_id;
        stream.internal_buffer = buffer;