org.gstreamer.interfaces
Class TunerChannel

java.lang.Object
  extended by org.gstreamer.lowlevel.NativeValue
      extended by org.gstreamer.lowlevel.Handle
          extended by org.gstreamer.lowlevel.NativeObject
              extended by org.gstreamer.lowlevel.RefCountedObject
                  extended by org.gstreamer.GObject
                      extended by org.gstreamer.interfaces.TunerChannel

public class TunerChannel
extends GObject


Nested Class Summary
static class TunerChannel.Flags
           
static interface TunerChannel.FREQUENCY_CHANGED
          Signal emitted when the frequency on a channel changes
static interface TunerChannel.SIGNAL_CHANGED
          Signal emitted when the signal strength on a channel changes
 
Nested classes/interfaces inherited from class org.gstreamer.GObject
GObject.GCallback
 
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject
NativeObject.Initializer
 
Field Summary
 
Fields inherited from class org.gstreamer.lowlevel.NativeObject
defaultInit, ownsHandle
 
Constructor Summary
TunerChannel(NativeObject.Initializer init)
          For internal gstreamer-java use only
 
Method Summary
 void connect(TunerChannel.FREQUENCY_CHANGED listener)
          Add a listener for frequency-changed messages.
 void connect(TunerChannel.SIGNAL_CHANGED listener)
          Add a listener for signal-changed messages.
 void disconnect(TunerChannel.FREQUENCY_CHANGED listener)
          Disconnect the listener for frequency-changed messages.
 void disconnect(TunerChannel.SIGNAL_CHANGED listener)
          Disconnect the listener for signal-changed messages.
 long getFrequency()
          Retrieves the current frequency from the given channel
 java.lang.String getLabel()
          Retrieves the label from the given channel
 int getSignalStrength()
          Gets the strength of the signal on this channel.
 boolean hasFlag(int flag)
          Checks if a flag is set on this channel.
 boolean isTuningChannel()
          Checks if the frequency of this channel can be changed
 void setFrequency(long frequency)
          Sets a tuning frequency on the given tuner/channel.
 
Methods inherited from class org.gstreamer.GObject
addCallback, connect, connect, connect, disconnect, disconnect, disposeNativeHandle, emit, emit, g_signal_connect, get, getPointer, getPropertyDefaultValue, getPropertyMaximumValue, getPropertyMinimumValue, getType, invalidate, objectFor, ref, removeCallback, set, unref
 
Methods inherited from class org.gstreamer.lowlevel.NativeObject
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, isDisposed, nativeValue, objectFor, objectFor, objectFor, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TunerChannel

public TunerChannel(NativeObject.Initializer init)
For internal gstreamer-java use only

Parameters:
init - initialization data
Method Detail

hasFlag

public final boolean hasFlag(int flag)
Checks if a flag is set on this channel.

Returns:
true if the flag is set

getFrequency

public long getFrequency()
Retrieves the current frequency from the given channel

Returns:
the current frequency

getLabel

public java.lang.String getLabel()
Retrieves the label from the given channel

Returns:
the label

setFrequency

public void setFrequency(long frequency)
Sets a tuning frequency on the given tuner/channel.

Note: this requires the given channel to be a "tuning" channel, which can be checked with isTuningChannel()


isTuningChannel

public boolean isTuningChannel()
Checks if the frequency of this channel can be changed

Returns:
true if this channel is a tuning channel

getSignalStrength

public int getSignalStrength()
Gets the strength of the signal on this channel.

Note: this requires the current channel to be a "tuning" channel, i.e. a channel on which frequency can be set. This can be checked using isTuningChannel()

Returns:
the current signal strength

connect

public void connect(TunerChannel.FREQUENCY_CHANGED listener)
Add a listener for frequency-changed messages.

Parameters:
listener - The listener to be called when the frequency changes

disconnect

public void disconnect(TunerChannel.FREQUENCY_CHANGED listener)
Disconnect the listener for frequency-changed messages.

Parameters:
listener - The listener that was registered to receive the message.

connect

public void connect(TunerChannel.SIGNAL_CHANGED listener)
Add a listener for signal-changed messages.

Parameters:
listener - The listener to be called when the signal strength changes

disconnect

public void disconnect(TunerChannel.SIGNAL_CHANGED listener)
Disconnect the listener for signal-changed messages.

Parameters:
listener - The listener that was registered to receive the message.