Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Sep 1999 14:49:36 -0400
From:      Randall Hopper <aa8vb@ipass.net>
To:        Wilko Bulte <wilko@yedi.iaf.nl>
Cc:        FreeBSD multi media list <freebsd-multimedia@FreeBSD.ORG>
Subject:   Re: Can you set fxtv to a default *frequency* iso channel?
Message-ID:  <19990926144935.A14779@ipass.net>
In-Reply-To: <199909261253.OAA16936@yedi.iaf.nl>; from Wilko Bulte on Sun, Sep 26, 1999 at 02:53:55PM %2B0200
References:  <199909261253.OAA16936@yedi.iaf.nl>

next in thread | previous in thread | raw e-mail | index | archive | help

--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii

Wilko Bulte:
 |Is it possible to do something like:
 |
 |Fxtv.defaultChannel:    NL1
 |
 |Where NL1 is:
 |
 |Fxtv.cableStationList: NL1(f216) NL2(f184) NL3(f192) RTL4(f720)
 |
 |etc?
 |
 |Reason for asking: our local cable droids have offset all(!) channels
 |from their nominal frequency. 

Wow.  That's ugly!

 |So, I have to set the StationList using frequency and not channel
 |number. Channel# simply don't work anymore (great isn't it?

Yeah.

As is, there isn't a way.  But here's a quick hack that lets you use
channel numbers, station names, or frequencies for defaultChannel.

(BTW, I think you might find it easier to hack the channel table for your
frequency set in the driver.  See

static int weurope[] = {
...

in /usr/src/sys/pci/brooktree848.c.  Should be a snap.)

Randall


--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="fxtv-1.00-defchan_station_name.patch"

--- t2/fxtv-1.00/tv.c	Sat Sep  4 15:55:15 1999
+++ tv.c	Sun Sep 26 14:44:55 1999
@@ -447,11 +447,6 @@
             App_res.display_fps = c->fps_max;
         App_res.display_fps = MAX( 1, MIN( c->fps_max, App_res.display_fps ) );
 
-        /*  Channel  */
-        if (( App_res.def_chan >= TV_CHAN_MIN ) &&
-            ( App_res.def_chan <= TV_CHAN_MAX ))
-            TVCAPTURESetTunerChannel( c, App_res.def_chan );
-
         /*  Cable/antenna tuner frequency modes  */
         p->ant_freq_set   = 1;
         p->cable_freq_set = 1;
@@ -556,8 +551,24 @@
     }
 
     /*  Last minute tweaks  */
+
     if (( s.tuner_chan < TV_CHAN_MIN ) || ( s.tuner_chan > TV_CHAN_MAX ))
        TVCAPTURESetTunerChannel( c, 3 );
+
+    /*  Default channel  */
+    if ( App_res.def_chan[0] && !STREQ( App_res.def_chan, "0" ) ) {
+      XEvent       xev;
+
+      /*  Set up a dummy xevent  */
+      memset( &xev, '\0', sizeof(xev) );
+      xev.xany.type       = ClientMessage;
+      xev.xclient.display = TVDISPLAY;
+      xev.xclient.window  = XtWindow( G_glob.display.video_wgt );
+
+      /*  Count args  */
+      XtCallActionProc( G_glob.display.video_wgt, "TVSetStation", 
+                        &xev, &App_res.def_chan, 1 );
+    }
 
     /*  Update menu/toolbar with currently selected options  */
     TVMENUSetSelectedInputDevice( s.input_dev );
--- t2/fxtv-1.00/app_rsrc.h	Sun Sep  5 21:16:12 1999
+++ app_rsrc.h	Sun Sep 26 14:39:37 1999
@@ -48,7 +48,8 @@
     int      device_number;
     String   input_format;
     String   tuner_mode;
-    int      def_chan;
+
+    String   def_chan;
     String   def_input;
     String   def_audio_input;
     int      display_fps;
@@ -354,8 +355,8 @@
     { RNtunerMode, RCtunerMode, XtRString, sizeof(String),
         XtOffsetOf(AppResources, tuner_mode      ), XtRImmediate,
         "antenna" },
-    { RNdefaultChannel, RCdefaultChannel, XtRInt, sizeof(int),
-        XtOffsetOf(AppResources, def_chan), XtRString,
+    { RNdefaultChannel, RCdefaultChannel, XtRString, sizeof(String),
+        XtOffsetOf(AppResources, def_chan), XtRImmediate,
         "0" /*  0 = Don't change channel */ },   
     { RNdefaultInput, RCdefaultInput, XtRString, sizeof(String),
         XtOffsetOf(AppResources, def_input), XtRImmediate,

--qMm9M+Fa2AknHoGS--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990926144935.A14779>