int _get_encoder_element_bitrate(GstElement *encoder, int *target_bitrate);
void _set_caps_for_render(webrtc_gst_slot_s *source, GstCaps *caps, int av_idx);
void _unset_caps_for_render(webrtc_gst_slot_s *source, int av_idx);
+void _set_video_src_resolution(webrtc_gst_slot_s *source, int width, int height);
#endif /* __TIZEN_MEDIA_WEBRTC_SOURCE_COMMON_H__ */
Name: capi-media-webrtc
Summary: A WebRTC library in Tizen Native API
-Version: 0.3.210
+Version: 0.3.211
Release: 0
Group: Multimedia/API
License: Apache-2.0
source->video_info.framerate = ini_source->v_framerate;
source->video_info.origin_width = ini_source->v_width;
source->video_info.origin_height = ini_source->v_height;
- source->video_info.width = ini_source->v_width;
- source->video_info.height = ini_source->v_height;
+ _set_video_src_resolution(source, ini_source->v_width, ini_source->v_height);
if (source->type == WEBRTC_MEDIA_SOURCE_TYPE_SCREEN) {
#ifdef TIZEN_FEATURE_UI
source->video_info.origin_width = width;
source->video_info.origin_height = height;
- source->video_info.width = width;
- source->video_info.height = height;
+ _set_video_src_resolution(source, width, height);
#else
LOG_WARNING("TIZEN_FEATURE_UI is disabled, skip this function, use values of ini");
#endif
_set_caps_for_render(source, new_caps, AV_IDX_VIDEO);
}
- source->video_info.width = width;
- source->video_info.height = height;
+ _set_video_src_resolution(source, width, height);
LOG_INFO("webrtc[%p], source_id[%u], [%dx%d]", webrtc, source_id, width, height);
gst_caps_unref(source->av[av_idx].render.appsrc_caps);
source->av[av_idx].render.appsrc_caps = NULL;
}
+
+void _set_video_src_resolution(webrtc_gst_slot_s *source, int width, int height)
+{
+ RET_IF(source == NULL, "source is NULL");
+
+ source->video_info.width = width;
+ source->video_info.height = height;
+}
*width = output_width - (left + right);
*height = output_height - (top + bottom);
- LOG_INFO("source_id[%u], video resolution is changed [%dx%d] ==> [%dx%d]", source_id,
- output_width, output_height, *width, *height);
+
+ _set_video_src_resolution(source, *width, *height);
+
+ LOG_INFO("source_id[%u], video resolution is changed [%dx%d] ==> [%dx%d]", source_id, output_width, output_height, *width, *height);
return WEBRTC_ERROR_NONE;
}
"bottom", 0,
NULL);
+ _set_video_src_resolution(source, source->video_info.origin_width, source->video_info.origin_height);
+
return WEBRTC_ERROR_NONE;
}