Changeset 2191 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
- Timestamp:
- Aug 4, 2008 3:01:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r2135 r2191 1232 1232 pj_memcpy(&sess_info.stream_info[0], si, sizeof(pjmedia_stream_info)); 1233 1233 1234 /* Check if media is put on-hold*/1234 /* Check if no media is active */ 1235 1235 if (sess_info.stream_cnt == 0 || si->dir == PJMEDIA_DIR_NONE) 1236 1236 { 1237 1238 /* Determine who puts the call on-hold */ 1239 if (prev_media_st == PJSUA_CALL_MEDIA_ACTIVE) { 1240 if (pjmedia_sdp_neg_was_answer_remote(call->inv->neg)) { 1241 /* It was local who offer hold */ 1242 call->media_st = PJSUA_CALL_MEDIA_LOCAL_HOLD; 1243 } else { 1244 call->media_st = PJSUA_CALL_MEDIA_REMOTE_HOLD; 1245 } 1246 } 1247 1237 /* Call media state */ 1238 call->media_st = PJSUA_CALL_MEDIA_NONE; 1239 1240 /* Call media direction */ 1248 1241 call->media_dir = PJMEDIA_DIR_NONE; 1249 1242 … … 1368 1361 } 1369 1362 1370 /* Call's media state is active */ 1371 call->media_st = PJSUA_CALL_MEDIA_ACTIVE; 1363 /* Call media direction */ 1372 1364 call->media_dir = si->dir; 1365 1366 /* Call media state */ 1367 if (call->local_hold) 1368 call->media_st = PJSUA_CALL_MEDIA_LOCAL_HOLD; 1369 else if (call->media_dir == PJMEDIA_DIR_DECODING) 1370 call->media_st = PJSUA_CALL_MEDIA_REMOTE_HOLD; 1371 else 1372 call->media_st = PJSUA_CALL_MEDIA_ACTIVE; 1373 1373 } 1374 1374
Note: See TracChangeset
for help on using the changeset viewer.