static GstCaps *__make_video_raw_caps_with_resolution(webrtc_gst_slot_s *source, webrtc_ini_s *ini, int width, int height)
{
GstCaps *caps = NULL;
- ini_item_media_source_s *ini_source;
+ const ini_item_media_source_s *ini_source;
RET_VAL_IF(source == NULL, NULL, "source is NULL");
RET_VAL_IF(ini == NULL, NULL, "ini is NULL");
static GstCaps *__make_default_raw_caps(webrtc_gst_slot_s *source, webrtc_ini_s *ini)
{
GstCaps *caps = NULL;
- ini_item_media_source_s *ini_source;
+ const ini_item_media_source_s *ini_source;
GstAudioInfo info;
GstAudioFormat format;
static GstCaps *__make_default_encoded_caps(webrtc_gst_slot_s *source, webrtc_ini_s *ini, gchar **media_type)
{
GstCaps *caps;
- ini_item_media_source_s *ini_source;
+ const ini_item_media_source_s *ini_source;
const char *_media_type;
RET_VAL_IF(source == NULL, NULL, "source is NULL");
static bool __is_hw_encoder_used(webrtc_s *webrtc, webrtc_media_source_type_e source_type, media_type_e media_type)
{
- ini_item_media_source_s *ini_source;
+ const ini_item_media_source_s *ini_source;
RET_VAL_IF(webrtc == NULL, NULL, "webrtc is NULL");
static GstElement *__get_hw_encoder_element(webrtc_s *webrtc, webrtc_gst_slot_s *source)
{
- ini_item_media_source_s *ini_source;
+ const ini_item_media_source_s *ini_source;
GstElement *encoder = NULL;
RET_VAL_IF(webrtc == NULL, NULL, "webrtc is NULL");
static bool __is_encoded_format_supported(webrtc_media_source_type_e type, webrtc_ini_s *ini)
{
- ini_item_media_source_s *ini_source;
+ const ini_item_media_source_s *ini_source;
RET_VAL_IF(ini == NULL, NULL, "ini is NULL");
static const char *__get_source_element(webrtc_s *webrtc, int type)
{
- ini_item_media_source_s *source;
+ const ini_item_media_source_s *source;
RET_VAL_IF(webrtc == NULL, NULL, "webrtc is NULL");
GList *switch_src_list = NULL;
GList *element_list = NULL;
GstPad *src_pad;
- ini_item_media_source_s *ini_source;
+ const 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");
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
- ini_item_media_source_s *ini_source;
+ const 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");
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
- ini_item_media_source_s *ini_source;
+ const 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");
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
- ini_item_media_source_s *ini_source;
+ const 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");
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
- ini_item_media_source_s *ini_source;
+ const 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");
GstElement *capsfilter;
GList *element_list = NULL;
GstPad *src_pad;
- ini_item_media_source_s *ini_source;
+ const 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");
RET_VAL_IF((source->type == WEBRTC_MEDIA_SOURCE_TYPE_MEDIA_PACKET), WEBRTC_ERROR_INVALID_PARAMETER, "this API does not support the media packet source");
if (webrtc->state != WEBRTC_STATE_IDLE) {
- ini_item_media_source_s *ini_source;
- ini_source = _ini_get_source_by_type(&webrtc->ini, source->type);
+ const ini_item_media_source_s *ini_source = _ini_get_source_by_type(&webrtc->ini, source->type);
if (ini_source == NULL)
ini_source = &webrtc->ini.media_source;
RET_VAL_IF(!ini_source->v_drc_support, WEBRTC_ERROR_INVALID_OPERATION, "not supported dynamic resolution change");