SageTV Platform
V9.0

sage.api
Class CaptureDeviceInputAPI

java.lang.Object
  extended by sage.api.CaptureDeviceInputAPI

public class CaptureDeviceInputAPI
extends java.lang.Object

Represents an specific input on a CaptureDevice such as the TV Tuner, Composite or S-Video inputs


Constructor Summary
CaptureDeviceInputAPI()
           
 
Method Summary
 java.lang.String AutoScanChannelInfo(java.lang.String CaptureDeviceInput, java.lang.String ChannelNumber)
          Tunes the CaptureDeviceInput to the specified physical channel and returns a list of the available channels.
 boolean AutoTuneChannelTest(java.lang.String CaptureDeviceInput, java.lang.String ChannelNumber)
          Tunes the CaptureDeviceInput to the specified physical channel and indicates whether or not a signal is present.
 boolean ConfigureInputForEPGDataLineup(java.lang.String CaptureDeviceInput, java.lang.String Lineup)
          Configures this CaptureDeviceInput to use the specified EPG Lineup.
 boolean ConfigureInputWithoutEPGData(java.lang.String CaptureDeviceInput)
          Configures this CaptureDeviceInput to not use an EPG data source.
 int GetCaptureBrightness(java.lang.String CaptureDeviceInput)
          Gets the brightness level for this CaptureDeviceInput.
 int GetCaptureContrast(java.lang.String CaptureDeviceInput)
          Gets the contrast level for this CaptureDeviceInput.
 java.lang.String GetCaptureDeviceForInput(java.lang.String CaptureDeviceInput)
          Returns the CaptureDevice for this CaptureDeviceInput
 java.lang.String GetCaptureDeviceInputBeingViewed()
          Returns the CaptureDeviceInput that is recording the MediaFile that is currently loaded by the MediaPlayer
 java.lang.String GetCaptureDeviceInputBroadcastStandard(java.lang.String CaptureDeviceInput)
          Returns the name of the broadcast standard used for reception on this capture device input (can be different per-input)
 java.lang.String GetCaptureDeviceInputName(java.lang.String CaptureDeviceInput)
          Returns the name of this CaptureDeviceInput connection without the CaptureDevice name prefixing it.
 java.lang.String GetCaptureDeviceInputRecordingMediaFile(sage.MediaFile MediaFile)
          Returns the CaptureDeviceInput that is recording the specified MediaFile
 int GetCaptureHue(java.lang.String CaptureDeviceInput)
          Gets the hue level for this CaptureDeviceInput.
 int GetCaptureSaturation(java.lang.String CaptureDeviceInput)
          Gets the saturation level for this CaptureDeviceInput.
 int GetCaptureSharpness(java.lang.String CaptureDeviceInput)
          Gets the sharpness level for this CaptureDeviceInput.
 int GetConstantRFChannelInput(java.lang.String CaptureDeviceInput)
          Returns the RF channel number that is used to receive the source signal.
 java.lang.String GetInfraredTunerRemoteName(java.lang.String CaptureDeviceInput)
          Returns the name of the device that is passed to the IR Tuner plugin for tuning control.
 java.lang.String GetInfraredTuningPlugin(java.lang.String CaptureDeviceInput)
          Gets the name of the tuning plugin used for this CaptureDeviceInput
 int GetInfraredTuningPluginPortNumber(java.lang.String CaptureDeviceInput)
          Gets the port number used by the tuning plugin for this CaptureDeviceInput
 int GetInputMaximumChannelNumber(java.lang.String CaptureDeviceInput)
          Returns the maximum channel number that this CaptureDeviceInput can tune to
 int GetInputMinimumChannelNumber(java.lang.String CaptureDeviceInput)
          Returns the minimum channel number that this CaptureDeviceInput can tune to
 java.lang.String GetLineupForCaptureDeviceInput(java.lang.String CaptureDeviceInput)
          Returns the name of the lineup that this CaptureDeviceInput is configured to use
 java.lang.String GetPhysicalInputType(java.lang.String CaptureDeviceInput)
          Returns the type of input this is, such as: S-Video, Composite, TV Tuner, etc.
 int GetSignalStrength(java.lang.String CaptureDeviceInput)
          Returns the current signal strength for this CaptureDeviceInput.
 boolean IsCaptureDeviceInputAudioVideo(java.lang.String CaptureDeviceInput)
          Returns whether or not this CaptureDeviceInput captures both audio and video
 boolean IsExternallyTunedRFInput(java.lang.String CaptureDeviceInput)
          Returns true if this input was created using AddInputForRFChannel() method call
 boolean IsRFSignalCableTV(java.lang.String CaptureDeviceInput)
          Returns whether or not this CaptureDeviceInput tunes for Antenna or Cable if it's a TV Tuner input
 void ReleaseCaptureDeviceInput(java.lang.String CaptureDeviceInput)
          Releases this CaptureDeviceInput from its currently configured lineup.
 void SetCaptureBrightness(java.lang.String CaptureDeviceInput, int Value)
          Sets the brightness for capture on this CaptureDeviceInput.
 void SetCaptureContrast(java.lang.String CaptureDeviceInput, int Value)
          Sets the contrast for capture on this CaptureDeviceInput.
 void SetCaptureHue(java.lang.String CaptureDeviceInput, int Value)
          Sets the hue for capture on this CaptureDeviceInput.
 void SetCaptureSaturation(java.lang.String CaptureDeviceInput, int Value)
          Sets the saturation for capture on this CaptureDeviceInput.
 void SetCaptureSharpness(java.lang.String CaptureDeviceInput, int Value)
          Sets the sharpness for capture on this CaptureDeviceInput.
 void SetInfraredTunerRemoteName(java.lang.String CaptureDeviceInput, java.lang.String ExternalDeviceName)
          Sets the name of the device that is passed to the IR Tuner plugin for tuning control.
 boolean SetInfraredTuningPluginAndPort(java.lang.String CaptureDeviceInput, java.lang.String PluginName, int PluginPortNumber)
          Sets the name and port number for the tuning plugin for a CaptureDeviceInput
 void SetRFSignalIsCableTV(java.lang.String CaptureDeviceInput, boolean Value)
          Sets whether or not this CaptureDeviceInput tunes for Antenna or Cable if it's a TV Tuner input
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaptureDeviceInputAPI

