com.skype.api
Class Video

java.lang.Object
  extended by com.skype.ipc.SidObject
      extended by com.skype.api.Video
All Implemented Interfaces:
SidGetResponding

public final class Video
extends SidObject

This class contains basic video control functionality for live conversations with video. Basically, Video objects represent specific Participant's video state in a live Conversation. The Video class can represent both local (outgoing) and remote (incoming) video streams. Note that as of SkypeKit SDK version 3.2, this class no longer handles video rendering in the UI. Currently available SkypeKit runtimes do not support multi-party video. The API however is designed with future compatibility in mind, so the Video class is attached to Participant class rather than Conversation class. Once multi-party video will become available for SkypeKit, the logic should go like this: Let there be 4-way live conversation C and participants P1, P2, P3 and P4. P1 is the local user. Remote participants P2 and P3 are capable of sending video. Remote user P4 is not capable of sending video. You would then end up with 4 video objects: V1, V2, V3 and V0. - C->P1->V1-> outgoing video stream - C->P2->V2-> incoming video stream 1 - C->P3->V3-> incoming video stream 2 - C->P4-> no video object as participant P4 does not advertise supporting video - V0-> local webcam preview - this is not attached to any particular conversation, however the corresponding video object can be retrieved with Skype.GetPreviewVideo method. As getting from a live conversation to running video streams involves three classes, it can be somewhat less than obvious. The basic state transition logic goes like this: You start out with a Conversation, that suddenly becomes live CONVERSATION.LOCAL_LIVESTATUS = IM_LIVE At this point you have access to participant list of that conversation. The next step will be to catch Partcipant property changes for PARTICIPANT.VIDEO_STATUS to see if any of the people in conversation have Video available. Note that you should not make assumptions on when this availability happens. Remote users may switch their video on-off as they please. PARTICIPANT.VIDEO_STATUS = VIDEO_AVAILABLE If you get to VIDEO_AVAILABLE (not necessarily for all Participants), you can retrieve Video object, with Participant.GetVideo method. Now you will need to handle Video.STATUS property changes. In case of successful video call, the sequence of Video.STATUS and Participant.VIDEO_STATUS changes for each Participant and Video object should look like this: - Video.STATUS = AVAILABLE - Video.STATUS = STARTING - Video.STATUS = CHECKING_SUBSCRIPTION - Video.STATUS = STARTING Participant.VIDEO_STATUS = VIDEO_CONNECTING - Video.STATUS = RUNNING - Participant.VIDEO_STATUS = STREAMING Both Video.STATUS == RUNNING and Participant.VIDEO_STATUS == STREAMING are indicative that the video for that particular participant is up and running, and your UI should update itself accordingly. NB! Note that it is not enough to check for Video.STATUS property updates. By the time you obtain the Video object in your client, it may already it may already have progressed to a further status. You should always check the status property immediately after obtaining the Video object.


Nested Class Summary
 class Video.GetCurrentVideoDeviceResponse
           
static class Video.MediaType
           
static class Video.Property
          Properties of the Video class
static class Video.Status
           
 class Video.SubmitCaptureRequestResponse
           
static class Video.VideoDeviceCapability
           
 
Field Summary
 Conversation mConvoId
           
 java.lang.String mDebugInfo
           
 java.lang.String mDevicePath
           
 java.lang.String mDimensions
           
 java.lang.String mError
           
 Video.MediaType mMediaType
           
 Video.Status mStatus
           
static java.lang.String VIDEO_ADVERTPOLICY
          Setupkey SETUPKEY_VIDEO_ADVERTPOLICY type:string default value:"contacts"
noone | contacts | everyone
This is account-specific setup key.
static java.lang.String VIDEO_AUTOSEND
          Setupkey SETUPKEY_VIDEO_AUTOSEND type:int
Setting this to 1 starts sending video automatically when call starts
This is account-specific setup key.
static java.lang.String VIDEO_DEVICE
          Setupkey SETUPKEY_VIDEO_DEVICE type:string
Selected video device name
This is account-specific setup key.
static java.lang.String VIDEO_DEVICE_PATH
          Setupkey SETUPKEY_VIDEO_DEVICE_PATH type:string
Currently selected video device path.
static java.lang.String VIDEO_DISABLE
          Setupkey SETUPKEY_VIDEO_DISABLE type:int
Setting this to 1 disables all video functionality.
static java.lang.String VIDEO_RECVPOLICY
          Setupkey SETUPKEY_VIDEO_RECVPOLICY type:string default value:"contacts"
noone | contacts | callpolicy
This is account-specific setup key.
 
Fields inherited from class com.skype.ipc.SidObject
mSidCached, mSidOid, mSidRoot, mSidTimestamp
 
