Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
luzpaz
gstreamer
Commits
06ef8cd7
Commit
06ef8cd7
authored
Mar 16, 2014
by
Tim-Philipp Müller
🐠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
globaldevicemonitor: update for new message API
https://bugzilla.gnome.org/show_bug.cgi?id=678402
parent
448d180c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
gst/gstglobaldevicemonitor.c
gst/gstglobaldevicemonitor.c
+5
-7
No files found.
gst/gstglobaldevicemonitor.c
View file @
06ef8cd7
...
...
@@ -61,16 +61,14 @@ static void
bus_sync_message
(
GstBus
*
bus
,
GstMessage
*
message
,
GstGlobalDeviceMonitor
*
monitor
)
{
GstMessageType
type
=
GST_MESSAGE_TYPE
(
message
);
if
(
GST_MESSAGE_TYPE
(
message
)
==
GST_MESSAGE_EXTENDED
&&
(
gst_message_get_extended_type
(
message
)
==
GST_MESSAGE_DEVICE_ADDED
||
gst_message_get_extended_type
(
message
)
==
GST_MESSAGE_DEVICE_REMOVED
))
{
if
(
type
==
GST_MESSAGE_DEVICE_ADDED
||
type
==
GST_MESSAGE_DEVICE_REMOVED
)
{
gboolean
intersects
;
GstCaps
*
caps
;
GstDevice
*
device
;
if
(
gst_message_get_extended_type
(
message
)
==
GST_MESSAGE_DEVICE_ADDED
)
if
(
type
==
GST_MESSAGE_DEVICE_ADDED
)
gst_message_parse_device_added
(
message
,
&
device
);
else
gst_message_parse_device_removed
(
message
,
&
device
);
...
...
@@ -117,7 +115,7 @@ gst_global_device_monitor_init (GstGlobalDeviceMonitor * self)
GstBus
*
bus
=
gst_device_monitor_get_bus
(
monitor
);
gst_bus_enable_sync_message_emission
(
bus
);
g_signal_connect
(
monitor
,
"sync-message
::extended
"
,
g_signal_connect
(
monitor
,
"sync-message"
,
G_CALLBACK
(
bus_sync_message
),
self
);
g_ptr_array_add
(
self
->
priv
->
monitors
,
monitor
);
}
...
...
@@ -352,7 +350,7 @@ gst_global_device_monitor_set_type_filter (GstGlobalDeviceMonitor * self,
GstBus
*
bus
=
gst_device_monitor_get_bus
(
monitor
);
gst_bus_enable_sync_message_emission
(
bus
);
g_signal_connect
(
bus
,
"sync-message
::extended
"
,
g_signal_connect
(
bus
,
"sync-message"
,
G_CALLBACK
(
bus_sync_message
),
self
);
gst_object_unref
(
bus
);
g_ptr_array_add
(
self
->
priv
->
monitors
,
monitor
);
...
...
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