public CaptureDeviceInputAPI()
Method Detail

GetInfraredTuningPlugin

public java.lang.String GetInfraredTuningPlugin(java.lang.String CaptureDeviceInput)
Gets the name of the tuning plugin used for this CaptureDeviceInput

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the name of the tuning plugin currently used for the specified CaptureDeviceInput

GetInfraredTuningPluginPortNumber

public int GetInfraredTuningPluginPortNumber(java.lang.String CaptureDeviceInput)
Gets the port number used by the tuning plugin for this CaptureDeviceInput

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the port number of the tuning plugin currently used for the specified CaptureDeviceInput

SetInfraredTuningPluginAndPort

public boolean SetInfraredTuningPluginAndPort(java.lang.String CaptureDeviceInput,
                                              java.lang.String PluginName,
                                              int PluginPortNumber)
Sets the name and port number for the tuning plugin for a CaptureDeviceInput

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
PluginName - the name of the tuning plugin to use on the specified CaptureDeviceInput. This should be a value from GetInfraredTuningPlugins() Use the emptry string "" to set the CaptureDeviceInput to not use a plugin
PluginPortNumber - the port number to configure the specified tuning plugin to use on the specified CaptureDeviceInput. Use 0 for the USB port.
Returns:
true if the plugin was setup (if it requires hardware this validates the hardware is connected)

AutoTuneChannelTest

public boolean AutoTuneChannelTest(java.lang.String CaptureDeviceInput,
                                   java.lang.String ChannelNumber)
Tunes the CaptureDeviceInput to the specified physical channel and indicates whether or not a signal is present. This call should only be used if the CaptureDeviceInput is already under live control (i.e. WatchLive() or LockTuner() was called on it) or if the input has not been configured for use yet. Otherwise this call may interfere with what is currently being recorded.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
ChannelNumber - the channel string to tune to
Returns:
true if the hardware detected a signal on the specified channel

AutoScanChannelInfo

public java.lang.String AutoScanChannelInfo(java.lang.String CaptureDeviceInput,
                                            java.lang.String ChannelNumber)
Tunes the CaptureDeviceInput to the specified physical channel and returns a list of the available channels. This call should only be used if the CaptureDeviceInput is already under live control (i.e. WatchLive() or LockTuner() was called on it) or if the input has not been configured for use yet. Otherwise this call may interfere with what is currently being recorded.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
ChannelNumber - the channel string to tune to
Returns:
a string describing the subchannels found scanning this channel, if no channels were found an empty or null string will be returned

GetInputMinimumChannelNumber

public int GetInputMinimumChannelNumber(java.lang.String CaptureDeviceInput)
Returns the minimum channel number that this CaptureDeviceInput can tune to

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the minimum channel number for the specified CaptureDeviceInput

GetInputMaximumChannelNumber

public int GetInputMaximumChannelNumber(java.lang.String CaptureDeviceInput)
Returns the maximum channel number that this CaptureDeviceInput can tune to

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the maximum channel number for the specified CaptureDeviceInput

SetCaptureBrightness

public void SetCaptureBrightness(java.lang.String CaptureDeviceInput,
                                 int Value)
