Changeset 3638
- Timestamp:
- Jul 14, 2011 3:47:04 AM (13 years ago)
- Location:
- pjproject/branches/projects/2.0-dev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/2.0-dev/pjsip-apps/src/pjsua/pjsua_app.c
r3637 r3638 3809 3809 } else if (strcmp(argv[1], "win")==0) { 3810 3810 if (argc==3 && strcmp(argv[2], "list")==0) { 3811 PJ_LOG(1,(THIS_FILE, "Not implemented")); 3812 PJ_TODO(vid_list_window); 3811 pjsua_vid_win_id wids[PJSUA_MAX_VID_WINS]; 3812 unsigned i, cnt = PJ_ARRAY_SIZE(wids); 3813 3814 pjsua_vid_enum_wins(wids, &cnt); 3815 3816 PJ_LOG(3,(THIS_FILE, "Found %d video windows:", cnt)); 3817 PJ_LOG(3,(THIS_FILE, "WID show pos size")); 3818 PJ_LOG(3,(THIS_FILE, "------------------------------")); 3819 for (i = 0; i < cnt; ++i) { 3820 pjsua_vid_win_info wi; 3821 pjsua_vid_win_get_info(wids[i], &wi); 3822 PJ_LOG(3,(THIS_FILE, "%3d %c (%d,%d) %dx%d", 3823 wids[i], (wi.show?'Y':'N'), wi.pos.x, wi.pos.y, 3824 wi.size.w, wi.size.h)); 3825 } 3813 3826 } else if (argc==4 && (strcmp(argv[2], "show")==0 || 3814 3827 strcmp(argv[2], "hide")==0)) … … 3816 3829 pj_bool_t show = (strcmp(argv[2], "show")==0); 3817 3830 pjsua_vid_win_id wid = atoi(argv[3]); 3818 3819 3831 pjsua_vid_win_set_show(wid, show); 3820 3821 3832 } else if (argc==6 && strcmp(argv[2], "move")==0) { 3822 3833 pjsua_vid_win_id wid = atoi(argv[3]); … … 3824 3835 3825 3836 pos.x = atoi(argv[4]); 3826 pos.y = atoi(argv[ 4]);3837 pos.y = atoi(argv[5]); 3827 3838 pjsua_vid_win_set_pos(wid, &pos); 3828 3829 3839 } else if (argc==6 && strcmp(argv[2], "resize")==0) { 3830 3840 pjsua_vid_win_id wid = atoi(argv[3]); … … 3832 3842 3833 3843 size.w = atoi(argv[4]); 3834 size.h = atoi(argv[ 4]);3844 size.h = atoi(argv[5]); 3835 3845 pjsua_vid_win_set_size(wid, &size); 3836 3846 } else -
pjproject/branches/projects/2.0-dev/pjsip/include/pjsua-lib/pjsua.h
r3636 r3638 5402 5402 5403 5403 /** 5404 * Enumerates all video windows. 5405 * 5406 * @param id Array of window ID to be initialized. 5407 * @param count On input, specifies max elements in the array. 5408 * On return, it contains actual number of elements 5409 * that have been initialized. 5410 * 5411 * @return PJ_SUCCESS on success, or the appropriate error code. 5412 */ 5413 PJ_DECL(pj_status_t) pjsua_vid_enum_wins(pjsua_vid_win_id wids[], 5414 unsigned *count); 5415 5416 5417 /** 5404 5418 * Get window info. 5405 5419 * -
pjproject/branches/projects/2.0-dev/pjsip/src/pjsua-lib/pjsua_vid.c
r3637 r3638 878 878 */ 879 879 880 881 /* 882 * Enumerates all video windows. 883 */ 884 PJ_DEF(pj_status_t) pjsua_vid_enum_wins( pjsua_vid_win_id wids[], 885 unsigned *count) 886 { 887 unsigned i, cnt; 888 889 cnt = 0; 890 891 for (i=0; i<PJSUA_MAX_VID_WINS && cnt <*count; ++i) { 892 pjsua_vid_win *w = &pjsua_var.win[i]; 893 if (w->type != PJSUA_WND_TYPE_NONE) 894 wids[cnt++] = i; 895 } 896 897 *count = cnt; 898 899 return PJ_SUCCESS; 900 } 901 902 880 903 /* 881 904 * Get window info. … … 980 1003 981 1004 status = pjmedia_vid_dev_stream_set_cap(s, 982 PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION, &pos);1005 PJMEDIA_VID_DEV_CAP_OUTPUT_POSITION, pos); 983 1006 984 1007 PJSUA_UNLOCK(); … … 1013 1036 1014 1037 status = pjmedia_vid_dev_stream_set_cap(s, 1015 PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE, &size);1038 PJMEDIA_VID_DEV_CAP_OUTPUT_RESIZE, size); 1016 1039 1017 1040 PJSUA_UNLOCK();
Note: See TracChangeset
for help on using the changeset viewer.