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
1bafa041
Commit
1bafa041
authored
Mar 20, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DTV: backward compatible --dvb-fec option
parent
44fdf553
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
modules/access/dtv/access.c
modules/access/dtv/access.c
+20
-2
No files found.
modules/access/dtv/access.c
View file @
1bafa041
...
...
@@ -207,7 +207,6 @@ vlc_module_begin ()
add_string
(
"dvb-code-rate"
,
""
,
CODE_RATE_TEXT
,
CODE_RATE_LONGTEXT
,
true
)
change_string_list
(
code_rate_vlc
,
code_rate_user
,
NULL
)
change_safe
()
/* Legacy FEC option for backward compatibility: TODO */
add_integer
(
"dvb-fec"
,
9
,
" "
,
" "
,
true
)
change_integer_range
(
0
,
9
)
change_private
()
...
...
@@ -458,6 +457,25 @@ static int Tune (vlc_object_t *obj, dvb_device_t *dev, const delsys_t *delsys,
return
VLC_SUCCESS
;
}
static
char
*
var_InheritCodeRate
(
vlc_object_t
*
obj
)
{
char
*
code_rate
=
var_InheritString
(
obj
,
"dvb-code-rate"
);
if
(
code_rate
!=
NULL
)
return
code_rate
;
/* Backward compatibility with VLC < 1.2 (= Linux DVBv3 enum) */
unsigned
fec
=
var_InheritInteger
(
obj
,
"dvb-fec"
);
if
(
fec
<
9
)
{
static
const
char
linux_dvb
[
9
][
5
]
=
{
"none"
,
"1/2"
,
"2/3"
,
"3/4"
,
"4/5"
,
"5/6"
,
"6/7"
,
"7/8"
};
msg_Warn
(
obj
,
"
\"
fec=%u
\"
option is obsolete. "
"Use
\"
code-rate=%s
\"
instead."
,
fec
,
linux_dvb
[
fec
]);
return
strdup
(
linux_dvb
[
fec
]);
}
return
NULL
;
}
/*** ATSC ***/
static
int
atsc_setup
(
vlc_object_t
*
obj
,
dvb_device_t
*
dev
,
uint64_t
freq
)
...
...
@@ -476,7 +494,7 @@ const delsys_t atsc = { .setup = atsc_setup };
static
int
dvbc_setup
(
vlc_object_t
*
obj
,
dvb_device_t
*
dev
,
uint64_t
freq
)
{
char
*
mod
=
var_InheritString
(
obj
,
"dvb-modulation"
);
char
*
fec
=
var_Inherit
String
(
obj
,
"dvb-code-rate"
);
char
*
fec
=
var_Inherit
CodeRate
(
obj
);
unsigned
srate
=
var_InheritInteger
(
obj
,
"dvb-srate"
);
int
ret
=
dvb_set_dvbc
(
dev
,
freq
,
mod
,
srate
,
fec
);
...
...
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