To test DVBCore we have provided a number of tests which should be run.
DVBCore with the App can be run standalone without plugging in a test to be run.
Preconditions:
Get the source of the DVBCore and App from our GIT Repository. To do this go to: https://github.com/DTVKit/DVBCore and select “Clone”. Copy the URL provided to you. This should look something like this: https://github.com/DTVKit/DVBCore.git
Then in the terminal type:
git clone https://github.com/DTVKit/DVBCore.git
Do the same for the App repository https://github.com/DTVKit/App, select “Clone”, then copy the URL: https://github.com/DTVKit/App.git
git clone https://github.com/DTVKit/App.git
This tutorial assumes they are contained in directories with the same names as the repositories, but you can have them in differently named directories if you wish.
To enable you to run DVBCore on Linux you must compile DVBCore and the App Linux build. Please follow the instructions on how to do this below:-
1) There are a number of libraries that are required for the build. Make sure that you have the following installed on your linux:
Install through the terminal using 'sudo apt-get install
library name'
2) Go to your DVBCore directory
cd DVBCore
and set-up any particular platform specific environment variables that you need. You can do this in linux by checking and running a script that is in the root of DVBCore:
source ./example_setenv.sh
The default values should work in this script.
Note: for 64-bit builds you will need to ensure these environment variables are changed:
export DTVKIT_USE_STDINT=1
export DTVKIT_ADDITIONAL_COMPILER_OPTIONS=-Wall
3) You can then run
make
DVBCore should compile successfully.
If you need to, you can also clean the build by running:
make clean
Once compiled the library should be built here:- DVBCore/build/bin/libdvb.a
1) There are a number of libs that are required for the build. Make sure that you have the following installed on your linux:-
2) Go to your App directory and set-up the particular platforms environment variables for the App. Check and modify the example_setenv.sh that is here. In particular, make sure that DTVKIT_DVBCORE_LIB and DTVKIT_DVBCORE_ROOT are correct. You can create your own script if needed and once done use:
source ./example_setenv.sh
Note:
For 64-bit builds you will need to edit the setenv script to include these variables:
export DTVKIT_USE_STDINT=1
export DTVKIT_ADDITIONAL_COMPILER_OPTIONS=“-Wall”
3) You can then run
make
and on successful compilation you should find the binary in:
build/bin/dtvkit
4) Once you have done this you should copy the dtvkit into the App directory so that it has test as a subdirectory:
cp build/bin/dtvkit .
5) You should then be able to run dtvkit
./dtvkit
If running the simulator standalone the dvbcore will look in a folder named “ts” which you need to create in the App directory.
cd App
mkdir ts
In this folder you can put in streams which you would like to run.
If you are a DTVKit member, you can access the DTVKit test stream through Github: https://github.com/DTVKit/TestStreams
The naming of these streams in this folder should be the frequency which they will be tuneable to. For example 722000000.ts when the tuner tunes to 722 MHz it will try to tun to this stream. 754000000.ts when the tuner tunes to 754 MHz it will tune to this stream.
In addition, you can add a second file - named with the same frequency, but having '.br' extension (e.g. 754000000.br). The content of this file should be a textual representation of decimal number that sets the bit rate for the stream. For most streams, this feature is not necessary, but for a few it is - like one of the DTG MHEG test suite streams.
For Satellite streams, the streams are labelled slightly differently. To work out the name of the stream, you need to minus the LNB from the frequency.
In most cases the LNB is 9750
Example: 10847 (frequency) - 9750 = 1097
Then, you need to multiply this number by 1000
Example: 1097 * 1000 = 1097000
This is then the name of the transport stream - 1097000.ts
The DTVKit App currently only supports Manual tuning for satellite.
The parameters for the frequency to enter use this equation:
Frequency (e.g. 964) + LNB (9750) = 10714
It is possible to tune to multiple transport streams on different transmissions. Follow the below process to do this. This example presumes one satellite stream and one terrestrial stream are located in the /ts directly:
The following key presses can be used to control the UI:-
Keypress | UI Button/Function |
---|---|
RETURN | OK Button |
PAGE DOWN | Channel Down Button |
UP ARROW | Up Button |
DOWN ARROW | Down Button |
LEFT ARROW | Left Button |
RIGHT ARROW | Right Button |
ESCAPE | Exit Button |
0 / Keypad 0 | 0 Button |
1 / Keypad 1 | 1 Button |
2 / Keypad 2 | 2 Button |
3 / Keypad 3 | 3 Button |
4 / Keypad 4 | 4 Button |
5 / Keypad 5 | 5 Button |
6 / Keypad 6 | 6 Button |
7 / Keypad 7 | 7 Button |
8 / Keypad 8 | 8 Button |
9 / Keypad 9 | 9 Button |
a | Check AV pids function |
b | Blue button |
c | Take Screenshot function |
e | EPG Button |
f | Favourites Button |
g | Green Button |
i | Information Button |
l | Language Button |
m | Menu Button |
Shift + m | Mute Button |
p | Pause Button |
q | Standby Button |
r | Red Button |
s | Subtitles Button |
Ctrl + s | Take Screenshot Function |
t | Text Button |
x | Quit Function |
y | Yellow Button |
=/+ | Volume Up Button |
- | Volume Down Button |
F1 | Services Button |
F4 | Record Button |
F5 | Play Button |
F6 | Pause Button |
F7 | Stop Button |
F8 | Fast Forward Button |
Ctrl + F8 | Rewind Button |
F9 | CAM Toggle Function |
F12 | Scale Function |
The simulator allows you to playback pre-recorded tests and also create your own tests.
There are a number of pre-recorded tests in the test/DVBCore/DTG_SI/ directory and these are tests which should pass before any new code can be committed to the DVBCore repository. To run each test the DVBCore takes a number of arguments as follows:
-m <mode> Select mode: “record” or “playback”. If no mode is specified, it will run the simulator without scripts. For Playback you will need to specify: “-m playback”
-s <stream_config> Select stream configuration file. Configs for running pre-recorded tests can be found under test/DVBCore/lua/stream_configs. The default stream config can be found here:
cd test/DVBCore/lua/stream_configs/default.lua
.
An example of this is “-s test/DVBCore/lua/stream_configs/SI_UK_DTT_7.50/ukdtt_si01_7.50.lua” If you want to run a test on si01 of the DTG SI Test streams. The DVBCore application looks for streams which are stored in the root of the App folder under /streams/. Make sure all streams are kept here (this can be done with a symbolic link if needed.
-t <test> (record and playback only). Specify test recording directory. In here specify the directory of the test which you would like to playback. The pre-recorded tests for DVBCore are here: test/DVBCore/DTG_SI/SI_UK_DTT_7.50/. An example of running SI01 002 would be:- “-t test/DVBCore/DTG_SI/SI_UK_DTT_7.50/SI01/SI01_002”
-p <directory for tap file>
Create a directory for your tap files:
mkdir test_results
An example of running dtg-580:SI01_002::Local Time Offset (single) test would be the following:-
./dtvkit -m playback -t test/DVBCore/DTG_SI/SI_UK_DTT_7.50/SI01/SI01_002 -s test/DVBCore/lua/stream_configs/SI_UK_DTT_7.50/ukdtt_si01_7.50.lua - p test_results/
Results of the tests which have been run are reported using “.tap” files. When a test has finished it creates a .tap file which uses standard TAP protocol to report if a test has passed or failed. You can find out about TAP protocol here.
To create your own recordings use the same arguments as playback, but you need to change the mode to “record”. Specifying your test -t will create a new directory of what name you choose to give your test. You will also need to add the following parameters:-
-n <title> - The title of the test, for example “-n “SI01_002::Local Time Offset (single)””
-c <short_name> - The name of the tap file which will be created for creating test results, for example “-c SI01_002” will then create a “SI01_002.tap” file.
-sync - true of false for stream sync to be enabled. The is used for when running multiple streams at the same time. When you switch stream the stream time will be remembered and will attempt to enter the newly tuned stream in at the same time.