- Timestamp:
- Oct 4, 2011 4:04:49 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r3735 r3785 2762 2762 } 2763 2763 2764 /* arrange windows. arg: 2765 * -1: arrange all windows 2766 * != -1: arrange only this window id 2767 */ 2768 static void arrange_window(pjsua_vid_win_id wid) 2769 { 2770 pjmedia_coord pos; 2771 int i, last; 2772 2773 pos.x = 0; 2774 pos.y = 0; 2775 last = (wid == PJSUA_INVALID_ID) ? PJSUA_MAX_VID_WINS : wid; 2776 2777 for (i=0; i<last; ++i) { 2778 pjsua_vid_win_info wi; 2779 pj_status_t status; 2780 2781 status = pjsua_vid_win_get_info(i, &wi); 2782 if (status != PJ_SUCCESS) 2783 continue; 2784 2785 if (wid == PJSUA_INVALID_ID) 2786 pjsua_vid_win_set_pos(i, &pos); 2787 2788 pos.y += wi.size.h; 2789 } 2790 2791 if (wid != PJSUA_INVALID_ID) 2792 pjsua_vid_win_set_pos(wid, &pos); 2793 } 2794 2764 2795 /* Process video media state. "mi" is the media index. */ 2765 2796 static void on_call_video_state(pjsua_call_info *ci, unsigned mi, 2766 2797 pj_bool_t *has_error) 2767 2798 { 2768 PJ_UNUSED_ARG(ci); 2769 PJ_UNUSED_ARG(mi); 2799 if (ci->media_status != PJSUA_CALL_MEDIA_ACTIVE) 2800 return; 2801 2802 arrange_window(ci->media[mi].stream.vid.win_in); 2803 2770 2804 PJ_UNUSED_ARG(has_error); 2771 2805 } … … 3840 3874 if (on) { 3841 3875 pjsua_vid_preview_start(dev_id, NULL); 3876 arrange_window(pjsua_vid_preview_get_win(dev_id)); 3842 3877 } else { 3843 3878 pjsua_vid_preview_stop(dev_id);
Note: See TracChangeset
for help on using the changeset viewer.