Package sage.api
Class CaptureDeviceAPI
- java.lang.Object
-
- sage.api.CaptureDeviceAPI
-
public class CaptureDeviceAPI extends java.lang.Object
Represents a capture card or network encoder which is used to record TV.
-
-
Constructor Summary
Constructors Constructor Description CaptureDeviceAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
AddInputForRFChannel(java.lang.String CaptureDevice, int RFChannel)
Returns a CaptureDeviceInput that corresponds to using the tuner input on the CaptureDevice locked to a certain channel.java.lang.String[]
GetActiveCaptureDevices()
Returns all of the CaptureDevices that are currently configured for use by SageTVjava.lang.String[]
GetAudioCaptureSources()
Returns an array of all the audio capture sources in the system, used withSetCaptureDeviceAudioSource(CaptureDevice, AudioSource)
java.lang.String
GetCaptureDeviceAudioSource(java.lang.String CaptureDevice)
Gets the audio capture source for a corresponding CaptureDevice.java.lang.String
GetCaptureDeviceBroadcastStandard(java.lang.String CaptureDevice)
Returns the name of the broadcast standard used for reception on this capture device.sage.MediaFile
GetCaptureDeviceCurrentRecordFile(java.lang.String CaptureDevice)
Returns the file that is currently being recorded by this capture devicejava.lang.String
GetCaptureDeviceDefaultQuality(java.lang.String CaptureDevice)
Returns the default recording qualities for this CaptureDevice.java.lang.String[]
GetCaptureDeviceInputs(java.lang.String CaptureDevice)
Returns all of the CaptureDeviceInputs for a given CaptureDevice.int
GetCaptureDeviceMerit(java.lang.String CaptureDevice)
Gets the encoder merit for a CaptureDevice.java.lang.String[]
GetCaptureDeviceQualities(java.lang.String CaptureDevice)
Returns the recording qualities which are supported by this CaptureDevicejava.lang.String[]
GetCaptureDevices()
Returns all of the CaptureDevices in the system that SageTV can usejava.lang.String[]
GetConfiguredCaptureDeviceInputs()
Returns all of the CaptureDeviceInputs that are currently configured for use by SageTV.java.lang.String
GetLastUsedCaptureDevice()
Returns the last CaptureDevice that was accessed by SageTV.java.lang.String
GetLastUsedCaptureDeviceInput(java.lang.String CaptureDevice)
Returns the last CaptureDeviceInput that was used by SageTV on the given CaptureDeviceboolean
IsCaptureDeviceANetworkEncoder(java.lang.String CaptureDevice)
Returns true if a CaptureDevice is a Network Encoderboolean
IsCaptureDeviceFunctioning(java.lang.String CaptureDevice)
Returns whether or not a CaptureDevice is functioning (i.e.boolean
IsCaptureDeviceHardwareEncoder(java.lang.String CaptureDevice)
Returns true if the CaptureDevice is a hardware encoderboolean
IsCaptureDeviceInUseByALiveClient(java.lang.String CaptureDevice)
Returns true if the CaptureDevice is currently under control of a client who is (or was) watching live TVvoid
SetCaptureDeviceAudioSource(java.lang.String CaptureDevice, java.lang.String AudioSource)
Sets the audio capture source for a corresponding CaptureDevicevoid
SetCaptureDeviceDefaultQuality(java.lang.String CaptureDevice, java.lang.String Quality)
Sets the default recording quality for a CaptureDevicevoid
SetCaptureDeviceDTVStandard(java.lang.String CaptureDevice, java.lang.String DTVStandard)
Sets the TV standard to use for a capture device for devices that support multiple digital TV standards.void
SetCaptureDeviceMerit(java.lang.String CaptureDevice, int Merit)
Sets the encoder merit for a CaptureDevice.
-
-
-
Method Detail
-
GetCaptureDevices
public java.lang.String[] GetCaptureDevices()
Returns all of the CaptureDevices in the system that SageTV can use- Returns:
- the names of all of the CaptureDevices in the system that SageTV can use
-
GetCaptureDeviceInputs
public java.lang.String[] GetCaptureDeviceInputs(java.lang.String CaptureDevice)
Returns all of the CaptureDeviceInputs for a given CaptureDevice.- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- all of the CaptureDeviceInputs for the specified CaptureDevice.
-
GetConfiguredCaptureDeviceInputs
public java.lang.String[] GetConfiguredCaptureDeviceInputs()
Returns all of the CaptureDeviceInputs that are currently configured for use by SageTV.- Returns:
- the names of all of the CaptureDeviceInputs that are currently configured for use by SageTV.
-
IsCaptureDeviceFunctioning
public boolean IsCaptureDeviceFunctioning(java.lang.String CaptureDevice)
Returns whether or not a CaptureDevice is functioning (i.e. the device is offline)- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- false if a CaptureDevice is NOT functioning (i.e. the device is offline), otherwise true
-
IsCaptureDeviceANetworkEncoder
public boolean IsCaptureDeviceANetworkEncoder(java.lang.String CaptureDevice)
Returns true if a CaptureDevice is a Network Encoder- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- true if the specified CaptureDevice is a Network Encoder
-
GetActiveCaptureDevices
public java.lang.String[] GetActiveCaptureDevices()
Returns all of the CaptureDevices that are currently configured for use by SageTV- Returns:
- all of the CaptureDevices that are currently configured for use by SageTV
-
IsCaptureDeviceInUseByALiveClient
public boolean IsCaptureDeviceInUseByALiveClient(java.lang.String CaptureDevice)
Returns true if the CaptureDevice is currently under control of a client who is (or was) watching live TV- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- true if the specified CaptureDevice is currently under control of a client who is watching live/delayed TV
-
AddInputForRFChannel
public java.lang.String AddInputForRFChannel(java.lang.String CaptureDevice, int RFChannel)
Returns a CaptureDeviceInput that corresponds to using the tuner input on the CaptureDevice locked to a certain channel. For example, using the RF connection from your cable box to the capture card on channel 3 would required adding a new input this way.- Parameters:
CaptureDevice
- the name of the CaptureDevice to add the new input toRFChannel
- the channel to tune to for this RF input- Returns:
- the name of the CaptureDeviceInput that was created which will act as an RF channel input
-
GetLastUsedCaptureDevice
public java.lang.String GetLastUsedCaptureDevice()
Returns the last CaptureDevice that was accessed by SageTV.- Returns:
- the name of the last CaptureDevice that was accessed by SageTV.
-
GetLastUsedCaptureDeviceInput
public java.lang.String GetLastUsedCaptureDeviceInput(java.lang.String CaptureDevice)
Returns the last CaptureDeviceInput that was used by SageTV on the given CaptureDevice- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- the name of the last CaptureDeviceInput that was used by SageTV on the given CaptureDevice
-
GetCaptureDeviceCurrentRecordFile
public sage.MediaFile GetCaptureDeviceCurrentRecordFile(java.lang.String CaptureDevice)
Returns the file that is currently being recorded by this capture device- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- the file that is currently being recorded by the specified capture device
-
GetCaptureDeviceQualities
public java.lang.String[] GetCaptureDeviceQualities(java.lang.String CaptureDevice)
Returns the recording qualities which are supported by this CaptureDevice- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- the recording qualities which are supported by the specified CaptureDevice
-
GetCaptureDeviceDefaultQuality
public java.lang.String GetCaptureDeviceDefaultQuality(java.lang.String CaptureDevice)
Returns the default recording qualities for this CaptureDevice.- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- the default recording quality for the specified CaptureDevice; if there is no default quality set it will return the empty string
-
SetCaptureDeviceDefaultQuality
public void SetCaptureDeviceDefaultQuality(java.lang.String CaptureDevice, java.lang.String Quality)
Sets the default recording quality for a CaptureDevice- Parameters:
CaptureDevice
- the name of the CaptureDeviceQuality
- the default quality setting to use for the specified capture device, use null or the empty string to clear the setting
-
SetCaptureDeviceAudioSource
public void SetCaptureDeviceAudioSource(java.lang.String CaptureDevice, java.lang.String AudioSource)
Sets the audio capture source for a corresponding CaptureDevice- Parameters:
CaptureDevice
- the name of the CaptureDeviceAudioSource
- the name of the audio capture source, should be one of the values fromGetAudioCaptureSources()
-
GetCaptureDeviceAudioSource
public java.lang.String GetCaptureDeviceAudioSource(java.lang.String CaptureDevice)
Gets the audio capture source for a corresponding CaptureDevice.- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- the name of the audio capture source for the specified CaptureDevice; the empty string is returned if there is no separate audio capture source (i.e. multiplexed capture or video only capture)
-
GetAudioCaptureSources
public java.lang.String[] GetAudioCaptureSources()
Returns an array of all the audio capture sources in the system, used withSetCaptureDeviceAudioSource(CaptureDevice, AudioSource)
- Returns:
- an array of all the audio capture sources in the system
-
IsCaptureDeviceHardwareEncoder
public boolean IsCaptureDeviceHardwareEncoder(java.lang.String CaptureDevice)
Returns true if the CaptureDevice is a hardware encoder- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- true if the specified CaptureDevice is a hardware encoder
-
GetCaptureDeviceBroadcastStandard
public java.lang.String GetCaptureDeviceBroadcastStandard(java.lang.String CaptureDevice)
Returns the name of the broadcast standard used for reception on this capture device. NOTE: The method 'GetCaptureDeviceInputBroadcastStandard' should be used instead since the broadcast standard can change per-input- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- the name of the broadcast standard used for reception on this capture device (i.e. NTSC, ATSC, DVB-S, etc.)
- Since:
- 5.1
-
SetCaptureDeviceDTVStandard
public void SetCaptureDeviceDTVStandard(java.lang.String CaptureDevice, java.lang.String DTVStandard)
Sets the TV standard to use for a capture device for devices that support multiple digital TV standards. The only current example of this is the Hauppauge HVR-4000 which support DVB-T, DVB-S and DVB-C.- Parameters:
CaptureDevice
- the name of the CaptureDeviceDTVStandard
- the DTV standard to use for this capture device, should be one of "DVB-T", "DVB-S" or "DVB-C"- Since:
- 7.0
-
GetCaptureDeviceMerit
public int GetCaptureDeviceMerit(java.lang.String CaptureDevice)
Gets the encoder merit for a CaptureDevice.- Parameters:
CaptureDevice
- the name of the CaptureDevice- Returns:
- The merit value for the specified CaptureDevice; If all else is equal, a capture device with a higher merit has higher priority.
-
SetCaptureDeviceMerit
public void SetCaptureDeviceMerit(java.lang.String CaptureDevice, int Merit)
Sets the encoder merit for a CaptureDevice.- Parameters:
Merit
- The new merit value for the specified CaptureDevice
-
-