Module Skype :: Class Video

Class Video

source code

     object --+        
              |        
skypekit.Cached --+    
                  |    
    skypekit.Object --+
                      |
                     Video

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.

Instance Methods
 
_sk_init_(self, object_id, transport)
actual constructor
source code
 
__str__(self)
str(x)
source code
 
OnPropertyChange(self, property_name)
notifies from a property change
source code
 
SetScreen(self, windowh)
No description available.
source code
 
Start(self)
This method starts either video send or video receive, depending on whether the video object is sender or receiver.
source code
 
Stop(self)
This method stops either video send or video receive, depending on whether the video object is sender or receiver.
source code
 
SubmitCaptureRequest(self)
No description available.
source code
 
OnCaptureRequestCompleted(self, request_id, is_successful, image, width, height)
No description available.
source code
 
SetScreenCaptureRectangle(self, x0, y0, width, height, monitor_number=0, window_handle=0)
This method has no known effect in current version.
source code
 
SetRenderRectangle(self, x0, y0, width, height)
No description available.
source code
 
SelectVideoSource(self, media_type, webcam_name='', device_path='', update_setup=False)
This method has no effect in current version.
source code
 
GetCurrentVideoDevice(self)
No description available.
source code
 
OnLastFrameCapture(self, image, width, height)
called when the video stops
source code

Inherited from skypekit.Object: multiget

Inherited from skypekit.Cached: __copy__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Static Methods
 
propid(propname)
convert a property name to the enum of the property
source code

Inherited from skypekit.Cached: __new__, sk_exists

