- Deprecated:
- Yes
- See:
Main object to manage DVB-C/T/T2 subsystem for MAG270/MAG275 boards only.
To start playback of DVB channel player should be started with the following URL: dvb://<channel_id>
where channel_id can be obtained from "id
" field in the result of calling dvbManager.GetChannelList
or dvbManager.GetChannelInfo
.
Current DVB type is set via dvb_type bootloader environment variable with the following values:
- DVB-C
- DVB-T
- DVB-T2
- DVB-S2
Status codes table:
Value | Description |
---|---|
0 | operation successful |
1 | error |
2 | unsupported |
3 | need reboot |
0x1c | bad handle |
Possible events:
event 40 (0x28) "DVB progress"
When scan starts to search new frequency, player will trigger event 40 (0x28)
with the following event data:
{
"state": "searching",
"channel": 23,
"frequency": 650000,
"progress": 33,
"inputIndex": 0,
"polarization": "H"
}
where
Name | Description |
---|---|
state | scan state: "searching " or "finished " |
channel | channel number in frequency grid |
frequency | channel frequency (in kHz) |
progress | scan progress in range [0..100] |
inputIndex | antenna (input connector) index [0..n] |
polarization | optional satellite signal polarization ("V " - vertical, "H " - horizontal, "CL " - circular left, "CR " - circular right ) to tune to |
event 41 (0x29) "DVB channel found"
When any new channels is found, player will trigger event 41 (0x29)
with the following event data:
{
"id": "C_4601_634000",
"name": "channel_name",
"frequency": 634000,
"inputIndex": 0,
"polarization": "H",
"symbolRate": 27500000
}
where
Name | Description |
---|---|
id | channel unique identifier |
type | DVB signal type (see dvbManager.signalType ) |
name | channel name |
frequency | channel frequency (in kHz) |
inputIndex | antenna (input connector) index [0..n] |
polarization | optional satellite signal polarization ("V " - vertical, "H " - horizontal, "CL " - circular left, "CR " - circular right ) to tune to |
symbolRate | optional satellite/cable signal symbol rate (symbols per second) |
event 43 (0x2B) "Power overload"
When antenna power is enabled but antenna is not active then antenna power will be disabled
and event 43 (0x2B)
will be triggered to notify JavaScript API user. Example:
{
"inputIndex": 0
}
where
Name | Description |
---|---|
inputIndex | antenna (input connector) index [0..n] |
Methods
(static) GetAntennaPower(inputIndex) → {boolean}
Get whether antenna power from STB is enabled.
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
possible values:
Value | Description |
---|---|
true | power is enabled |
false | power is disabled |
- Type
- boolean
(static) GetBitErrorRate(inputIndex) → {number}
Get Bit Error Rate.
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
(Bit Error Rate) * 10^7
- Type
- number
(static) GetChannelList(inputIndex) → {dvbManager.typeChannelInfoList}
- See:
Get full list of DVB channels in JSON format.
See dvbManager.typeChannelInfo
, dvbManager.typeChannelInfoList
.
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
list of channels descriptions in JSON format
(static) GetChannelInfo(id) → {dvbManager.typeChannelInfo}
- See:
Get information about specified channel in JSON format.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | channel unique identifier from |
Returns:
channel description in JSON format
(static) ClearChannelList(inputIndex) → {number}
- See:
Clear DVB channel list.
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
operation status
(see status codes table)
- Type
- number
(static) RemoveChannel(id) → {number}
- See:
Remove specified DVB channel.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | channel unique identifier from |
Returns:
operation status
(see status codes table)
- Type
- number
(static) StartChannelScan(type, inputIndex) → {number}
Parameters:
Name | Type | Description |
---|---|---|
type |
dvbManager.signalType | DVB signal type |
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
operation status
(see status codes table)
- Type
- number
(static) StartChannelScanManual(from, to, type, bandwidth, step, inputIndex) → {number}
Start manual channel scanning.
During scan player can trigger 2 events.
Parameters:
Name | Type | Description |
---|---|---|
from |
number | scan range start frequency (in kHz) |
to |
number | scan range end frequency (in kHz) |
type |
dvbManager.signalType | DVB signal type |
bandwidth |
number | channel bandwidth in MHz. e.i. 6, 7, 8 |
step |
number | frequency step (in kHz) |
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
operation status
(see status codes table)
- Type
- number
(static) StopChannelScan(inputIndex) → {number}
- See:
Stop channel scan.
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
operation status
(see status codes table)
- Type
- number
(static) GetSignalLevel(inputIndex) → {number}
Get signal level.
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
signal level [0..100]
- Type
- number
(static) GetSignalQuality(inputIndex) → {number}
Get signal quality.
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
signal quality [0..100]
- Type
- number
(static) TuneChannel(config) → {number}
- See:
Tune receiver to specified frequency.
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
string | configuration object in JSON format
|
Returns:
operation status
(see status codes table)
- Type
- number
(static) UnTuneChannel(inputIndex) → {number}
- See:
Untune receiver from frequency.
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
operation status
(see status codes table)
- Type
- number
(static) SetAntennaPower(on, inputIndex) → {number}
Enable or disable antenna power from STB.
Used to supply power to active antenna.
In case when connected antenna is not active an event 33 (0x2B)
will be triggered and antenna power will be disabled.
See dvbManager
.
Parameters:
Name | Type | Description |
---|---|---|
on |
boolean | power state |
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
operation status
(see status codes table)
- Type
- number
(static) SetScanParams(params) → {number}
Set params for DVB channel scan.
Modulation values list:
Value | Description |
---|---|
0 | AUTO |
1 | 16QAM |
2 | 32QAM |
3 | 64QAM |
4 | 128QAM |
5 | 256QAM |
Example
dvbManager.SetScanParams(JSON.stringify({
type: 1,
symRate: 6875,
modulation: 4,
scanMode: 1,
frequency: 506000,
inputIndex: 0,
networkId: 3333
}));
Parameters:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
string | configuration object in JSON format
|
Returns:
operation status
(see status codes table)
- Type
- number
(static) GetSupportedScanTypes(inputIndex) → {string}
Get supported scan types for this STB.
Example
// parsed JSON data
JSON.parse(dvbManager.GetSupportedScanTypes());
// execution result
[
{type: 1, name: "DVB-C"},
{type: 2, name: "DVB-T"},
{type: 3, name: "DVB-T2"}
]
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
scan types list in JSON format
- Type
- string
(static) SetPreferredLang(lang1, lang2, inputIndex) → {number}
Set preferred language for DVB subsystem (EPG etc.).
Example
dvbManager.SetPreferredLang('eng', 'en', 0);
Parameters:
Name | Type | Description |
---|---|---|
lang1 |
string | preferred language in ISO 639-2 format (Alpha-3 code) |
lang2 |
string | preferred language in ISO 639-1 format (Alpha-2 code) |
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
operation status
(see status codes table)
- Type
- number
(static) GetCurrentScanTypes(inputIndex) → {string}
Get currently supported scan types for this STB.
The difference with dvbManager.GetSupportedScanTypes
is:
result of dvbManager.GetCurrentScanTypes
depends on current DVB Type
e.i. for MAG275 it can be either DVB-C or DVB-T and DVB-T2, for MAG356 it can be DVB-S2.
Example
// parsed JSON data
JSON.parse(dvbManager.GetCurrentScanTypes());
// execution result
[
{type: 1, name: "DVB-C"},
{type: 2, name: "DVB-T"},
{type: 3, name: "DVB-T2"}
]
Parameters:
Name | Type | Description |
---|---|---|
inputIndex |
number | antenna (input connector) index [0..n] |
Returns:
scan types list in JSON format
- Type
- string
(static) EnableEPG(state)
Enable/disable EPG data collection (enabled by default).
Parameters:
Name | Type | Description |
---|---|---|
state |
number | activity state (0 - turn off, 1 - turn on) |
(static) GetEPGBrief(id) → {epgManager.typeInfoList}
Get brief EPG (present and following program) for specified channel.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | channel unique identifier from |
Returns:
EPG brief data in JSON format
(static) GetEPGSchedule(id, day) → {epgManager.typeInfoList}
Get schedule EPG (for long period) for specified channel of the selected day.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | channel unique identifier from |
day |
number | selected day number from current day |
Returns:
schedule EPG data in JSON format
(static) GetEPGScheduleByRange(id, start, end) → {epgManager.typeInfoList}
Get full EPG (program schedule) for specified channel within specified time range.
Example
var schedule = JSON.parse(epgManager.getScheduleByRange('C_4601_634000', 1428307972, 142832946));
Parameters:
Name | Type | Description |
---|---|---|
id |
string | channel unique identifier from |
start |
number | range start in seconds since epoch |
end |
number | range end in seconds since epoch |
Returns:
schedule EPG data in JSON format
Type Definitions
signalType
DVB signal type.
Value | Description |
---|---|
1 | DVB-C signal |
2 | DVB-T signal |
3 | DVB-T2 signal (not available for MAG270) |
4 | DVB-S2 signal |
Type:
- number
typeChannelInfoList
Properties:
Name | Type | Description |
---|---|---|
channels |
Array.<dvbManager.typeChannelInfo> | individual channels data |
List of DVB channels data in JSON format.
Type:
- string
Example
// parsed JSON data
{
channels: [{
frequency: 634000,
inputIndex: 0,
polarization: "H",
symbolRate: 27500000,
id: "C_4601_634000",
type: 2,
scrambled: "false",
name: "ServiceName",
provider: "testProvider",
isRadio: "false",
channel_number: "23"
}]
}
typeChannelInfo
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
frequency |
number | channel frequency (in kHz) |
|
inputIndex |
number | antenna (input connector) index [0..n] |
|
polarization |
string |
<optional> |
satellite signal polarization (" |
symbolRate |
number |
<optional> |
satellite/cable signal symbol rate (symbols per second) |
id |
string | unique channel identifier |
|
type |
number | DVB signal type (see |
|
scrambled |
boolean | scrambled channel indication |
|
name |
string | channel name |
|
provider |
string | service provider name |
|
isRadio |
boolean | radio channel indicator |
|
channel_number |
string | logical channel number in network (0 means that logical channel number is not found) |
Information about a channel in JSON format.
Type:
- string
Example
// parsed JSON data
{
frequency: 634000,
inputIndex: 0,
polarization: "H",
symbolRate: 27500000,
id: "C_4601_634000",
type: 2,
scrambled: "false",
name: "ServiceName",
provider: "testProvider",
isRadio: "false",
channel_number: "23"
}