Public Types | Public Member Functions

# Video Class Reference

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. More...

`#include <skype-embedded_2.h>`

List of all members.

## Public Types
enum | { MODULE_ID = 11 }
enum | PROPERTY { P_STATUS = 130, P_ERROR, P_DEBUGINFO, P_DIMENSIONS, P_MEDIA_TYPE, P_CONVO_ID = 1104, P_DEVICE_PATH }
enum | STATUS { NOT_AVAILABLE = 0, AVAILABLE, STARTING, REJECTED, RUNNING, STOPPING, PAUSED, NOT_STARTED, HINT_IS_VIDEOCALL_RECEIVED, UNKNOWN, RENDERING, CHECKING_SUBSCRIPTION, SWITCHING_DEVICE }
enum | MEDIATYPE { MEDIA_SCREENSHARING = 1, MEDIA_VIDEO = 0 }
enum | VIDEO_DEVICE_CAPABILITY { VIDEOCAP_HQ_CAPABLE = 0, VIDEOCAP_HQ_CERTIFIED, VIDEOCAP_REQ_DRIVERUPDATE, VIDEOCAP_USB_HIGHSPEED }
typedef VideoRef | Ref
typedef VideoRefs | Refs
## Public Member Functions
virtual | ~Video ()
VideoRef | ref ()
bool | SetScreen (const uint &windowh)
bool | Start ()
bool | Stop ()
bool | SubmitCaptureRequest (bool &ret, uint &requestId)
virtual void | OnCaptureRequestCompleted (const uint &requestId, const bool &isSuccessful, const Sid::Binary &image, const int &width, const int &height)
bool | SetScreenCaptureRectangle (const int &x0, const int &y0, const uint &width, const uint &height, const int monitorNumber=0, const uint windowHandle=0)
bool | SetRenderRectangle (const int &x0, const int &y0, const uint &width, const uint &height)
bool | SelectVideoSource (const Video::MEDIATYPE &mediaType, const Sid::String webcamName="", const Sid::String devicePath="", const bool updateSetup=false)
bool | GetCurrentVideoDevice (MEDIATYPE &mediatype, Sid::String &deviceName, Sid::String &devicePath)
virtual void | OnLastFrameCapture (const Sid::Binary &image, const uint &width, const uint &height)
bool | GetPropStatus (STATUS &status)
bool | GetPropError (Sid::String &error)
bool | GetPropDebuginfo (Sid::String &debuginfo)
bool | GetPropDimensions (Sid::String &dimensions)
bool | GetPropMediaType (MEDIATYPE &media_type)
bool | GetPropConvoId (uint &convo_id)
bool | GetPropDevicePath (Sid::String &device_path)

## Detailed Description

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.

Definition at line 1812 of file skype-embedded_2.h.

## Member Typedef Documentation

typedef VideoRef Video::Ref

Definition at line 1821 of file skype-embedded_2.h.

typedef VideoRefs Video::Refs

Definition at line 1822 of file skype-embedded_2.h.

## Member Enumeration Documentation

anonymous enum

Enumerator:

  MODULE_ID |

Definition at line 1823 of file skype-embedded_2.h.

enum Video::MEDIATYPE

Enumerator:

  MEDIA_SCREENSHARING |
  MEDIA_VIDEO |

Definition at line 1881 of file skype-embedded_2.h.

enum Video::PROPERTY

Properties of the Video class

Enumerator:

  P_STATUS | Video::STATUS, type: STATUS
  P_ERROR | 'errorcode errortext' , type: Sid::String
  P_DEBUGINFO | space-separated string of tokens, type: Sid::String
  P_DIMENSIONS | 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. , type: Sid::String
  P_MEDIA_TYPE | Indicates whether the video object is streaming webcam video or screensharing session, values: MEDIA_SCREENSHARING, MEDIA_VIDEO , type: MEDIATYPE
  P_CONVO_ID | conference id to be able to identify remote/local video in the same call, type: uint
  P_DEVICE_PATH | device path used by video object, type: Sid::String

