+ /* get queued buffer size */
+ if (sc->encode_element[_MMCAMCORDER_ENCSINK_AENC_QUE].gst) {
+ MMCAMCORDER_G_OBJECT_GET(sc->encode_element[_MMCAMCORDER_ENCSINK_AENC_QUE].gst, "current-level-bytes", &aq_size);
+ }
+
+ if (sc->encode_element[_MMCAMCORDER_ENCSINK_VENC_QUE].gst) {
+ MMCAMCORDER_G_OBJECT_GET(sc->encode_element[_MMCAMCORDER_ENCSINK_VENC_QUE].gst, "current-level-bytes", &vq_size);
+ }
+
+ queued_buffer = aq_size + vq_size;
+
+ if (free_space < (_MMCAMCORDER_MINIMUM_SPACE + buffer_size + trailer_size + queued_buffer)) {
+ _mmcam_dbg_warn("No more space for recording!!! Recording is paused.");
+ _mmcam_dbg_warn("Free Space : [%" G_GUINT64_FORMAT "], trailer size : [%" G_GUINT64_FORMAT "]," \
+ " buffer size : [%" G_GUINT64_FORMAT "], queued buffer size : [%" G_GUINT64_FORMAT "]", \
+ free_space, trailer_size, buffer_size, queued_buffer);
+
+ if (!sc->isMaxsizePausing) {
+ MMCAMCORDER_G_OBJECT_SET(sc->encode_element[_MMCAMCORDER_ENCSINK_ENCBIN].gst, "block", TRUE);
+ sc->isMaxsizePausing = TRUE;
+
+ msg.id = MM_MESSAGE_CAMCORDER_NO_FREE_SPACE;
+ _mmcamcorder_send_message((MMHandleType)hcamcorder, &msg);
+ }
+
+ return GST_PAD_PROBE_DROP;
+ }
+
+ g_mutex_lock(&videoinfo->size_check_lock);