net.luniks.jtvd
Class GrabPanel

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bynet.luniks.jtvd.GrabPanel
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class GrabPanel
extends javax.swing.JPanel

JPanel containing all the components and methods that make up the user interface for grabbing from the TV Card.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JComboBox aspectComboBox
           
private  javax.swing.JLabel aspectLabel
           
private  javax.swing.JComboBox audioBitrateComboBox
           
private  javax.swing.JRadioButton audioCBRRadioButton
           
private  javax.swing.JComboBox audioComboBox
           
private  javax.swing.JLabel audioLabel
           
private  javax.swing.JPanel audioPanel
           
private  javax.swing.JComboBox audioQualityComboBox
           
private  javax.swing.JRadioButton audioVBRRadioButton
           
private  javax.swing.JLabel brightnessLabel
           
private  javax.swing.JSpinner brightnessSpinner
           
private  javax.swing.JPanel buttonPanel
           
private  boolean capLow
           
private  javax.swing.JComboBox channelComboBox
           
private  javax.swing.JLabel channelLabel
           
private  javax.swing.JLabel contrastLabel
           
private  javax.swing.JSpinner contrastSpinner
           
private  int duration
           
private  javax.swing.JLabel fineLabel
           
private  javax.swing.JSpinner fineSpinner
           
private  float freq
           
private  javax.swing.JTextField freqField
           
private  java.text.DecimalFormat freqFormat
           
private  javax.swing.JLabel freqLabel
           
private  FreqTables.FreqTable freqTable
           
private  javax.swing.JTextField freqTableField
           
private  javax.swing.JLabel freqTableLabel
           
private  Grabber grabber
           
static java.lang.String GRABBER
           
private  javax.swing.JComboBox grabberComboBox
           
private  javax.swing.JLabel grabberLabel
           
private  javax.swing.JButton grabButton
           
private  javax.swing.ImageIcon grabIcon
           
private  javax.swing.JLabel hueLabel
           
private  javax.swing.JSpinner hueSpinner
           
private  javax.swing.ImageIcon infoIcon
           
private  boolean initCompleted
           
private  javax.swing.JComboBox inputComboBox
           
private  javax.swing.JLabel inputLabel
           
private  java.awt.Insets insets
           
private  javax.swing.JTextArea jmfErrorText
           
private  JTVDFrame mainFrame
           
private  javax.swing.JCheckBox noiseFilterCheckBox
           
static java.lang.String NONAME_NAME
           
private  javax.swing.JComboBox normComboBox
           
private  javax.swing.JLabel normLabel
           
private  javax.swing.ImageIcon pauseIcon
           
private  javax.swing.JPanel picturePanel
           
private  javax.swing.JPanel playerPanel
           
private  javax.swing.ImageIcon recordIcon
           
private  javax.swing.JComboBox resolutionComboBox
           
private  javax.swing.JLabel resolutionLabel
           
private  javax.swing.JLabel saturationLabel
           
private  javax.swing.JSpinner saturationSpinner
           
private  javax.swing.JButton scheduleButton
           
private  javax.swing.ImageIcon scheduleIcon
           
private  boolean schedulerActive
           
private  Task[] schedulerTasks
           
private  boolean selectFrequency
           
private  javax.swing.JPanel sourcePanel
           
private  javax.swing.JComboBox stationComboBox
           
private  javax.swing.JLabel stationLabel
           
private  javax.swing.JPanel stationPanel
           
private  javax.swing.JButton stopButton
           
private  javax.swing.ImageIcon stopIcon
           
private  java.lang.Object taskSynch
           
private  java.util.Timer timer
           
private  javax.swing.JTextField titleField
           
private  javax.swing.JLabel titleLabel
           
private  javax.swing.JPanel titlePanel
           
private  javax.swing.JLabel tvScreenLabel
           
private  javax.swing.JToggleButton tvScreenToggleButton
           
static java.lang.String UNKNOWN_CHANNEL
           
private  javax.swing.JCheckBox useAspectCheckBox
           
private  javax.swing.JCheckBox useFMP4CheckBox
           
private  javax.swing.JCheckBox useODMLCheckBox
           