Definition at line 1837 of file skype-embedded_2.h.

enum Video::STATUS

Enumerator:

  NOT_AVAILABLE |
  AVAILABLE |
  STARTING |
  REJECTED |
  RUNNING |
  STOPPING |
  PAUSED |
  NOT_STARTED |
  HINT_IS_VIDEOCALL_RECEIVED |
  UNKNOWN |
  RENDERING |
  CHECKING_SUBSCRIPTION |
  SWITCHING_DEVICE |

Definition at line 1865 of file skype-embedded_2.h.

enum Video::VIDEO_DEVICE_CAPABILITY

Enumerator:

  VIDEOCAP_HQ_CAPABLE |
  VIDEOCAP_HQ_CERTIFIED |
  VIDEOCAP_REQ_DRIVERUPDATE |
  VIDEOCAP_USB_HIGHSPEED |

Definition at line 1886 of file skype-embedded_2.h.

## Constructor & Destructor Documentation

Video::~Video | ( |  | ) | `[virtual]`

Definition at line 859 of file skype-embedded_2.cpp.

## Member Function Documentation

bool Video::GetCurrentVideoDevice | ( | MEDIATYPE & | mediatype,
|  | Sid::String & | deviceName,
|  | Sid::String & | devicePath |
| ) |  |  |

bool Video::GetPropConvoId | ( | uint & | convo_id | ) |

Video::P_CONVO_ID property get accessor

bool Video::GetPropDebuginfo | ( | Sid::String & | debuginfo | ) |

Video::P_DEBUGINFO property get accessor

bool Video::GetPropDevicePath | ( | Sid::String & | device_path | ) |

Video::P_DEVICE_PATH property get accessor

bool Video::GetPropDimensions | ( | Sid::String & | dimensions | ) |

Video::P_DIMENSIONS property get accessor

bool Video::GetPropError | ( | Sid::String & | error | ) |

Video::P_ERROR property get accessor

bool Video::GetPropMediaType | ( | MEDIATYPE & | media_type | ) |

Video::P_MEDIA_TYPE property get accessor

bool Video::GetPropStatus | ( | STATUS & | status | ) |

Video::P_STATUS property get accessor

virtual void Video::OnCaptureRequestCompleted | ( | const uint & | requestId,
|  | const bool & | isSuccessful,
|  | const Sid::Binary & | image,
|  | const int & | width,
|  | const int & | height |
| ) |  |  | `[virtual]`

virtual void Video::OnLastFrameCapture | ( | const Sid::Binary & | image,
|  | const uint & | width,
|  | const uint & | height |
| ) |  |  | `[virtual]`

called when the video stops

VideoRef Video::ref | ( |  | ) | `[inline]`

Definition at line 1824 of file skype-embedded_2.h.

bool Video::SelectVideoSource | ( | const Video::MEDIATYPE & | mediaType,
|  | const Sid::String | webcamName = `""`,
|  | const Sid::String | devicePath = `""`,
|  | const bool | updateSetup = `false` |
| ) |  |  |

This method has no effect in current version.

bool Video::SetRenderRectangle | ( | const int & | x0,
|  | const int & | y0,
|  | const uint & | width,
|  | const uint & | height |
| ) |  |  |

bool Video::SetScreen | ( | const uint & | windowh | ) |

bool Video::SetScreenCaptureRectangle | ( | const int & | x0,
|  | const int & | y0,
|  | const uint & | width,
|  | const uint & | height,
|  | const int | monitorNumber = `0`,
|  | const uint | windowHandle = `0` |
| ) |  |  |

This method has no known effect in current version.

bool Video::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).

bool Video::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).

bool Video::SubmitCaptureRequest | ( | bool & | ret,
|  | uint & | requestId |
| ) |  |  |

The documentation for this class was generated from the following files:

- skype-embedded_2.h
- skype-embedded_2.cpp

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

(c) Skype Technologies S.A. Confidential/Proprietary

Last updated: Fri Mar 16 2012