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
bf8ba839
Commit
bf8ba839
authored
Apr 23, 2014
by
Guillaume Desmottes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add nice_component_state_to_string()
Nice to make debug logs more friendly to read.
parent
220bb5ca
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
6 deletions
+22
-6
agent/agent.c
agent/agent.c
+6
-6
agent/agent.h
agent/agent.h
+13
-0
docs/reference/libnice/libnice-sections.txt
docs/reference/libnice/libnice-sections.txt
+1
-0
nice/libnice.sym
nice/libnice.sym
+1
-0
win32/vs9/libnice.def
win32/vs9/libnice.def
+1
-0
No files found.
agent/agent.c
View file @
bf8ba839
...
@@ -1652,8 +1652,8 @@ void agent_signal_new_remote_candidate (NiceAgent *agent, NiceCandidate *candida
...
@@ -1652,8 +1652,8 @@ void agent_signal_new_remote_candidate (NiceAgent *agent, NiceCandidate *candida
candidate
->
stream_id
,
candidate
->
component_id
,
candidate
->
foundation
);
candidate
->
stream_id
,
candidate
->
component_id
,
candidate
->
foundation
);
}
}
static
const
gchar
*
NICEAPI_EXPORT
const
gchar
*
component_state_to_string
(
NiceComponentState
state
)
nice_
component_state_to_string
(
NiceComponentState
state
)
{
{
switch
(
state
)
switch
(
state
)
{
{
...
@@ -1686,16 +1686,16 @@ void agent_signal_component_state_change (NiceAgent *agent, guint stream_id, gui
...
@@ -1686,16 +1686,16 @@ void agent_signal_component_state_change (NiceAgent *agent, guint stream_id, gui
if
(
agent
->
reliable
&&
component
->
tcp
==
NULL
&&
if
(
agent
->
reliable
&&
component
->
tcp
==
NULL
&&
state
!=
NICE_COMPONENT_STATE_FAILED
)
{
state
!=
NICE_COMPONENT_STATE_FAILED
)
{
nice_debug
(
"Agent %p: not changing component state for s%d:%d to %
d
"
nice_debug
(
"Agent %p: not changing component state for s%d:%d to %
s
"
"because pseudo tcp socket does not exist in reliable mode"
,
agent
,
"because pseudo tcp socket does not exist in reliable mode"
,
agent
,
stream
->
id
,
component
->
id
,
state
);
stream
->
id
,
component
->
id
,
nice_component_state_to_string
(
state
)
);
return
;
return
;
}
}
if
(
component
->
state
!=
state
&&
state
<
NICE_COMPONENT_STATE_LAST
)
{
if
(
component
->
state
!=
state
&&
state
<
NICE_COMPONENT_STATE_LAST
)
{
nice_debug
(
"Agent %p : stream %u component %u STATE-CHANGE %s -> %s."
,
agent
,
nice_debug
(
"Agent %p : stream %u component %u STATE-CHANGE %s -> %s."
,
agent
,
stream_id
,
component_id
,
component_state_to_string
(
component
->
state
),
stream_id
,
component_id
,
nice_
component_state_to_string
(
component
->
state
),
component_state_to_string
(
state
));
nice_
component_state_to_string
(
state
));
component
->
state
=
state
;
component
->
state
=
state
;
...
...
agent/agent.h
View file @
bf8ba839
...
@@ -1412,6 +1412,19 @@ nice_agent_get_io_stream (
...
@@ -1412,6 +1412,19 @@ nice_agent_get_io_stream (
guint
stream_id
,
guint
stream_id
,
guint
component_id
);
guint
component_id
);
/**
* nice_component_state_to_string:
* @state: a #NiceComponentState
*
* Returns a string representation of the state, generally to use in debug
* messages.
*
* Returns: (transfer none): a string representation of @state
* Since: UNRELEASED
*/
const
gchar
*
nice_component_state_to_string
(
NiceComponentState
state
);
G_END_DECLS
G_END_DECLS
#endif
/* _AGENT_H */
#endif
/* _AGENT_H */
...
...
docs/reference/libnice/libnice-sections.txt
View file @
bf8ba839
...
@@ -47,6 +47,7 @@ nice_agent_parse_remote_stream_sdp
...
@@ -47,6 +47,7 @@ nice_agent_parse_remote_stream_sdp
nice_agent_parse_remote_candidate_sdp
nice_agent_parse_remote_candidate_sdp
nice_agent_get_io_stream
nice_agent_get_io_stream
nice_agent_get_selected_socket
nice_agent_get_selected_socket
nice_component_state_to_string
<SUBSECTION Standard>
<SUBSECTION Standard>
NICE_AGENT
NICE_AGENT
NICE_IS_AGENT
NICE_IS_AGENT
...
...
nice/libnice.sym
View file @
bf8ba839
...
@@ -55,6 +55,7 @@ nice_agent_set_stream_tos
...
@@ -55,6 +55,7 @@ nice_agent_set_stream_tos
nice_candidate_copy
nice_candidate_copy
nice_candidate_free
nice_candidate_free
nice_candidate_new
nice_candidate_new
nice_component_state_to_string
nice_debug_disable
nice_debug_disable
nice_debug_enable
nice_debug_enable
nice_interfaces_get_ip_for_interface
nice_interfaces_get_ip_for_interface
...
...
win32/vs9/libnice.def
View file @
bf8ba839
...
@@ -53,6 +53,7 @@ nice_agent_set_stream_tos
...
@@ -53,6 +53,7 @@ nice_agent_set_stream_tos
nice_candidate_copy
nice_candidate_copy
nice_candidate_free
nice_candidate_free
nice_candidate_new
nice_candidate_new
nice_component_state_to_string
nice_debug_disable
nice_debug_disable
nice_debug_enable
nice_debug_enable
nice_interfaces_get_ip_for_interface
nice_interfaces_get_ip_for_interface
...
...
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