Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gstreamer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
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
luzpaz
gstreamer
Commits
0e0e78e8
Commit
0e0e78e8
authored
Jun 27, 2014
by
Tim-Philipp Müller
🐠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devicemonitor: don't fail when started without any filters
Just show all devices then.
parent
9b07b935
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
gst/gstdevicemonitor.c
gst/gstdevicemonitor.c
+5
-3
tests/check/gst/gstdevice.c
tests/check/gst/gstdevice.c
+6
-2
No files found.
gst/gstdevicemonitor.c
View file @
0e0e78e8
...
...
@@ -35,7 +35,7 @@
* the application has set.
*
*
* The basic use pattern of a
n itera
tor is as follows:
* The basic use pattern of a
device moni
tor is as follows:
* |[
* static gboolean
* my_bus_func (GstBus * bus, GstMessage * message, gpointer user_data)
...
...
@@ -348,8 +348,10 @@ gst_device_monitor_start (GstDeviceMonitor * monitor)
if
(
monitor
->
priv
->
filters
->
len
==
0
)
{
GST_OBJECT_UNLOCK
(
monitor
);
GST_WARNING_OBJECT
(
monitor
,
"No filters have been set"
);
return
FALSE
;
GST_WARNING_OBJECT
(
monitor
,
"No filters have been set, will expose all "
"devices found"
);
gst_device_monitor_add_filter
(
monitor
,
NULL
,
NULL
);
GST_OBJECT_LOCK
(
monitor
);
}
if
(
monitor
->
priv
->
providers
->
len
==
0
)
{
...
...
tests/check/gst/gstdevice.c
View file @
0e0e78e8
...
...
@@ -420,8 +420,6 @@ GST_START_TEST (test_device_monitor)
mon
=
gst_device_monitor_new
();
fail_if
(
gst_device_monitor_start
(
mon
));
devices
=
g_list_append
(
NULL
,
test_device_new
());
devs
=
gst_device_monitor_get_devices
(
mon
);
...
...
@@ -533,6 +531,12 @@ GST_START_TEST (test_device_monitor)
gst_object_unref
(
dp
);
gst_object_unref
(
dp2
);
g_list_free_full
(
devices
,
(
GDestroyNotify
)
gst_object_unref
);
/* should work fine without any filters */
mon
=
gst_device_monitor_new
();
fail_unless
(
gst_device_monitor_start
(
mon
));
gst_device_monitor_stop
(
mon
);
gst_object_unref
(
mon
);
}
GST_END_TEST
;
...
...
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