FileDocCategorySizeDatePackage
ITvInputHardware.javaAPI DocAndroid 5.1 API9007Sat Mar 14 05:48:10 GMT 2015android.media.tv

ITvInputHardware

public interface ITvInputHardware implements android.os.IInterface
TvInputService representing a physical port should connect to HAL through this interface. Framework will take care of communication among system services including TvInputManagerService, HdmiControlService, AudioService, etc.
hide

Fields Summary
Constructors Summary
Methods Summary
public booleandispatchKeyEventToHdmi(android.view.KeyEvent event)
Dispatch key event to HDMI service. The events would be automatically converted to HDMI CEC commands. If the hardware is not representing an HDMI port, this method will fail.

public voidoverrideAudioSink(int audioType, java.lang.String audioAddress, int samplingRate, int channelMask, int format)
Override default audio sink from audio policy. When override is on, it is TvInputService's responsibility to adjust to audio configuration change (for example, when the audio sink becomes unavailable or more desirable audio sink is detected).

param
audioType one of AudioManager.DEVICE_* values. When it's * DEVICE_NONE, override becomes off.
param
audioAddress audio address of the overriding device.
param
samplingRate desired sampling rate. Use default when it's 0.
param
channelMask desired channel mask. Use default when it's AudioFormat.CHANNEL_OUT_DEFAULT.
param
format desired format. Use default when it's AudioFormat.ENCODING_DEFAULT.

public voidsetStreamVolume(float volume)
Set volume for this stream via AudioGain.

public booleansetSurface(android.view.Surface surface, android.media.tv.TvStreamConfig config)
Make the input render on the surface according to the config. In case of HDMI, this will trigger CEC commands for adjusting active HDMI source. Returns true on success.