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
f09152bc
Commit
f09152bc
authored
Sep 23, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added signal stat to dvb module.
parent
813a4595
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
modules/access/dvb/access.c
modules/access/dvb/access.c
+22
-7
modules/access/dvb/dvb.h
modules/access/dvb/dvb.h
+2
-0
No files found.
modules/access/dvb/access.c
View file @
f09152bc
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include <vlc_common.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_plugin.h>
#include <vlc_access.h>
#include <vlc_access.h>
#include <vlc_input.h>
#include <vlc_interface.h>
#include <vlc_interface.h>
#ifdef HAVE_UNISTD_H
#ifdef HAVE_UNISTD_H
...
@@ -323,12 +324,8 @@ static int Open( vlc_object_t *p_this )
...
@@ -323,12 +324,8 @@ static int Open( vlc_object_t *p_this )
p_access
->
pf_block
=
Block
;
p_access
->
pf_block
=
Block
;
p_access
->
pf_control
=
Control
;
p_access
->
pf_control
=
Control
;
p_access
->
pf_seek
=
NULL
;
p_access
->
pf_seek
=
NULL
;
p_access
->
info
.
i_update
=
0
;
p_access
->
info
.
i_size
=
0
;
access_InitFields
(
p_access
);
p_access
->
info
.
i_pos
=
0
;
p_access
->
info
.
b_eof
=
false
;
p_access
->
info
.
i_title
=
0
;
p_access
->
info
.
i_seekpoint
=
0
;
p_access
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
access_sys_t
)
);
p_access
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
access_sys_t
)
);
if
(
!
p_sys
)
if
(
!
p_sys
)
...
@@ -555,6 +552,10 @@ static block_t *Block( access_t *p_access )
...
@@ -555,6 +552,10 @@ static block_t *Block( access_t *p_access )
if
(
p_sys
->
i_read_once
<
DVB_READ_ONCE
)
if
(
p_sys
->
i_read_once
<
DVB_READ_ONCE
)
p_sys
->
i_read_once
++
;
p_sys
->
i_read_once
++
;
/* Update moderatly the signal properties */
if
(
(
p_sys
->
i_stat_counter
++
%
100
)
==
0
)
p_access
->
info
.
i_update
|=
INPUT_UPDATE_SIGNAL
;
return
p_block
;
return
p_block
;
}
}
...
@@ -715,7 +716,9 @@ static int Control( access_t *p_access, int i_query, va_list args )
...
@@ -715,7 +716,9 @@ static int Control( access_t *p_access, int i_query, va_list args )
bool
*
pb_bool
,
b_bool
;
bool
*
pb_bool
,
b_bool
;
int
*
pi_int
,
i_int
;
int
*
pi_int
,
i_int
;
int64_t
*
pi_64
;
int64_t
*
pi_64
;
double
*
pf1
,
*
pf2
;
dvbpsi_pmt_t
*
p_pmt
;
dvbpsi_pmt_t
*
p_pmt
;
frontend_statistic_t
stat
;
switch
(
i_query
)
switch
(
i_query
)
{
{
...
@@ -749,6 +752,18 @@ static int Control( access_t *p_access, int i_query, va_list args )
...
@@ -749,6 +752,18 @@ static int Control( access_t *p_access, int i_query, va_list args )
case
ACCESS_GET_CONTENT_TYPE
:
case
ACCESS_GET_CONTENT_TYPE
:
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
case
ACCESS_GET_SIGNAL
:
pf1
=
(
double
*
)
va_arg
(
args
,
double
*
);
pf2
=
(
double
*
)
va_arg
(
args
,
double
*
);
*
pf1
=
*
pf2
=
0
;
if
(
!
FrontendGetStatistic
(
p_access
,
&
stat
)
)
{
*
pf1
=
(
double
)
stat
.
i_snr
/
65535
.
0
;
*
pf2
=
(
double
)
stat
.
i_signal_strenth
/
65535
.
0
;
}
return
VLC_SUCCESS
;
case
ACCESS_SET_PRIVATE_ID_STATE
:
case
ACCESS_SET_PRIVATE_ID_STATE
:
if
(
p_sys
->
b_scan_mode
)
if
(
p_sys
->
b_scan_mode
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
...
modules/access/dvb/dvb.h
View file @
f09152bc
...
@@ -171,6 +171,8 @@ struct access_sys_t
...
@@ -171,6 +171,8 @@ struct access_sys_t
/* */
/* */
int
i_read_once
;
int
i_read_once
;
int
i_stat_counter
;
#ifdef ENABLE_HTTPD
#ifdef ENABLE_HTTPD
/* Local HTTP server */
/* Local HTTP server */
httpd_host_t
*
p_httpd_host
;
httpd_host_t
*
p_httpd_host
;
...
...
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