Class Variables
  event_handlers = {1: '_sk_on_last_frame_capture', 2: '_sk_on_c...
  propid2label = {130: 'status', 131: 'error', 132: 'debuginfo',...
  module_id = 11
  STATUS = {0: 'NOT_AVAILABLE', 1: 'AVAILABLE', 2: 'STARTING', 3...
NOT_AVAILABLE
  MEDIATYPE = {0: 'MEDIA_VIDEO', 1: 'MEDIA_SCREENSHARING', 'MEDI...
MEDIA_SCREENSHARING
  VIDEO_DEVICE_CAPABILITY = {0: 'VIDEOCAP_HQ_CAPABLE', 1: 'VIDEO...
VIDEOCAP_HQ_CAPABLE
  P_STATUS = 130
  P_ERROR = 131
  P_DEBUGINFO = 132
  P_DIMENSIONS = 133
  P_MEDIA_TYPE = 134
  P_CONVO_ID = 1104
  P_DEVICE_PATH = 1105
  SETUPKEY_VIDEO_DEVICE = 'Lib/Video/Device'
  SETUPKEY_VIDEO_DEVICE_PATH = 'Lib/Video/DevicePath'
  SETUPKEY_VIDEO_AUTOSEND = 'Lib/Video/AutoSend'
  SETUPKEY_VIDEO_DISABLE = '*Lib/Video/Disable'
  SETUPKEY_VIDEO_RECVPOLICY = 'Lib/Video/RecvPolicy'
  SETUPKEY_VIDEO_ADVERTPOLICY = 'Lib/Video/AdvertPolicy'

Inherited from skypekit.Object: rwlock

Instance Variables

Inherited from skypekit.Object: properties

Properties
  status
Video::STATUS
  error
'errorcode errortext'
  debuginfo
space-separated string of tokens
  dimensions
This property does not currently work, always containing an empty string.
  media_type
Indicates whether the video object is streaming webcam video or screensharing session, values: MEDIA_SCREENSHARING, MEDIA_VIDEO
  convo_id
conference id to be able to identify remote/local video in the same call
  device_path
device path used by video object

Inherited from object: __class__

Method Details

_sk_init_(self, object_id, transport)

source code 

actual constructor

Overrides: skypekit.Object._sk_init_

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

SetScreen(self, windowh)

source code 

No description available.

Arguments:

  • windowh

Start(self)

source code 

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(self)

source code 

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(self)

source code 

No description available.

Return values:

  • ret
  • request_id

OnCaptureRequestCompleted(self, request_id, is_successful, image, width, height)

source code 

No description available.

Return values:

  • request_id
  • is_successful
  • image
  • width
  • height

SetScreenCaptureRectangle(self, x0, y0, width, height, monitor_number=0, window_handle=0)

source code 

This method has no known effect in current version.

Arguments:

  • x0
  • y0
  • width
  • height
  • monitor_number
  • window_handle

SetRenderRectangle(self, x0, y0, width, height)

source code 

No description available.

Arguments:

  • x0
  • y0
  • width
  • height

SelectVideoSource(self, media_type, webcam_name='', device_path='', update_setup=False)

source code 

This method has no effect in current version.

Arguments:

  • media_type
  • webcam_name
  • device_path
  • update_setup

GetCurrentVideoDevice(self)

source code 

No description available.

Return values:

  • mediatype
  • device_name
  • device_path

OnLastFrameCapture(self, image, width, height)

source code 

called when the video stops

Return values:

  • image
  • width
  • height

Class Variable Details

event_handlers

Value:
{1: '_sk_on_last_frame_capture',
 2: '_sk_on_capture_request_completed'}

propid2label

Value:
{130: 'status',
 131: 'error',
 132: 'debuginfo',
 133: 'dimensions',
 134: 'media_type',
 1104: 'convo_id',
 1105: 'device_path'}

STATUS

  • NOT_AVAILABLE
  • AVAILABLE
  • STARTING
  • REJECTED
  • RUNNING
  • STOPPING
  • PAUSED
  • NOT_STARTED
  • HINT_IS_VIDEOCALL_RECEIVED
  • UNKNOWN
  • RENDERING
  • CHECKING_SUBSCRIPTION
  • SWITCHING_DEVICE
Value:
{0: 'NOT_AVAILABLE',
 1: 'AVAILABLE',
 2: 'STARTING',
 3: 'REJECTED',
 4: 'RUNNING',
 5: 'STOPPING',
 6: 'PAUSED',
 7: 'NOT_STARTED',
...

MEDIATYPE

  • MEDIA_SCREENSHARING
  • MEDIA_VIDEO
Value:
{0: 'MEDIA_VIDEO',
 1: 'MEDIA_SCREENSHARING',
 'MEDIA_SCREENSHARING': 1,
 'MEDIA_VIDEO': 0}

VIDEO_DEVICE_CAPABILITY

  • VIDEOCAP_HQ_CAPABLE
  • VIDEOCAP_HQ_CERTIFIED
  • VIDEOCAP_REQ_DRIVERUPDATE
  • VIDEOCAP_USB_HIGHSPEED
Value:
{0: 'VIDEOCAP_HQ_CAPABLE',
 1: 'VIDEOCAP_HQ_CERTIFIED',
 2: 'VIDEOCAP_REQ_DRIVERUPDATE',
 3: 'VIDEOCAP_USB_HIGHSPEED',
 'VIDEOCAP_HQ_CAPABLE': 0,
 'VIDEOCAP_HQ_CERTIFIED': 1,
 'VIDEOCAP_REQ_DRIVERUPDATE': 2,
 'VIDEOCAP_USB_HIGHSPEED': 3}

Property Details

status

Video::STATUS

Get Method:
_sk_get_status(self) - Video::STATUS

error

'errorcode errortext'

Get Method:
_sk_get_error(self) - 'errorcode errortext'

debuginfo

space-separated string of tokens

Get Method:
_sk_get_debuginfo(self) - space-separated string of tokens

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.

Get Method:
_sk_get_dimensions(self) - This property does not currently work, always containing an empty string.

media_type

Indicates whether the video object is streaming webcam video or screensharing session, values: MEDIA_SCREENSHARING, MEDIA_VIDEO

Get Method:
_sk_get_media_type(self) - Indicates whether the video object is streaming webcam video or screensharing session, values: MEDIA_SCREENSHARING, MEDIA_VIDEO

convo_id

conference id to be able to identify remote/local video in the same call

Get Method:
_sk_get_convo_id(self) - conference id to be able to identify remote/local video in the same call

device_path

device path used by video object

Get Method:
_sk_get_device_path(self) - device path used by video object