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
cf2dd978
Commit
cf2dd978
authored
Mar 20, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DTV: backward compatibility with --dvb-modulation
parent
1bafa041
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
8 deletions
+34
-8
modules/access/dtv/access.c
modules/access/dtv/access.c
+34
-8
No files found.
modules/access/dtv/access.c
View file @
cf2dd978
...
...
@@ -168,11 +168,6 @@ vlc_module_begin ()
MODULATION_TEXT
,
MODULATION_LONGTEXT
,
false
)
change_string_list
(
modulation_vlc
,
modulation_user
,
NULL
)
change_safe
()
/* Legacy modulation option for backward compatibility: TODO */
/*add_integer ("dvb-modulation", 0, " ", " ", true)
change_integer_range (-1, 256)
change_private ()
change_safe ()*/
add_integer
(
"dvb-inversion"
,
-
1
,
INVERSION_TEXT
,
INVERSION_LONGTEXT
,
true
)
change_integer_list
(
inversion_vlc
,
auto_off_on
)
change_safe
()
...
...
@@ -476,11 +471,42 @@ static char *var_InheritCodeRate (vlc_object_t *obj)
return
NULL
;
}
static
char
*
var_InheritModulation
(
vlc_object_t
*
obj
)
{
char
*
mod
=
var_InheritString
(
obj
,
"dvb-modulation"
);
if
(
mod
==
NULL
)
return
mod
;
char
*
end
;
unsigned
long
l
=
strtol
(
mod
,
&
end
,
0
);
if
(
*
end
!=
'\0'
)
/* not a number = not from VLC < 1.2 */
return
mod
;
/* Backward compatibility with VLC < 1.2 */
const
char
*
str
;
switch
(
l
)
{
case
-
1
:
str
=
"QPSK"
;
break
;
case
0
:
str
=
"QAM"
;
break
;
case
8
:
str
=
"8VSB"
;
break
;
case
16
:
str
=
"16QAM"
;
break
;
case
32
:
str
=
"32QAM"
;
break
;
case
64
:
str
=
"64QAM"
;
break
;
case
128
:
str
=
"128QAM"
;
break
;
case
256
:
str
=
"256QAM"
;
break
;
default:
return
mod
;
}
msg_Warn
(
obj
,
"
\"
modulation=%ld
\"
option is obsolete. "
"Use
\"
modulation=%s
\"
instead."
,
l
,
str
);
return
strdup
(
str
);
}
/*** ATSC ***/
static
int
atsc_setup
(
vlc_object_t
*
obj
,
dvb_device_t
*
dev
,
uint64_t
freq
)
{
char
*
mod
=
var_Inherit
String
(
obj
,
"dvb-modulation"
);
char
*
mod
=
var_Inherit
Modulation
(
obj
);
int
ret
=
dvb_set_atsc
(
dev
,
freq
,
mod
);
free
(
mod
);
...
...
@@ -493,7 +519,7 @@ const delsys_t atsc = { .setup = atsc_setup };
/*** DVB-C ***/
static
int
dvbc_setup
(
vlc_object_t
*
obj
,
dvb_device_t
*
dev
,
uint64_t
freq
)
{
char
*
mod
=
var_Inherit
String
(
obj
,
"dvb-modulation"
);
char
*
mod
=
var_Inherit
Modulation
(
obj
);
char
*
fec
=
var_InheritCodeRate
(
obj
);
unsigned
srate
=
var_InheritInteger
(
obj
,
"dvb-srate"
);
...
...
@@ -528,7 +554,7 @@ const delsys_t dvbs2 = { .setup = dvbs2_setup };
/*** DVB-T ***/
static
int
dvbt_setup
(
vlc_object_t
*
obj
,
dvb_device_t
*
dev
,
uint64_t
freq
)
{
char
*
mod
=
var_Inherit
String
(
obj
,
"dvb-modulation"
);
char
*
mod
=
var_Inherit
Modulation
(
obj
);
char
*
fec_hp
=
var_InheritString
(
obj
,
"dvb-code-rate-hp"
);
char
*
fec_lp
=
var_InheritString
(
obj
,
"dvb-code-rate-lp"
);
char
*
guard
=
var_InheritString
(
obj
,
"dvb-guard"
);
...
...
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