Sets the brightness for capture on this CaptureDeviceInput. This only affects analog capture devices

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Value - the new value to set the brightness to, in the inclusive range 0-255. Use -1 to set it to the default.

SetCaptureSaturation

public void SetCaptureSaturation(java.lang.String CaptureDeviceInput,
                                 int Value)
Sets the saturation for capture on this CaptureDeviceInput. This only affects analog capture devices

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Value - the new value to set the saturation to, in the inclusive range 0-255. Use -1 to set it to the default.

SetCaptureHue

public void SetCaptureHue(java.lang.String CaptureDeviceInput,
                          int Value)
Sets the hue for capture on this CaptureDeviceInput. This only affects analog capture devices.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Value - the new value to set the hue to, in the inclusive range 0-255. Use -1 to set it to the default.

SetCaptureContrast

public void SetCaptureContrast(java.lang.String CaptureDeviceInput,
                               int Value)
Sets the contrast for capture on this CaptureDeviceInput. This only affects analog capture devices.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Value - the new value to set the contrast to, in the inclusive range 0-255. Use -1 to set it to the default.

SetCaptureSharpness

public void SetCaptureSharpness(java.lang.String CaptureDeviceInput,
                                int Value)
Sets the sharpness for capture on this CaptureDeviceInput. This only affects analog capture devices. NOTE: On Linux this currently sets the audio capture volume level

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Value - the new value to set the sharpness to, in the inclusive range 0-255. Use -1 to set it to the default.

GetCaptureBrightness

public int GetCaptureBrightness(java.lang.String CaptureDeviceInput)
Gets the brightness level for this CaptureDeviceInput. This is only valid for analog capture devices.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the brightness level for the specified CaptureDeviceInput in the inclusive range 0-255

GetCaptureSaturation

public int GetCaptureSaturation(java.lang.String CaptureDeviceInput)
Gets the saturation level for this CaptureDeviceInput. This is only valid for analog capture devices.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the saturation level for the specified CaptureDeviceInput in the inclusive range 0-255

GetCaptureHue

public int GetCaptureHue(java.lang.String CaptureDeviceInput)
Gets the hue level for this CaptureDeviceInput. This is only valid for analog capture devices.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the hue level for the specified CaptureDeviceInput in the inclusive range 0-255

GetCaptureContrast

public int GetCaptureContrast(java.lang.String CaptureDeviceInput)
Gets the contrast level for this CaptureDeviceInput. This is only valid for analog capture devices.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the contrast level for the specified CaptureDeviceInput in the inclusive range 0-255

GetCaptureSharpness

public int GetCaptureSharpness(java.lang.String CaptureDeviceInput)
Gets the sharpness level for this CaptureDeviceInput. This is only valid for analog capture devices. NOTE: On Linux this gets the audio volume level

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the sharpness level for the specified CaptureDeviceInput in the inclusive range 0-255

SetInfraredTunerRemoteName

public void SetInfraredTunerRemoteName(java.lang.String CaptureDeviceInput,
                                       java.lang.String ExternalDeviceName)
