GList *switch_src_list = NULL;
GList *element_list = NULL;
GstPad *src_pad;
+ ini_item_media_source_s *ini_source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
return WEBRTC_ERROR_INVALID_OPERATION;
APPEND_ELEMENT(switch_src_list, screensrc);
+ if (!(ini_source = _ini_get_source_by_type(&webrtc->ini, source->type))) {
+ LOG_ERROR("ini_source is NULL");
+ goto exit;
+ }
+ _gst_set_element_properties(screensrc, ini_source->source_element_properties);
+
if (!(videotestsrc = _create_element(DEFAULT_ELEMENT_VIDEOTESTSRC, ELEMENT_NAME_VIDEO_MUTE_SRC)))
goto exit;
APPEND_ELEMENT(switch_src_list, videotestsrc);
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
+ ini_item_media_source_s *ini_source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
return WEBRTC_ERROR_INVALID_OPERATION;
APPEND_ELEMENT(element_list, camerasrc);
- /* FIXME: set camera default setting from ini */
+ if (!(ini_source = _ini_get_source_by_type(&webrtc->ini, source->type))) {
+ LOG_ERROR("ini_source is NULL");
+ goto exit;
+ }
+ _gst_set_element_properties(camerasrc, ini_source->source_element_properties);
/* NOTE: in case of an element that supports tizen zerocopy format, not to emit an error in GST_STATE_PLAYING
* without buffer consumption before finishing negotiation, set this property to 0 here. */
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
+ ini_item_media_source_s *ini_source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
return WEBRTC_ERROR_INVALID_OPERATION;
APPEND_ELEMENT(element_list, audiosrc);
- if (!use_mic)
- g_object_set(G_OBJECT(audiosrc), "is-live", TRUE, NULL);
+ if (!(ini_source = _ini_get_source_by_type(&webrtc->ini, source->type))) {
+ LOG_ERROR("ini_source is NULL");
+ goto exit;
+ }
+ _gst_set_element_properties(audiosrc, ini_source->source_element_properties);
if (!(volume = _create_element(DEFAULT_ELEMENT_VOLUME, ELEMENT_NAME_VOLUME)))
goto exit;
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
+ ini_item_media_source_s *ini_source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
return WEBRTC_ERROR_INVALID_OPERATION;
APPEND_ELEMENT(element_list, videotestsrc);
- g_object_set(G_OBJECT(videotestsrc),
- "is-live", TRUE,
- "pattern", 18, /* ball */
- NULL);
+ if (!(ini_source = _ini_get_source_by_type(&webrtc->ini, source->type))) {
+ LOG_ERROR("ini_source is NULL");
+ goto exit;
+ }
+ _gst_set_element_properties(videotestsrc, ini_source->source_element_properties);
if ((ret = __create_rest_of_elements(webrtc, source, true, &element_list, false)) != WEBRTC_ERROR_NONE)
goto exit;
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
+ ini_item_media_source_s *ini_source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
return WEBRTC_ERROR_INVALID_OPERATION;
APPEND_ELEMENT(element_list, custom_videosrc);
+ if (!(ini_source = _ini_get_source_by_type(&webrtc->ini, source->type))) {
+ LOG_ERROR("ini_source is NULL");
+ goto exit;
+ }
+ _gst_set_element_properties(custom_videosrc, ini_source->source_element_properties);
+
if ((ret = __create_rest_of_elements(webrtc, source, true, &element_list, false)) != WEBRTC_ERROR_NONE)
goto exit;
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
+ ini_item_media_source_s *ini_source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
return WEBRTC_ERROR_INVALID_OPERATION;
APPEND_ELEMENT(element_list, custom_audiosrc);
+ if (!(ini_source = _ini_get_source_by_type(&webrtc->ini, source->type))) {
+ LOG_ERROR("ini_source is NULL");
+ goto exit;
+ }
+ _gst_set_element_properties(custom_audiosrc, ini_source->source_element_properties);
+
if (!(volume = _create_element(DEFAULT_ELEMENT_VOLUME, ELEMENT_NAME_VOLUME)))
goto exit;
APPEND_ELEMENT(element_list, volume);