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
db133a5a
Commit
db133a5a
authored
Jun 30, 2014
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified code
parent
eab9fc19
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
sessions.py
blink/sessions.py
+2
-16
No files found.
blink/sessions.py
View file @
db133a5a
...
...
@@ -629,16 +629,7 @@ class BlinkSession(QObject):
self
.
lookup
.
lookup_sip_proxy
(
uri
,
settings
.
sip
.
transport_list
)
def
add_stream
(
self
,
stream_description
):
assert
self
.
state
==
'connected'
if
stream_description
.
type
in
self
.
streams
:
raise
RuntimeError
(
'session already has a stream of type
%
s'
%
stream_description
.
type
)
self
.
info
.
streams
[
stream_description
.
type
]
.
_reset
()
stream
=
stream_description
.
create_stream
()
self
.
sip_session
.
add_stream
(
stream
)
self
.
streams
.
add
(
stream
)
notification_center
=
NotificationCenter
()
notification_center
.
post_notification
(
'BlinkSessionWillAddStream'
,
sender
=
self
,
data
=
NotificationData
(
stream
=
stream
))
notification_center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
,
'statistics'
}))
self
.
add_streams
([
stream_description
])
def
add_streams
(
self
,
stream_descriptions
):
assert
self
.
state
==
'connected'
...
...
@@ -655,12 +646,7 @@ class BlinkSession(QObject):
notification_center
.
post_notification
(
'BlinkSessionInfoUpdated'
,
sender
=
self
,
data
=
NotificationData
(
elements
=
{
'media'
,
'statistics'
}))
def
remove_stream
(
self
,
stream
):
assert
self
.
state
==
'connected'
if
stream
not
in
self
.
streams
:
raise
RuntimeError
(
'stream is not part of the current session'
)
self
.
sip_session
.
remove_stream
(
stream
)
notification_center
=
NotificationCenter
()
notification_center
.
post_notification
(
'BlinkSessionWillRemoveStream'
,
sender
=
self
,
data
=
NotificationData
(
stream
=
stream
))
self
.
remove_streams
([
stream
])
def
remove_streams
(
self
,
streams
):
assert
self
.
state
==
'connected'
...
...
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