Constructor Summary
Video(int oid, SidRoot root)
           
 
Method Summary
 Conversation getConvoId()
          conference id to be able to identify remote/local video in the same call
 Video.GetCurrentVideoDeviceResponse getCurrentVideoDevice()
          getCurrentVideoDevice
 java.lang.String getDebugInfo()
          space-separated string of tokens
 java.lang.String getDevicePath()
          device path used by video object
 java.lang.String getDimensions()
          This property does not currently work, always containing an empty string.
 java.lang.String getError()
          'errorcode errortext'
 Video.MediaType getMediaType()
          Indicates whether the video object is streaming webcam video or screensharing session, values: MEDIA_SCREENSHARING, MEDIA_VIDEO
 java.lang.String getPropertyAsString(int prop)
           
 java.lang.String getPropertyAsString(Video.Property prop)
           
 Video.Status getStatus()
          Video.STATUS
 int moduleId()
           
 void selectVideoSource(Video.MediaType mediaType, java.lang.String webcamName, java.lang.String devicePath, boolean updateSetup)
          This method has no effect in current version.
 void setRemoteRendererId(int id)
          setRemoteRendererId
 void setRenderRectangle(int x0, int y0, int width, int height)
          setRenderRectangle
 void setScreen(int windowh)
          setScreen
 void setScreenCaptureRectangle(int x0, int y0, int width, int height, int monitorNumber, int windowHandle)
          This method has no known effect in current version.
 EnumConverting sidGetEnumProperty(PropertyEnumConverting prop)
           
 SidObject sidGetObjectProperty(PropertyEnumConverting prop)
           
 java.lang.String sidGetStringProperty(PropertyEnumConverting prop)
           
 SidGetResponding sidMultiGet(Video.Property[] requested)
          generic multiget of a list of Property
static SidGetResponding[] sidMultiGet(Video.Property[] requested, Video[] objects)
          generic multiget of list of Property for a list of Video
protected  void sidOnChangedProperty(int propertyId, int value, java.lang.String svalue)
           
 void sidSetProperty(PropertyEnumConverting prop, int newValue)
           
 void sidSetProperty(PropertyEnumConverting prop, SidObject newValue)
           
 void sidSetProperty(PropertyEnumConverting prop, java.lang.String newValue)
           
 void start()
          This method starts either video send or video receive, depending on whether the video object is sender or receiver.
 void stop()
          This method stops either video send or video receive, depending on whether the video object is sender or receiver.
 Video.SubmitCaptureRequestResponse submitCaptureRequest()
          submitCaptureRequest
 
Methods inherited from class com.skype.ipc.SidObject
finalize, getOid, hasCached, invalidateCache, isCached, sidDoRequest, sidGetBinaryProperty, sidGetBoolProperty, sidGetFilenameProperty, sidGetIntProperty, sidGetLongProperty, sidGetObject, sidGetUintProperty, sidGetXmlProperty, sidMultiGet, sidMultiGet, sidMultiGet, sidMultiGet, sidRequestBinaryProperty, sidRequestBoolProperty, sidRequestEnumProperty, sidRequestFilenameProperty, sidRequestIntProperty, sidRequestObjectProperty, sidRequestProperty, sidRequestStringProperty, sidRequestUintProperty, sidRequestXmlProperty, sidSetProperty, sidSetProperty
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIDEO_DEVICE

public static final java.lang.String VIDEO_DEVICE
Setupkey SETUPKEY_VIDEO_DEVICE type:string
Selected video device name
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

VIDEO_DEVICE_PATH

public static final java.lang.String VIDEO_DEVICE_PATH
Setupkey SETUPKEY_VIDEO_DEVICE_PATH type:string
Currently selected video device path.
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

VIDEO_AUTOSEND

public static final java.lang.String VIDEO_AUTOSEND
Setupkey SETUPKEY_VIDEO_AUTOSEND type:int
Setting this to 1 starts sending video automatically when call starts
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

VIDEO_DISABLE

public static final java.lang.String VIDEO_DISABLE
Setupkey SETUPKEY_VIDEO_DISABLE type:int
Setting this to 1 disables all video functionality.
This setup key is machine-specific and affects all local accounts.

See Also:
Constant Field Values

VIDEO_RECVPOLICY

public static final java.lang.String VIDEO_RECVPOLICY
Setupkey SETUPKEY_VIDEO_RECVPOLICY type:string default value:"contacts"
noone | contacts | callpolicy
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

VIDEO_ADVERTPOLICY

public static final java.lang.String VIDEO_ADVERTPOLICY
Setupkey SETUPKEY_VIDEO_ADVERTPOLICY type:string default value:"contacts"
noone | contacts | everyone
This is account-specific setup key. It can only be used while an account is logged in.

See Also:
Constant Field Values

mStatus

public Video.Status mStatus

mError

public java.lang.String mError

mDebugInfo

public java.lang.String mDebugInfo

mDimensions

public java.lang.String mDimensions

mMediaType

public Video.MediaType mMediaType

mConvoId

public Conversation mConvoId

mDevicePath

public java.lang.String mDevicePath
Constructor Detail

Video

public Video(int oid,
             SidRoot root)
Method Detail

setScreen

public void setScreen(int windowh)
setScreen

Parameters:
windowh -

start

public void start()
This method starts either video send or video receive, depending on whether the video object is sender or receiver. In case of desktop video, the receiver side needs to instantiate a renderer object and associate it with the receiveing video (Video.SetRemoteRendererId).


stop

public void stop()
This method stops either video send or video receive, depending on whether the video object is sender or receiver. In case of desktop video, the receiver side needs to dis-associate the video object from the renderer, by calling Video.SetRemoteRendererId(0).


submitCaptureRequest

public Video.SubmitCaptureRequestResponse submitCaptureRequest()
submitCaptureRequest

Returns:
SubmitCaptureRequestResponse
- ret
- requestId

setScreenCaptureRectangle

public void setScreenCaptureRectangle(int x0,
                                      int y0,
                                      int width,
                                      int height,
                                      int monitorNumber,
                                      int windowHandle)
This method has no known effect in current version. * @param x0

Parameters:
y0 -
width -
height -
monitorNumber -
windowHandle -

setRenderRectangle

public void setRenderRectangle(int x0,
                               int y0,
                               int width,
                               int height)
setRenderRectangle

Parameters:
x0 -
y0 -
width -
height -

setRemoteRendererId

public void setRemoteRendererId(int id)
setRemoteRendererId

Parameters:
id -

selectVideoSource

public void selectVideoSource(Video.MediaType mediaType,
                              java.lang.String webcamName,
                              java.lang.String devicePath,
                              boolean updateSetup)
This method has no effect in current version. * @param mediaType

Parameters:
webcamName -
devicePath -
updateSetup -

getCurrentVideoDevice

public Video.GetCurrentVideoDeviceResponse getCurrentVideoDevice()
getCurrentVideoDevice

Returns:
GetCurrentVideoDeviceResponse
- mediatype
- deviceName
- devicePath

sidMultiGet

public SidGetResponding sidMultiGet(Video.Property[] requested)
generic multiget of a list of Property

Parameters:
requested - the list of requested properties of Video
Returns:
SidGetResponding

sidMultiGet

public static SidGetResponding[] sidMultiGet(Video.Property[] requested,
                                             Video[] objects)
generic multiget of list of Property for a list of Video

Parameters:
requested - the list of requested properties
Returns:
SidGetResponding[] can be casted to (Video[]) if all properties are cached

getStatus

public Video.Status getStatus()
Video.STATUS


getError

public java.lang.String getError()
'errorcode errortext'


getDebugInfo

public java.lang.String getDebugInfo()
space-separated string of tokens


getDimensions

public java.lang.String getDimensions()
This property does not currently work, always containing an empty string. For desktop video, you can get the frame dimensions from the video frame buffers API instead - the buffer struct retrieved with ipc.getFrame() or ipc.getNewFrame() has width and height fields, which you can then use in your UI. With RTP video solutions, you already have the frame sizes in your videohost code. Communicating these to the UI process is currently up to you.


getMediaType

public Video.MediaType getMediaType()
Indicates whether the video object is streaming webcam video or screensharing session, values: MEDIA_SCREENSHARING, MEDIA_VIDEO


getConvoId

public Conversation getConvoId()
conference id to be able to identify remote/local video in the same call


getDevicePath

public java.lang.String getDevicePath()
device path used by video object


sidGetStringProperty

public java.lang.String sidGetStringProperty(PropertyEnumConverting prop)
Specified by:
sidGetStringProperty in interface SidGetResponding
Overrides:
sidGetStringProperty in class SidObject

sidGetObjectProperty

public SidObject sidGetObjectProperty(PropertyEnumConverting prop)
Specified by:
sidGetObjectProperty in interface SidGetResponding
Overrides:
sidGetObjectProperty in class SidObject

sidGetEnumProperty

public EnumConverting sidGetEnumProperty(PropertyEnumConverting prop)
Specified by:
sidGetEnumProperty in interface SidGetResponding
Overrides:
sidGetEnumProperty in class SidObject

getPropertyAsString

public java.lang.String getPropertyAsString(int prop)

getPropertyAsString

public java.lang.String getPropertyAsString(Video.Property prop)

sidOnChangedProperty

protected void sidOnChangedProperty(int propertyId,
                                    int value,
                                    java.lang.String svalue)
Specified by:
sidOnChangedProperty in class SidObject

sidSetProperty

public void sidSetProperty(PropertyEnumConverting prop,
                           java.lang.String newValue)
Specified by:
sidSetProperty in interface SidGetResponding
Overrides:
sidSetProperty in class SidObject

sidSetProperty

public void sidSetProperty(PropertyEnumConverting prop,
                           SidObject newValue)
Specified by:
sidSetProperty in interface SidGetResponding
Overrides:
sidSetProperty in class SidObject

sidSetProperty

public void sidSetProperty(PropertyEnumConverting prop,
                           int newValue)
Specified by:
sidSetProperty in interface SidGetResponding
Overrides:
sidSetProperty in class SidObject

moduleId

public int moduleId()
Specified by:
moduleId in class SidObject


Copyright © 2010, 2011 Skype Technologies. All Rights Reserved.