Fix invalid format usage - Phase#2 78/195478/1 accepted/tizen/unified/20181214.110958 submit/tizen/20181214.015811
authorJeongmo Yang <jm80.yang@samsung.com>
Fri, 14 Dec 2018 01:14:29 +0000 (10:14 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Fri, 14 Dec 2018 01:14:29 +0000 (10:14 +0900)
[Version] 0.10.177
[Profile] Common
[Issue Type] Bug fix
[Dependency module] N/A

Change-Id: I8cc80815e59fa8ed9f69da5df83e9ab073c12954
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/libmm-camcorder.spec
src/mm_camcorder_audiorec.c
src/mm_camcorder_gstcommon.c
src/mm_camcorder_util.c
src/mm_camcorder_videorec.c

index 89bb287..e124c5b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.176
+Version:    0.10.177
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index eef54db..0159475 100644 (file)
@@ -484,11 +484,11 @@ _mmcamcorder_audio_command(MMHandleType handle, int command)
                        if (info->filesize > 0) {
                                break;
                        } else if (count == _MMCAMCORDER_RETRIAL_COUNT) {
-                               _mmcam_dbg_err("Pause fail, wait 200 ms, but file size is %lu",
+                               _mmcam_dbg_err("Pause fail, wait 200 ms, but file size is %"G_GUINT64_FORMAT,
                                        info->filesize);
                                return MM_ERROR_CAMCORDER_INVALID_CONDITION;
                        } else {
-                               _mmcam_dbg_warn("Wait for enough audio frame, retry count[%d], file size is %lu",
+                               _mmcam_dbg_warn("Wait for enough audio frame, retry count[%d], file size is %"G_GUINT64_FORMAT,
                                        count, info->filesize);
                        }
                        usleep(_MMCAMCORDER_FRAME_WAIT_TIME);
@@ -551,11 +551,11 @@ _mmcamcorder_audio_command(MMHandleType handle, int command)
                        if (info->filesize > 0) {
                                break;
                        } else if (count == _MMCAMCORDER_RETRIAL_COUNT) {
-                               _mmcam_dbg_err("Commit fail, waited 200 ms, but file size is %lu", info->filesize);
+                               _mmcam_dbg_err("Commit fail, waited 200 ms, but file size is %"G_GUINT64_FORMAT, info->filesize);
                                        info->b_commiting = FALSE;
                                return MM_ERROR_CAMCORDER_INVALID_CONDITION;
                        } else {
-                               _mmcam_dbg_warn("Waiting for enough audio frame, re-count[%d], file size is %lu",
+                               _mmcam_dbg_warn("Waiting for enough audio frame, re-count[%d], file size is %"G_GUINT64_FORMAT,
                                        count, info->filesize);
                        }
                        usleep(_MMCAMCORDER_FRAME_WAIT_TIME);
index 275576d..3bc8440 100644 (file)
@@ -2164,7 +2164,7 @@ GstPadProbeReturn __mmcamcorder_eventprobe_monitor(GstPad *pad, GstPadProbeInfo
                        const GstSegment *segment;
                        gst_event_parse_segment(event, &segment);
                        if (segment->format == GST_FORMAT_BYTES) {
-                               _mmcam_dbg_log("change current offset %llu -> %lu",
+                               _mmcam_dbg_log("change current offset %llu -> %"G_GUINT64_FORMAT,
                                        sc->muxed_stream_offset, segment->start);
 
                                sc->muxed_stream_offset = (unsigned long long)segment->start;
index 171eda4..bc34463 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdlib.h>
+#include <inttypes.h>
 #include <sys/vfs.h> /* struct statfs */
 #include <sys/time.h> /* gettimeofday */
 #include <sys/stat.h>
@@ -284,7 +285,7 @@ gint _mmcamcorder_find_tag(FILE *f, guint32 tag_fourcc, gboolean do_rewind)
                                buf_size = buf_size - 8; /* include tag */
                        }
 
-                       _mmcam_dbg_log("seek %lu", buf_size);
+                       _mmcam_dbg_log("seek %"PRIu64, buf_size);
                        if (fseeko(f, (off_t)buf_size, SEEK_CUR) != 0) {
                                _mmcam_dbg_err("fseeko() fail");
                                return FALSE;
@@ -345,7 +346,7 @@ gboolean _mmcamcorder_find_fourcc(FILE *f, guint32 tag_fourcc, gboolean do_rewin
                                buf_size = buf_size - 8; /* include tag */
                        }
 
-                       _mmcam_dbg_log("seek %lu", buf_size);
+                       _mmcam_dbg_log("seek %"PRIu64, buf_size);
                        if (fseeko(f, (off_t)buf_size, SEEK_CUR) != 0) {
                                _mmcam_dbg_err("fseeko() fail");
                                return FALSE;
@@ -603,7 +604,7 @@ guint64 _mmcamcorder_get_container_size(const guchar *size)
        result = result | (temp << 8);
        result = result | size[3];
 
-       _mmcam_dbg_log("result : %lu", result);
+       _mmcam_dbg_log("result : %"G_GUINT64_FORMAT, result);
 
        return result;
 }
@@ -630,7 +631,7 @@ guint64 _mmcamcorder_get_container_size64(const guchar *size)
        result = result | (temp << 8);
        result = result | size[7];
 
-       _mmcam_dbg_log("result : %lu", result);
+       _mmcam_dbg_log("result : %"G_GUINT64_FORMAT, result);
 
        return result;
 }
@@ -764,7 +765,7 @@ int _mmcamcorder_get_freespace(storage_type_e type, guint64 *free_space)
        *free_space = vfs.f_bsize * vfs.f_bavail;
        /*
        _mmcam_dbg_log("vfs.f_bsize [%lu], vfs.f_bavail [%lu]", vfs.f_bsize, vfs.f_bavail);
-       _mmcam_dbg_log("memory size %lu [%s]", *free_space, path);
+       _mmcam_dbg_log("memory size %"G_GUINT64_FORMAT" [%s]", *free_space, path);
        */
        return 0;
 }
index f6aaf57..1acd72f 100644 (file)
@@ -923,10 +923,10 @@ int _mmcamcorder_video_command(MMHandleType handle, int command)
                                if (info->video_frame_count >= _MMCAMCORDER_MINIMUM_FRAME) {
                                        break;
                                } else if (count == _MMCAMCORDER_RETRIAL_COUNT) {
-                                       _mmcam_dbg_err("Pause fail, frame count %lu", info->video_frame_count);
+                                       _mmcam_dbg_err("Pause fail, frame count %"G_GUINT64_FORMAT, info->video_frame_count);
                                        return MM_ERROR_CAMCORDER_INVALID_CONDITION;
                                } else {
-                                       _mmcam_dbg_warn("Waiting for enough video frame, retrial[%d], frame %lu", count, info->video_frame_count);
+                                       _mmcam_dbg_warn("Waiting for enough video frame, retrial[%d], frame %"G_GUINT64_FORMAT, count, info->video_frame_count);
                                }
 
                                usleep(_MMCAMCORDER_FRAME_WAIT_TIME);
@@ -935,11 +935,11 @@ int _mmcamcorder_video_command(MMHandleType handle, int command)
                                if (info->video_frame_count >= _MMCAMCORDER_MINIMUM_FRAME && info->audio_frame_count) {
                                        break;
                                } else if (count == _MMCAMCORDER_RETRIAL_COUNT) {
-                                       _mmcam_dbg_err("Pause fail, frame count VIDEO[%lu], AUDIO [%lu]",
+                                       _mmcam_dbg_err("Pause fail, frame count VIDEO[%"G_GUINT64_FORMAT"], AUDIO [%"G_GUINT64_FORMAT"]",
                                                info->video_frame_count, info->audio_frame_count);
                                        return MM_ERROR_CAMCORDER_INVALID_CONDITION;
                                } else {
-                                       _mmcam_dbg_warn("Waiting for enough frames, retrial [%d], VIDEO[%lu], AUDIO [%lu]",
+                                       _mmcam_dbg_warn("Waiting for enough frames, retrial [%d], VIDEO[%"G_GUINT64_FORMAT"], AUDIO [%"G_GUINT64_FORMAT"]",
                                                count, info->video_frame_count, info->audio_frame_count);
                                }
 
@@ -1069,7 +1069,7 @@ int _mmcamcorder_video_command(MMHandleType handle, int command)
                                    hcamcorder->capture_in_recording == FALSE) {
                                        break;
                                } else if (count == _MMCAMCORDER_RETRIAL_COUNT) {
-                                       _mmcam_dbg_err("Commit fail, frame count is %lu, capturing %d",
+                                       _mmcam_dbg_err("Commit fail, frame count is %"G_GUINT64_FORMAT", capturing %d",
                                                info->video_frame_count, hcamcorder->capture_in_recording);
 
                                        if (info->video_frame_count >= _MMCAMCORDER_MINIMUM_FRAME) {
@@ -1079,7 +1079,7 @@ int _mmcamcorder_video_command(MMHandleType handle, int command)
                                                return MM_ERROR_CAMCORDER_INVALID_CONDITION;
                                        }
                                } else {
-                                       _mmcam_dbg_warn("Waiting for enough video frame, retrial [%d], frame %lu, capturing %d",
+                                       _mmcam_dbg_warn("Waiting for enough video frame, retrial [%d], frame %"G_GUINT64_FORMAT", capturing %d",
                                                count, info->video_frame_count, hcamcorder->capture_in_recording);
                                }
                        } else {
@@ -1089,7 +1089,7 @@ int _mmcamcorder_video_command(MMHandleType handle, int command)
                                    hcamcorder->capture_in_recording == FALSE) {
                                        break;
                                } else if (count == _MMCAMCORDER_RETRIAL_COUNT) {
-                                       _mmcam_dbg_err("Commit fail, VIDEO[%lu], AUDIO [%lu], capturing %d",
+                                       _mmcam_dbg_err("Commit fail, VIDEO[%"G_GUINT64_FORMAT"], AUDIO [%"G_GUINT64_FORMAT"], capturing %d",
                                                info->video_frame_count, info->audio_frame_count, hcamcorder->capture_in_recording);
 
                                        if (info->video_frame_count >= _MMCAMCORDER_MINIMUM_FRAME && info->audio_frame_count) {
@@ -1101,7 +1101,7 @@ int _mmcamcorder_video_command(MMHandleType handle, int command)
 
                                        return MM_ERROR_CAMCORDER_INVALID_CONDITION;
                                } else {
-                                       _mmcam_dbg_warn("Waiting for enough frames, retrial [%d], VIDEO[%lu], AUDIO [%lu], capturing %d",
+                                       _mmcam_dbg_warn("Waiting for enough frames, retrial [%d], VIDEO[%"G_GUINT64_FORMAT"], AUDIO [%"G_GUINT64_FORMAT"], capturing %d",
                                                count, info->video_frame_count, info->audio_frame_count, hcamcorder->capture_in_recording);
                                }
                        }
@@ -1248,7 +1248,7 @@ int _mmcamcorder_video_handle_eos(MMHandleType handle)
        /* Check file size */
        if (info->max_size > 0) {
                _mmcamcorder_get_file_size(info->filename, &file_size);
-               _mmcam_dbg_log("MAX size %lu byte - created filesize %lu byte",
+               _mmcam_dbg_log("MAX size %"G_GUINT64_FORMAT" byte - created filesize %"G_GUINT64_FORMAT" byte",
                                           info->max_size, file_size);
 
                if (file_size > info->max_size) {