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.
-
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.
|
|
|
|
|
|
|
|
OnPropertyChange(self,
property_name)
notifies from a property change |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SelectVideoSource(self,
media_type,
webcam_name='',
device_path='',
update_setup=False)
This method has no effect in current version. |
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__
|
|
|
event_handlers = {2: '_sk_on_capture_request_completed'}
|
|
|
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
|
|
|
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__
|
__str__(self)
(Informal representation operator)
| source code
|
str(x)
- Overrides:
object.__str__
- (inherited documentation)
|
|
No description available.
Arguments:
|
|
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).
|
|
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).
|
|
No description available.
Return values:
|
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:
|
|
No description available.
Arguments:
|
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
|
|
No description available.
Return values:
-
mediatype
-
device_name
-
device_path
|
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}
|
|
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
|