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
d2cd2e5d
Commit
d2cd2e5d
authored
Aug 26, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: poll signal level through demux (refs #8456)
parent
4543c9c8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
20 deletions
+17
-20
include/vlc_demux.h
include/vlc_demux.h
+2
-0
include/vlc_input.h
include/vlc_input.h
+0
-1
modules/access/dtv/access.c
modules/access/dtv/access.c
+5
-5
modules/demux/ts.c
modules/demux/ts.c
+3
-2
src/input/input.c
src/input/input.c
+7
-12
No files found.
include/vlc_demux.h
View file @
d2cd2e5d
...
...
@@ -138,6 +138,8 @@ enum demux_query_e
DEMUX_CAN_RECORD
,
/* arg1=bool* res=can fail(assume false) */
DEMUX_SET_RECORD_STATE
,
/* arg1=bool res=can fail */
DEMUX_GET_SIGNAL
,
/* arg1=double *pf_quality, arg2=double *pf_strength
res=can fail */
/* II. Specific access_demux queries */
/* PAUSE you are ensured that it is never called twice with the same state */
...
...
include/vlc_input.h
View file @
d2cd2e5d
...
...
@@ -206,7 +206,6 @@ static inline void vlc_input_attachment_Delete( input_attachment_t *a )
#define INPUT_UPDATE_TITLE 0x0010
#define INPUT_UPDATE_SEEKPOINT 0x0020
#define INPUT_UPDATE_META 0x0040
#define INPUT_UPDATE_SIGNAL 0x0080
#define INPUT_UPDATE_TITLE_LIST 0x0100
/**
...
...
modules/access/dtv/access.c
View file @
d2cd2e5d
...
...
@@ -521,11 +521,6 @@ static block_t *Read (access_t *access)
block
->
i_buffer
=
val
;
/* Fetch the signal levels every so often. Some devices do not like this
* to be requested too frequently, e.g. due to low bandwidth I²C bus. */
if
((
sys
->
signal_poll
++
)
==
0
)
access
->
info
.
i_update
|=
INPUT_UPDATE_SIGNAL
;
return
block
;
}
...
...
@@ -555,6 +550,11 @@ static int Control (access_t *access, int query, va_list args)
break
;
case
ACCESS_GET_SIGNAL
:
/* Fetch the signal levels only every so often to avoid stressing
* the device bus. */
if
((
sys
->
signal_poll
++
))
return
VLC_EGENERIC
;
*
va_arg
(
args
,
double
*
)
=
dvb_get_snr
(
dev
);
*
va_arg
(
args
,
double
*
)
=
dvb_get_signal_strength
(
dev
);
return
VLC_SUCCESS
;
...
...
modules/demux/ts.c
View file @
d2cd2e5d
...
...
@@ -1202,8 +1202,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
p_sys
->
b_start_record
=
b_bool
;
return
VLC_SUCCESS
;
case
DEMUX_GET_FPS
:
case
DEMUX_SET_TIME
:
case
DEMUX_GET_SIGNAL
:
return
stream_Control
(
p_demux
->
s
,
STREAM_GET_SIGNAL
,
args
);
default:
return
VLC_EGENERIC
;
}
...
...
src/input/input.c
View file @
d2cd2e5d
...
...
@@ -2212,6 +2212,13 @@ static void UpdateGenericFromDemux( input_thread_t *p_input )
}
p_demux
->
info
.
i_update
&=
~
INPUT_UPDATE_META
;
}
{
double
quality
;
double
strength
;
if
(
!
demux_Control
(
p_demux
,
DEMUX_GET_SIGNAL
,
&
quality
,
&
strength
)
)
input_SendEventSignal
(
p_input
,
quality
,
strength
);
}
}
static
void
UpdateTitleListfromDemux
(
input_thread_t
*
p_input
)
...
...
@@ -2284,18 +2291,6 @@ static void UpdateGenericFromAccess( input_thread_t *p_input )
}
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_META
;
}
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_SIGNAL
)
{
double
f_quality
;
double
f_strength
;
if
(
stream_Control
(
p_stream
,
STREAM_GET_SIGNAL
,
&
f_quality
,
&
f_strength
)
)
f_quality
=
f_strength
=
-
1
;
input_SendEventSignal
(
p_input
,
f_quality
,
f_strength
);
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_SIGNAL
;
}
}
/*****************************************************************************
...
...
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