Package org.linphone.core

# Interface VideoSourceDescriptor

public interface VideoSourceDescriptor
Object that is used to describe a video source.

## Method Summary

Modifier and Type
Method
Description
`VideoSourceDescriptor`
`clone()`
Instantiate a new video source descriptor with values from source.
`Call`
`getCall()`
Gets the call of a `VideoSourceDescriptor`.
`String`
`getCameraId()`
Gets the camera id of a `VideoSourceDescriptor`.
`String`
`getImage()`
Gets the image path of a `VideoSourceDescriptor`.
`long`
`getNativePointer()`
Gets the native pointer used by this class to make native method calls.
`Object`
`getScreenSharing()`
Gets the screen sharing description of a `VideoSourceDescriptor`.
`VideoSourceScreenSharingType`
`getScreenSharingType()`
Gets the screen sharing type of a `VideoSourceDescriptor`.
`VideoSourceType`
`getType()`
Gets the type of a `VideoSourceDescriptor`.
`Object`
`getUserData()`
Gets the object stored in this object user's data
`void`
`setCall(Call call)`
Sets the source of a `VideoSourceDescriptor` with a call.
`void`
`setCameraId(String cameraId)`
Sets the source of a `VideoSourceDescriptor` with a camera id.
`void`
`setImage(String imagePath)`
Sets the source of a `VideoSourceDescriptor` with an image path.
`void`
`setScreenSharing(VideoSourceScreenSharingType type, Object nativeData)`
Sets the source of a `VideoSourceDescriptor` as screen sharing.
`void`
`setUserData(Object data)`
Sets the object to store in this object user's data
`String`
`toString()`

## Method Details

### getCall

Call getCall()
Gets the call of a `VideoSourceDescriptor`.

Returns:
  The `Call` of the video source descriptor if its type is
  LinphoneVideoSourceCall, null otherwise.

### setCall

void setCall(Call call)
Sets the source of a `VideoSourceDescriptor` with a call.
Setting a `VideoSourceDescriptor` with a call will require the lib to
have two calls running at the same time. To do so the media resource mode has
to be set to LinphoneSharedMediaResources with `Core.setMediaResourceMode(org.linphone.core.MediaResourceMode)`
.

Parameters:
  `call` - The `Call` that will be used as a video source.

### getCameraId

String getCameraId()
Gets the camera id of a `VideoSourceDescriptor`.

Returns:
  The camera ID of the video source descriptor if its type is
  LinphoneVideoSourceCamera, null otherwise.

### setCameraId

void setCameraId(String cameraId)
Sets the source of a `VideoSourceDescriptor` with a camera id.

Parameters:
  `cameraId` - The camera id that will be used as a video source.

### getImage

String getImage()
Gets the image path of a `VideoSourceDescriptor`.

Returns:
  The image path of the video source descriptor if its type is
  LinphoneVideoSourceImage, null otherwise.

### setImage

void setImage(String imagePath)
Sets the source of a `VideoSourceDescriptor` with an image path.

Parameters:
  `imagePath` - The image path that will be used as a video source.

### getScreenSharing

Object getScreenSharing()
Gets the screen sharing description of a `VideoSourceDescriptor`.

Returns:
  The native screen sharing description

### getScreenSharingType

VideoSourceScreenSharingType getScreenSharingType()
Gets the screen sharing type of a `VideoSourceDescriptor`.

Returns:
  The `VideoSourceType.ScreenSharing` Type corresponding to this
  video source descriptor.

### getType

VideoSourceType getType()
Gets the type of a `VideoSourceDescriptor`.

Returns:
  The `VideoSourceType` corresponding to this video source
  descriptor.

### clone

VideoSourceDescriptor clone()
Instantiate a new video source descriptor with values from source.

Returns:
  The newly created `VideoSourceDescriptor` object.

### setScreenSharing

void setScreenSharing(VideoSourceScreenSharingType type, Object nativeData)
Sets the source of a `VideoSourceDescriptor` as screen sharing.
native_data depends on the type and the current platform:
native_data depends on the type and the current platform:
-Linux : uintptr_t The index of the screen ordered by XineramaQueryScreens.
-Mac : CGDirectDisplayID The display identification that can be retrieved from
SCShareableContent.
-Windows : uintptr_t The index of the screen ordered by
IDXGIAdapter->EnumOutputs.
-Linux : Window The Window object that can be retrieved from XQueryPointer.
-Mac : CGWindowID The window identification that can be retrieved from NSEvent.
-Windows : HWND The window handle that can be retrieved from WindowFromPoint.
-not yet supported.

Parameters:
  `type` - The `VideoSourceScreenSharingType` type of native_data.
  `nativeData` - The screen handle that will be used as a video source.

### setUserData

void setUserData(Object data)
Sets the object to store in this object user's data

Parameters:
  `data` - the object to store

### getUserData

Object getUserData()
Gets the object stored in this object user's data

Returns:
  the object store if any, null otherwise

### getNativePointer

long getNativePointer()
Gets the native pointer used by this class to make native method calls.

Returns:
  the nativer pointer, as long

### toString

String toString()

Overrides:
  `toString` in class `Object`