Ignore:
Timestamp:
Sep 19, 2011 8:26:35 AM (13 years ago)
Author:
bennylp
Message:

Implemented native video preview support. This closes #1340

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r3724 r3756  
    46924692     */ 
    46934693    int                 snd_auto_close_time; 
     4694 
     4695    /** 
     4696     * Specify whether built-in/native preview should be used if available. 
     4697     * In some systems, video input devices have built-in capability to show 
     4698     * preview window of the device. Using this built-in preview is preferable 
     4699     * as it consumes less CPU power. If built-in preview is not available, 
     4700     * the library will perform software rendering of the input. If this 
     4701     * field is set to PJ_FALSE, software preview will always be used. 
     4702     * 
     4703     * Default: PJ_TRUE 
     4704     */ 
     4705    pj_bool_t vid_preview_enable_native; 
    46944706}; 
    46954707 
     
    54375449    /** 
    54385450     * Device ID for the video renderer to be used for rendering the 
    5439      * capture stream for preview. 
     5451     * capture stream for preview. This parameter is ignored if native 
     5452     * preview is being used. 
    54405453     * 
    54415454     * Default: PJMEDIA_VID_DEFAULT_RENDER_DEV 
     
    54595472 */ 
    54605473PJ_DECL(void) pjsua_vid_preview_param_default(pjsua_vid_preview_param *p); 
     5474 
     5475/** 
     5476 * Determine if the specified video input device has built-in native 
     5477 * preview capability. This is a convenience function that is equal to 
     5478 * querying device's capability for PJMEDIA_VID_DEV_CAP_INPUT_PREVIEW 
     5479 * capability. 
     5480 * 
     5481 * @param id            The capture device ID. 
     5482 * 
     5483 * @return              PJ_TRUE if it has. 
     5484 */ 
     5485PJ_DECL(pj_bool_t) pjsua_vid_preview_has_native(pjmedia_vid_dev_index id); 
    54615486 
    54625487/** 
     
    55045529{ 
    55055530    /** 
     5531     * Flag to indicate whether this window is a native window, 
     5532     * such as created by built-in preview device. If this field is 
     5533     * PJ_TRUE, only the native window handle field of this 
     5534     * structure is valid. 
     5535     */ 
     5536    pj_bool_t is_native; 
     5537 
     5538    /** 
     5539     * Native window handle. 
     5540     */ 
     5541    pjmedia_vid_dev_hwnd hwnd; 
     5542 
     5543    /** 
    55065544     * Renderer device ID. 
    55075545     */ 
    55085546    pjmedia_vid_dev_index rdr_dev; 
    5509  
    5510     /** 
    5511      * Native window handle. 
    5512      */ 
    5513     pjmedia_vid_dev_hwnd hwnd; 
    55145547 
    55155548    /** 
     
    55575590 
    55585591/** 
    5559  * Show or hide window. 
     5592 * Show or hide window. This operation is not valid for native windows 
     5593 * (pjsua_vid_win_info.is_native=PJ_TRUE), on which native windowing API 
     5594 * must be used instead. 
    55605595 * 
    55615596 * @param wid           The video window ID. 
     
    55695604 
    55705605/** 
    5571  * Set video window position. 
     5606 * Set video window position. This operation is not valid for native windows 
     5607 * (pjsua_vid_win_info.is_native=PJ_TRUE), on which native windowing API 
     5608 * must be used instead. 
    55725609 * 
    55735610 * @param wid           The video window ID. 
     
    55805617 
    55815618/** 
    5582  * Resize window. 
     5619 * Resize window. This operation is not valid for native windows 
     5620 * (pjsua_vid_win_info.is_native=PJ_TRUE), on which native windowing API 
     5621 * must be used instead. 
    55835622 * 
    55845623 * @param wid           The video window ID. 
Note: See TracChangeset for help on using the changeset viewer.