tvsim - TV application interaction simulator
tvsim [ options ]
tvsim is a demo application that shows in which ways nxtvepg can cooperate with TV applications. It's also a reference implementation of the communication protocols and offers most of the source code (under the GPL license) that would be required to add EPG support to a TV application. If you want to add nxtvepg to a TV application, it's recommended to start with the code of tvsim's source modules, remove everthing you don't need (esp. the Tcl/Tk GUI and support for all but one protocols), put it in a library and link it to your TV app.
In the current version two protocols are supported: On UNIX an X11 atoms based protocol which allows interaction with xawtv and xawdecode. On Windows a shared memory based protocol which allows interaction with K!TV.
Summary of command line options (it's a sub-set of the options supported by nxtvepg):
tvsim uses the nxtvepg INI file, i.e. by default it searches for a file named nxtvepg.ini in the current working directory. If this file is located elsewhere, you need to specify the -rcfile option. Please refer to GETTING STARTED below for configuration information.
tvsim can demonstrate all TV application interaction features which currently are supported by nxtvepg:
Note this feature is not required on UNIX since concurrent access to video and VBI devices by independent processes is supported by the drivers.
The TV application has the possibility to grant the tuner to EPG, e.g. when capturing is stopped of the TV window is minimized. nxtvepg will then ask the TV app to tune it's provider's channel and forward it's teletext data. However the driver still remains in control of the TV app and can revoke the ``grant'' at any time without having to wait for nxtvepg.
Some third-party TV viewing and scheduling applications use XMLTV instead of this feature, but it's less efficient because the application has to read the entire database which is not only time consuming but also consumes a significant amount of RAM, and long-running apps will also not benefit from constant updates provided by Nextview acquisition.
There's also a small context menu behind the Tune-TV button which can be
opened by clicking on it with the right mouse button. There's commands to
start/stop capturing, muting audio and toggle channels. Additionally the
user can send arbitrary commands to the connected TV app via user-defined
entries in nxtvepg's programme schedule context menu and reminder scripts
(by using prefix !xawtv!
or !winshm!
, see nxtvepg manual chapter
Context menu extensions.) These entries may include parameters of the
currently selected programme, e.g. start time and network.
Note this feature is not required on UNIX for the same reasons already mentioned above for the first item.
The software is called a ``simulator'' because it doesn't display a TV image. But still it does read in a channel table and tune in the respective TV channels when they are selected in the channel table; this is required to demonstrate forwarding of VPS/PDC and EPG packets.
tvsim does not have its own rc/INI file, instead it uses the nxtvepg configuration file. Hence you should configure nxtvepg first before using tvsim. Please refer to the nxtvepg manual, section GETTING STARTED for detailed documentation of the initial configuration process. tvsim only uses the configuration settings of the TV card input and TV app. interaction dialogs, with the exception of the TV card index.
If your TV application's channel table format is not supported by nxtvepg and you don't have any of the supported freeware TV applications, you can set up a minimal channel table manually. The simplest format is that of the DScaler channel table; so create a file named program.txt somewhere with the following format:
Name: First Channel Freq2: 2020 Name: Second Channel Freq2: 2132
where you replace ``First Channel'' etc. with the actual channel names and the numbers with the respective TV tuner frequencies in MHz times 16 (i.e. 2020 means tuner frequency 126.25 MHz). Then open the TV app. interaction dialog in nxtvepg, choose TV app. name DScaler and specify the path to the channel table you've just creatd. Then quit the dialog with Ok and start tvsim (you don't need to quit nxtvepg). Your channels should appear in the tvsim channel table.
Please refer to the manual of nxtvepg for information on TV card and TV application interaction configuration. See also the manuals for vbirec and vbiplay for further debugging possibilities.
Please refer to the homepage of nxtvepg on the Internet for up-to-date information which protocols and TV applications are currently supported. You'll also find links to the respective applications homepages. See About in the Help menu for a link to the nxtvepg homepage.
Under Windows there's a risk of system crash (``blue screen'') when the application is terminated by force, e.g. via the task manager. This is unavoidable because in this case there's no chance to stop the driver and hence the TV card continues to capure data into RAM. In normal operation this should be very unlikely because all software exceptions (e.g. page faults) and shutdown messages are caught and the driver then stopped before the exit.
Th. ``Tom'' Zoerner, Nuremberg, Germany.
Email: tomzo (at) users (dot) sourceforge (dot) net
Thanks to e-nek for reviewing the design of the Windows communication protocol, alpha testing and most importantly for being the first one to implement support specifically for interaction between nxtvepg and a TV application (the Xawtv solution predates K!TV, however it was based on already existing remote control mechanisms, i.e. no changes were made to Xawtv.)
Copyright (C) 2002,2004 by Th. Zoerner. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation, e.g. at http://www.fsf.org/
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of merchantability or fitness for a particular purpose. See the file COPYRIGHT for more details.