Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
75a5fdde
Commit
75a5fdde
authored
Mar 23, 2005
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* dvb: fix report of error in FrontendPoll (please report any problem).
parent
7a97dae2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
55 deletions
+61
-55
modules/access/dvb/linux_dvb.c
modules/access/dvb/linux_dvb.c
+61
-55
No files found.
modules/access/dvb/linux_dvb.c
View file @
75a5fdde
...
...
@@ -258,21 +258,26 @@ void E_(FrontendPoll)( access_t *p_access )
{
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
frontend_t
*
p_frontend
=
p_sys
->
p_frontend
;
int
i_ret
;
struct
dvb_frontend_event
event
;
fe_status_t
i_status
,
i_diff
;
if
(
(
i_ret
=
ioctl
(
p_sys
->
i_frontend_handle
,
FE_GET_EVENT
,
&
event
))
<
0
)
for
(
;;
)
{
msg_Err
(
p_access
,
"reading frontend status failed (%d) %s"
,
i_ret
,
strerror
(
errno
)
);
return
;
}
int
i_ret
=
ioctl
(
p_sys
->
i_frontend_handle
,
FE_GET_EVENT
,
&
event
);
i_status
=
event
.
status
;
i_diff
=
i_status
^
p_frontend
->
i_last_status
;
p_frontend
->
i_last_status
=
i_status
;
if
(
i_ret
<
0
)
{
if
(
errno
==
EWOULDBLOCK
)
return
;
msg_Err
(
p_access
,
"reading frontend status failed (%d) %s"
,
i_ret
,
strerror
(
errno
)
);
continue
;
}
i_status
=
event
.
status
;
i_diff
=
i_status
^
p_frontend
->
i_last_status
;
p_frontend
->
i_last_status
=
i_status
;
#define IF_UP( x ) \
} \
...
...
@@ -280,52 +285,53 @@ void E_(FrontendPoll)( access_t *p_access )
{ \
if ( i_status & (x) )
{
IF_UP
(
FE_HAS_SIGNAL
)
msg_Dbg
(
p_access
,
"frontend has acquired signal"
);
else
msg_Dbg
(
p_access
,
"frontend has lost signal"
);
IF_UP
(
FE_HAS_CARRIER
)
msg_Dbg
(
p_access
,
"frontend has acquired carrier"
);
else
msg_Dbg
(
p_access
,
"frontend has lost carrier"
);
IF_UP
(
FE_HAS_VITERBI
)
msg_Dbg
(
p_access
,
"frontend has acquired stable FEC"
);
else
msg_Dbg
(
p_access
,
"frontend has lost FEC"
);
IF_UP
(
FE_HAS_SYNC
)
msg_Dbg
(
p_access
,
"frontend has acquired sync"
);
else
msg_Dbg
(
p_access
,
"frontend has lost sync"
);
IF_UP
(
FE_HAS_LOCK
)
{
int32_t
i_value
;
msg_Dbg
(
p_access
,
"frontend has acquired lock"
);
p_sys
->
i_frontend_timeout
=
0
;
/* Read some statistics */
if
(
ioctl
(
p_sys
->
i_frontend_handle
,
FE_READ_BER
,
&
i_value
)
>=
0
)
msg_Dbg
(
p_access
,
"- Bit error rate: %d"
,
i_value
);
if
(
ioctl
(
p_sys
->
i_frontend_handle
,
FE_READ_SIGNAL_STRENGTH
,
&
i_value
)
>=
0
)
msg_Dbg
(
p_access
,
"- Signal strength: %d"
,
i_value
);
if
(
ioctl
(
p_sys
->
i_frontend_handle
,
FE_READ_SNR
,
&
i_value
)
>=
0
)
msg_Dbg
(
p_access
,
"- SNR: %d"
,
i_value
);
}
else
{
msg_Dbg
(
p_access
,
"frontend has lost lock"
);
p_sys
->
i_frontend_timeout
=
mdate
()
+
FRONTEND_LOCK_TIMEOUT
;
}
IF_UP
(
FE_REINIT
)
{
/* The frontend was reinited. */
msg_Warn
(
p_access
,
"reiniting frontend"
);
E_
(
FrontendSet
)(
p_access
);
IF_UP
(
FE_HAS_SIGNAL
)
msg_Dbg
(
p_access
,
"frontend has acquired signal"
);
else
msg_Dbg
(
p_access
,
"frontend has lost signal"
);
IF_UP
(
FE_HAS_CARRIER
)
msg_Dbg
(
p_access
,
"frontend has acquired carrier"
);
else
msg_Dbg
(
p_access
,
"frontend has lost carrier"
);
IF_UP
(
FE_HAS_VITERBI
)
msg_Dbg
(
p_access
,
"frontend has acquired stable FEC"
);
else
msg_Dbg
(
p_access
,
"frontend has lost FEC"
);
IF_UP
(
FE_HAS_SYNC
)
msg_Dbg
(
p_access
,
"frontend has acquired sync"
);
else
msg_Dbg
(
p_access
,
"frontend has lost sync"
);
IF_UP
(
FE_HAS_LOCK
)
{
int32_t
i_value
;
msg_Dbg
(
p_access
,
"frontend has acquired lock"
);
p_sys
->
i_frontend_timeout
=
0
;
/* Read some statistics */
if
(
ioctl
(
p_sys
->
i_frontend_handle
,
FE_READ_BER
,
&
i_value
)
>=
0
)
msg_Dbg
(
p_access
,
"- Bit error rate: %d"
,
i_value
);
if
(
ioctl
(
p_sys
->
i_frontend_handle
,
FE_READ_SIGNAL_STRENGTH
,
&
i_value
)
>=
0
)
msg_Dbg
(
p_access
,
"- Signal strength: %d"
,
i_value
);
if
(
ioctl
(
p_sys
->
i_frontend_handle
,
FE_READ_SNR
,
&
i_value
)
>=
0
)
msg_Dbg
(
p_access
,
"- SNR: %d"
,
i_value
);
}
else
{
msg_Dbg
(
p_access
,
"frontend has lost lock"
);
p_sys
->
i_frontend_timeout
=
mdate
()
+
FRONTEND_LOCK_TIMEOUT
;
}
IF_UP
(
FE_REINIT
)
{
/* The frontend was reinited. */
msg_Warn
(
p_access
,
"reiniting frontend"
);
E_
(
FrontendSet
)(
p_access
);
}
}
}
}
...
...
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