Name: capi-media-webrtc
Summary: A WebRTC library in Tizen Native API
-Version: 0.4.41
+Version: 0.4.42
Release: 0
Group: Multimedia/API
License: Apache-2.0
source_id, g_webrtc_media_type_str[media_type], rid);
}
+static void _webrtc_media_source_active_transceiver_encoding(int index, unsigned int source_id, webrtc_media_type_e media_type, const char *rid, bool active)
+{
+ int ret = webrtc_media_source_active_transceiver_encoding(g_ad.conns[index].webrtc, source_id, media_type, rid, active);
+ RET_IF(ret != WEBRTC_ERROR_NONE, "ret[0x%x]", ret);
+
+ g_print("webrtc_media_source_active_transceiver_encoding() success, source_id[%u], media_type[%s], rid[%s], active[%d]\n",
+ source_id, g_webrtc_media_type_str[media_type], rid, active);
+}
+
static void __offer_created_cb(webrtc_h webrtc, const char *description, void *user_data)
{
connection_s *conn = (connection_s *)user_data;
}
break;
}
+ case CURRENT_STATUS_MEDIA_SOURCE_ACTIVE_TRANSCEIVER_ENCODING: {
+ static unsigned int id;
+ static unsigned int media_type;
+ static char *rid;
+
+ switch (g_ad.input_count) {
+ case 0:
+ id = value;
+ g_ad.input_count++;
+ return;
+ case 1:
+ media_type = value - 1;
+ g_ad.input_count++;
+ return;
+ case 2:
+ rid = strdup(cmd);
+ g_ad.input_count++;
+ return;
+ case 3:
+ _webrtc_media_source_active_transceiver_encoding(0, id, media_type, rid, value > 0);
+ id = media_type = 0;
+ if (rid) {
+ free(rid);
+ rid = NULL;
+ }
+ g_ad.input_count = 0;
+ break;
+ }
+ break;
+ }
}
reset_menu_state();
{ "gpt", CURRENT_STATUS_MEDIA_SOURCE_GET_PAYLOAD_TYPE, true },
{ "ae", CURRENT_STATUS_MEDIA_SOURCE_ADD_TRANSCEIVER_ENCODING, true },
{ "re", CURRENT_STATUS_MEDIA_SOURCE_REMOVE_TRANSCEIVER_ENCODING, true },
+ { "te", CURRENT_STATUS_MEDIA_SOURCE_ACTIVE_TRANSCEIVER_ENCODING, true },
/* webrtc media render */
{ "dt", CURRENT_STATUS_SET_DISPLAY_TYPE, true },
{ "dm", CURRENT_STATUS_SET_DISPLAY_MODE, true },
g_print("scs. *Set screen source crop\t");
g_print("ucs. *Unset screen source crop\n");
g_print("ae. *Add transceiver encoding\t");
- g_print("re. *Remove transceiver encoding\n");
+ g_print("re. *Remove transceiver encoding\t");
+ g_print("te. *Active transceiver encoding\n");
g_print("------------------------------------- Media Render --------------------------------------\n");
g_print("dt. Set display type\t");
g_print("dm. Set display mode\t");
else if (get_appdata()->input_count == 2)
g_print("*** input rid.\n");
break;
+ case CURRENT_STATUS_MEDIA_SOURCE_ACTIVE_TRANSCEIVER_ENCODING:
+ if (get_appdata()->input_count == 0)
+ g_print("*** input source id.\n");
+ else if (get_appdata()->input_count == 1)
+ g_print("*** input media type.(1:audio 2:video)\n");
+ else if (get_appdata()->input_count == 2)
+ g_print("*** input rid.\n");
+ else if (get_appdata()->input_count == 3)
+ g_print("*** input active or not.(1.active 0:inactive)\n");
+ break;
}
g_print(" >>> ");
}
CURRENT_STATUS_MEDIA_SOURCE_GET_PAYLOAD_TYPE = TEST_MENU_WEBRTC_MEDIA_SOURCE | 0x1F,
CURRENT_STATUS_MEDIA_SOURCE_ADD_TRANSCEIVER_ENCODING = TEST_MENU_WEBRTC_MEDIA_SOURCE | 0x21,
CURRENT_STATUS_MEDIA_SOURCE_REMOVE_TRANSCEIVER_ENCODING = TEST_MENU_WEBRTC_MEDIA_SOURCE | 0x22,
+ CURRENT_STATUS_MEDIA_SOURCE_ACTIVE_TRANSCEIVER_ENCODING = TEST_MENU_WEBRTC_MEDIA_SOURCE | 0x23,
/* webrtc media render */
CURRENT_STATUS_SET_DISPLAY_TYPE = TEST_MENU_WEBRTC_MEDIA_RENDER | 0x01,
CURRENT_STATUS_SET_DISPLAY_MODE = TEST_MENU_WEBRTC_MEDIA_RENDER | 0x02,