Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc
Commits
748b8ea6
Commit
748b8ea6
authored
Oct 07, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not show non-capture V4L2 devices in services (fix #5095)
parent
05842dc3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
modules/services_discovery/udev.c
modules/services_discovery/udev.c
+11
-3
No files found.
modules/services_discovery/udev.c
View file @
748b8ea6
...
...
@@ -398,18 +398,26 @@ static char *decode_property (struct udev_device *dev, const char *name)
/*** Video4Linux support ***/
static
bool
is_v4l
_legacy
(
struct
udev_device
*
dev
)
static
bool
v4l_is
_legacy
(
struct
udev_device
*
dev
)
{
const
char
*
version
;
version
=
udev_device_get_property_value
(
dev
,
"ID_V4L_VERSION"
);
return
version
&&
!
strcmp
(
version
,
"1"
);
return
(
version
!=
NULL
)
&&
!
strcmp
(
version
,
"1"
);
}
static
bool
v4l_can_capture
(
struct
udev_device
*
dev
)
{
const
char
*
caps
;
caps
=
udev_device_get_property_value
(
dev
,
"ID_V4L_CAPABILITIES"
);
return
(
caps
!=
NULL
)
&&
(
strstr
(
caps
,
":capture:"
)
!=
NULL
);
}
static
char
*
v4l_get_mrl
(
struct
udev_device
*
dev
)
{
/* Determine media location */
if
(
is_v4l_legacy
(
dev
))
if
(
v4l_is_legacy
(
dev
)
||
!
v4l_can_capture
(
dev
))
return
NULL
;
const
char
*
node
=
udev_device_get_devnode
(
dev
);
...
...
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