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
6409dc01
Commit
6409dc01
authored
Oct 25, 2008
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify confusing code.
parent
8dc89254
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
modules/access/v4l2/v4l2.c
modules/access/v4l2/v4l2.c
+12
-5
No files found.
modules/access/v4l2/v4l2.c
View file @
6409dc01
...
@@ -70,7 +70,6 @@
...
@@ -70,7 +70,6 @@
#ifdef HAVE_LIBV4L2
#ifdef HAVE_LIBV4L2
# include <libv4l2.h>
# include <libv4l2.h>
#else
#else
# define v4l2_fd_open(fd, flags) (fd)
# define v4l2_close close
# define v4l2_close close
# define v4l2_dup dup
# define v4l2_dup dup
# define v4l2_ioctl ioctl
# define v4l2_ioctl ioctl
...
@@ -1845,15 +1844,19 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
...
@@ -1845,15 +1844,19 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
goto
open_failed
;
goto
open_failed
;
}
}
#ifdef HAVE_LIBV4L2
/* Note the v4l2_xxx functions are designed so that if they get passed an
/* Note the v4l2_xxx functions are designed so that if they get passed an
unknown fd, the will behave exactly as their regular xxx counterparts,
unknown fd, the will behave exactly as their regular xxx counterparts,
so if v4l2_fd_open fails, we continue as normal (missing the libv4l2
so if v4l2_fd_open fails, we continue as normal (missing the libv4l2
custom cam format to normal formats conversion). Chances are big we will
custom cam format to normal formats conversion). Chances are big we will
still fail then though, as normally v4l2_fd_open only fails if the
still fail then though, as normally v4l2_fd_open only fails if the
device is not a v4l2 device. */
device is not a v4l2 device. */
libv4l2_fd
=
v4l2_fd_open
(
i_fd
,
V4L2_ENABLE_ENUM_FMT_EMULATION
);
libv4l2_fd
=
v4l2_fd_open
(
i_fd
,
V4L2_ENABLE_ENUM_FMT_EMULATION
);
if
(
libv4l2_fd
!=
-
1
)
if
(
libv4l2_fd
!=
-
1
)
i_fd
=
libv4l2_fd
;
i_fd
=
libv4l2_fd
;
#else
libv4l2_fd
=
i_fd
;
#endif
/* Tune the tuner */
/* Tune the tuner */
if
(
p_sys
->
i_frequency
>=
0
)
if
(
p_sys
->
i_frequency
>=
0
)
...
@@ -2574,15 +2577,19 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
...
@@ -2574,15 +2577,19 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
goto
open_failed
;
goto
open_failed
;
}
}
#ifdef HAVE_LIBV4L2
/* Note the v4l2_xxx functions are designed so that if they get passed an
/* Note the v4l2_xxx functions are designed so that if they get passed an
unknown fd, the will behave exactly as their regular xxx counterparts,
unknown fd, the will behave exactly as their regular xxx counterparts,
so if v4l2_fd_open fails, we continue as normal (missing the libv4l2
so if v4l2_fd_open fails, we continue as normal (missing the libv4l2
custom cam format to normal formats conversion). Chances are big we will
custom cam format to normal formats conversion). Chances are big we will
still fail then though, as normally v4l2_fd_open only fails if the
still fail then though, as normally v4l2_fd_open only fails if the
device is not a v4l2 device. */
device is not a v4l2 device. */
libv4l2_fd
=
v4l2_fd_open
(
i_fd
,
V4L2_ENABLE_ENUM_FMT_EMULATION
);
libv4l2_fd
=
v4l2_fd_open
(
i_fd
,
V4L2_ENABLE_ENUM_FMT_EMULATION
);
if
(
libv4l2_fd
!=
-
1
)
if
(
libv4l2_fd
!=
-
1
)
i_fd
=
libv4l2_fd
;
i_fd
=
libv4l2_fd
;
#else
libv4l2_fd
=
i_fd
;
#endif
/* Get device capabilites */
/* Get device capabilites */
...
...
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