Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
39cc0ea0
Commit
39cc0ea0
authored
Mar 20, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DTV: DVB-S and DVB-S2 tuning
This is untested. Frequency offsets and diseqc are not done yet.
parent
001cbdee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
10 deletions
+77
-10
modules/access/dtv/access.c
modules/access/dtv/access.c
+39
-9
modules/access/dtv/linux.c
modules/access/dtv/linux.c
+38
-1
No files found.
modules/access/dtv/access.c
View file @
39cc0ea0
...
...
@@ -81,8 +81,8 @@ static const char *const modulation_user[] = { N_("Undefined"),
#define INVERSION_LONGTEXT N_( \
"If the demodulator cannot detect spectral inversion correctly, " \
"it needs to be configured manually.")
const
int
inversi
on_vlc
[]
=
{
-
1
,
0
,
1
};
static
const
char
*
const
auto_off_on
[]
=
{
N_
(
"Automatic"
),
const
int
auto_off_
on_vlc
[]
=
{
-
1
,
0
,
1
};
static
const
char
*
const
auto_off_on
_user
[]
=
{
N_
(
"Automatic"
),
N_
(
"Off"
),
N_
(
"On"
)
};
#define CODE_RATE_TEXT N_("FEC code rate")
...
...
@@ -131,6 +131,15 @@ static const char *const hierarchy_user[] = { N_("Automatic"),
N_
(
"None"
),
"1"
,
"2"
,
"4"
,
};
#define PILOT_TEXT N_("Pilot")
#define ROLLOFF_TEXT N_("Roll-off factor")
const
int
rolloff_vlc
[]
=
{
-
1
,
35
,
20
,
25
,
};
static
const
char
*
const
rolloff_user
[]
=
{
N_
(
"Automatic"
),
N_
(
"0.35 (same as DVB-S)"
),
N_
(
"0.20"
),
N_
(
"0.25"
),
};
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
...
...
@@ -165,7 +174,7 @@ vlc_module_begin ()
change_integer_range
(
0
,
UINT64_C
(
0xffffffff
)
*
1000
)
change_safe
()
add_integer
(
"dvb-inversion"
,
-
1
,
INVERSION_TEXT
,
INVERSION_LONGTEXT
,
true
)
change_integer_list
(
inversion_vlc
,
auto_off_on
)
change_integer_list
(
auto_off_on_vlc
,
auto_off_on_user
)
change_safe
()
set_section
(
N_
(
"Terrestrial reception parameters"
),
NULL
)
...
...
@@ -229,6 +238,13 @@ vlc_module_begin ()
change_integer_range
(
0
,
0x7fffffff
)
change_safe
()
#endif
set_section
(
N_
(
"DVB-S2 parameters"
),
NULL
)
add_integer
(
"dvb-pilot"
,
-
1
,
PILOT_TEXT
,
PILOT_TEXT
,
true
)
change_integer_list
(
auto_off_on_vlc
,
auto_off_on_user
)
change_safe
()
add_integer
(
"dvb-rolloff"
,
-
1
,
ROLLOFF_TEXT
,
ROLLOFF_TEXT
,
true
)
change_integer_list
(
rolloff_vlc
,
rolloff_user
)
change_safe
()
vlc_module_end
()
struct
access_sys_t
...
...
@@ -535,16 +551,30 @@ const delsys_t dvbc = { .setup = dvbc_setup };
/*** DVB-S ***/
static
int
dvbs_setup
(
vlc_object_t
*
obj
,
dvb_device_t
*
dev
,
uint64_t
freq
)
{
(
void
)
dev
;
(
void
)
freq
;
msg_Err
(
obj
,
"DVB-S not implemented"
);
return
-
1
;
char
*
fec
=
var_InheritCodeRate
(
obj
);
uint32_t
srate
=
var_InheritInteger
(
obj
,
"dvb-srate"
);
/* FIXME: adjust frequency (offset) */
int
ret
=
dvb_set_dvbs
(
dev
,
freq
,
srate
,
fec
);
free
(
fec
);
/* TODO: setup SEC */
return
ret
;
}
static
int
dvbs2_setup
(
vlc_object_t
*
obj
,
dvb_device_t
*
dev
,
uint64_t
freq
)
{
(
void
)
dev
;
(
void
)
freq
;
msg_Err
(
obj
,
"DVB-S2 not implemented"
);
return
-
1
;
char
*
mod
=
var_InheritModulation
(
obj
);
char
*
fec
=
var_InheritCodeRate
(
obj
);
uint32_t
srate
=
var_InheritInteger
(
obj
,
"dvb-srate"
);
int
pilot
=
var_InheritInteger
(
obj
,
"dvb-pilot"
);
int
rolloff
=
var_InheritInteger
(
obj
,
"dvb-rolloff"
);
/* FIXME: adjust frequency (offset)? SEC? */
int
ret
=
dvb_set_dvbs2
(
dev
,
freq
,
mod
,
srate
,
fec
,
pilot
,
rolloff
);
free
(
fec
);
free
(
mod
);
return
ret
;
}
const
delsys_t
dvbs
=
{
.
setup
=
dvbs_setup
};
...
...
modules/access/dtv/linux.c
View file @
39cc0ea0
...
...
@@ -536,7 +536,44 @@ int dvb_set_dvbc (dvb_device_t *d, uint32_t freq, const char *modstr,
/*** DVB-S ***/
/* TODO */
int
dvb_set_dvbs
(
dvb_device_t
*
d
,
uint64_t
freq
,
uint32_t
srate
,
const
char
*
fecstr
)
{
unsigned
f
=
freq
/
1000
;
unsigned
fec
=
dvb_parse_fec
(
fecstr
);
return
dvb_set_props
(
d
,
5
,
DTV_CLEAR
,
0
,
DTV_DELIVERY_SYSTEM
,
SYS_DVBS
,
DTV_FREQUENCY
,
f
,
DTV_SYMBOL_RATE
,
srate
,
DTV_INNER_FEC
,
fec
);
}
int
dvb_set_dvbs2
(
dvb_device_t
*
d
,
uint64_t
freq
,
const
char
*
modstr
,
uint32_t
srate
,
const
char
*
fecstr
,
int
pilot
,
int
rolloff
)
{
unsigned
f
=
freq
/
1000
;
unsigned
mod
=
dvb_parse_modulation
(
modstr
,
QPSK
);
unsigned
fec
=
dvb_parse_fec
(
fecstr
);
switch
(
pilot
)
{
case
0
:
pilot
=
PILOT_OFF
;
break
;
case
1
:
pilot
=
PILOT_ON
;
break
;
default:
pilot
=
PILOT_AUTO
;
break
;
}
switch
(
rolloff
)
{
case
20
:
rolloff
=
ROLLOFF_20
;
break
;
case
25
:
rolloff
=
ROLLOFF_25
;
break
;
case
35
:
rolloff
=
ROLLOFF_35
;
break
;
default:
rolloff
=
PILOT_AUTO
;
break
;
}
return
dvb_set_props
(
d
,
8
,
DTV_CLEAR
,
0
,
DTV_DELIVERY_SYSTEM
,
SYS_DVBS2
,
DTV_FREQUENCY
,
f
,
DTV_MODULATION
,
mod
,
DTV_SYMBOL_RATE
,
srate
,
DTV_INNER_FEC
,
fec
,
DTV_PILOT
,
pilot
,
DTV_ROLLOFF
,
rolloff
);
}
/*** DVB-T ***/
...
...
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