<?xml version="1.0"?>
<!DOCTYPE tvtime PUBLIC "-//tvtime//DTD tvtime 1.0//EN"
  "http://tvtime.sourceforge.net/DTD/tvtime1.dtd">
<tvtime xmlns="http://tvtime.sourceforge.net/DTD/">

  <!--
    Default $HOME/.tvtime/tvtime.xml configuration file.
    Do not edit this config file while tvtime is running, it
    will be overwritten during runtime to update program settings.
  -->


  <!--
    The verbose setting indicates that we should print full
    informational and warning messages to stderr while running tvtime.
    Otherwise, only fatal errors will be printed to the output.
  -->
  <option name="Verbose" value="0"/>


  <!-- This sets the default capture device to use. -->
  <option name="V4LDevice" value="/dev/video0"/>

  <!--
    This sets the default capture card input to be opened by tvtime.
    For example, for my WinTV card has the tuner as source 0, and
    its composite input as source 1.  Sources can be changed at runtime
    using the "toggle_input" command, which is key command "i" by
    default.
  -->
  <option name="V4LInput" value="0"/>

  <!--
    This sets the default TV norm.  Valid options are:
       NTSC
       NTSC-JP
       SECAM
       PAL
       PAL-Nc
       PAL-M
       PAL-N
       PAL-60
  -->
  <option name="Norm" value="NTSC"/>

  <!--
    This sets the default frequency table to use for any tuners found.
    Possibilities are:
       us-cable
       us-broadcast
       japan-cable
       japan-broadcast
       europe
       australia
       australia-optus
       newzealand
       france
       russia
  -->
  <option name="Frequencies" value="US-Cable"/>

  <!--
    There are two special NTSC cable standards in the US: IRC and HRC.
    In IRC, channels 5 and 6 are on different frequencies, and HRC mode
    shifts all frequencies up by 1.25MHz (and is also weird on channels
    5 and 6).  Use this option to set the cable mode to "Standard",
    "IRC", or "HRC".  It is very rare that you will see cable systems
    that use IRC or HRC cable.
  -->
  <option name="NTSCCableMode" value="Standard"/>

  <!--
    Toggle whether tvtime should check if there is a signal present
    when changing channels etc.  If your card doesn't suck, you
    shouldn't need to shut this off.  Disabling this feature will also
    disable the channel scanner.
  -->
  <option name="CheckForSignal" value="1"/>

  <!--
    This sets how many pixels per scanline to request from the capture
    card.  A higher setting gives better quality, while a lower setting
    means we do less work, and so tvtime will run faster.  If you have
    a slower CPU (like, less than 500Mhz or so), maybe values of 480
    or 400 might suit you best.  For best quality, choose a high value
    like 720 or 768.  Most capture cards cannot sample higher than 768
    pixels per scanline.
  -->
  <option name="InputWidth" value="720"/>

  <!--
    Set this to a filename to get show listings from an xmltv file.
    Set to "none" if you do not wish to use xmltv.
  -->
  <option name="XMLTVFile" value="none"/>

  <!--
    Set this to 1 to enable XDS channel information decoding.  This
    option is specific to NTSC regions.  XDS is used to send information
    about the channel including the network name and call letters, and
    sometimes information about the current show.  This information is
    then shown on the OSD and saved to the stationlist.xml file.
  -->
  <option name="UseXDS" value="0"/>

  <!--
    This sets which device to use for VBI decoding.
  -->
  <option name="VBIDevice" value="/dev/vbi0"/>

  <!--
    This sets the mixer device and channel to use.  The format is device
    name:channel name.  Valid channels are:
      vol, bass, treble, synth, pcm, speaker, line, mic, cd, mix, pcm2,
      rec, igain, ogain, line1, line2, line3, dig1, dig2, dig3, phin,
      phout, video, radio, monitor
   -->
  <option name="MixerDevice" value="/dev/mixer:line"/>

  <!--
    This option enables 16:9 aspect ratio mode by default on startup.
  -->
  <option name="Widescreen" value="0"/>

  <!--
    Default to a 768x576 window.
  -->
  <option name="OutputHeight" value="576"/>

  <!--
    tvtime can be told to position its window on startup.  Setting
    UseWindowPosition to 1 instructs tvtime that it should read its
    position from the WindowX and WindowY config file parameters.
  -->
  <option name="UseWindowPosition" value="0"/>
  <option name="WindowX" value="320"/>
  <option name="WindowY" value="240"/>

  <!--
    This sets the percent of the sides to leave to the overscan, that
    is, don't show them at all.  Safe action area on a television is 10%
    in the overscan, but that's a bit restrictive.  If you want tvtime
    to look like a TV, a good value would be about 6-8%.  The value is
    in percent, so for 8%, use 8.0.
  -->
  <option name="Overscan" value="3.5"/>

  <!--
    Set this to 1 to have tvtime start in fullscreen mode.  This setting is
    set at runtime so that when you quit tvtime in fullscreen, starting it
    again will start back in fullscreen mode.
  -->
  <option name="Fullscreen" value="0"/>

  <!--
    Sets the position of the output when in fullscreen mode: top, bottom
    or centre.  When set to top, tvtime in fullscreen will place its output
    at the top of the screen.  Use this if you have a projector to help
    tvtime fit properly onto your screen.
  -->
  <option name="FullscreenPosition" value="Centre"/>

  <!--
    This sets the framerate of the output from tvtime.

    0 = Full framerate mode, every field is deinterlaced.
        59.94fps for NTSC, 50fps for PAL.
    1 = Half framerate mode, deinterlace every top field to a frame (TFF).
        29.97fps for NTSC, 25fps for PAL.
    2 = Half framerate mode, deinterlace every bottom field to a frame (BFF).
        29.97fps for NTSC, 25fps for PAL.

    The two half framerate modes are useful for progressive content from
    video game consoles.  Use weave and select either TFF or BFF, whichever
    does not exhibit interlace effects.
  -->
  <option name="FramerateMode" value="0"/>

  <!--
    This option indicates whether tvtime should enable its own saving and
    restoring of picture settings, both on startup and per channel change.
  -->
  <option name="SaveAndRestorePictureSettings" value="1"/>

  <!--
    If Save/Restore is turned on, this is where we store the global
    default settings.  Each value is from 0-100.  If the value is -1, then
    we don't set that setting on startup.
  -->
  <option name="DefaultBrightness" value="-1"/>
  <option name="DefaultContrast" value="-1"/>
  <option name="DefaultColour" value="-1"/>
  <option name="DefaultHue" value="-1"/>

  <!--
    This option saves the last used audio mode.  This will be used to
    remember which audio mode to select when the application is next
    started.  Valid options here are "mono", "stereo", "lang1", "lang2"
    or "sap".
  -->
  <option name="AudioMode" value="stereo"/>

  <!--
    This option saves the state of closed caption decoding.  Closed
    captions are an NTSC-specific text version of the audio for the
    hearing impaired.
  -->
  <option name="ShowCC" value="0"/>

  <!--
    This value saves the on-off state of the colour invert filter across
    sessions.
  -->
  <option name="ColourInvert" value="0"/>

  <!--
    This value saves the on-off state of the mirror filter across sessions.
  -->
  <option name="MirrorInput" value="0"/>

  <!--
    This indicates whether the luma correction option should be enabled by
    default when starting the application.  Luma correction can be turned
    on or off within the application using the "c" key.
  -->
  <option name="ApplyLumaCorrection" value="0"/>

  <!--
    This indicates the power for correction.  A value of 1.0 does
    nothing except apply Bt8x8 correction, if you have a Bt8x8-based
    capture card.  Values less than one make the output darker, and
    values greater than one make the output brighter.  The valid range
    is 0.1 to 10.0 in increments of 0.1.
  -->
  <option name="LumaCorrection" value="1.0"/>


  <!--
    Sets the default process priority.  By default, tvtime tries to be
    a real hog and get -19 priority, which is insane, but hey, if a
    frame comes in we need to process it right away or it gets dropped,
    right? :)    Acceptable values are from -20 to 20, with lower values
    meaning higher priority (blame UNIX for that).
  -->
  <option name="ProcessPriority" value="-19"/>

  <!--
    Sets the time format to be used in the tvtime on-screen display.
    The format is a string in the same format as strftime(3).  The
    default is to use the time format of your locale.
  -->
  <option name="TimeFormat" value="%X"/>

  <!--
    This is the default directory in which screenshots are placed.
    The default is to save them into the user's home directory.
  -->
  <option name="ScreenShotDir" value="~"/>

  <!--
    These options set the ARGB colours used for the text in the
    on-screen display.  The default for the channel name is "yellow"
    (0xffffff00), and the default for the surrounding text is "wheat"
    (0xfff5deb3).  The colour format can be hexadecimal or decimal.
    If the alpha channel is not specified the default is "opaque" (255).

    Examples: 0xffaadd, 0xff0000ff, 0xff, 0xffff, 255 255 0, 0, 
              16777215.
  -->
  <option name="ChannelTextFG" value="0xFFFFFF00"/>
  <option name="OtherTextFG" value="0xFFF5DEB3"/>

  <!--
    This setting is saved at runtime to remember the current channel.
  -->
  <option name="PrevChannel" value="2"/>

  <!--
    This setting is saved at runtime to remember the previous channel.
  -->
  <option name="Channel" value="2"/>

  <!--
    This setting is saved at runtime the deinterlacer used.

    Supported deinterlacers are:

    TelevisionFull    Television: Full Resolution
    TelevisionHalf    Television: Half Resolution
    BlurVertical      Blur: Vertical
    BlurTemporal      Blur: Temporal
    AdaptiveSearch    Motion Adaptive: Motion Search
    AdaptiveAdvanced  Motion Adaptive: Advanced Detection
    AdaptiveSimple    Motion Adaptive: Simple Detection
    ProgressiveTFF    Progressive: Top Field First
    ProgressiveBFF    Progressive: Bottom Field First
  -->
  <option name="DeinterlaceMethod" value="AdaptiveAdvanced"/>

  <!--
    This option selects which output driver will be used.  tvtime
    currently supports five output drivers: the standard XVIDEO
    output, a DirectFB output layer, an experimental DirectFB output
    driver specific to the Matrox G400/G450/G550 TV output on the
    second head, the mga and xmga options interface with mplayer's
    mga_vid driver for the G400/G200-series cards, and finally the
    SDL output driver is included to help with porting to other
    driver layers.  Valid options here are:

      Xv
      DirectFB
      matroxtv
      mga
      xmga
      SDL
  -->
  <option name="OutputDriver" value="Xv"/>


  <!--
    Preset "modes" may be defined for convenience.  By default, tvtime 
    ships with three useful modes: LargeWindow, SmallWindow and
    FullscreenWindow.
  -->

  <mode name="LargeWindow">
    <option name="DeinterlaceMethod" value="AdaptiveAdvanced"/>
    <option name="FramerateMode" value="0"/>
    <option name="OutputHeight" value="576"/>
    <option name="UseWindowPosition" value="1"/>
    <option name="WindowX" value="320"/>
    <option name="WindowY" value="240"/>
  </mode>

  <mode name="SmallWindow">
    <option name="DeinterlaceMethod" value="TelevisionHalf"/>
    <option name="FramerateMode" value="1"/>
    <option name="OutputHeight" value="288"/>
    <option name="UseWindowPosition" value="1"/>
    <option name="WindowX" value="320"/>
    <option name="WindowY" value="240"/>
  </mode>

  <mode name="FullscreenWindow">
    <option name="DeinterlaceMethod" value="AdaptiveAdvanced"/>
    <option name="FramerateMode" value="0"/>
    <option name="OutputHeight" value="Full"/>
  </mode>


  <!--
    The rest of the configuration file defines how the input to
    tvtime is mapped to tvtime commands.  Each command can be bound
    to multiple keys and mouse buttons.  Up to nine mouse buttons
    are supported.


    Commands known to tvtime:

      AUTO_ADJUST_PICT           MIXER_TOGGLE_MUTE        
      AUTO_ADJUST_WINDOW         MIXER_UP                 
      BRIGHTNESS_DOWN            OVERSCAN_DOWN            
      BRIGHTNESS_UP              OVERSCAN_UP              
      CHANNEL_1                  PICTURE                  
      CHANNEL_2                  PICTURE_UP               
      CHANNEL_3                  PICTURE_DOWN             
      CHANNEL_4                  RESTART                  
      CHANNEL_5                  RUN_COMMAND              
      CHANNEL_6                  SAVE_PICTURE_GLOBAL      
      CHANNEL_7                  SAVE_PICTURE_CHANNEL     
      CHANNEL_8                  SCREENSHOT               
      CHANNEL_9                  SCROLL_CONSOLE_DOWN      
      CHANNEL_0                  SCROLL_CONSOLE_UP        
      CHANNEL_ACTIVATE_ALL       SET_AUDIO_MODE           
      CHANNEL_DEC                SET_DEINTERLACER         
      CHANNEL_DOWN               SET_FRAMERATE            
      CHANNEL_INC                SET_FREQUENCY_TABLE      
      CHANNEL_PREV               SET_NORM                 
      CHANNEL_RENUMBER           SET_SHARPNESS            
      CHANNEL_SAVE_TUNING        SHOW_DEINTERLACER_INFO   
      CHANNEL_SCAN               SHOW_MENU                
      CHANNEL_SKIP               SHOW_STATS               
      CHANNEL_UP                 TOGGLE_ALWAYSONTOP       
      COLOR_DOWN                 TOGGLE_ASPECT            
      COLOR_UP                   TOGGLE_AUDIO_MODE        
      COLOUR_DOWN                TOGGLE_BARS              
      COLOUR_UP                  TOGGLE_CC                
      CONTRAST_DOWN              TOGGLE_CHROMA_KILL       
      CONTRAST_UP                TOGGLE_COLOR_INVERT      
      DISPLAY_INFO               TOGGLE_COLOUR_INVERT     
      DISPLAY_MESSAGE            TOGGLE_CONSOLE           
      ENTER                      TOGGLE_DEINTERLACER      
      FINETUNE_DOWN              TOGGLE_FULLSCREEN        
      FINETUNE_UP                TOGGLE_FRAMERATE         
      HUE_DOWN                   TOGGLE_INPUT             
      HUE_UP                     TOGGLE_LUMA_CORRECTION   
      KEY_EVENT                  TOGGLE_MATTE             
      LUMA_DOWN                  TOGGLE_MIRROR            
      LUMA_UP                    TOGGLE_MODE              
      MENU_DOWN                  TOGGLE_MUTE              
      MENU_ENTER                 TOGGLE_NTSC_CABLE_MODE   
      MENU_EXIT                  TOGGLE_PAL_SECAM         
      MENU_LEFT                  TOGGLE_PAUSE             
      MENU_RIGHT                 TOGGLE_PULLDOWN_DETECTION
      MENU_UP                    TOGGLE_SIGNAL_DETECTION  
      MIXER_DOWN                 QUIT                     

    Special keys known by tvtime:

      Up, Down, Left, Right, Insert, Home, End, PgUp, Page_Up, PageUp,
      PgDn, Page_Down, PageDown, F1, F2, F3, F4, F5, F6, F7, F8, F9,
      F10, F11, F12, F13, F14, F15 Backspace, BS, Delete, Del, Esc,
      Escape, Enter, Print, Menu
  -->

  <bind command="quit">
    <keyboard key="escape"/>
    <keyboard key="q"/>
  </bind>

  <bind command="show_menu">
    <keyboard key="F1"/>
    <keyboard key="	"/>
    <mouse button="3"/>
  </bind>

  <bind command="channel_inc">
    <keyboard key="up"/>
    <mouse button="4"/>
  </bind>

  <bind command="channel_dec">
    <keyboard key="down"/>
    <mouse button="5"/>
  </bind>

  <bind command="channel_prev">
    <keyboard key="backspace"/>
  </bind>

  <bind command="finetune_up">
    <keyboard key="right"/>
  </bind>

  <bind command="finetune_down">
    <keyboard key="left"/>
  </bind>

  <bind command="toggle_mute">
    <keyboard key="m"/>
    <mouse button="2"/>
  </bind>

  <bind command="mixer_up">
    <keyboard key="+"/>
  </bind>

  <bind command="mixer_down">
    <keyboard key="-"/>
  </bind>

  <bind command="enter">
    <keyboard key="enter"/>
  </bind>

  <bind command="picture">
    <keyboard key="F5"/>
  </bind>

  <bind command="picture_down">
    <keyboard key="F6"/>
  </bind>

  <bind command="picture_up">
    <keyboard key="F7"/>
  </bind>

  <bind command="channel_renumber">
    <keyboard key="r"/>
  </bind>

  <bind command="show_stats">
    <keyboard key="d"/>
  </bind>

  <bind command="toggle_fullscreen">
    <keyboard key="f"/>
  </bind>

  <bind command="toggle_input">
    <keyboard key="i"/>
  </bind>

  <bind command="toggle_aspect">
    <keyboard key="a"/>
  </bind>

  <bind command="screenshot">
    <keyboard key="s"/>
  </bind>

  <bind command="toggle_deinterlacer">
    <keyboard key="t"/>
  </bind>

  <bind command="toggle_pulldown_detection">
    <keyboard key="p"/>
  </bind>

  <bind command="toggle_cc">
    <keyboard key="c"/>
  </bind>

  <bind command="toggle_framerate">
    <keyboard key="="/>
  </bind>

  <bind command="toggle_audio_mode">
    <keyboard key="e"/>
  </bind>

  <bind command="overscan_up">
    <keyboard key="&gt;"/>
  </bind>

  <bind command="overscan_down">
    <keyboard key="&lt;"/>
  </bind>

  <bind command="display_info">
    <mouse button="1"/>
  </bind>

  <bind command="toggle_matte">
    <keyboard key="insert"/>
  </bind>

  <bind command="toggle_alwaysontop">
    <keyboard key="v"/>
  </bind>


  <!--
    The following keys are active when tvtime is displaying the menu.
   -->
  <bind command="menu_exit">
    <keyboard key="esc"/>
    <keyboard key="q"/>
    <keyboard key="F1"/>
    <keyboard key="	"/>
    <mouse button="3"/>
  </bind>

  <bind command="menu_enter">
    <keyboard key="enter"/>
    <mouse button="1"/>
  </bind>

  <bind command="menu_down">
    <keyboard key="down"/>
    <mouse button="5"/>
  </bind>

  <bind command="menu_up">
    <keyboard key="up"/>
    <mouse button="4"/>
  </bind>

  <bind command="menu_left">
    <keyboard key="left"/>
  </bind>

  <bind command="menu_right">
    <keyboard key="right"/>
  </bind>

  <!--
    The following keys are not part of the core tvtime functionality,
    that is, they are mostly for debugging, but are bound to keys by
    default in tvtime.
   -->

  <bind command="auto_adjust_window">  <keyboard key="/"/>    </bind>
  <bind command="toggle_bars">         <keyboard key="b"/>    </bind>
  <bind command="toggle_mode">         <keyboard key="*"/>    </bind>
  <bind command="toggle_pause">        <keyboard key="end"/>  </bind>
  <bind command="toggle_console">      <keyboard key="`"/>    </bind>
  <bind command="scroll_console_up">   <keyboard key="pgup"/> </bind>
  <bind command="scroll_console_down"> <keyboard key="pgdn"/> </bind>
  <bind command="mixer_toggle_mute">   <keyboard key=","/>    </bind>
  <bind command="auto_adjust_pict">    <keyboard key=" "/>    </bind>
  <bind command="toggle_colour_invert"><keyboard key="o"/>    </bind>

</tvtime>