private  boolean v4l2Available
           
private  V4L2Ctrl v4l2Ctrl
           
private  V4L2Info v4l2Info
           
private  V4LCtrl v4lCtrl
           
private  V4LInfo v4lInfo
           
private  javax.swing.JTextField videoBitrateField
           
private  javax.swing.JRadioButton videoCBRRadioButton
           
private  javax.swing.JComboBox videoCodecComboBox
           
private  javax.swing.JLabel videoCodecLabel
           
private  javax.swing.JCheckBox videoMaxBitrateCheckBox
           
private  javax.swing.JTextField videoMaxBitrateField
           
private  javax.swing.JCheckBox videoMinBitrateCheckBox
           
private  javax.swing.JTextField videoMinBitrateField
           
private  javax.swing.JPanel videoPanel
           
private  javax.swing.JComboBox videoQualityComboBox
           
private  javax.swing.JRadioButton videoVBRRadioButton
           
private  javax.swing.JButton viewButton
           
private  javax.swing.ImageIcon viewIcon
           
 
Fields inherited from class javax.swing.JPanel
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GrabPanel(JTVDFrame frame)
          Constructs the panel and calls some methods to set up the interface.
 
Method Summary
(package private)  void cancelTimer()
           
(package private)  void closeJMFPlayer()
          Turns off the TV screen.
private  void cycleStations(int i)
          Cycles through the stations in the direction specified by the argument
(package private)  Station getStation()
          Returns the currently selected station
(package private)  java.util.List getStations()
          Returns the stations (in the combobox)
private  void grab()
          Method to start the grabbing process.
private  void grabAction()
          Called, when the user presses "Grab".
(package private)  java.io.File grabbingFile()
          Returns the file that is just being grabbed to, null if no grabbing is done.
private  void initJMFPlayer()
          Sets up a PlayerPanel as the TV screen.
(package private)  void initJV4LInfo()
          Gets information about the video device and populates the relevant components like the combobox listing the available inputs
(package private)  boolean isGrabbing()
          Returns true, if a grabbing process is running, false otherwise
(package private)  boolean isSchedulerActive()
           
(package private)  void muteAudio(boolean mute)
          Mutes/unmutes the audio depending on the argument
private  void populate()
          Instanciates the Grabber and populates some components using values from it, for example the comboboxes.
private  void scheduleAction()
           
private  void selectAudio()
          Selects the audiomode of the video device according to the selected value of the "Audio" combobox
private  void selectChannel()
          Resets the "Fine" spinner to 0 and calls selectFrequency() to select the frequency of the selected channel
private  void selectFine()
          Selects the frequency of the selected channel shifted by the current fine value
(package private)  void selectFrequency()
          Selects the frequency of the currently selected station.
(package private)  void selectFrequency(FreqTables.FreqTable freqTable, java.lang.String channel, int fine)
          Selects the frequency.
private  void selectInput()
          Selects the input of the video device according to the selected value of the "Input" combobox
private  void selectNorm()
          Selects the standard of the video device according to the selected value of the "Norm" combobox
private  void selectStation()
          Sets the "Channel" combobox and the "Fine" spinner to the values of the selected station
private  void selectV4L()
          This is run once after startup to set the settings of the video device accordingly to the selection of the components
private  void setAudios()
          Populates the "Audio" combobox with the audiomodes supported by the tuner at the currently selected input
 void setComponents()
          Sets all components in this tab to values taken from the global properties
private  void setComponentsEnabled(boolean enabled)
          Disables or enables all components that do things that should not be done during grabbing, like selecting another input or station.
(package private)  void setFreqTable(FreqTables.FreqTable freqTable)
          Sets the freqTable instance variable and the textfield accordingly, and populates the channels combobox with the channels of the frequency table given as argument
private  void setGrabber(Grabber grabber)
          Sets the type of grabber to be used, the "Backend" the user has chosen
private  void setInputs()
          Populates the "Input" combobox with the available inputs of the video device
private  void setNorms()
          Populates the "Norm" combobox with the standards supported by the currently selected input
 void setProperties()
          Puts the current settings of all components in this tab in the global properties
