Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dvblast
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
dvblast
Commits
25ed9882
Commit
25ed9882
authored
Jul 12, 2010
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* dvb.c: Re-introduce the DVR watchdog since it happens to be effective with some DVB-S2 frontends.
parent
7984a1e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
dvb.c
dvb.c
+18
-0
No files found.
dvb.c
View file @
25ed9882
...
...
@@ -53,6 +53,7 @@
* Local declarations
*****************************************************************************/
#define FRONTEND_LOCK_TIMEOUT 30000000
/* 30 s */
#define DVR_READ_TIMEOUT 30000000
/* 30 s */
#define CA_POLL_PERIOD 100000
/* 100 ms */
#define MAX_READ_ONCE 50
#define DVR_BUFFER_SIZE 40*188*1024
/* bytes */
...
...
@@ -60,6 +61,7 @@
static
int
i_frontend
,
i_dvr
;
static
fe_status_t
i_last_status
;
static
mtime_t
i_frontend_timeout
;
static
mtime_t
i_last_packet
=
0
;
static
mtime_t
i_ca_next_event
=
0
;
static
block_t
*
p_freelist
=
NULL
;
...
...
@@ -79,6 +81,8 @@ void dvb_Open( void )
msg_Dbg
(
NULL
,
"using linux-dvb API version %d"
,
DVB_API_VERSION
);
i_wallclock
=
mdate
();
sprintf
(
psz_tmp
,
"/dev/dvb/adapter%d/frontend%d"
,
i_adapter
,
i_fenum
);
if
(
(
i_frontend
=
open
(
psz_tmp
,
O_RDWR
|
O_NONBLOCK
))
<
0
)
{
...
...
@@ -155,7 +159,20 @@ block_t *dvb_Read( mtime_t i_poll_timeout )
}
if
(
ufds
[
0
].
revents
)
{
p_blocks
=
DVRRead
();
i_wallclock
=
mdate
();
}
if
(
p_blocks
!=
NULL
)
i_last_packet
=
i_wallclock
;
else
if
(
!
i_frontend_timeout
&&
i_wallclock
>
i_last_packet
+
DVR_READ_TIMEOUT
)
{
msg_Warn
(
NULL
,
"no DVR output, resetting"
);
FrontendSet
(
false
);
en50221_Reset
();
}
if
(
i_ca_handle
&&
i_ca_type
==
CA_CI_LINK
)
{
...
...
@@ -341,6 +358,7 @@ static void FrontendPoll( void )
int32_t
i_value
=
0
;
msg_Dbg
(
NULL
,
"frontend has acquired lock"
);
i_frontend_timeout
=
0
;
i_last_packet
=
i_wallclock
;
/* Read some statistics */
if
(
ioctl
(
i_frontend
,
FE_READ_BER
,
&
i_value
)
>=
0
)
...
...
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