static int __media_packet_finalize_cb(media_packet_h packet, int error_code, void *user_data)
{
- webrtc_gst_slot_s *sink = (webrtc_gst_slot_s *)user_data;
+ const webrtc_gst_slot_s *sink = (webrtc_gst_slot_s *)user_data;
GstBuffer *buffer = NULL;
RET_VAL_IF(sink == NULL, MEDIA_PACKET_FINALIZE, "sink is NULL");
int _get_display_mode_from_sink(webrtc_s *webrtc, unsigned int track_id, webrtc_display_mode_e *mode)
{
- webrtc_gst_slot_s *sink;
+ const webrtc_gst_slot_s *sink;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(track_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "track id is 0");
int _get_display_visible_from_sink(webrtc_s *webrtc, unsigned int track_id, bool *visible)
{
- webrtc_gst_slot_s *sink;
+ const webrtc_gst_slot_s *sink;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(track_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "track id is 0");
return WEBRTC_ERROR_NONE;
}
-//LCOV_EXCL_STOP
\ No newline at end of file
+//LCOV_EXCL_STOP
GstElement *queue = NULL;
GstElement *capsfilter = NULL;
GList *element_list = NULL;
- int av_idx = GET_AV_IDX_BY_TYPE(media_type);
+ const int av_idx = GET_AV_IDX_BY_TYPE(media_type);
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
RET_VAL_IF(source->bin == NULL, WEBRTC_ERROR_INVALID_OPERATION, "bin is NULL");
int _get_transceiver_direction(webrtc_s *webrtc, unsigned int source_id, webrtc_media_type_e media_type, webrtc_transceiver_direction_e *direction)
{
int ret = WEBRTC_ERROR_INVALID_OPERATION;
- webrtc_gst_slot_s *source;
- GstWebRTCRTPTransceiver *trans;
+ const webrtc_gst_slot_s *source;
+ const GstWebRTCRTPTransceiver *trans;
GArray *transceivers;
int mline;
guint i;
int _get_pause(webrtc_s *webrtc, unsigned int source_id, webrtc_media_type_e media_type, bool *paused)
{
- webrtc_gst_slot_s *source;
+ const webrtc_gst_slot_s *source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(paused == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "paused is NULL");
int _get_video_resolution(webrtc_s *webrtc, unsigned int source_id, int *width, int *height)
{
- webrtc_gst_slot_s *source;
+ const webrtc_gst_slot_s *source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(width == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "width is NULL");
int _set_sound_stream_info(webrtc_s *webrtc, unsigned int source_id, sound_stream_info_h stream_info)
{
- webrtc_gst_slot_s *source;
+ const webrtc_gst_slot_s *source;
GstElement *element;
int ret;
bool available = false;
static gboolean __check_format_is_not_set_cb(gpointer key, gpointer value, gpointer user_data)
{
- webrtc_gst_slot_s *source = value;
+ const webrtc_gst_slot_s *source = (webrtc_gst_slot_s *)value;
if (source->type == GPOINTER_TO_INT(user_data)) {
LOG_INFO("found media packet source[%p, id:%u, media_format:%p]", source, source->id, source->media_format);
bool _check_if_format_is_set_to_packet_sources(webrtc_s *webrtc)
{
- webrtc_gst_slot_s *source;
+ const webrtc_gst_slot_s *source;
RET_VAL_IF(webrtc == NULL, false, "webrtc is NULL");
static gboolean __check_path_is_not_set_cb(gpointer key, gpointer value, gpointer user_data)
{
- webrtc_gst_slot_s *source = (webrtc_gst_slot_s *)value;
+ const webrtc_gst_slot_s *source = (webrtc_gst_slot_s *)value;
gchar *location = NULL;
if (source->type == GPOINTER_TO_INT(user_data)) {
bool _check_if_path_is_set_to_file_sources(webrtc_s *webrtc)
{
- webrtc_gst_slot_s *source;
+ const webrtc_gst_slot_s *source;
RET_VAL_IF(webrtc == NULL, false, "webrtc is NULL");
int _get_video_mute(webrtc_s *webrtc, unsigned int source_id, bool *muted)
{
- webrtc_gst_slot_s *source = NULL;
+ const webrtc_gst_slot_s *source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "source_id is 0");
//LCOV_EXCL_START
int _get_audio_mute(webrtc_s *webrtc, unsigned int source_id, bool *muted)
{
- webrtc_gst_slot_s *source = NULL;
+ const webrtc_gst_slot_s *source;
GstElement *volume = NULL;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
{
GstElement *appsrc;
gchar *pipeline_name;
- int idx = GET_AV_IDX_BY_TYPE(type);
+ const int idx = GET_AV_IDX_BY_TYPE(type);
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "source is NULL");
int _get_display_mode_from_loopback(webrtc_s *webrtc, unsigned int track_id, webrtc_display_mode_e *mode)
{
- webrtc_gst_slot_s *source;
+ const webrtc_gst_slot_s *source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(track_id < TRACK_ID_THRESHOLD_OF_LOOPBACK, WEBRTC_ERROR_INVALID_PARAMETER, "invalid track_id(%d)", track_id);
int _get_display_visible_from_loopback(webrtc_s *webrtc, unsigned int track_id, bool *visible)
{
- webrtc_gst_slot_s *source;
+ const webrtc_gst_slot_s *source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(track_id < TRACK_ID_THRESHOLD_OF_LOOPBACK, WEBRTC_ERROR_INVALID_PARAMETER, "invalid track_id(%d)", track_id);
int _get_filesrc_looping(webrtc_s * webrtc, unsigned int source_id, bool *looping)
{
- webrtc_gst_slot_s *source = NULL;
+ const webrtc_gst_slot_s *source;
RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
RET_VAL_IF(source_id == 0, WEBRTC_ERROR_INVALID_PARAMETER, "source_id is 0");