(package private)  void setStation(Station station)
          Sets the currently selected station to the one given as argument
(package private)  void setStations()
          Populates the stations combobox with the stations returned by Environment.getStations(), which are the stations read from the configfile and set/modified by the preferences dialog.
private  void setTimer()
           
private  void setup()
          Sets up the grabber using values from the components, meaning the values the user has chosen.
(package private)  void startJMFPlayer()
          Resumes the TV screen and sets the "TV Screen" button to selected.
private  void stop()
          Terminates the process
private  void stopAction()
          Called, when the user presses "Stop".
(package private)  void stopJMFPlayer()
          Pauses the TV screen and set the "TV Screen" button to deselected.
private  void tvScreenAction(boolean on)
          Resumes or pauses the TV screen
private  void viewAction()
          Called, when the user presses "View".
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mainFrame

private JTVDFrame mainFrame

GRABBER

public static final java.lang.String GRABBER
See Also:
Constant Field Values

NONAME_NAME

public static final java.lang.String NONAME_NAME
See Also:
Constant Field Values

UNKNOWN_CHANNEL

public static final java.lang.String UNKNOWN_CHANNEL
See Also:
Constant Field Values

initCompleted

private boolean initCompleted

selectFrequency

private boolean selectFrequency

freqTable

private FreqTables.FreqTable freqTable

freq

private float freq

v4lInfo

private V4LInfo v4lInfo

v4lCtrl

private V4LCtrl v4lCtrl

v4l2Info

private V4L2Info v4l2Info

v4l2Ctrl

private V4L2Ctrl v4l2Ctrl

capLow

private boolean capLow

v4l2Available

private boolean v4l2Available

grabber

private Grabber grabber

freqFormat

private java.text.DecimalFormat freqFormat

titlePanel

private javax.swing.JPanel titlePanel

sourcePanel

private javax.swing.JPanel sourcePanel

stationPanel

private javax.swing.JPanel stationPanel

playerPanel

private javax.swing.JPanel playerPanel

picturePanel

private javax.swing.JPanel picturePanel

videoPanel

private javax.swing.JPanel videoPanel

audioPanel

private javax.swing.JPanel audioPanel

buttonPanel

private javax.swing.JPanel buttonPanel

titleLabel

private javax.swing.JLabel titleLabel

titleField

private javax.swing.JTextField titleField

grabberLabel

private javax.swing.JLabel grabberLabel

grabberComboBox

private javax.swing.JComboBox grabberComboBox

inputLabel

private javax.swing.JLabel inputLabel

inputComboBox

private javax.swing.JComboBox inputComboBox

normLabel

private javax.swing.JLabel normLabel

normComboBox

private javax.swing.JComboBox normComboBox

resolutionLabel

private javax.swing.JLabel resolutionLabel

resolutionComboBox

private javax.swing.JComboBox resolutionComboBox

audioLabel

private javax.swing.JLabel audioLabel

audioComboBox

private javax.swing.JComboBox audioComboBox

stationLabel

private javax.swing.JLabel stationLabel

stationComboBox

private javax.swing.JComboBox stationComboBox

channelLabel

private javax.swing.JLabel channelLabel

channelComboBox

private javax.swing.JComboBox channelComboBox

freqLabel

private javax.swing.JLabel freqLabel

freqField

private javax.swing.JTextField freqField

fineLabel

private javax.swing.JLabel fineLabel

fineSpinner

private javax.swing.JSpinner fineSpinner

freqTableLabel

private javax.swing.JLabel freqTableLabel

freqTableField

private javax.swing.JTextField freqTableField

tvScreenLabel

private javax.swing.JLabel tvScreenLabel

tvScreenToggleButton

private javax.swing.JToggleButton tvScreenToggleButton

jmfErrorText

private javax.swing.JTextArea jmfErrorText

brightnessLabel

private javax.swing.JLabel brightnessLabel

contrastLabel

private javax.swing.JLabel contrastLabel

hueLabel

private javax.swing.JLabel hueLabel

saturationLabel

private javax.swing.JLabel saturationLabel

brightnessSpinner

private javax.swing.JSpinner brightnessSpinner

