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
9cf2944f
Commit
9cf2944f
authored
Jan 18, 2009
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dvb-c scanning support (not working yet)
parent
c1788de6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
0 deletions
+71
-0
modules/access/dvb/linux_dvb.c
modules/access/dvb/linux_dvb.c
+24
-0
modules/access/dvb/scan.c
modules/access/dvb/scan.c
+47
-0
No files found.
modules/access/dvb/linux_dvb.c
View file @
9cf2944f
...
...
@@ -402,6 +402,28 @@ void FrontendGetStatus( access_t *p_access, frontend_status_t *p_status )
p_status
->
b_has_carrier
=
(
p_frontend
->
i_last_status
&
FE_HAS_CARRIER
)
!=
0
;
p_status
->
b_has_lock
=
(
p_frontend
->
i_last_status
&
FE_HAS_LOCK
)
!=
0
;
}
static
int
ScanParametersDvbC
(
access_t
*
p_access
,
scan_parameter_t
*
p_scan
)
{
const
frontend_t
*
p_frontend
=
p_access
->
p_sys
->
p_frontend
;
memset
(
p_scan
,
0
,
sizeof
(
*
p_scan
)
);
p_scan
->
type
=
SCAN_DVB_C
;
p_scan
->
b_exhaustive
=
false
;
/* */
p_scan
->
frequency
.
i_min
=
p_frontend
->
info
.
frequency_min
;
p_scan
->
frequency
.
i_max
=
p_frontend
->
info
.
frequency_max
;
p_scan
->
frequency
.
i_step
=
p_frontend
->
info
.
frequency_stepsize
;
p_scan
->
frequency
.
i_count
=
(
p_scan
->
frequency
.
i_max
-
p_scan
->
frequency
.
i_min
)
/
p_scan
->
frequency
.
i_step
;
/* */
p_scan
->
bandwidth
.
i_min
=
6
;
p_scan
->
bandwidth
.
i_max
=
8
;
p_scan
->
bandwidth
.
i_step
=
1
;
p_scan
->
bandwidth
.
i_count
=
3
;
return
VLC_SUCCESS
;
}
static
int
ScanParametersDvbT
(
access_t
*
p_access
,
scan_parameter_t
*
p_scan
)
{
const
frontend_t
*
p_frontend
=
p_access
->
p_sys
->
p_frontend
;
...
...
@@ -431,6 +453,8 @@ int FrontendGetScanParameter( access_t *p_access, scan_parameter_t *p_scan )
if
(
p_frontend
->
info
.
type
==
FE_OFDM
)
// DVB-T
return
ScanParametersDvbT
(
p_access
,
p_scan
);
else
if
(
p_frontend
->
info
.
type
==
FE_QAM
)
// DVB-C
return
ScanParametersDvbC
(
p_access
,
p_scan
);
msg_Err
(
p_access
,
"Frontend type not supported for scanning"
);
return
VLC_EGENERIC
;
...
...
modules/access/dvb/scan.c
View file @
9cf2944f
...
...
@@ -110,6 +110,15 @@ int scan_Init( vlc_object_t *p_obj, scan_t *p_scan, const scan_parameter_t *p_pa
p_parameter
->
bandwidth
.
i_min
,
p_parameter
->
bandwidth
.
i_max
);
msg_Dbg
(
p_obj
,
" - exhaustive mode %s"
,
p_parameter
->
b_exhaustive
?
"on"
:
"off"
);
}
else
if
(
p_parameter
->
type
==
SCAN_DVB_C
)
{
msg_Dbg
(
p_obj
,
"DVB-C scanning:"
);
msg_Dbg
(
p_obj
,
" - frequency [%d, %d]"
,
p_parameter
->
frequency
.
i_min
,
p_parameter
->
frequency
.
i_max
);
msg_Dbg
(
p_obj
,
" - bandwidth [%d,%d]"
,
p_parameter
->
bandwidth
.
i_min
,
p_parameter
->
bandwidth
.
i_max
);
msg_Dbg
(
p_obj
,
" - exhaustive mode %s"
,
p_parameter
->
b_exhaustive
?
"on"
:
"off"
);
}
else
{
return
VLC_EGENERIC
;
...
...
@@ -134,6 +143,33 @@ void scan_Clean( scan_t *p_scan )
TAB_CLEAN
(
p_scan
->
i_service
,
p_scan
->
pp_service
);
}
static
int
ScanDvbCNextFast
(
scan_t
*
p_scan
,
scan_configuration_t
*
p_cfg
,
double
*
pf_pos
)
{
msg_Dbg
(
p_scan
->
p_obj
,
"Scan index %d"
,
p_scan
->
i_index
);
if
(
p_scan
->
i_index
<=
(
10
)
)
{
p_cfg
->
i_frequency
=
100500000
+
(
(
p_scan
->
i_index
)
*
700000
);
}
else
if
(
p_scan
->
i_index
<=
(
10
+
9
)
)
{
p_cfg
->
i_frequency
=
97000000
+
(
(
p_scan
->
i_index
-
20
)
*
800000
);
}
else
if
(
p_scan
->
i_index
<=
(
38
+
17
)
)
{
p_cfg
->
i_frequency
=
14250000
+
(
(
p_scan
->
i_index
-
33
)
*
700000
);
}
else
if
(
p_scan
->
i_index
<=
(
72
+
(
90
-
21
)
)
)
{
p_cfg
->
i_frequency
=
13800000
+
(
(
p_scan
->
i_index
-
(
72
+
21
)
)
*
800000
);
}
else
{
return
VLC_EGENERIC
;
}
*
pf_pos
=
(
double
)
p_scan
->
i_index
/
(
(
90
-
21
+
22
-
5
+
10
+
9
));
return
VLC_SUCCESS
;
}
static
int
ScanDvbTNextExhaustive
(
scan_t
*
p_scan
,
scan_configuration_t
*
p_cfg
,
double
*
pf_pos
)
{
...
...
@@ -222,6 +258,14 @@ static int ScanDvbTNextFast( scan_t *p_scan, scan_configuration_t *p_cfg, double
}
}
static
int
ScanDvbCNext
(
scan_t
*
p_scan
,
scan_configuration_t
*
p_cfg
,
double
*
pf_pos
)
{
if
(
p_scan
->
parameter
.
b_exhaustive
)
return
ScanDvbTNextExhaustive
(
p_scan
,
p_cfg
,
pf_pos
);
else
return
ScanDvbCNextFast
(
p_scan
,
p_cfg
,
pf_pos
);
}
static
int
ScanDvbTNext
(
scan_t
*
p_scan
,
scan_configuration_t
*
p_cfg
,
double
*
pf_pos
)
{
if
(
p_scan
->
parameter
.
b_exhaustive
)
...
...
@@ -244,6 +288,9 @@ int scan_Next( scan_t *p_scan, scan_configuration_t *p_cfg )
case
SCAN_DVB_T
:
i_ret
=
ScanDvbTNext
(
p_scan
,
p_cfg
,
&
f_position
);
break
;
case
SCAN_DVB_C
:
i_ret
=
ScanDvbCNext
(
p_scan
,
p_cfg
,
&
f_position
);
break
;
default:
i_ret
=
VLC_EGENERIC
;
break
;
...
...
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