Replace gst_structure_get_int() by gst_structure_get()
[platform/core/multimedia/libmm-camcorder.git] / src / mm_camcorder_stillshot.c
index 340a6d7..b2ac5c2 100644 (file)
@@ -860,17 +860,13 @@ int _mmcamcorder_image_cmd_preview_start(MMHandleType handle)
                        _mmcamcorder_sound_finalize(handle);
        } else {
                if (_mmcamcorder_is_encoded_preview_pixel_format(info->preview_format)) {
-                       ret = mm_camcorder_get_attributes(handle, NULL,
+                       mm_camcorder_get_attributes(handle, NULL,
                                MMCAM_ENCODED_PREVIEW_BITRATE, &bitrate,
-                               NULL);
-                       if (ret == MM_ERROR_NONE)
-                               _mmcamcorder_set_encoded_preview_bitrate(handle, bitrate);
-
-                       ret = mm_camcorder_get_attributes(handle, NULL,
                                MMCAM_ENCODED_PREVIEW_GOP_INTERVAL, &gop_interval,
                                NULL);
-                       if (ret == MM_ERROR_NONE)
-                               _mmcamcorder_set_encoded_preview_gop_interval(handle, gop_interval);
+
+                       _mmcamcorder_set_encoded_preview_bitrate(handle, bitrate);
+                       _mmcamcorder_set_encoded_preview_gop_interval(handle, gop_interval);
                }
 
                MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_VIDEOSRC_QUE].gst, "empty-buffers", FALSE);
@@ -1155,8 +1151,10 @@ void __mmcamcorder_get_capture_data_from_buffer(MMCamcorderCaptureDataType *capt
        gst_buffer_map(gst_sample_get_buffer(sample), &mapinfo, GST_MAP_READ);
        capture_data->data = mapinfo.data;
        capture_data->format = pixtype;
-       gst_structure_get_int(structure, "width", &capture_data->width);
-       gst_structure_get_int(structure, "height", &capture_data->height);
+       gst_structure_get(structure,
+               "width", G_TYPE_INT, &capture_data->width,
+               "height", G_TYPE_INT, &capture_data->height,
+               NULL);
        capture_data->length = mapinfo.size;
        gst_buffer_unmap(gst_sample_get_buffer(sample), &mapinfo);