From owner-freebsd-multimedia Sun Sep 26 11:48:26 1999 Delivered-To: freebsd-multimedia@freebsd.org Received: from pluto.ipass.net (pluto.ipass.net [198.79.53.5]) by hub.freebsd.org (Postfix) with ESMTP id 171D7153AF for ; Sun, 26 Sep 1999 11:48:19 -0700 (PDT) (envelope-from rhh@ipass.net) Received: from stealth.ipass.net. (ppp-1-227.dialup.rdu.ipass.net [209.170.132.227]) by pluto.ipass.net (8.9.3/8.9.3) with ESMTP id OAA13184; Sun, 26 Sep 1999 14:48:15 -0400 (EDT) Received: (from rhh@localhost) by stealth.ipass.net. (8.9.3/8.8.8) id OAA14848; Sun, 26 Sep 1999 14:49:36 -0400 (EDT) (envelope-from rhh) Date: Sun, 26 Sep 1999 14:49:36 -0400 From: Randall Hopper To: Wilko Bulte Cc: FreeBSD multi media list Subject: Re: Can you set fxtv to a default *frequency* iso channel? Message-ID: <19990926144935.A14779@ipass.net> References: <199909261253.OAA16936@yedi.iaf.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=qMm9M+Fa2AknHoGS X-Mailer: Mutt 0.95.1i In-Reply-To: <199909261253.OAA16936@yedi.iaf.nl>; from Wilko Bulte on Sun, Sep 26, 1999 at 02:53:55PM +0200 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --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