aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-23 04:39:23 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-04-23 05:30:44 (GMT)
commitf5e784320cd69db46f8549462ac7bec869018b06 (patch)
tree383811ce7a08e99c7bb8da4d69016ef121d24c67 /common
parentb9acc8d7f7a6b9d78da222432eb95c9823f80886 (diff)
Allow changing vbi region via an environment variable
Give the user possibility to change default zvbi region (16, West-Europe) via ALEVTD_REGION environment variable. Sometimes the region value just not reported in the stream etc... This patch were imported from Fedora 12 set of patches for xawtv. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'common')
-rw-r--r--common/vbi-data.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/vbi-data.c b/common/vbi-data.c
index 9b4a0a8..05f6d71 100644
--- a/common/vbi-data.c
+++ b/common/vbi-data.c
@@ -48,6 +48,18 @@ vbi_open(char *dev, int debug, int sim)
if (NULL == vbi->dec)
goto oops;
+ /*
+ * Give the user possibility to change default zvbi region (16, West-Europe)
+ * Sometimes the region value just not reported in the stream etc...
+ */
+ if (1) {
+ char *env = getenv("ALEVTD_REGION");
+ unsigned int region;
+
+ if (env && (region = strtoul(env,NULL,0)) != 0)
+ vbi_teletext_set_default_region(vbi->dec,region);
+ }
+
if (vbi->sim) {
vbi->par = init_sim(625,services);
/* simulation for select */

Privacy Policy