*/
int webrtc_set_sound_stream_info(webrtc_h webrtc, unsigned int track_id, sound_stream_info_h stream_info);
+/**
+ * @brief Sets mute to the audio track.
+ * @since_tizen 8.0
+ * @remarks If @a mute is set to @c true, playback of audio track received from a remote peer will be muted.
+ * @param[in] webrtc WebRTC handle
+ * @param[in] track_id The track id
+ * @param[in] mute Mute or not (@c true = mute, @c false = not mute)
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
+ * @pre webrtc_track_added_cb() must be set by calling webrtc_set_track_added_cb().
+ * @pre Call webrtc_set_sound_stream_info() before calling this function.
+ * @see webrtc_get_audio_mute()
+ */
+int webrtc_set_audio_mute(webrtc_h webrtc, unsigned int track_id, bool mute);
+
+/**
+ * @brief Gets the mute state of the audio track.
+ * @since_tizen 8.0
+ * @remarks The default value is @c false.
+ * @param[in] webrtc WebRTC handle
+ * @param[in] track_id The track id
+ * @param[out] muted Muted or not (@c true = muted, @c false = not muted)
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ * @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
+ * @pre webrtc_track_added_cb() must be set by calling webrtc_set_track_added_cb().
+ * @pre Call webrtc_set_sound_stream_info() before calling this function.
+ * @see webrtc_set_audio_mute()
+ */
+int webrtc_get_audio_mute(webrtc_h webrtc, unsigned int track_id, bool *muted);
+
/**
* @brief Sets a display to the video track to be rendered.
* @since_tizen 6.5
*/
int webrtc_set_display_surface_id(webrtc_h webrtc, unsigned int track_id, int surface_id, int x, int y, int width, int height);
-/**
- * @internal
- * @brief Sets mute to the audio track.
- * @since_tizen 6.5
- * @remarks If @a mute is set to @c true, playback of audio track received from a remote peer will be muted.
- * @param[in] webrtc WebRTC handle
- * @param[in] track_id The track id
- * @param[in] mute Mute or not (@c true = mute, @c false = not mute)
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #WEBRTC_ERROR_NONE Successful
- * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @pre webrtc_track_added_cb() must be set by calling webrtc_set_track_added_cb().
- * @pre Call webrtc_set_sound_stream_info() before calling this function.
- * @see webrtc_get_audio_mute()
- */
-int webrtc_set_audio_mute(webrtc_h webrtc, unsigned int track_id, bool mute);
-
-/**
- * @internal
- * @brief Gets the mute state of the audio track.
- * @since_tizen 6.5
- * @remarks The default value is @c false.
- * @param[in] webrtc WebRTC handle
- * @param[in] track_id The track id
- * @param[out] muted Muted or not (@c true = muted, @c false = not muted)
- * @return @c 0 on success,
- * otherwise a negative error value
- * @retval #WEBRTC_ERROR_NONE Successful
- * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @pre webrtc_track_added_cb() must be set by calling webrtc_set_track_added_cb().
- * @pre Call webrtc_set_sound_stream_info() before calling this function.
- * @see webrtc_set_audio_mute()
- */
-int webrtc_get_audio_mute(webrtc_h webrtc, unsigned int track_id, bool *muted);
-
/**
* @internal
* @brief Gets the video resolution of the video track.
return _set_stream_info_to_sink(webrtc, track_id, stream_info);
}
+int webrtc_set_audio_mute(webrtc_h webrtc, unsigned int track_id, bool mute)
+{
+ g_autoptr(GMutexLocker) locker = NULL;
+ webrtc_s *_webrtc = (webrtc_s *)webrtc;
+
+ RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
+
+ locker = g_mutex_locker_new(&_webrtc->mutex);
+
+ RET_VAL_IF(_webrtc->track_added_cb.callback == NULL, WEBRTC_ERROR_INVALID_OPERATION, "track added callback was not set");
+
+ return _set_audio_mute_to_sink(_webrtc, track_id, mute);
+}
+
+int webrtc_get_audio_mute(webrtc_h webrtc, unsigned int track_id, bool *muted)
+{
+ g_autoptr(GMutexLocker) locker = NULL;
+ webrtc_s *_webrtc = (webrtc_s *)webrtc;
+
+ RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
+ RET_VAL_IF(muted == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "muted is NULL");
+
+ locker = g_mutex_locker_new(&_webrtc->mutex);
+
+ RET_VAL_IF(_webrtc->track_added_cb.callback == NULL, WEBRTC_ERROR_INVALID_OPERATION, "track added callback was not set");
+
+ return _get_audio_mute_from_sink(_webrtc, track_id, muted);
+}
+
int webrtc_set_display(webrtc_h webrtc, unsigned int track_id, webrtc_display_type_e type, webrtc_display_h display)
{
g_autoptr(GMutexLocker) locker = NULL;
return _set_display_surface_id_to_sink(webrtc, track_id, surface_id, x, y, width, height);
}
-int webrtc_set_audio_mute(webrtc_h webrtc, unsigned int track_id, bool mute)
-{
- g_autoptr(GMutexLocker) locker = NULL;
- webrtc_s *_webrtc = (webrtc_s *)webrtc;
-
- RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
-
- locker = g_mutex_locker_new(&_webrtc->mutex);
-
- RET_VAL_IF(_webrtc->track_added_cb.callback == NULL, WEBRTC_ERROR_INVALID_OPERATION, "track added callback was not set");
-
- return _set_audio_mute_to_sink(_webrtc, track_id, mute);
-}
-
-int webrtc_get_audio_mute(webrtc_h webrtc, unsigned int track_id, bool *muted)
-{
- g_autoptr(GMutexLocker) locker = NULL;
- webrtc_s *_webrtc = (webrtc_s *)webrtc;
-
- RET_VAL_IF(_webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
- RET_VAL_IF(muted == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "muted is NULL");
-
- locker = g_mutex_locker_new(&_webrtc->mutex);
-
- RET_VAL_IF(_webrtc->track_added_cb.callback == NULL, WEBRTC_ERROR_INVALID_OPERATION, "track added callback was not set");
-
- return _get_audio_mute_from_sink(_webrtc, track_id, muted);
-}
-
int webrtc_get_video_resolution(webrtc_h webrtc, unsigned int track_id, int *width, int *height)
{
g_autoptr(GMutexLocker) locker = NULL;
g_print("gm. Get display mode\n");
g_print("dv. Set display visible\t");
g_print("gv. Get display visible\n");
- g_print("*sam. Set audio mute\t");
- g_print("*gam. Get audio mute\n");
+ g_print("sam. Set audio mute\t");
+ g_print("gam. Get audio mute\n");
g_print("*gvr. Get video resolution\n");
g_print("*tsn. Take snapshot\n");
g_print("al. Set audio loopback\t");
void reset_menu_state(void)
{
get_appdata()->menu_status = CURRENT_STATUS_MAINMENU;
-}
\ No newline at end of file
+}