Changeset 3781 for pjproject


Ignore:
Timestamp:
Oct 3, 2011 9:43:10 AM (13 years ago)
Author:
bennylp
Message:

Added PJMEDIA_VID_DEV_CAP_SWITCH capability to allow fast switching to another device while the video device stream is running. Currently not implemented on any devices.(This closes #1362)

Location:
pjproject/trunk/pjmedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia-videodev/videodev.h

    r3774 r3781  
    9797 
    9898/** 
     99 * Parameter for switching device with PJMEDIA_VID_DEV_CAP_SWITCH capability. 
     100 */ 
     101typedef struct pjmedia_vid_dev_switch_param 
     102{ 
     103    /** 
     104     * Target device ID to switch to. Once the switching is successful, the 
     105     * video stream will use this device and the old device will be closed. 
     106     */ 
     107    pjmedia_vid_dev_index target_id; 
     108 
     109} pjmedia_vid_dev_switch_param; 
     110 
     111 
     112/** 
    99113 * Device index constants. 
    100114 */ 
     
    205219     */ 
    206220    PJMEDIA_VID_DEV_CAP_ORIENTATION = 128, 
     221 
     222    /** 
     223     * Support for fast switching to another device. A video stream with this 
     224     * capability allows replacing of its underlying device with another 
     225     * device, saving the user from opening a new video stream and gets a much 
     226     * faster and smoother switching action. 
     227     * 
     228     * Note that even when this capability is supported by a device, it may 
     229     * not be able to switch to arbitrary device. Application must always 
     230     * check the return value of the operation to verify that switching has 
     231     * occurred. 
     232     * 
     233     * This capability is currently write-only (i.e. set-only). 
     234     * 
     235     * The value of this capability is pointer to pjmedia_vid_dev_switch_param 
     236     * structure. 
     237     */ 
     238    PJMEDIA_VID_DEV_CAP_SWITCH = 256, 
    207239 
    208240    /** 
  • pjproject/trunk/pjmedia/src/pjmedia-videodev/videodev.c

    r3774 r3781  
    4646    DEFINE_CAP("hide",          "Renderer hide"), 
    4747    DEFINE_CAP("preview",       "Input preview"), 
    48     DEFINE_CAP("orientation",   "Video orientation") 
     48    DEFINE_CAP("orientation",   "Video orientation"), 
     49    DEFINE_CAP("switch",        "Switch device") 
    4950}; 
    5051 
     
    184185        FIELD_INFO(orient); 
    185186        break; 
     187    /* The PJMEDIA_VID_DEV_CAP_SWITCH does not have an entry in the 
     188     * param (it doesn't make sense to open a stream and tell it 
     189     * to switch immediately). 
     190     */ 
    186191    default: 
    187192        return PJMEDIA_EVID_INVCAP; 
Note: See TracChangeset for help on using the changeset viewer.