Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
e671b5c9
Commit
e671b5c9
authored
Feb 02, 2015
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt to notification name changes in the middleware
parent
35a1c2a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
10 deletions
+28
-10
sessions.py
blink/sessions.py
+28
-10
No files found.
blink/sessions.py
View file @
e671b5c9
...
@@ -962,26 +962,44 @@ class BlinkSession(QObject):
...
@@ -962,26 +962,44 @@ class BlinkSession(QObject):
elif
self
.
streams
.
types
.
isdisjoint
({
'audio'
,
'video'
}):
elif
self
.
streams
.
types
.
isdisjoint
({
'audio'
,
'video'
}):
self
.
unhold
()
self
.
unhold
()
def
_NH_AudioStreamICENegotiationStateDidChange
(
self
,
notification
):
def
_NH_RTPStreamICENegotiationStateDidChange
(
self
,
notification
):
if
notification
.
sender
.
type
==
'audio'
:
info
=
self
.
info
.
streams
.
audio
elif
notification
.
sender
.
type
==
'video'
:
info
=
self
.
info
.
streams
.
video
else
:
raise
RuntimeError
(
'Unexpected stream type:
%
s'
%
notification
.
sender
.
type
)
state
=
notification
.
data
.
state
state
=
notification
.
data
.
state
if
state
==
'GATHERING'
:
if
state
==
'GATHERING'
:
self
.
info
.
streams
.
audi
o
.
ice_status
=
'gathering'
inf
o
.
ice_status
=
'gathering'
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
if
state
==
'GATHERING_COMPLETE'
:
if
state
==
'GATHERING_COMPLETE'
:
self
.
info
.
streams
.
audi
o
.
ice_status
=
'gathering_complete'
inf
o
.
ice_status
=
'gathering_complete'
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
elif
state
==
'NEGOTIATING'
:
elif
state
==
'NEGOTIATING'
:
self
.
info
.
streams
.
audi
o
.
ice_status
=
'negotiating'
inf
o
.
ice_status
=
'negotiating'
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
def
_NH_AudioStreamICENegotiationDidSucceed
(
self
,
notification
):
def
_NH_RTPStreamICENegotiationDidSucceed
(
self
,
notification
):
self
.
info
.
streams
.
audio
.
ice_status
=
'succeeded'
if
notification
.
sender
.
type
==
'audio'
:
self
.
info
.
streams
.
audio
.
local_rtp_candidate
=
notification
.
sender
.
local_rtp_candidate
info
=
self
.
info
.
streams
.
audio
self
.
info
.
streams
.
audio
.
remote_rtp_candidate
=
notification
.
sender
.
remote_rtp_candidate
elif
notification
.
sender
.
type
==
'video'
:
info
=
self
.
info
.
streams
.
video
else
:
raise
RuntimeError
(
'Unexpected stream type:
%
s'
%
notification
.
sender
.
type
)
info
.
ice_status
=
'succeeded'
info
.
local_rtp_candidate
=
notification
.
sender
.
local_rtp_candidate
info
.
remote_rtp_candidate
=
notification
.
sender
.
remote_rtp_candidate
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
def
_NH_AudioStreamICENegotiationDidFail
(
self
,
notification
):
def
_NH_RTPStreamICENegotiationDidFail
(
self
,
notification
):
self
.
info
.
streams
.
audio
.
ice_status
=
'failed'
if
notification
.
sender
.
type
==
'audio'
:
info
=
self
.
info
.
streams
.
audio
elif
notification
.
sender
.
type
==
'video'
:
info
=
self
.
info
.
streams
.
video
else
:
raise
RuntimeError
(
'Unexpected stream type:
%
s'
%
notification
.
sender
.
type
)
info
.
ice_status
=
'failed'
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
notification
.
center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
}))
def
_NH_AudioStreamGotDTMF
(
self
,
notification
):
def
_NH_AudioStreamGotDTMF
(
self
,
notification
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment