From: Jeongmo Yang Date: Wed, 6 Jan 2016 03:00:55 +0000 (+0900) Subject: [Release version 0.10.26] Support tizenipcsrc (patch #2) and remove build warnings X-Git-Tag: accepted/tizen/mobile/20160107.100804^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ec7c99e9c3159f29dba210d26b060f51fabca8a3;p=platform%2Fcore%2Fmultimedia%2Flibmm-camcorder.git [Release version 0.10.26] Support tizenipcsrc (patch #2) and remove build warnings Change-Id: Ib34252ab1ced9b46190137e3b8c533edbe797895 Signed-off-by: Jeongmo Yang --- diff --git a/packaging/libmm-camcorder.spec b/packaging/libmm-camcorder.spec index 29b7431..179769b 100644 --- a/packaging/libmm-camcorder.spec +++ b/packaging/libmm-camcorder.spec @@ -2,7 +2,7 @@ Name: libmm-camcorder Summary: Camera and recorder library -Version: 0.10.25 +Version: 0.10.26 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 diff --git a/src/mm_camcorder_client.c b/src/mm_camcorder_client.c index 6e79a78..5c5dd50 100644 --- a/src/mm_camcorder_client.c +++ b/src/mm_camcorder_client.c @@ -1215,9 +1215,9 @@ int _mmcamcorder_client_create_preview_elements(MMHandleType handle, const char /* create source */ if (hcamcorder->use_zero_copy_format) { - _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSRC_SRC, "tizenipcsrc", "camera_client_src", element_list, ret); + _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSRC_SRC, "tizenipcsrc", "client_videosrc_src", element_list, ret); } else { - _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSRC_SRC, "shmsrc", "camera_client_src", element_list, ret); + _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSRC_SRC, "shmsrc", "client_videosrc_src", element_list, ret); } mm_camcorder_get_attributes(handle, NULL, @@ -1237,7 +1237,7 @@ int _mmcamcorder_client_create_preview_elements(MMHandleType handle, const char NULL); /* create capsfilter */ - _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSRC_FILT, "capsfilter", "vidoesrc_filt", element_list, ret); + _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSRC_FILT, "capsfilter", "client_vidoesrc_filt", element_list, ret); caps = gst_caps_from_string(string_caps); MMCAMCORDER_G_OBJECT_SET_POINTER(sc->element[_MMCAMCORDER_CLIENT_VIDEOSRC_FILT].gst, "caps", caps); @@ -1247,15 +1247,15 @@ int _mmcamcorder_client_create_preview_elements(MMHandleType handle, const char caps = NULL; /* Making Video sink from here */ - _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSINK_QUE, "queue", "videosink_queue", element_list, ret); + _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSINK_QUE, "queue", "client_videosink_queue", element_list, ret); /* Add color converting element */ if (!strcmp(videosink_name, "evasimagesink") || !strcmp(videosink_name, "ximagesink")) { - _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSINK_CLS, "videoconvert", "videosrc_convert", element_list, ret); + _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSINK_CLS, "videoconvert", "client_videosrc_convert", element_list, ret); } /* create sink */ - _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSINK_SINK, videosink_name, "videosink_sink", element_list, ret); + _MMCAMCORDER_ELEMENT_MAKE(sc, sc->element, _MMCAMCORDER_CLIENT_VIDEOSINK_SINK, videosink_name, "client_videosink_sink", element_list, ret); if (strcmp(videosink_name, "fakesink") && strcmp(videosink_name, "tizenipcsink") && @@ -1322,11 +1322,14 @@ void __mmcamcorder_client_gst_destroy_pipeline(MMHandleType handle) sc = MMF_CAMCORDER_SUBCONTEXT(handle); if (sc->element[_MMCAMCORDER_CLIENT_MAIN_PIPE].gst) { + MMCAMCORDER_G_OBJECT_SET(sc->element[_MMCAMCORDER_CLIENT_VIDEOSINK_QUE].gst, "empty-buffers", TRUE); + _mmcamcorder_gst_set_state(handle, sc->element[_MMCAMCORDER_CLIENT_MAIN_PIPE].gst, GST_STATE_NULL); _mmcamcorder_remove_all_handlers(handle, _MMCAMCORDER_HANDLER_CATEGORY_ALL); gst_object_unref(sc->element[_MMCAMCORDER_CLIENT_MAIN_PIPE].gst); } + return; } @@ -1574,10 +1577,17 @@ int mm_camcorder_client_create(MMHandleType *handle) goto _ERR_DEFAULT_VALUE_INIT; } + /* Get UseZeroCopyFormat value from INI */ + _mmcamcorder_conf_get_value_int((MMHandleType)hcamcorder, hcamcorder->conf_main, + CONFIGURE_CATEGORY_MAIN_VIDEO_INPUT, + "UseZeroCopyFormat", + &(hcamcorder->use_zero_copy_format)); + /* Set initial state */ _mmcamcorder_set_state((MMHandleType)hcamcorder, MM_CAMCORDER_STATE_NULL); - _mmcam_dbg_log("created handle %p", hcamcorder); + _mmcam_dbg_log("created handle %p - UseZeroCopyFormat %d", + hcamcorder, hcamcorder->use_zero_copy_format); *handle = (MMHandleType)hcamcorder; _mmcam_dbg_log("created client handle : 0x%x", *handle); diff --git a/src/mm_camcorder_resource.c b/src/mm_camcorder_resource.c index 57c2110..54a0b3f 100644 --- a/src/mm_camcorder_resource.c +++ b/src/mm_camcorder_resource.c @@ -166,7 +166,6 @@ static void mrp_rset_state_callback(mrp_res_context_t *cx, const mrp_res_resourc static void mrp_resource_release_cb (mrp_res_context_t *cx, const mrp_res_resource_set_t *rs, void *user_data) { int i = 0; - int result = MM_ERROR_NONE; int current_state = MM_CAMCORDER_STATE_NONE; mmf_camcorder_t* camcorder = (mmf_camcorder_t*)user_data; mrp_res_resource_t *res; diff --git a/src/mm_camcorder_sound.c b/src/mm_camcorder_sound.c index d2fda12..c4c89fb 100644 --- a/src/mm_camcorder_sound.c +++ b/src/mm_camcorder_sound.c @@ -428,7 +428,9 @@ gboolean _mmcamcorder_sound_play(MMHandleType handle, const char *sample_name, g mmf_camcorder_t *hcamcorder = MMF_CAMCORDER(handle); SOUND_INFO *info = NULL; +/* pa_operation *pulse_op = NULL; +*/ mmf_return_val_if_fail(hcamcorder && sample_name, FALSE); @@ -507,9 +509,6 @@ gboolean _mmcamcorder_sound_finalize(MMHandleType handle) { mmf_camcorder_t *hcamcorder = MMF_CAMCORDER(handle); SOUND_INFO *info = NULL; - mm_sound_device_in device_in; - mm_sound_device_out device_out; - int ret = 0; mmf_return_val_if_fail(hcamcorder, FALSE);