contrastSpinner

private javax.swing.JSpinner contrastSpinner

hueSpinner

private javax.swing.JSpinner hueSpinner

saturationSpinner

private javax.swing.JSpinner saturationSpinner

videoCodecLabel

private javax.swing.JLabel videoCodecLabel

videoCodecComboBox

private javax.swing.JComboBox videoCodecComboBox

aspectLabel

private javax.swing.JLabel aspectLabel

aspectComboBox

private javax.swing.JComboBox aspectComboBox

useAspectCheckBox

private javax.swing.JCheckBox useAspectCheckBox

noiseFilterCheckBox

private javax.swing.JCheckBox noiseFilterCheckBox

videoCBRRadioButton

private javax.swing.JRadioButton videoCBRRadioButton

videoBitrateField

private javax.swing.JTextField videoBitrateField

videoVBRRadioButton

private javax.swing.JRadioButton videoVBRRadioButton

videoQualityComboBox

private javax.swing.JComboBox videoQualityComboBox

useODMLCheckBox

private javax.swing.JCheckBox useODMLCheckBox

useFMP4CheckBox

private javax.swing.JCheckBox useFMP4CheckBox

videoMinBitrateCheckBox

private javax.swing.JCheckBox videoMinBitrateCheckBox

videoMinBitrateField

private javax.swing.JTextField videoMinBitrateField

videoMaxBitrateCheckBox

private javax.swing.JCheckBox videoMaxBitrateCheckBox

videoMaxBitrateField

private javax.swing.JTextField videoMaxBitrateField

audioCBRRadioButton

private javax.swing.JRadioButton audioCBRRadioButton

audioBitrateComboBox

private javax.swing.JComboBox audioBitrateComboBox

audioVBRRadioButton

private javax.swing.JRadioButton audioVBRRadioButton

audioQualityComboBox

private javax.swing.JComboBox audioQualityComboBox

scheduleButton

private javax.swing.JButton scheduleButton

grabButton

private javax.swing.JButton grabButton

stopButton

private javax.swing.JButton stopButton

viewButton

private javax.swing.JButton viewButton

grabIcon

private javax.swing.ImageIcon grabIcon

stopIcon

private javax.swing.ImageIcon stopIcon

viewIcon

private javax.swing.ImageIcon viewIcon

pauseIcon

private javax.swing.ImageIcon pauseIcon

infoIcon

private javax.swing.ImageIcon infoIcon

scheduleIcon

private javax.swing.ImageIcon scheduleIcon

recordIcon

private javax.swing.ImageIcon recordIcon

schedulerActive

private boolean schedulerActive

schedulerTasks

private Task[] schedulerTasks

timer

private java.util.Timer timer

taskSynch

private java.lang.Object taskSynch

duration

private int duration

insets

private java.awt.Insets insets
Constructor Detail

GrabPanel

public GrabPanel(JTVDFrame frame)
Constructs the panel and calls some methods to set up the interface.

Parameters:
frame - the JFrame of this application, used to be able to refer to the other panels in this application.
Method Detail

initJMFPlayer

private void initJMFPlayer()
Sets up a PlayerPanel as the TV screen. If that fails, a normal JPanel with a TextField showing an error message is set up instead.


startJMFPlayer

void startJMFPlayer()
Resumes the TV screen and sets the "TV Screen" button to selected. The method does nothing when isGrabbing() returns true.


stopJMFPlayer

void stopJMFPlayer()
Pauses the TV screen and set the "TV Screen" button to deselected.


closeJMFPlayer

void closeJMFPlayer()
Turns off the TV screen. After calling this method the TV screen cannot be turned on again or resumed.


tvScreenAction

private void tvScreenAction(boolean on)
Resumes or pauses the TV screen

Parameters:
on - true to resume, false to pause

muteAudio

void muteAudio(boolean mute)
Mutes/unmutes the audio depending on the argument

Parameters:
mute - true to mute, false to unmute

setComponentsEnabled

private void setComponentsEnabled(boolean enabled)
Disables or enables all components that do things that should not be done during grabbing, like selecting another input or station.

Parameters:
enabled - true to enable, false to disable

