Changeset 5677
- Timestamp:
- Oct 27, 2017 6:30:50 AM (7 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/audiodev.h
r5430 r5677 50 50 * Device index constants. 51 51 */ 52 enum 52 typedef enum pjmedia_aud_dev_id 53 53 { 54 54 /** … … 66 66 */ 67 67 PJMEDIA_AUD_INVALID_DEV = -3 68 } ;68 } pjmedia_aud_dev_id; 69 69 70 70 -
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r5534 r5677 960 960 static pj_status_t on_snd_dev_operation(int operation) 961 961 { 962 PJ_LOG(3,(THIS_FILE, "Turning sound device %s", (operation? "ON":"OFF"))); 962 int cap_dev, play_dev; 963 964 pjsua_get_snd_dev(&cap_dev, &play_dev); 965 PJ_LOG(3,(THIS_FILE, "Turning sound device %d %d %s", cap_dev, play_dev, 966 (operation? "ON":"OFF"))); 963 967 return PJ_SUCCESS; 964 968 } -
pjproject/trunk/pjsip-apps/src/swig/symbols.i
r5649 r5677 56 56 57 57 typedef enum pjmedia_vid_dev_cap {PJMEDIA_VID_DEV_CAP_FORMAT = 1, PJMEDIA_VID_DEV_CAP_INPUT_SCALE = 2, PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW = 4, PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE = 8, PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION = 16, PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE = 32, PJMEDIA_VID_DEV_CAP_INPUT_PREVIEW = 64, PJMEDIA_VID_DEV_CAP_ORIENTATION = 128, PJMEDIA_VID_DEV_CAP_SWITCH = 256, PJMEDIA_VID_DEV_CAP_OUTPUT_WINDOW_FLAGS = 512, PJMEDIA_VID_DEV_CAP_MAX = 16384} pjmedia_vid_dev_cap; 58 59 typedef enum pjmedia_aud_dev_id {PJMEDIA_AUD_DEFAULT_CAPTURE_DEV = -1, PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV = -2, PJMEDIA_AUD_INVALID_DEV = -3} pjmedia_aud_dev_id; 58 60 59 61 typedef enum pjmedia_aud_dev_route {PJMEDIA_AUD_DEV_ROUTE_DEFAULT = 0, PJMEDIA_AUD_DEV_ROUTE_LOUDSPEAKER = 1, PJMEDIA_AUD_DEV_ROUTE_EARPIECE = 2, PJMEDIA_AUD_DEV_ROUTE_BLUETOOTH = 4, PJMEDIA_AUD_DEV_ROUTE_CUSTOM = 128} pjmedia_aud_dev_route; … … 174 176 typedef enum pjsua_create_media_transport_flag {PJSUA_MED_TP_CLOSE_MEMBER = 1} pjsua_create_media_transport_flag; 175 177 178 typedef enum pjsua_snd_dev_id {PJSUA_SND_DEFAULT_CAPTURE_DEV = PJMEDIA_AUD_DEFAULT_CAPTURE_DEV, PJSUA_SND_DEFAULT_PLAYBACK_DEV = PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV, PJSUA_SND_NO_DEV = PJMEDIA_AUD_INVALID_DEV, PJSUA_SND_NULL_DEV = -99} pjsua_snd_dev_id; 179 176 180 typedef enum pjsua_snd_dev_mode {PJSUA_SND_DEV_SPEAKER_ONLY = 1, PJSUA_SND_DEV_NO_IMMEDIATE_OPEN = 2} pjsua_snd_dev_mode; 177 181 -
pjproject/trunk/pjsip-apps/src/swig/symbols.lst
r5649 r5677 12 12 pjmedia/vid_stream.h pjmedia_vid_stream_rc_method 13 13 pjmedia-videodev/videodev.h pjmedia_vid_dev_index pjmedia_vid_dev_std_index pjmedia_vid_dev_cap 14 pjmedia-audiodev/audiodev.h pjmedia_aud_dev_ route pjmedia_aud_dev_cap14 pjmedia-audiodev/audiodev.h pjmedia_aud_dev_id pjmedia_aud_dev_route pjmedia_aud_dev_cap 15 15 pjmedia/wav_port.h pjmedia_file_writer_option pjmedia_file_player_option 16 16 pjmedia/tonegen.h pjmedia_tone_digit pjmedia_tone_digit_map pjmedia_tone_desc … … 34 34 pjsip-ua/sip_inv.h pjsip_inv_state 35 35 36 pjsua-lib/pjsua.h pjsua_invalid_id_const_ pjsua_state pjsua_stun_use pjsua_call_hold_type pjsua_acc_id pjsua_destroy_flag pjsua_100rel_use pjsua_sip_timer_use pjsua_ipv6_use pjsua_nat64_opt pjsua_buddy_status pjsua_call_media_status pjsua_vid_win_id pjsua_call_id pjsua_med_tp_st pjsua_call_vid_strm_op pjsua_vid_req_keyframe_method pjsua_call_flag pjsua_create_media_transport_flag pjsua_snd_dev_ mode pjsua_ip_change_op36 pjsua-lib/pjsua.h pjsua_invalid_id_const_ pjsua_state pjsua_stun_use pjsua_call_hold_type pjsua_acc_id pjsua_destroy_flag pjsua_100rel_use pjsua_sip_timer_use pjsua_ipv6_use pjsua_nat64_opt pjsua_buddy_status pjsua_call_media_status pjsua_vid_win_id pjsua_call_id pjsua_med_tp_st pjsua_call_vid_strm_op pjsua_vid_req_keyframe_method pjsua_call_flag pjsua_create_media_transport_flag pjsua_snd_dev_id pjsua_snd_dev_mode pjsua_ip_change_op -
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r5676 r5677 1447 1447 * sound device is configured by the application (i.e. the 1448 1448 * #pjsua_set_null_snd_dev() and #pjsua_set_no_snd_dev() APIs). 1449 * This API is mostly useful when the application wants to manage 1449 * Application can use the API #pjsua_get_snd_dev() to get the info 1450 * about which sound device is going to be opened/closed. 1451 * 1452 * This callback is mostly useful when the application wants to manage 1450 1453 * the sound device by itself (i.e. with #pjsua_set_no_snd_dev()), 1451 1454 * to get notified when it should open or close the sound device. … … 6407 6410 } pjsua_media_transport; 6408 6411 6412 6413 /** 6414 * Sound device index constants. 6415 */ 6416 typedef enum pjsua_snd_dev_id 6417 { 6418 /** 6419 * Constant to denote default capture device. 6420 */ 6421 PJSUA_SND_DEFAULT_CAPTURE_DEV = PJMEDIA_AUD_DEFAULT_CAPTURE_DEV, 6422 6423 /** 6424 * Constant to denote default playback device. 6425 */ 6426 PJSUA_SND_DEFAULT_PLAYBACK_DEV = PJMEDIA_AUD_DEFAULT_PLAYBACK_DEV, 6427 6428 /** 6429 * Constant to denote that no sound device is being used. 6430 */ 6431 PJSUA_SND_NO_DEV = PJMEDIA_AUD_INVALID_DEV, 6432 6433 /** 6434 * Constant to denote null sound device. 6435 */ 6436 PJSUA_SND_NULL_DEV = -99 6437 6438 } pjsua_snd_dev_id; 6439 6409 6440 /** 6410 6441 * This enumeration specifies the sound device mode. … … 6826 6857 * (for example when pjsua_start() is not called), it is possible that 6827 6858 * the function returns PJ_SUCCESS with -1 as device IDs. 6859 * See also #pjsua_snd_dev_id constants. 6828 6860 * 6829 6861 * @param capture_dev On return it will be filled with device ID of the -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_aud.c
r5676 r5677 24 24 25 25 #define THIS_FILE "pjsua_aud.c" 26 #define NULL_SND_DEV_ID -9927 26 28 27 /***************************************************************************** … … 881 880 882 881 if (need_reopen) { 883 if (pjsua_var.cap_dev != NULL_SND_DEV_ID) {882 if (pjsua_var.cap_dev != PJSUA_SND_NULL_DEV) { 884 883 pjmedia_snd_port_param param; 885 884 … … 1728 1727 1729 1728 /* Check if NULL sound device is used */ 1730 if ( NULL_SND_DEV_ID==param->base.rec_id ||1731 NULL_SND_DEV_ID==param->base.play_id)1729 if (PJSUA_SND_NULL_DEV==param->base.rec_id || 1730 PJSUA_SND_NULL_DEV==param->base.play_id) 1732 1731 { 1733 1732 return pjsua_set_null_snd_dev(); … … 1736 1735 /* Close existing sound port */ 1737 1736 close_snd_dev(); 1737 1738 /* Save the device IDs */ 1739 pjsua_var.cap_dev = param->base.rec_id; 1740 pjsua_var.play_dev = param->base.play_id; 1738 1741 1739 1742 /* Notify app */ … … 1853 1856 } 1854 1857 1855 /* Save the device IDs */1856 pjsua_var.cap_dev = param->base.rec_id;1857 pjsua_var.play_dev = param->base.play_id;1858 1859 1858 /* Update sound device name. */ 1860 1859 { … … 2010 2009 2011 2010 /* Null-sound */ 2012 if (snd_param->capture_dev == NULL_SND_DEV_ID&&2013 snd_param->playback_dev == NULL_SND_DEV_ID)2011 if (snd_param->capture_dev == PJSUA_SND_NULL_DEV && 2012 snd_param->playback_dev == PJSUA_SND_NULL_DEV) 2014 2013 { 2015 2014 PJSUA_UNLOCK(); … … 2130 2129 close_snd_dev(); 2131 2130 2131 pjsua_var.cap_dev = PJSUA_SND_NULL_DEV; 2132 pjsua_var.play_dev = PJSUA_SND_NULL_DEV; 2133 2132 2134 /* Notify app */ 2133 2135 if (pjsua_var.ua_cfg.cb.on_snd_dev_operation) { … … 2162 2164 PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 2163 2165 2164 pjsua_var.cap_dev = NULL_SND_DEV_ID;2165 pjsua_var.play_dev = NULL_SND_DEV_ID;2166 2167 2166 pjsua_var.no_snd = PJ_FALSE; 2168 2167 pjsua_var.snd_is_on = PJ_TRUE; … … 2185 2184 close_snd_dev(); 2186 2185 pjsua_var.no_snd = PJ_TRUE; 2186 pjsua_var.cap_dev = PJSUA_SND_NO_DEV; 2187 pjsua_var.play_dev = PJSUA_SND_NO_DEV; 2187 2188 2188 2189 PJSUA_UNLOCK();
Note: See TracChangeset
for help on using the changeset viewer.