Commit 16ac05ef authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

zvbi: Added a table with language -> zvbi default_region mappings. Far from...

zvbi: Added a table with language -> zvbi default_region mappings. Far from perfect, but will solve some cases.
(cherry picked from commit 718739e9)
parent 6de5681d
...@@ -102,6 +102,27 @@ vlc_module_end(); ...@@ -102,6 +102,27 @@ vlc_module_end();
// #define ZVBI_DEBUG // #define ZVBI_DEBUG
//Guessing table for missing "default region triplet"
static const int pi_default_triplet[] = {
0, 0, // slo cze
8, // pol
24,24,24,24, //ssc scr slv rum
32,32,32,32,32, //est lit rus bul ukr
48,48, //gre ell
64, //ara
88, //heb
16 }; //default
static const char *const ppsz_default_triplet[] = {
"slo", "cze",
"pol",
"ssc", "scr", "slv", "rum",
"est", "lit", "rus", "bul", "ukr",
"gre", "ell",
"ara",
"heb",
NULL
};
typedef enum { typedef enum {
DATA_UNIT_EBU_TELETEXT_NON_SUBTITLE = 0x02, DATA_UNIT_EBU_TELETEXT_NON_SUBTITLE = 0x02,
DATA_UNIT_EBU_TELETEXT_SUBTITLE = 0x03, DATA_UNIT_EBU_TELETEXT_SUBTITLE = 0x03,
...@@ -187,6 +208,19 @@ static int Open( vlc_object_t *p_this ) ...@@ -187,6 +208,19 @@ static int Open( vlc_object_t *p_this )
return VLC_ENOMEM; return VLC_ENOMEM;
} }
/* Some broadcasters in countries with level 1 and level 1.5 still not send a G0 to do
* matches against table 32 of ETSI 300 706. We try to do some best effort guessing
* This is not perfect, but might handle some cases where we know the vbi language
* is known. It would be better if people started sending G0 */
for( int i = 0; ppsz_default_triplet[i] != NULL; i++ )
{
if( p_dec->fmt_in.psz_language && !strcmp( p_dec->fmt_in.psz_language, ppsz_default_triplet[i] ) )
{
vbi_teletext_set_default_region( p_sys->p_vbi_dec, pi_default_triplet[i]);
msg_Dbg( p_dec, "overwriting default zvbi region: %d", pi_default_triplet[i] );
}
}
vbi_event_handler_register( p_sys->p_vbi_dec, VBI_EVENT_TTX_PAGE | vbi_event_handler_register( p_sys->p_vbi_dec, VBI_EVENT_TTX_PAGE |
VBI_EVENT_CAPTION | VBI_EVENT_NETWORK | VBI_EVENT_CAPTION | VBI_EVENT_NETWORK |
VBI_EVENT_ASPECT | VBI_EVENT_PROG_INFO, VBI_EVENT_ASPECT | VBI_EVENT_PROG_INFO,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment