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
8ae52ea3
Commit
8ae52ea3
authored
Mar 14, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: Create a custom pointer GType to recognize the stream ids
parent
b6aa6927
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
agent/agent.c
agent/agent.c
+10
-3
No files found.
agent/agent.c
View file @
8ae52ea3
...
@@ -158,6 +158,12 @@ void agent_unlock(void)
...
@@ -158,6 +158,12 @@ void agent_unlock(void)
#endif
#endif
static
GType
_nice_agent_stream_ids_get_type
(
void
);
G_DEFINE_POINTER_TYPE
(
_NiceAgentStreamIds
,
_nice_agent_stream_ids
);
#define NICE_TYPE_AGENT_STREAM_IDS _nice_agent_stream_ids_get_type ()
typedef
struct
{
typedef
struct
{
guint
signal_id
;
guint
signal_id
;
GSignalQuery
query
;
GSignalQuery
query
;
...
@@ -171,9 +177,9 @@ free_queued_signal (QueuedSignal *sig)
...
@@ -171,9 +177,9 @@ free_queued_signal (QueuedSignal *sig)
guint
i
;
guint
i
;
for
(
i
=
0
;
i
<
sig
->
query
.
n_params
;
i
++
)
{
for
(
i
=
0
;
i
<
sig
->
query
.
n_params
;
i
++
)
{
if
(
G_VALUE_HOLDS_POINTER
(
&
sig
->
params
[
i
]))
g_free
(
g_value_get_pointer
(
&
sig
->
params
[
i
]));
g_free
(
g_value_get_pointer
(
&
sig
->
params
[
i
]));
g_value_unset
(
&
sig
->
params
[
i
]);
g_value_unset
(
&
sig
->
params
[
i
]);
if
(
G_VALUE_HOLDS
(
&
sig
->
params
[
i
+
1
],
NICE_TYPE_AGENT_STREAM_IDS
))
}
}
g_slice_free1
(
sizeof
(
GValue
)
*
(
sig
->
query
.
n_params
+
1
),
sig
->
params
);
g_slice_free1
(
sizeof
(
GValue
)
*
(
sig
->
query
.
n_params
+
1
),
sig
->
params
);
...
@@ -771,7 +777,7 @@ nice_agent_class_init (NiceAgentClass *klass)
...
@@ -771,7 +777,7 @@ nice_agent_class_init (NiceAgentClass *klass)
g_cclosure_marshal_VOID__POINTER
,
g_cclosure_marshal_VOID__POINTER
,
G_TYPE_NONE
,
G_TYPE_NONE
,
1
,
1
,
G_TYPE_POINTER
,
NICE_TYPE_AGENT_STREAM_IDS
,
G_TYPE_INVALID
);
G_TYPE_INVALID
);
/* Init debug options depending on env variables */
/* Init debug options depending on env variables */
...
@@ -2378,7 +2384,8 @@ nice_agent_remove_stream (
...
@@ -2378,7 +2384,8 @@ nice_agent_remove_stream (
if
(
!
agent
->
streams
)
if
(
!
agent
->
streams
)
priv_remove_keepalive_timer
(
agent
);
priv_remove_keepalive_timer
(
agent
);
agent_queue_signal
(
agent
,
signals
[
SIGNAL_STREAMS_REMOVED
],
stream_ids
);
agent_queue_signal
(
agent
,
signals
[
SIGNAL_STREAMS_REMOVED
],
g_memdup
(
stream_ids
,
sizeof
(
stream_ids
)));
agent_unlock_and_emit
(
agent
);
agent_unlock_and_emit
(
agent
);
return
;
return
;
...
...
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