Sets the name of the device that is passed to the IR Tuner plugin for tuning control. Corresponds to a .ir file for current IR transmitters

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
ExternalDeviceName - the name of the external device the IR tuning plugin is supposed to control This value should be obtained from a call to (@link Configuration#GetRemotesForInfraredTuningPlugin GetRemotesForInfraredTuningPlugin()}

GetInfraredTunerRemoteName

public java.lang.String GetInfraredTunerRemoteName(java.lang.String CaptureDeviceInput)
Returns the name of the device that is passed to the IR Tuner plugin for tuning control. Corresponds to a .ir file for current IR transmitters.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the name of the external device codes used for the tuner plugin on the specified CaptureDeviceInput

SetRFSignalIsCableTV

public void SetRFSignalIsCableTV(java.lang.String CaptureDeviceInput,
                                 boolean Value)
Sets whether or not this CaptureDeviceInput tunes for Antenna or Cable if it's a TV Tuner input

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Value - true if this input is connected to a Cable source, false if it uses Broadcast/Over-the-Air (OTA)

IsRFSignalCableTV

public boolean IsRFSignalCableTV(java.lang.String CaptureDeviceInput)
Returns whether or not this CaptureDeviceInput tunes for Antenna or Cable if it's a TV Tuner input

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
true if this input is connected to a Cable source, false if it uses Broadcast/Over-the-Air (OTA)

IsExternallyTunedRFInput

public boolean IsExternallyTunedRFInput(java.lang.String CaptureDeviceInput)
Returns true if this input was created using AddInputForRFChannel() method call

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
true if this input was created using AddInputForRFChannel() method call

GetConstantRFChannelInput

public int GetConstantRFChannelInput(java.lang.String CaptureDeviceInput)
Returns the RF channel number that is used to receive the source signal. This is set using AddInputForRFChannel()

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the RF channel number used to receive the source signal on the specified CaptureDeviceInput

IsCaptureDeviceInputAudioVideo

public boolean IsCaptureDeviceInputAudioVideo(java.lang.String CaptureDeviceInput)
Returns whether or not this CaptureDeviceInput captures both audio and video

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
true if this input captures both audio and video, false if it just captures video

GetPhysicalInputType

public java.lang.String GetPhysicalInputType(java.lang.String CaptureDeviceInput)
Returns the type of input this is, such as: S-Video, Composite, TV Tuner, etc.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the type of physical connector used for the specified CaptureDeviceInput

GetCaptureDeviceInputName

public java.lang.String GetCaptureDeviceInputName(java.lang.String CaptureDeviceInput)
Returns the name of this CaptureDeviceInput connection without the CaptureDevice name prefixing it. This is not the same as the 'name' of the CaptureDeviceInput used as the parameter. The String that uniquely identifies a CaptureDeviceInput must always have the CaptureDevice's name included in it. Only use this return value for display purposes; do not use it for anything else.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the name of the specified CaptureDeviceInput connection without the CaptureDevice name prefixing it

ConfigureInputForEPGDataLineup

public boolean ConfigureInputForEPGDataLineup(java.lang.String CaptureDeviceInput,
                                              java.lang.String Lineup)
Configures this CaptureDeviceInput to use the specified EPG Lineup.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput to set the lineup on
Lineup - the name of the Lineup to configure this CaptureDeviceInput for. This name should be obtained from a call to the EPG server
Returns:
true if the Lineup was successfully configured for the specified CaptureDeviceInput

ConfigureInputWithoutEPGData

public boolean ConfigureInputWithoutEPGData(java.lang.String CaptureDeviceInput)
Configures this CaptureDeviceInput to not use an EPG data source. It will instead create a generic lineup with numeric channels that

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput to use
Returns:
true (the call will always succeed)

ReleaseCaptureDeviceInput

public void ReleaseCaptureDeviceInput(java.lang.String CaptureDeviceInput)
Releases this CaptureDeviceInput from its currently configured lineup. It will no longer be considered "configured" or "active". If its lineup is no longer is in use, it will be cleaned up on the next EPG maintenance cycle.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput to use

GetCaptureDeviceInputBeingViewed

public java.lang.String GetCaptureDeviceInputBeingViewed()
Returns the CaptureDeviceInput that is recording the MediaFile that is currently loaded by the MediaPlayer

Returns:
the CaptureDeviceInput that is recording the MediaFile that is currently loaded by the MediaPlayer

GetCaptureDeviceInputRecordingMediaFile

public java.lang.String GetCaptureDeviceInputRecordingMediaFile(sage.MediaFile MediaFile)
Returns the CaptureDeviceInput that is recording the specified MediaFile

Parameters:
MediaFile - the MediaFile who's recording CaptureDeviceInput should be returned
Returns:
the CaptureDeviceInput that is recording the specified MediaFile; null if that file is not being recorded currently

GetLineupForCaptureDeviceInput

public java.lang.String GetLineupForCaptureDeviceInput(java.lang.String CaptureDeviceInput)
Returns the name of the lineup that this CaptureDeviceInput is configured to use

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput to use
Returns:
the name of the lineups that is configured for use on the specified CaptureDeviceInput; returns null if the input is not configured

GetCaptureDeviceForInput

public java.lang.String GetCaptureDeviceForInput(java.lang.String CaptureDeviceInput)
Returns the CaptureDevice for this CaptureDeviceInput

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput to use
Returns:
the name of the CaptureDevice for the specified CaptureDeviceInput

GetSignalStrength

public int GetSignalStrength(java.lang.String CaptureDeviceInput)
Returns the current signal strength for this CaptureDeviceInput. This is only valid for Digital TV inputs. The returned value will be between 0 and 100 inclusive. 0 is no signal and 100 is maximum signal strength.

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput to use
Returns:
the current signal strength on the specified CaptureDeviceInput

GetCaptureDeviceInputBroadcastStandard

public java.lang.String GetCaptureDeviceInputBroadcastStandard(java.lang.String CaptureDeviceInput)
Returns the name of the broadcast standard used for reception on this capture device input (can be different per-input)

Parameters:
CaptureDeviceInput - the name of the CaptureDeviceInput
Returns:
the name of the broadcast standard used for reception on this capture device input (i.e. NTSC, ATSC, DVB-S, etc.)
Since:
7.0

SageTV Platform
V9.0

SageTV is a trademark or registered trademark of Google, Inc. in the US and other countries.
Copyright 2000-2015 The SageTV Authors. All Rights Reserved.