From 0d787ff15965f4a4ea8c24aaaa64f6541a1cd876 Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Mon, 3 Oct 2011 09:43:10 +0000 Subject: 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) git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3781 74dad513-b988-da41-8d7b-12977e46ad98 --- pjmedia/include/pjmedia-videodev/videodev.h | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'pjmedia/include/pjmedia-videodev/videodev.h') diff --git a/pjmedia/include/pjmedia-videodev/videodev.h b/pjmedia/include/pjmedia-videodev/videodev.h index 208b96c6..f64479d6 100644 --- a/pjmedia/include/pjmedia-videodev/videodev.h +++ b/pjmedia/include/pjmedia-videodev/videodev.h @@ -95,6 +95,20 @@ typedef struct pjmedia_vid_dev_hwnd } pjmedia_vid_dev_hwnd; +/** + * Parameter for switching device with PJMEDIA_VID_DEV_CAP_SWITCH capability. + */ +typedef struct pjmedia_vid_dev_switch_param +{ + /** + * Target device ID to switch to. Once the switching is successful, the + * video stream will use this device and the old device will be closed. + */ + pjmedia_vid_dev_index target_id; + +} pjmedia_vid_dev_switch_param; + + /** * Device index constants. */ @@ -205,6 +219,24 @@ typedef enum pjmedia_vid_dev_cap */ PJMEDIA_VID_DEV_CAP_ORIENTATION = 128, + /** + * Support for fast switching to another device. A video stream with this + * capability allows replacing of its underlying device with another + * device, saving the user from opening a new video stream and gets a much + * faster and smoother switching action. + * + * Note that even when this capability is supported by a device, it may + * not be able to switch to arbitrary device. Application must always + * check the return value of the operation to verify that switching has + * occurred. + * + * This capability is currently write-only (i.e. set-only). + * + * The value of this capability is pointer to pjmedia_vid_dev_switch_param + * structure. + */ + PJMEDIA_VID_DEV_CAP_SWITCH = 256, + /** * End of standard capability */ -- cgit v1.2.3