populate

private void populate()
Instanciates the Grabber and populates some components using values from it, for example the comboboxes.


setGrabber

private void setGrabber(Grabber grabber)
Sets the type of grabber to be used, the "Backend" the user has chosen

Parameters:
grabber - Grabber to be used

setComponents

public void setComponents()
Sets all components in this tab to values taken from the global properties


setProperties

public void setProperties()
Puts the current settings of all components in this tab in the global properties


initJV4LInfo

void initJV4LInfo()
Gets information about the video device and populates the relevant components like the combobox listing the available inputs


setInputs

private void setInputs()
Populates the "Input" combobox with the available inputs of the video device


setNorms

private void setNorms()
Populates the "Norm" combobox with the standards supported by the currently selected input


setAudios

private void setAudios()
Populates the "Audio" combobox with the audiomodes supported by the tuner at the currently selected input


setFreqTable

void setFreqTable(FreqTables.FreqTable freqTable)
Sets the freqTable instance variable and the textfield accordingly, and populates the channels combobox with the channels of the frequency table given as argument

Parameters:
freqTable - the new frequency table to be used

setStations

void setStations()
Populates the stations combobox with the stations returned by Environment.getStations(), which are the stations read from the configfile and set/modified by the preferences dialog.


selectV4L

private void selectV4L()
This is run once after startup to set the settings of the video device accordingly to the selection of the components


selectInput

private void selectInput()
Selects the input of the video device according to the selected value of the "Input" combobox


selectNorm

private void selectNorm()
Selects the standard of the video device according to the selected value of the "Norm" combobox


selectAudio

private void selectAudio()
Selects the audiomode of the video device according to the selected value of the "Audio" combobox


selectStation

private void selectStation()
Sets the "Channel" combobox and the "Fine" spinner to the values of the selected station


selectChannel

private void selectChannel()
Resets the "Fine" spinner to 0 and calls selectFrequency() to select the frequency of the selected channel


selectFine

private void selectFine()
Selects the frequency of the selected channel shifted by the current fine value


cycleStations

private void cycleStations(int i)
Cycles through the stations in the direction specified by the argument

Parameters:
i - 1 for the next, -1 for the previous station

getStation

Station getStation()
Returns the currently selected station

Returns:
the currently selected station

getStations

java.util.List getStations()
Returns the stations (in the combobox)

Returns:
the station

setStation

void setStation(Station station)
Sets the currently selected station to the one given as argument

Parameters:
station - the station to be set

selectFrequency

void selectFrequency()
Selects the frequency of the currently selected station. Does nothing if a grabbing process is running


selectFrequency

void selectFrequency(FreqTables.FreqTable freqTable,
                     java.lang.String channel,
                     int fine)
Selects the frequency. Does nothing if a grabbing process is running

Parameters:
freqTable - the frequency table to be used
channel - the channel whose frequency should be set
fine - the fine value in units of 62.5 (k)Hz

setup

private void setup()
Sets up the grabber using values from the components, meaning the values the user has chosen.


scheduleAction

private void scheduleAction()

setTimer

private void setTimer()

cancelTimer

void cancelTimer()

isSchedulerActive

boolean isSchedulerActive()

grabAction

private void grabAction()
Called, when the user presses "Grab". Performs some checks and starts grabbing.


stopAction

private void stopAction()
Called, when the user presses "Stop". Stops grabbing.


viewAction

private void viewAction()
Called, when the user presses "View". Plays the file that has been previously grabbed.


grab

private void grab()
Method to start the grabbing process. Sets up the global process handler for grabbing, updates the UI with status information as well as stdout and stderr obtained from the process handler and checks the exit code. Pauses the TV screen and disables relevant components during grabbing.


stop

private void stop()
Terminates the process


isGrabbing

boolean isGrabbing()
Returns true, if a grabbing process is running, false otherwise

Returns:
true if currently grabbing, false otherwise

grabbingFile

java.io.File grabbingFile()
Returns the file that is just being grabbed to, null if no grabbing is done.

Returns:
the file being grabbed to


Copyright (c) 2004, 2005 Torsten Römer, dode@luniks.net