Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
6a320d91
Commit
6a320d91
authored
Apr 14, 2006
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/access/pvr/pvr.c: Be compatible with both old and new kernels.
parent
d68e3479
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
modules/access/pvr/pvr.c
modules/access/pvr/pvr.c
+24
-12
No files found.
modules/access/pvr/pvr.c
View file @
6a320d91
...
@@ -560,8 +560,9 @@ static int Open( vlc_object_t * p_this )
...
@@ -560,8 +560,9 @@ static int Open( vlc_object_t * p_this )
if
(
p_sys
->
i_frequency
!=
-
1
)
if
(
p_sys
->
i_frequency
!=
-
1
)
{
{
int
i_fd
;
int
i_fd
;
struct
v4l2_frequency
vf
;
struct
v4l2_tuner
vt
;
vf
.
tuner
=
0
;
/* TODO: let the user choose the tuner */
vt
.
index
=
0
;
/* TODO: let the user choose the tuner */
memset
(
&
vt
.
reserved
,
0
,
sizeof
(
vt
.
reserved
)
);
if
(
p_sys
->
i_frequency
>=
pi_radio_range
[
0
]
if
(
p_sys
->
i_frequency
>=
pi_radio_range
[
0
]
&&
p_sys
->
i_frequency
<=
pi_radio_range
[
1
]
)
&&
p_sys
->
i_frequency
<=
pi_radio_range
[
1
]
)
...
@@ -586,27 +587,38 @@ static int Open( vlc_object_t * p_this )
...
@@ -586,27 +587,38 @@ static int Open( vlc_object_t * p_this )
p_sys
->
i_radio_fd
=
-
1
;
p_sys
->
i_radio_fd
=
-
1
;
}
}
if
(
ioctl
(
i_fd
,
VIDIOC_G_
FREQUENCY
,
&
vf
)
<
0
)
if
(
ioctl
(
i_fd
,
VIDIOC_G_
TUNER
,
&
vt
)
<
0
)
{
{
msg_Warn
(
p_access
,
"VIDIOC_G_
FREQUENCY
failed (%s)"
,
msg_Warn
(
p_access
,
"VIDIOC_G_
TUNER
failed (%s)"
,
strerror
(
errno
)
);
strerror
(
errno
)
);
}
}
else
else
{
{
if
(
p_sys
->
i_radio_fd
==
-
1
)
struct
v4l2_frequency
vf
;
vf
.
frequency
=
(
p_sys
->
i_frequency
*
16
+
500
)
/
1000
;
vf
.
tuner
=
vt
.
index
;
else
vf
.
frequency
=
p_sys
->
i_frequency
*
16
;
if
(
ioctl
(
i_fd
,
VIDIOC_S
_FREQUENCY
,
&
vf
)
<
0
)
if
(
ioctl
(
i_fd
,
VIDIOC_G
_FREQUENCY
,
&
vf
)
<
0
)
{
{
msg_Warn
(
p_access
,
"VIDIOC_
S
_FREQUENCY failed (%s)"
,
msg_Warn
(
p_access
,
"VIDIOC_
G
_FREQUENCY failed (%s)"
,
strerror
(
errno
)
);
strerror
(
errno
)
);
}
}
else
else
{
{
msg_Dbg
(
p_access
,
"tuner frequency set to: %d"
,
if
(
vt
.
capability
&
V4L2_TUNER_CAP_LOW
)
p_sys
->
i_frequency
);
vf
.
frequency
=
p_sys
->
i_frequency
*
16
;
else
vf
.
frequency
=
(
p_sys
->
i_frequency
*
16
+
500
)
/
1000
;
if
(
ioctl
(
i_fd
,
VIDIOC_S_FREQUENCY
,
&
vf
)
<
0
)
{
msg_Warn
(
p_access
,
"VIDIOC_S_FREQUENCY failed (%s)"
,
strerror
(
errno
)
);
}
else
{
msg_Dbg
(
p_access
,
"tuner frequency set to: %d"
,
p_sys
->
i_frequency
);
}
}
}
}
}
}
}
...
...
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