Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
277f6198
Commit
277f6198
authored
Oct 30, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
signal candidates-gathering-done for each stream that had a gather_candidates call
parent
b96460c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
51 deletions
+61
-51
agent/agent-signals-marshal.list
agent/agent-signals-marshal.list
+1
-2
agent/agent.c
agent/agent.c
+59
-49
agent/stream.h
agent/stream.h
+1
-0
No files found.
agent/agent-signals-marshal.list
View file @
277f6198
# component-status-changed
# component-status-changed
VOID:UINT,UINT,UINT
VOID:UINT,UINT,UINT
# candidate-gathering-done
VOID:VOID
# new-selected-pair
# new-selected-pair
VOID:UINT,UINT,STRING,STRING
VOID:UINT,UINT,STRING,STRING
# new-candidate
# new-candidate
VOID:UINT,UINT,STRING
VOID:UINT,UINT,STRING
# candidate-gathering-done
# initial-binding-request-received
# initial-binding-request-received
VOID:UINT
VOID:UINT
agent/agent.c
View file @
277f6198
...
@@ -292,10 +292,10 @@ nice_agent_class_init (NiceAgentClass *klass)
...
@@ -292,10 +292,10 @@ nice_agent_class_init (NiceAgentClass *klass)
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
,
agent_marshal_VOID__
VOID
,
agent_marshal_VOID__
UINT
,
G_TYPE_NONE
,
G_TYPE_NONE
,
0
,
1
,
G_TYPE_INVALID
);
G_TYPE_
UINT
,
G_TYPE_
INVALID
);
/* signature: void cb(NiceAgent *agent, guint stream_id, guint component_id,
/* signature: void cb(NiceAgent *agent, guint stream_id, guint component_id,
gchar *lfoundation, gchar* rfoundation, gpointer self) */
gchar *lfoundation, gchar* rfoundation, gpointer self) */
...
@@ -577,7 +577,15 @@ void agent_gathering_done (NiceAgent *agent)
...
@@ -577,7 +577,15 @@ void agent_gathering_done (NiceAgent *agent)
void
agent_signal_gathering_done
(
NiceAgent
*
agent
)
void
agent_signal_gathering_done
(
NiceAgent
*
agent
)
{
{
g_signal_emit
(
agent
,
signals
[
SIGNAL_CANDIDATE_GATHERING_DONE
],
0
);
GSList
*
i
;
for
(
i
=
agent
->
streams
;
i
;
i
=
i
->
next
)
{
Stream
*
stream
=
i
->
data
;
if
(
stream
->
gathering
)
{
g_signal_emit
(
agent
,
signals
[
SIGNAL_CANDIDATE_GATHERING_DONE
],
0
,
stream
->
id
);
stream
->
gathering
=
FALSE
;
}
}
}
}
void
agent_signal_initial_binding_request_received
(
NiceAgent
*
agent
,
Stream
*
stream
)
void
agent_signal_initial_binding_request_received
(
NiceAgent
*
agent
,
Stream
*
stream
)
...
@@ -870,66 +878,68 @@ nice_agent_gather_candidates (
...
@@ -870,66 +878,68 @@ nice_agent_gather_candidates (
goto
done
;
goto
done
;
}
}
nice_debug
(
"Agent %p : In %s mode, starting candidate gathering."
,
agent
,
agent
->
full_mode
?
"ICE-FULL"
:
"ICE-LITE"
);
nice_debug
(
"Agent %p : In %s mode, starting candidate gathering."
,
agent
,
agent
->
full_mode
?
"ICE-FULL"
:
"ICE-LITE"
);
/* generate a local host candidate for each local address */
/* generate a local host candidate for each local address */
for
(
i
=
agent
->
local_addresses
;
i
;
i
=
i
->
next
)
for
(
i
=
agent
->
local_addresses
;
i
;
i
=
i
->
next
){
{
NiceAddress
*
addr
=
i
->
data
;
NiceAddress
*
addr
=
i
->
data
;
NiceCandidate
*
host_candidate
;
NiceCandidate
*
host_candidate
;
for
(
n
=
0
;
n
<
stream
->
n_components
;
n
++
)
{
for
(
n
=
0
;
n
<
stream
->
n_components
;
n
++
)
{
Component
*
component
=
stream_find_component_by_id
(
stream
,
n
+
1
);
Component
*
component
=
stream_find_component_by_id
(
stream
,
n
+
1
);
host_candidate
=
discovery_add_local_host_candidate
(
agent
,
stream
->
id
,
host_candidate
=
discovery_add_local_host_candidate
(
agent
,
stream
->
id
,
n
+
1
,
addr
);
n
+
1
,
addr
);
if
(
!
host_candidate
)
{
if
(
!
host_candidate
)
{
g_error
(
"No host candidate??"
);
g_error
(
"No host candidate??"
);
break
;
break
;
}
}
if
(
agent
->
full_mode
&&
if
(
agent
->
full_mode
&&
agent
->
stun_server_ip
)
{
agent
->
stun_server_ip
)
{
NiceAddress
stun_server
;
NiceAddress
stun_server
;
if
(
nice_address_set_from_string
(
&
stun_server
,
agent
->
stun_server_ip
))
{
if
(
nice_address_set_from_string
(
&
stun_server
,
agent
->
stun_server_ip
))
{
nice_address_set_port
(
&
stun_server
,
agent
->
stun_server_port
);
nice_address_set_port
(
&
stun_server
,
agent
->
stun_server_port
);
gboolean
res
=
gboolean
res
=
priv_add_new_candidate_discovery_stun
(
agent
,
priv_add_new_candidate_discovery_stun
(
agent
,
host_candidate
,
host_candidate
,
stun_server
,
stun_server
,
stream
,
stream
,
n
+
1
);
n
+
1
);
if
(
res
!=
TRUE
)
{
if
(
res
!=
TRUE
)
{
/* note: memory allocation failure, return error */
/* note: memory allocation failure, return error */
g_error
(
"Memory allocation failure?"
);
g_error
(
"Memory allocation failure?"
);
}
}
}
}
}
}
if
(
agent
->
full_mode
&&
component
)
{
if
(
agent
->
full_mode
&&
component
)
{
GList
*
item
;
GList
*
item
;
for
(
item
=
component
->
turn_servers
;
item
;
item
=
item
->
next
)
{
for
(
item
=
component
->
turn_servers
;
item
;
item
=
item
->
next
)
{
TurnServer
*
turn
=
item
->
data
;
TurnServer
*
turn
=
item
->
data
;
gboolean
res
=
gboolean
res
=
priv_add_new_candidate_discovery_turn
(
agent
,
priv_add_new_candidate_discovery_turn
(
agent
,
host_candidate
,
host_candidate
,
turn
,
turn
,
stream
,
stream
,
n
+
1
);
n
+
1
);
if
(
res
!=
TRUE
)
{
if
(
res
!=
TRUE
)
{
/* note: memory allocation failure, return error */
/* note: memory allocation failure, return error */
g_error
(
"Memory allocation failure?"
);
g_error
(
"Memory allocation failure?"
);
}
}
}
}
}
}
}
}
}
}
stream
->
gathering
=
TRUE
;
/* note: no async discoveries pending, signal that we are ready */
/* note: no async discoveries pending, signal that we are ready */
...
...
agent/stream.h
View file @
277f6198
...
@@ -82,6 +82,7 @@ struct _Stream
...
@@ -82,6 +82,7 @@ struct _Stream
gchar
local_password
[
NICE_STREAM_MAX_PWD
];
gchar
local_password
[
NICE_STREAM_MAX_PWD
];
gchar
remote_ufrag
[
NICE_STREAM_MAX_UFRAG
];
gchar
remote_ufrag
[
NICE_STREAM_MAX_UFRAG
];
gchar
remote_password
[
NICE_STREAM_MAX_PWD
];
gchar
remote_password
[
NICE_STREAM_MAX_PWD
];
gboolean
gathering
;
};
};
Stream
*
Stream
*
...
...
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