Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
7275b922
Commit
7275b922
authored
Feb 22, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reworked DecodeModulation (close #1063)
parent
99aeeff1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
27 deletions
+52
-27
modules/access/dvb/access.c
modules/access/dvb/access.c
+12
-5
modules/access/dvb/linux_dvb.c
modules/access/dvb/linux_dvb.c
+40
-22
No files found.
modules/access/dvb/access.c
View file @
7275b922
...
...
@@ -253,14 +253,21 @@ vlc_module_begin();
#endif
set_capability
(
"access2"
,
0
);
add_shortcut
(
"dvb"
);
add_shortcut
(
"dvb-s"
);
add_shortcut
(
"dvb"
);
/* Generic name */
add_shortcut
(
"dvb-s"
);
/* Satellite */
add_shortcut
(
"qpsk"
);
add_shortcut
(
"dvb-c"
);
add_shortcut
(
"satellite"
);
add_shortcut
(
"dvb-c"
);
/* Cable */
add_shortcut
(
"cable"
);
add_shortcut
(
"dvb-t"
);
add_shortcut
(
"dvb-t"
);
/* Terrestrial */
add_shortcut
(
"terrestrial"
);
add_shortcut
(
"satellite"
);
/* compatibility with the interface. */
add_shortcut
(
"atsc"
);
/* Atsc */
add_shortcut
(
"usdigital"
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
modules/access/dvb/linux_dvb.c
View file @
7275b922
...
...
@@ -684,29 +684,47 @@ static fe_code_rate_t DecodeFEC( access_t *p_access, int i_val )
return
fe_fec
;
}
static
fe_modulation_t
DecodeModulation
(
access_t
*
p_access
)
static
fe_modulation_t
DecodeModulation
QAM
(
access_t
*
p_access
)
{
vlc_value_t
val
;
fe_modulation_t
fe_modulation
=
0
;
var_Get
(
p_access
,
"dvb-modulation"
,
&
val
);
switch
(
val
.
i_int
)
switch
(
var_GetInteger
(
p_access
,
"dvb-modulation"
)
)
{
case
-
1
:
fe_modulation
=
QPSK
;
break
;
case
0
:
fe_modulation
=
QAM_AUTO
;
break
;
case
8
:
fe_modulation
=
VSB_8
;
break
;
// ugly hack
case
16
:
fe_modulation
=
QAM_16
;
break
;
case
32
:
fe_modulation
=
QAM_32
;
break
;
case
64
:
fe_modulation
=
QAM_64
;
break
;
case
128
:
fe_modulation
=
QAM_128
;
break
;
case
256
:
fe_modulation
=
QAM_256
;
break
;
case
0
:
return
QAM_AUTO
;
case
16
:
return
QAM_16
;
case
32
:
return
QAM_32
;
case
64
:
return
QAM_64
;
case
128
:
return
QAM_128
;
case
256
:
return
QAM_256
;
default:
msg_Dbg
(
p_access
,
"terrestrial/cable dvb has constellation/modulation not set, using auto"
);
fe_modulation
=
QAM_AUTO
;
break
;
msg_Dbg
(
p_access
,
"QAM modulation not set, using auto"
);
return
QAM_AUTO
;
}
}
static
fe_modulation_t
DecodeModulationOFDM
(
access_t
*
p_access
)
{
switch
(
var_GetInteger
(
p_access
,
"dvb-modulation"
)
)
{
case
-
1
:
return
QPSK
;
case
0
:
return
QAM_AUTO
;
case
16
:
return
QAM_16
;
case
32
:
return
QAM_32
;
case
64
:
return
QAM_64
;
case
128
:
return
QAM_128
;
case
256
:
return
QAM_256
;
default:
msg_Dbg
(
p_access
,
"OFDM modulation not set, using QAM auto"
);
return
QAM_AUTO
;
}
}
static
fe_modulation_t
DecodeModulationATSC
(
access_t
*
p_access
)
{
switch
(
var_GetInteger
(
p_access
,
"dvb-modulation"
)
)
{
case
8
:
return
VSB_8
;
case
16
:
return
VSB_16
;
default:
msg_Dbg
(
p_access
,
"ATSC modulation not set, using VSB 8"
);
return
VSB_8
;
}
return
fe_modulation
;
}
/*****************************************************************************
...
...
@@ -1003,7 +1021,7 @@ static int FrontendSetQAM( access_t *p_access )
var_Get
(
p_access
,
"dvb-fec"
,
&
val
);
fep
.
u
.
qam
.
fec_inner
=
DecodeFEC
(
p_access
,
val
.
i_int
);
fep
.
u
.
qam
.
modulation
=
DecodeModulation
(
p_access
);
fep
.
u
.
qam
.
modulation
=
DecodeModulation
QAM
(
p_access
);
/* Empty the event queue */
for
(
;
;
)
...
...
@@ -1136,7 +1154,7 @@ static int FrontendSetOFDM( access_t * p_access )
fep
.
u
.
ofdm
.
code_rate_HP
=
DecodeFEC
(
p_access
,
val
.
i_int
);
var_Get
(
p_access
,
"dvb-code-rate-lp"
,
&
val
);
fep
.
u
.
ofdm
.
code_rate_LP
=
DecodeFEC
(
p_access
,
val
.
i_int
);
fep
.
u
.
ofdm
.
constellation
=
DecodeModulation
(
p_access
);
fep
.
u
.
ofdm
.
constellation
=
DecodeModulation
OFDM
(
p_access
);
fep
.
u
.
ofdm
.
transmission_mode
=
DecodeTransmission
(
p_access
);
fep
.
u
.
ofdm
.
guard_interval
=
DecodeGuardInterval
(
p_access
);
fep
.
u
.
ofdm
.
hierarchy_information
=
DecodeHierarchy
(
p_access
);
...
...
@@ -1176,7 +1194,7 @@ static int FrontendSetATSC( access_t *p_access )
var_Get
(
p_access
,
"dvb-frequency"
,
&
val
);
fep
.
frequency
=
val
.
i_int
;
fep
.
u
.
vsb
.
modulation
=
DecodeModulation
(
p_access
);
fep
.
u
.
vsb
.
modulation
=
DecodeModulation
ATSC
(
p_access
);
/* Empty the event queue */
for
(
;
;
)
...
...
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