net.luniks.linux.jv4linfo
Class V4LCtrl

java.lang.Object
  extended bynet.luniks.linux.jv4linfo.V4LCtrl

public class V4LCtrl
extends java.lang.Object

Class to query and control a v4l device such as getting or setting the currently selected video norm

Author:
Torsten Römer, www.luniks.net

Field Summary
private  java.lang.String device
           
private  V4LInfo info
           
 
Constructor Summary
V4LCtrl(java.lang.String device)
           
 
Method Summary
 V4LInfo getInfo()
           
 long getSelectedFrequency()
          Returns the currently selected frequency
 int getSelectedNorm(int channel)
          Returns the currently selected video norm of the channel given as argument
 void setMuted(boolean mute)
          Mutes or unmutes the audio channels
 void setSelectedAudiomode(int mode)
          Sets the selected audiomode by setting the audiomode of all audio inputs to the value given as argument
 void setSelectedChannel(int channel)
          Sets the selected channel by the index given as argument
 void setSelectedFrequency(long units)
          Sets the frequency in units of 62.5 Hz if VideoTuner.isLow() returns true, in units of 62.5 kHz otherwise.
 void setSelectedNorm(int channel, int norm)
          Sets the selected norm of the channel specified as first argument by the value given as argument
 java.lang.String toString()
          String representation of the current selection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

device

private java.lang.String device

info

private V4LInfo info
Constructor Detail

V4LCtrl

public V4LCtrl(java.lang.String device)
        throws JV4LInfoException
Method Detail

getInfo

public V4LInfo getInfo()

getSelectedNorm

public int getSelectedNorm(int channel)
                    throws JV4LInfoException
Returns the currently selected video norm of the channel given as argument

Returns:
the currently selected norm
Throws:
JV4LInfoException

getSelectedFrequency

public long getSelectedFrequency()
                          throws JV4LInfoException
Returns the currently selected frequency

Returns:
the currently selected frequency
Throws:
JV4LInfoException

setSelectedChannel

public void setSelectedChannel(int channel)
                        throws JV4LInfoException
Sets the selected channel by the index given as argument

Parameters:
channel - the index to set the channel to
Throws:
JV4LInfoException

setSelectedNorm

public void setSelectedNorm(int channel,
                            int norm)
                     throws JV4LInfoException
Sets the selected norm of the channel specified as first argument by the value given as argument

Parameters:
channel - the channel of that the norm should be set
norm - the norm to set
Throws:
JV4LInfoException

setSelectedFrequency

public void setSelectedFrequency(long units)
                          throws JV4LInfoException
Sets the frequency in units of 62.5 Hz if VideoTuner.isLow() returns true, in units of 62.5 kHz otherwise.

Parameters:
units - the units to set the frequency to
Throws:
JV4LInfoException

setSelectedAudiomode

public void setSelectedAudiomode(int mode)
                          throws JV4LInfoException
Sets the selected audiomode by setting the audiomode of all audio inputs to the value given as argument

Parameters:
mode - the audio mode to be set
Throws:
JV4LInfoException

setMuted

public void setMuted(boolean mute)
              throws JV4LInfoException
Mutes or unmutes the audio channels

Parameters:
mute - true to mute, false to unmute
Throws:
JV4LInfoException

toString

public java.lang.String toString()
String representation of the current selection



Copyright © 2004 Torsten Römer, dode@luniks.net