Fields Summary |
---|
private static final String | TAG |
private static final int | RECORD_SOURCE_TYPE_OWN_SOURCERecord source type for "Own Source". |
private static final int | RECORD_SOURCE_TYPE_DIGITAL_SERVICERecord source type for "Digital Service". |
private static final int | RECORD_SOURCE_TYPE_ANALOGUE_SERVICERecord source type for "Analogue Service". |
private static final int | RECORD_SOURCE_TYPE_EXTERNAL_PLUGRecord source type for "Exteranl Plug". |
private static final int | RECORD_SOURCE_TYPE_EXTERNAL_PHYSICAL_ADDRESSRecord source type for "External Physical Address". |
public static final int | DIGITAL_BROADCAST_TYPE_ARIB |
public static final int | DIGITAL_BROADCAST_TYPE_ATSC |
public static final int | DIGITAL_BROADCAST_TYPE_DVB |
public static final int | DIGITAL_BROADCAST_TYPE_ARIB_BS |
public static final int | DIGITAL_BROADCAST_TYPE_ARIB_CS |
public static final int | DIGITAL_BROADCAST_TYPE_ARIB_T |
public static final int | DIGITAL_BROADCAST_TYPE_ATSC_CABLE |
public static final int | DIGITAL_BROADCAST_TYPE_ATSC_SATELLITE |
public static final int | DIGITAL_BROADCAST_TYPE_ATSC_TERRESTRIAL |
public static final int | DIGITAL_BROADCAST_TYPE_DVB_C |
public static final int | DIGITAL_BROADCAST_TYPE_DVB_S |
public static final int | DIGITAL_BROADCAST_TYPE_DVB_S2 |
public static final int | DIGITAL_BROADCAST_TYPE_DVB_T |
private static final int | CHANNEL_NUMBER_FORMAT_1_PARTChannel number formats. |
private static final int | CHANNEL_NUMBER_FORMAT_2_PART |
public static final int | ANALOGUE_BROADCAST_TYPE_CABLE |
public static final int | ANALOGUE_BROADCAST_TYPE_SATELLITE |
public static final int | ANALOGUE_BROADCAST_TYPE_TERRESTRIAL |
public static final int | BROADCAST_SYSTEM_PAL_BG |
public static final int | BROADCAST_SYSTEM_SECAM_LP |
public static final int | BROADCAST_SYSTEM_PAL_M |
public static final int | BROADCAST_SYSTEM_NTSC_M |
public static final int | BROADCAST_SYSTEM_PAL_I |
public static final int | BROADCAST_SYSTEM_SECAM_DK |
public static final int | BROADCAST_SYSTEM_SECAM_BG |
public static final int | BROADCAST_SYSTEM_SECAM_L |
public static final int | BROADCAST_SYSTEM_PAL_DK |
public static final int | BROADCAST_SYSTEM_PAL_OTHER_SYSTEM |
Methods Summary |
---|
public static boolean | checkRecordSource(byte[] recordSource)Checks the byte array of record source.
if (recordSource == null || recordSource.length == 0) return false;
int recordSourceType = recordSource[0];
int extraDataSize = recordSource.length - 1;
switch (recordSourceType) {
case RECORD_SOURCE_TYPE_OWN_SOURCE:
return extraDataSize == OwnSource.EXTRA_DATA_SIZE;
case RECORD_SOURCE_TYPE_DIGITAL_SERVICE:
return extraDataSize == DigitalServiceSource.EXTRA_DATA_SIZE;
case RECORD_SOURCE_TYPE_ANALOGUE_SERVICE:
return extraDataSize == AnalogueServiceSource.EXTRA_DATA_SIZE;
case RECORD_SOURCE_TYPE_EXTERNAL_PLUG:
return extraDataSize == ExternalPlugData.EXTRA_DATA_SIZE;
case RECORD_SOURCE_TYPE_EXTERNAL_PHYSICAL_ADDRESS:
return extraDataSize == ExternalPhysicalAddress.EXTRA_DATA_SIZE;
default:
return false;
}
|
public static android.hardware.hdmi.HdmiRecordSources$AnalogueServiceSource | ofAnalogue(int broadcastType, int frequency, int broadcastSystem)Creates {@link AnalogueServiceSource} of analogue service.
if (broadcastType < ANALOGUE_BROADCAST_TYPE_CABLE
|| broadcastType > ANALOGUE_BROADCAST_TYPE_TERRESTRIAL) {
Log.w(TAG, "Invalid Broadcast type:" + broadcastType);
throw new IllegalArgumentException("Invalid Broadcast type:" + broadcastType);
}
if (frequency < 0 || frequency > 0xFFFF) {
Log.w(TAG, "Invalid frequency value[0x0000-0xFFFF]:" + frequency);
throw new IllegalArgumentException(
"Invalid frequency value[0x0000-0xFFFF]:" + frequency);
}
if (broadcastSystem < BROADCAST_SYSTEM_PAL_BG
|| broadcastSystem > BROADCAST_SYSTEM_PAL_OTHER_SYSTEM) {
Log.w(TAG, "Invalid Broadcast system:" + broadcastSystem);
throw new IllegalArgumentException(
"Invalid Broadcast system:" + broadcastSystem);
}
return new AnalogueServiceSource(broadcastType, frequency, broadcastSystem);
|
public static android.hardware.hdmi.HdmiRecordSources$DigitalServiceSource | ofArib(int aribType, android.hardware.hdmi.HdmiRecordSources$AribData data)Creates {@link DigitalServiceSource} of ARIB type.
if (data == null) {
throw new IllegalArgumentException("data should not be null.");
}
switch (aribType) {
case DIGITAL_BROADCAST_TYPE_ARIB:
case DIGITAL_BROADCAST_TYPE_ARIB_BS:
case DIGITAL_BROADCAST_TYPE_ARIB_CS:
case DIGITAL_BROADCAST_TYPE_ARIB_T:
return new DigitalServiceSource(
DigitalServiceSource.DIGITAL_SERVICE_IDENTIFIED_BY_DIGITAL_ID,
aribType, data);
default:
Log.w(TAG, "Invalid ARIB type:" + aribType);
throw new IllegalArgumentException("type should not be null.");
}
|
public static android.hardware.hdmi.HdmiRecordSources$DigitalServiceSource | ofAtsc(int atscType, android.hardware.hdmi.HdmiRecordSources$AtscData data)Creates {@link DigitalServiceSource} of ATSC type.
if (data == null) {
throw new IllegalArgumentException("data should not be null.");
}
switch (atscType) {
case DIGITAL_BROADCAST_TYPE_ATSC:
case DIGITAL_BROADCAST_TYPE_ATSC_CABLE:
case DIGITAL_BROADCAST_TYPE_ATSC_SATELLITE:
case DIGITAL_BROADCAST_TYPE_ATSC_TERRESTRIAL:
return new DigitalServiceSource(
DigitalServiceSource.DIGITAL_SERVICE_IDENTIFIED_BY_DIGITAL_ID,
atscType, data);
default:
Log.w(TAG, "Invalid ATSC type:" + atscType);
throw new IllegalArgumentException("Invalid ATSC type:" + atscType);
}
|
public static android.hardware.hdmi.HdmiRecordSources$DigitalServiceSource | ofDigitalChannelId(int broadcastSystem, android.hardware.hdmi.HdmiRecordSources$DigitalChannelData data)Creates {@link DigitalServiceSource} with channel type.
if (data == null) {
throw new IllegalArgumentException("data should not be null.");
}
switch (broadcastSystem) {
case DIGITAL_BROADCAST_TYPE_ARIB:
case DIGITAL_BROADCAST_TYPE_ATSC:
case DIGITAL_BROADCAST_TYPE_DVB:
case DIGITAL_BROADCAST_TYPE_ARIB_BS:
case DIGITAL_BROADCAST_TYPE_ARIB_CS:
case DIGITAL_BROADCAST_TYPE_ARIB_T:
case DIGITAL_BROADCAST_TYPE_ATSC_CABLE:
case DIGITAL_BROADCAST_TYPE_ATSC_SATELLITE:
case DIGITAL_BROADCAST_TYPE_ATSC_TERRESTRIAL:
case DIGITAL_BROADCAST_TYPE_DVB_C:
case DIGITAL_BROADCAST_TYPE_DVB_S:
case DIGITAL_BROADCAST_TYPE_DVB_S2:
case DIGITAL_BROADCAST_TYPE_DVB_T:
return new DigitalServiceSource(
DigitalServiceSource.DIGITAL_SERVICE_IDENTIFIED_BY_CHANNEL,
broadcastSystem,
data);
default:
Log.w(TAG, "Invalid broadcast type:" + broadcastSystem);
throw new IllegalArgumentException(
"Invalid broadcast system value:" + broadcastSystem);
}
|
public static android.hardware.hdmi.HdmiRecordSources$DigitalServiceSource | ofDvb(int dvbType, android.hardware.hdmi.HdmiRecordSources$DvbData data)Creates {@link DigitalServiceSource} of ATSC type.
if (data == null) {
throw new IllegalArgumentException("data should not be null.");
}
switch (dvbType) {
case DIGITAL_BROADCAST_TYPE_DVB:
case DIGITAL_BROADCAST_TYPE_DVB_C:
case DIGITAL_BROADCAST_TYPE_DVB_S:
case DIGITAL_BROADCAST_TYPE_DVB_S2:
case DIGITAL_BROADCAST_TYPE_DVB_T:
return new DigitalServiceSource(
DigitalServiceSource.DIGITAL_SERVICE_IDENTIFIED_BY_DIGITAL_ID,
dvbType, data);
default:
Log.w(TAG, "Invalid DVB type:" + dvbType);
throw new IllegalArgumentException("Invalid DVB type:" + dvbType);
}
|
public static android.hardware.hdmi.HdmiRecordSources$ExternalPhysicalAddress | ofExternalPhysicalAddress(int physicalAddress)Creates {@link ExternalPhysicalAddress} of external physical address.
if ((physicalAddress & ~0xFFFF) != 0) {
Log.w(TAG, "Invalid physical address:" + physicalAddress);
throw new IllegalArgumentException("Invalid physical address:" + physicalAddress);
}
return new ExternalPhysicalAddress(physicalAddress);
|
public static android.hardware.hdmi.HdmiRecordSources$ExternalPlugData | ofExternalPlug(int plugNumber)Creates {@link ExternalPlugData} of external plug type.
if (plugNumber < 1 || plugNumber > 255) {
Log.w(TAG, "Invalid plug number[1-255]" + plugNumber);
throw new IllegalArgumentException("Invalid plug number[1-255]" + plugNumber);
}
return new ExternalPlugData(plugNumber);
|
public static android.hardware.hdmi.HdmiRecordSources$OwnSource | ofOwnSource()Creates {@link OwnSource} of own source.
return new OwnSource();
|
private static int | shortToByteArray(short value, byte[] byteArray, int index)
byteArray[index] = (byte) ((value >>> 8) & 0xFF);
byteArray[index + 1] = (byte) (value & 0xFF);
return 2;
|
private static int | threeFieldsToSixBytes(int first, int second, int third, byte[] data, int index)
shortToByteArray((short) first, data, index);
shortToByteArray((short) second, data, index + 2);
shortToByteArray((short) third, data, index + 4);
return 6;
|