--- /dev/null
+<compatibility-matrix version="1.0" type="framework">
+ <hal format="hidl" optional="false">
+ <name>android.hardware.audio</name>
+ <version>2.0</version>
+ <interface>
+ <name>IDevicesFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.audio.effect</name>
+ <version>2.0</version>
+ <interface>
+ <name>IEffectsFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.automotive.evs</name>
+ <version>1.0</version>
+ <interface>
+ <name>IEvsEnumerator</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.automotive.vehicle</name>
+ <version>2.0</version>
+ <interface>
+ <name>IVehicle</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.biometrics.fingerprint</name>
+ <version>2.1</version>
+ <interface>
+ <name>IBiometricsFingerprint</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.bluetooth</name>
+ <version>1.0</version>
+ <interface>
+ <name>IBluetoothHci</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.boot</name>
+ <version>1.0</version>
+ <interface>
+ <name>IBootControl</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.broadcastradio</name>
+ <version>1.0</version>
+ <interface>
+ <name>IBroadcastRadioFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.camera.provider</name>
+ <version>2.4</version>
+ <interface>
+ <name>ICameraProvider</name>
+ <instance>legacy/0</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.configstore</name>
+ <version>1.0-1</version>
+ <interface>
+ <name>ISurfaceFlingerConfigs</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.contexthub</name>
+ <version>1.0</version>
+ <interface>
+ <name>IContexthub</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.drm</name>
+ <version>1.0</version>
+ <interface>
+ <name>ICryptoFactory</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IDrmFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.dumpstate</name>
+ <version>1.0</version>
+ <interface>
+ <name>IDumpstateDevice</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.gatekeeper</name>
+ <version>1.0</version>
+ <interface>
+ <name>IGatekeeper</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.gnss</name>
+ <version>1.0</version>
+ <interface>
+ <name>IGnss</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.graphics.allocator</name>
+ <version>2.0</version>
+ <interface>
+ <name>IAllocator</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.graphics.composer</name>
+ <version>2.1</version>
+ <interface>
+ <name>IComposer</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.graphics.mapper</name>
+ <version>2.0</version>
+ <interface>
+ <name>IMapper</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.health</name>
+ <version>1.0</version>
+ <interface>
+ <name>IHealth</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.ir</name>
+ <version>1.0</version>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.keymaster</name>
+ <version>3.0</version>
+ <interface>
+ <name>IKeymasterDevice</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.light</name>
+ <version>2.0</version>
+ <interface>
+ <name>ILight</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.media.omx</name>
+ <version>1.0</version>
+ <interface>
+ <name>IOmx</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IOmxStore</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.memtrack</name>
+ <version>1.0</version>
+ <interface>
+ <name>IMemtrack</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.nfc</name>
+ <version>1.0</version>
+ <interface>
+ <name>INfc</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.power</name>
+ <version>1.0</version>
+ <interface>
+ <name>IPower</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio</name>
+ <version>1.0</version>
+ <interface>
+ <name>IRadio</name>
+ <instance>slot1</instance>
+ </interface>
+ <interface>
+ <name>ISap</name>
+ <instance>slot1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio.deprecated</name>
+ <version>1.0</version>
+ <interface>
+ <name>IOemHook</name>
+ <instance>slot1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.renderscript</name>
+ <version>1.0</version>
+ <interface>
+ <name>IDevice</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.sensors</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISensors</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.soundtrigger</name>
+ <version>2.0</version>
+ <interface>
+ <name>ISoundTriggerHw</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.thermal</name>
+ <version>1.0</version>
+ <interface>
+ <name>IThermal</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.tv.cec</name>
+ <version>1.0</version>
+ <interface>
+ <name>IHdmiCec</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.tv.input</name>
+ <version>1.0</version>
+ <interface>
+ <name>ITvInput</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.usb</name>
+ <version>1.0</version>
+ <interface>
+ <name>IUsb</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.vibrator</name>
+ <version>1.0</version>
+ <interface>
+ <name>IVibrator</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.vr</name>
+ <version>1.0</version>
+ <interface>
+ <name>IVr</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.wifi</name>
+ <version>1.0</version>
+ <interface>
+ <name>IWifi</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.wifi.supplicant</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISupplicant</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <kernel version="4.9.0" />
+ <kernel version="4.4.0" />
+ <kernel version="3.18.0" />
+</compatibility-matrix>
--- /dev/null
+<compatibility-matrix version="1.0" type="framework">
+ <hal format="hidl" optional="false">
+ <name>android.hardware.audio</name>
+ <version>2.0</version>
+ <interface>
+ <name>IDevicesFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.audio.effect</name>
+ <version>2.0</version>
+ <interface>
+ <name>IEffectsFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.automotive.evs</name>
+ <version>1.0</version>
+ <interface>
+ <name>IEvsEnumerator</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.automotive.vehicle</name>
+ <version>2.0</version>
+ <interface>
+ <name>IVehicle</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.biometrics.fingerprint</name>
+ <version>2.1</version>
+ <interface>
+ <name>IBiometricsFingerprint</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.bluetooth</name>
+ <version>1.0</version>
+ <interface>
+ <name>IBluetoothHci</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.boot</name>
+ <version>1.0</version>
+ <interface>
+ <name>IBootControl</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.broadcastradio</name>
+ <version>1.0</version>
+ <interface>
+ <name>IBroadcastRadioFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.camera.provider</name>
+ <version>2.4</version>
+ <interface>
+ <name>ICameraProvider</name>
+ <instance>legacy/0</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.configstore</name>
+ <version>1.0-1</version>
+ <interface>
+ <name>ISurfaceFlingerConfigs</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.contexthub</name>
+ <version>1.0</version>
+ <interface>
+ <name>IContexthub</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.drm</name>
+ <version>1.0</version>
+ <interface>
+ <name>ICryptoFactory</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IDrmFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.dumpstate</name>
+ <version>1.0</version>
+ <interface>
+ <name>IDumpstateDevice</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.gatekeeper</name>
+ <version>1.0</version>
+ <interface>
+ <name>IGatekeeper</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.gnss</name>
+ <version>1.0</version>
+ <interface>
+ <name>IGnss</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.graphics.allocator</name>
+ <version>2.0</version>
+ <interface>
+ <name>IAllocator</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.graphics.composer</name>
+ <version>2.1</version>
+ <interface>
+ <name>IComposer</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.graphics.mapper</name>
+ <version>2.0</version>
+ <interface>
+ <name>IMapper</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.health</name>
+ <version>1.0</version>
+ <interface>
+ <name>IHealth</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.ir</name>
+ <version>1.0</version>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.keymaster</name>
+ <version>3.0</version>
+ <interface>
+ <name>IKeymasterDevice</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.light</name>
+ <version>2.0</version>
+ <interface>
+ <name>ILight</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="false">
+ <name>android.hardware.media.omx</name>
+ <version>1.0</version>
+ <interface>
+ <name>IOmx</name>
+ <instance>default</instance>
+ </interface>
+ <interface>
+ <name>IOmxStore</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.memtrack</name>
+ <version>1.0</version>
+ <interface>
+ <name>IMemtrack</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.nfc</name>
+ <version>1.0</version>
+ <interface>
+ <name>INfc</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.power</name>
+ <version>1.0</version>
+ <interface>
+ <name>IPower</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio</name>
+ <version>1.0</version>
+ <interface>
+ <name>IRadio</name>
+ <instance>slot1</instance>
+ </interface>
+ <interface>
+ <name>ISap</name>
+ <instance>slot1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.radio.deprecated</name>
+ <version>1.0</version>
+ <interface>
+ <name>IOemHook</name>
+ <instance>slot1</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.renderscript</name>
+ <version>1.0</version>
+ <interface>
+ <name>IDevice</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.sensors</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISensors</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.soundtrigger</name>
+ <version>2.0</version>
+ <interface>
+ <name>ISoundTriggerHw</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.thermal</name>
+ <version>1.0</version>
+ <interface>
+ <name>IThermal</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.tv.cec</name>
+ <version>1.0</version>
+ <interface>
+ <name>IHdmiCec</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.tv.input</name>
+ <version>1.0</version>
+ <interface>
+ <name>ITvInput</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.usb</name>
+ <version>1.0</version>
+ <interface>
+ <name>IUsb</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.vibrator</name>
+ <version>1.0</version>
+ <interface>
+ <name>IVibrator</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.vr</name>
+ <version>1.0</version>
+ <interface>
+ <name>IVr</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.wifi</name>
+ <version>1.0</version>
+ <interface>
+ <name>IWifi</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
+ <name>android.hardware.wifi.supplicant</name>
+ <version>1.0</version>
+ <interface>
+ <name>ISupplicant</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <kernel version="4.9.0" />
+ <kernel version="4.4.0" />
+ <kernel version="3.18.0" />
+</compatibility-matrix>
efc83df3f962b93c7c0290d691d7d300dabe12683e2cde3591fb3c0beedce20f android.hardware.power@1.0::types
9b5aa499ec3b4226f15f48f5ed08896e2fc0676f978c9e199c1da21daaf002a6 android.hardware.radio@1.0::IRadio
5c8efbb9c451a59737ed2c6c20230aae4745839ca01d8088d6dcc9020e52d2c5 android.hardware.radio@1.0::IRadioIndication
-c5f22264a31562e009bb284287051b7998fc46cd3294df61c9e6a1d622184993 android.hardware.radio@1.0::IRadioResponse
+69f6b4b8ec40ca02ccc7bb8227a097135c20c00bd94c822e421cd9af1267252c android.hardware.radio@1.0::IRadioResponse
de3ab9f73b1073cd677b19d886fb927e9381b30161a704712d2b30f875873f5c android.hardware.radio@1.0::ISap
d183e406ef0897df2117a9dde384e8e6ea4fa6ab1c7f6f28e65b87011218c9ea android.hardware.radio@1.0::ISapCallback
96986fbd22f0e6ca752e1fcdc0a64bda213995a81f5f36bc4faf3532d9306b97 android.hardware.radio@1.0::types
b12ef0bdd8a4d247a8a6e960b227ed32383f2b0241f55d67fcea6eff6a6737fa android.hardware.wifi.supplicant@1.0::ISupplicantStaNetwork
d8f0877ae1d321c1d884c7631dfe36cab0ec8a4b2863d4b687f85d3549a63bcc android.hardware.wifi.supplicant@1.0::ISupplicantStaNetworkCallback
fe3c3c2f572b72f15f8594c538b0577bd5c28722c31879cfe6231330cddb6747 android.hardware.wifi.supplicant@1.0::types
+
+# ABI preserving changes to HALs released in Android O
+
+28e929b453df3d9f5060af2764e6cdb123ddb893e3e86923c877f6ff7e5f02c9 android.hardware.wifi@1.0::types
&att_tee_enforced, //
&att_unique_id));
- if (att_keymaster_version == 3) {
- EXPECT_EQ(2U, att_attestation_version);
- } else {
- EXPECT_EQ(1U, att_attestation_version);
- }
+ EXPECT_TRUE(att_attestation_version == 1 || att_attestation_version == 2);
expected_sw_enforced.push_back(TAG_ATTESTATION_APPLICATION_ID,
HidlBuf(app_id));
android::Vector<BufferInfo>* oBuffer,
OMX_AUDIO_CODINGTYPE eEncoding,
OMX_U32 kPortIndexInput, OMX_U32 kPortIndexOutput,
- Message msg) {
+ Message msg,
+ AudioDecHidlTest::standardComp comp =
+ AudioDecHidlTest::standardComp::unknown_comp) {
android::hardware::media::omx::V1_0::Status status;
if (msg.data.eventData.event == OMX_EventPortSettingsChanged) {
int32_t nSampleRate;
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
- setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
- nChannels, nSampleRate);
+ // Configure output port
+ // SPECIAL CASE: Soft Vorbis, Opus and Raw Decoders do not offer way
+ // to
+ // configure output PCM port. The port undergoes auto configuration
+ // internally basing on parsed elementary stream information.
+ if (comp != AudioDecHidlTest::standardComp::vorbis &&
+ comp != AudioDecHidlTest::standardComp::opus &&
+ comp != AudioDecHidlTest::standardComp::raw) {
+ setDefaultPortParam(omxNode, kPortIndexOutput,
+ OMX_AUDIO_CodingPCM, nChannels,
+ nSampleRate);
+ }
// If you can disable a port, then you should be able to
// enable
OMX_AUDIO_CODINGTYPE eEncoding, OMX_U32 kPortIndexInput,
OMX_U32 kPortIndexOutput, std::ifstream& eleStream,
android::Vector<FrameData>* Info, int offset, int range,
- bool signalEOS = true) {
+ AudioDecHidlTest::standardComp comp, bool signalEOS = true) {
android::hardware::media::omx::V1_0::Status status;
Message msg;
if (status == android::hardware::media::omx::V1_0::Status::OK &&
msg.type == Message::Type::EVENT) {
portReconfiguration(omxNode, observer, iBuffer, oBuffer, eEncoding,
- kPortIndexInput, kPortIndexOutput, msg);
+ kPortIndexInput, kPortIndexOutput, msg, comp);
}
if (frameID == (int)Info->size() || frameID == (offset + range)) break;
}
// port format enumeration
-TEST_F(AudioDecHidlTest, EnumeratePortFormat) {
+TEST_F(AudioDecHidlTest, DISABLED_EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port
- setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
- nChannels, nSampleRate);
+ // SPECIAL CASE: Soft Vorbis, Opus and Raw Decoders do not offer way to
+ // configure output PCM port. The port undergoes auto configuration
+ // internally basing on parsed elementary stream information.
+ if (compName != vorbis && compName != opus && compName != raw) {
+ setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
+ nChannels, nSampleRate);
+ }
android::Vector<BufferInfo> iBuffer, oBuffer;
ASSERT_EQ(eleStream.is_open(), true);
decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput, eleStream, &Info, 0,
- (int)Info.size());
+ (int)Info.size(), compName);
eleStream.close();
waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput);
}
// end of sequence test
-TEST_F(AudioDecHidlTest, EOSTest_M) {
+// SPECIAL CASE; Sending Empty input EOS buffer is not supported across all
+// components. For instance soft vorbis and soft opus expects CSD buffers at
+// the start. Disabling this test for now. We shall revisit this at a later
+// stage
+TEST_F(AudioDecHidlTest, DISABLED_EOSTest_M) {
description("Test end of stream monkeying");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port
- setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
- nChannels, nSampleRate);
+ // SPECIAL CASE: Soft Vorbis, Opus and Raw Decoders do not offer way to
+ // configure output PCM port. The port undergoes auto configuration
+ // internally basing on parsed elementary stream information.
+ if (compName != vorbis && compName != opus && compName != raw) {
+ setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
+ nChannels, nSampleRate);
+ }
android::Vector<BufferInfo> iBuffer, oBuffer;
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port
- setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
- nChannels, nSampleRate);
+ // SPECIAL CASE: Soft Vorbis, Opus and Raw Decoders do not offer way to
+ // configure output PCM port. The port undergoes auto configuration
+ // internally basing on parsed elementary stream information.
+ if (compName != vorbis && compName != opus && compName != raw) {
+ setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
+ nChannels, nSampleRate);
+ }
android::Vector<BufferInfo> iBuffer, oBuffer;
eleStream.open(mURL, std::ifstream::binary);
ASSERT_EQ(eleStream.is_open(), true);
decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
- kPortIndexInput, kPortIndexOutput, eleStream, &Info, 0,
- i + 1);
+ kPortIndexInput, kPortIndexOutput, eleStream, &Info, 0, i + 1,
+ compName);
eleStream.close();
waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput);
ASSERT_EQ(eleStream.is_open(), true);
decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput, eleStream, &Info, 0, i + 1,
- false);
+ compName, false);
eleStream.close();
waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput);
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port
- setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
- nChannels, nSampleRate);
+ // SPECIAL CASE: Soft Vorbis, Opus and Raw Decoders do not offer way to
+ // configure output PCM port. The port undergoes auto configuration
+ // internally basing on parsed elementary stream information.
+ if (compName != vorbis && compName != opus && compName != raw) {
+ setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
+ nChannels, nSampleRate);
+ }
android::Vector<BufferInfo> iBuffer, oBuffer;
ASSERT_EQ(eleStream.is_open(), true);
decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput, eleStream, &Info, 0,
- (int)Info.size());
+ (int)Info.size(), compName, false);
eleStream.close();
waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput);
- testEOS(omxNode, observer, &iBuffer, &oBuffer, false, eosFlag);
+ testEOS(omxNode, observer, &iBuffer, &oBuffer, true, eosFlag);
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput);
framesReceived = 0;
getInputChannelInfo(omxNode, kPortIndexInput, eEncoding, &nChannels,
&nSampleRate);
// Configure output port
- setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
- nChannels, nSampleRate);
+ // SPECIAL CASE: Soft Vorbis, Opus and Raw Decoders do not offer way to
+ // configure output PCM port. The port undergoes auto configuration
+ // internally basing on parsed elementary stream information.
+ if (compName != vorbis && compName != opus && compName != raw) {
+ setDefaultPortParam(omxNode, kPortIndexOutput, OMX_AUDIO_CodingPCM,
+ nChannels, nSampleRate);
+ }
android::Vector<BufferInfo> iBuffer, oBuffer;
ASSERT_EQ(eleStream.is_open(), true);
decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput, eleStream, &Info, 0,
- nFrames, false);
+ nFrames, compName, false);
// Note: Assumes 200 ms is enough to end any decode call that started
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput, 200000);
if (keyFrame) {
decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, eEncoding,
kPortIndexInput, kPortIndexOutput, eleStream, &Info,
- index, Info.size() - index, false);
+ index, Info.size() - index, compName, false);
}
// Note: Assumes 200 ms is enough to end any decode call that started
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
}
// port format enumeration
-TEST_F(AudioEncHidlTest, EnumeratePortFormat) {
+TEST_F(AudioEncHidlTest, DISABLED_EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
return status;
}
-Return<android::hardware::media::omx::V1_0::Status> setRole(
- sp<IOmxNode> omxNode, const char* role) {
- OMX_PARAM_COMPONENTROLETYPE params;
- strcpy((char*)params.cRole, role);
- return setParam(omxNode, OMX_IndexParamStandardComponentRole, ¶ms);
-}
-
void enumerateProfile(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile) {
android::hardware::media::omx::V1_0::Status status;
Return<android::hardware::media::omx::V1_0::Status> setAudioPortFormat(
sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_AUDIO_CODINGTYPE eEncoding);
-Return<android::hardware::media::omx::V1_0::Status> setRole(
- sp<IOmxNode> omxNode, const char* role);
-
void enumerateProfile(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile);
using ::android::hardware::media::omx::V1_0::Message;
using ::android::hardware::media::omx::V1_0::CodecBuffer;
using ::android::hardware::media::omx::V1_0::PortMode;
+using ::android::hardware::media::omx::V1_0::Status;
using ::android::hidl::allocator::V1_0::IAllocator;
using ::android::hidl::memory::V1_0::IMemory;
using ::android::hidl::memory::V1_0::IMapper;
#include <media_hidl_test_common.h>
#include <memory>
+// set component role
+Return<android::hardware::media::omx::V1_0::Status> setRole(
+ sp<IOmxNode> omxNode, const char* role) {
+ OMX_PARAM_COMPONENTROLETYPE params;
+ strcpy((char*)params.cRole, role);
+ return setParam(omxNode, OMX_IndexParamStandardComponentRole, ¶ms);
+}
+
// allocate buffers needed on a component port
void allocatePortBuffers(sp<IOmxNode> omxNode,
android::Vector<BufferInfo>* buffArray,
void dispatchOutputBuffer(sp<IOmxNode> omxNode,
android::Vector<BufferInfo>* buffArray,
size_t bufferIndex, PortMode portMode) {
- if (portMode == PortMode::DYNAMIC_ANW_BUFFER) {
- android::hardware::media::omx::V1_0::Status status;
- CodecBuffer t = (*buffArray)[bufferIndex].omxBuffer;
- t.type = CodecBuffer::Type::ANW_BUFFER;
- native_handle_t* fenceNh = native_handle_create(0, 0);
- ASSERT_NE(fenceNh, nullptr);
- status = omxNode->fillBuffer((*buffArray)[bufferIndex].id, t, fenceNh);
- native_handle_close(fenceNh);
- native_handle_delete(fenceNh);
- ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
- buffArray->editItemAt(bufferIndex).owner = component;
- } else {
- android::hardware::media::omx::V1_0::Status status;
- CodecBuffer t;
- t.sharedMemory = android::hardware::hidl_memory();
- t.nativeHandle = android::hardware::hidl_handle();
- t.type = CodecBuffer::Type::PRESET;
- t.attr.preset.rangeOffset = 0;
- t.attr.preset.rangeLength = 0;
- native_handle_t* fenceNh = native_handle_create(0, 0);
- ASSERT_NE(fenceNh, nullptr);
- status = omxNode->fillBuffer((*buffArray)[bufferIndex].id, t, fenceNh);
- native_handle_close(fenceNh);
- native_handle_delete(fenceNh);
- ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
- buffArray->editItemAt(bufferIndex).owner = component;
+ android::hardware::media::omx::V1_0::Status status;
+ CodecBuffer t;
+ native_handle_t* fenceNh = native_handle_create(0, 0);
+ ASSERT_NE(fenceNh, nullptr);
+ switch (portMode) {
+ case PortMode::DYNAMIC_ANW_BUFFER:
+ t = (*buffArray)[bufferIndex].omxBuffer;
+ t.type = CodecBuffer::Type::ANW_BUFFER;
+ status =
+ omxNode->fillBuffer((*buffArray)[bufferIndex].id, t, fenceNh);
+ break;
+ case PortMode::PRESET_SECURE_BUFFER:
+ case PortMode::PRESET_BYTE_BUFFER:
+ t.sharedMemory = android::hardware::hidl_memory();
+ t.nativeHandle = android::hardware::hidl_handle();
+ t.type = CodecBuffer::Type::PRESET;
+ t.attr.preset.rangeOffset = 0;
+ t.attr.preset.rangeLength = 0;
+ status =
+ omxNode->fillBuffer((*buffArray)[bufferIndex].id, t, fenceNh);
+ break;
+ default:
+ status = Status::NAME_NOT_FOUND;
}
+ native_handle_close(fenceNh);
+ native_handle_delete(fenceNh);
+ ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
+ buffArray->editItemAt(bufferIndex).owner = component;
}
// dispatch buffer to input port
void dispatchInputBuffer(sp<IOmxNode> omxNode,
android::Vector<BufferInfo>* buffArray,
size_t bufferIndex, int bytesCount, uint32_t flags,
- uint64_t timestamp) {
+ uint64_t timestamp, PortMode portMode) {
android::hardware::media::omx::V1_0::Status status;
CodecBuffer t;
- t.sharedMemory = android::hardware::hidl_memory();
- t.nativeHandle = android::hardware::hidl_handle();
- t.type = CodecBuffer::Type::PRESET;
- t.attr.preset.rangeOffset = 0;
- t.attr.preset.rangeLength = bytesCount;
native_handle_t* fenceNh = native_handle_create(0, 0);
ASSERT_NE(fenceNh, nullptr);
- status = omxNode->emptyBuffer((*buffArray)[bufferIndex].id, t, flags,
- timestamp, fenceNh);
+ switch (portMode) {
+ case PortMode::PRESET_SECURE_BUFFER:
+ case PortMode::PRESET_BYTE_BUFFER:
+ t.sharedMemory = android::hardware::hidl_memory();
+ t.nativeHandle = android::hardware::hidl_handle();
+ t.type = CodecBuffer::Type::PRESET;
+ t.attr.preset.rangeOffset = 0;
+ t.attr.preset.rangeLength = bytesCount;
+ status = omxNode->emptyBuffer((*buffArray)[bufferIndex].id, t,
+ flags, timestamp, fenceNh);
+ break;
+ default:
+ status = Status::NAME_NOT_FOUND;
+ }
native_handle_close(fenceNh);
native_handle_delete(fenceNh);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
/*
* common functions declarations
*/
+Return<android::hardware::media::omx::V1_0::Status> setRole(
+ sp<IOmxNode> omxNode, const char* role);
+
void allocatePortBuffers(sp<IOmxNode> omxNode,
android::Vector<BufferInfo>* buffArray,
OMX_U32 portIndex,
void dispatchInputBuffer(sp<IOmxNode> omxNode,
android::Vector<BufferInfo>* buffArray,
size_t bufferIndex, int bytesCount, uint32_t flags,
- uint64_t timestamp);
+ uint64_t timestamp,
+ PortMode portMode = PortMode::PRESET_BYTE_BUFFER);
void flushPorts(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
android::Vector<BufferInfo>* iBuffer,
}
}
if (compClass == unknown_class) disableTest = true;
+ isSecure = false;
+ size_t suffixLen = strlen(".secure");
+ if (strlen(gEnv->getComponent().c_str()) >= suffixLen) {
+ isSecure =
+ !strcmp(gEnv->getComponent().c_str() +
+ strlen(gEnv->getComponent().c_str()) - suffixLen,
+ ".secure");
+ }
if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
}
sp<CodecObserver> observer;
sp<IOmxNode> omxNode;
standardCompClass compClass;
+ bool isSecure;
bool disableTest;
protected:
// Random Index used for monkey testing while get/set parameters
#define RANDOM_INDEX 1729
+void initPortMode(PortMode* pm, bool isSecure,
+ ComponentHidlTest::standardCompClass compClass) {
+ pm[0] = PortMode::PRESET_BYTE_BUFFER;
+ pm[1] = PortMode::PRESET_BYTE_BUFFER;
+ if (isSecure) {
+ switch (compClass) {
+ case ComponentHidlTest::video_decoder:
+ pm[0] = PortMode::PRESET_SECURE_BUFFER;
+ break;
+ case ComponentHidlTest::video_encoder:
+ pm[1] = PortMode::PRESET_SECURE_BUFFER;
+ break;
+ default:
+ break;
+ }
+ }
+ return;
+}
+
// get/set video component port format
Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
sp<IOmxNode> omxNode, OMX_U32 portIndex,
return status;
}
-// set component role
-Return<android::hardware::media::omx::V1_0::Status> setRole(
- sp<IOmxNode> omxNode, const char* role) {
- OMX_PARAM_COMPONENTROLETYPE params;
- strcpy((char*)params.cRole, role);
- return setParam(omxNode, OMX_IndexParamStandardComponentRole, ¶ms);
-}
-
// test dispatch message API call
TEST_F(ComponentHidlTest, dispatchMsg) {
description("test dispatch message API call");
Message msgin, msgout;
msgin.type = Message::Type::EVENT;
-
- // dispatch EOS event, normally this is by component when it receives a
- // EOS flag
- msgin.data.eventData.event = OMX_EventBufferFlag;
- msgin.data.eventData.data1 = 0U;
- msgin.data.eventData.data2 = (uint32_t)OMX_BUFFERFLAG_EOS;
- status = omxNode->dispatchMessage(msgin);
- ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- status = observer->dequeueMessage(&msgout, DEFAULT_TIMEOUT);
- ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
- ASSERT_EQ(msgout.type, msgin.type);
- ASSERT_EQ(msgout.data.eventData.event, msgin.data.eventData.event);
- ASSERT_EQ(msgout.data.eventData.data1, msgin.data.eventData.data1);
- ASSERT_EQ(msgout.data.eventData.data2, msgin.data.eventData.data2);
-
- // dispatch dataspace changed event
- msgin.data.eventData.event = OMX_EventDataSpaceChanged;
- msgin.data.eventData.data1 = 281149440U; // V0_BT601_625;
- msgin.data.eventData.data2 = 0x1111;
- msgin.data.eventData.data3 = 0x24; // RAW_OPAQUE
+ msgin.data.eventData.event = OMX_EventError;
+ msgin.data.eventData.data1 = 0xdeaf;
+ msgin.data.eventData.data2 = 0xd00d;
+ msgin.data.eventData.data3 = 0x01ce;
+ msgin.data.eventData.data4 = 0xfa11;
status = omxNode->dispatchMessage(msgin);
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
status = observer->dequeueMessage(&msgout, DEFAULT_TIMEOUT);
- ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
- ASSERT_EQ(msgout.type, msgin.type);
- ASSERT_EQ(msgout.data.eventData.event, msgin.data.eventData.event);
- ASSERT_EQ(msgout.data.eventData.data1, msgin.data.eventData.data1);
- ASSERT_EQ(msgout.data.eventData.data2, msgin.data.eventData.data2);
+ EXPECT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
+ EXPECT_EQ(msgout.type, msgin.type);
+ EXPECT_EQ(msgout.data.eventData.event, msgin.data.eventData.event);
+ EXPECT_EQ(msgout.data.eventData.data1, msgin.data.eventData.data1);
+ EXPECT_EQ(msgout.data.eventData.data2, msgin.data.eventData.data2);
+ EXPECT_EQ(msgout.data.eventData.data3, msgin.data.eventData.data3);
+ EXPECT_EQ(msgout.data.eventData.data4, msgin.data.eventData.data4);
}
// set component role
}
// port indices enumeration
-TEST_F(ComponentHidlTest, GetPortIndices) {
+TEST_F(ComponentHidlTest, DISABLED_GetPortIndices) {
description("Test Component on Mandatory Port Parameters (Port Indices)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
}
// port format enumeration
-TEST_F(ComponentHidlTest, EnumeratePortFormat) {
+TEST_F(ComponentHidlTest, DISABLED_EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
}
// get/set default port settings of a component
-TEST_F(ComponentHidlTest, SetDefaultPortParams) {
+TEST_F(ComponentHidlTest, DISABLED_SetDefaultPortParams) {
description(
"Test Component on Mandatory Port Parameters (Port Definition)");
if (disableTest) return;
kPortIndexOutput = kPortIndexInput + 1;
}
- // r/w default i/o port parameters
- OMX_PARAM_PORTDEFINITIONTYPE iPortDef;
- status = getPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexInput, &iPortDef);
- EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- if (status == android::hardware::media::omx::V1_0::Status::OK) {
- EXPECT_EQ(iPortDef.eDir, OMX_DirInput);
- EXPECT_EQ(iPortDef.bEnabled, OMX_TRUE);
- EXPECT_EQ(iPortDef.bPopulated, OMX_FALSE);
- EXPECT_GE(iPortDef.nBufferCountMin, 1U);
- EXPECT_GE(iPortDef.nBufferCountActual, iPortDef.nBufferCountMin);
- if (compClass == audio_encoder || compClass == audio_decoder) {
- EXPECT_EQ(iPortDef.eDomain, OMX_PortDomainAudio);
- if (compClass == audio_decoder) {
- iPortDef.format.audio.bFlagErrorConcealment = OMX_TRUE;
- status = setPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexInput, &iPortDef);
+ for (size_t i = kPortIndexInput; i < kPortIndexOutput; i++) {
+ OMX_PARAM_PORTDEFINITIONTYPE portDef;
+ status =
+ getPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ if (status == android::hardware::media::omx::V1_0::Status::OK) {
+ EXPECT_EQ(portDef.eDir, i - kPortIndexInput); // OMX_DirInput
+ EXPECT_EQ(portDef.bEnabled, OMX_TRUE);
+ EXPECT_EQ(portDef.bPopulated, OMX_FALSE);
+ EXPECT_GE(portDef.nBufferCountMin, 1U);
+ EXPECT_GE(portDef.nBufferCountActual, portDef.nBufferCountMin);
+ if (compClass == audio_encoder || compClass == audio_decoder) {
+ EXPECT_EQ(portDef.eDomain, OMX_PortDomainAudio);
+ } else if (compClass == video_encoder ||
+ compClass == video_decoder) {
+ EXPECT_EQ(portDef.eDomain, OMX_PortDomainVideo);
}
- } else if (compClass == video_encoder || compClass == video_decoder) {
- EXPECT_EQ(iPortDef.eDomain, OMX_PortDomainVideo);
- if (compClass == video_decoder) {
- iPortDef.format.video.bFlagErrorConcealment = OMX_TRUE;
- status = setPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexInput, &iPortDef);
+ OMX_PARAM_PORTDEFINITIONTYPE mirror = portDef;
+
+ // nBufferCountActual >= nBufferCountMin
+ portDef.nBufferCountActual = portDef.nBufferCountMin - 1;
+ status = setPortParam(omxNode, OMX_IndexParamPortDefinition, i,
+ &portDef);
+ EXPECT_NE(status,
+ ::android::hardware::media::omx::V1_0::Status::OK);
+
+ // Edit Read-Only fields.
+ portDef = mirror;
+ portDef.eDir = static_cast<OMX_DIRTYPE>(RANDOM_INDEX);
+ setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ getPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ EXPECT_EQ(portDef.eDir, mirror.eDir);
+ setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &mirror);
+
+ portDef = mirror;
+ portDef.nBufferSize >>= 1;
+ setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ getPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ EXPECT_EQ(portDef.nBufferSize, mirror.nBufferSize);
+ setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &mirror);
+
+ portDef = mirror;
+ portDef.nBufferCountMin += 1;
+ setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ getPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ EXPECT_EQ(portDef.nBufferCountMin, mirror.nBufferCountMin);
+ setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &mirror);
+
+ portDef = mirror;
+ portDef.nBufferCountActual += 1;
+ status = setPortParam(omxNode, OMX_IndexParamPortDefinition, i,
+ &portDef);
+ if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
+ status = getPortParam(omxNode, OMX_IndexParamPortDefinition, i,
+ &portDef);
+ EXPECT_EQ(portDef.nBufferCountActual,
+ mirror.nBufferCountActual + 1);
}
- }
- EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- OMX_PARAM_PORTDEFINITIONTYPE dummy = iPortDef;
- iPortDef.nBufferCountActual = iPortDef.nBufferCountMin - 1;
- status = setPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexInput, &iPortDef);
- EXPECT_NE(status, ::android::hardware::media::omx::V1_0::Status::OK);
- // Edit Read-Only fields.
- iPortDef.eDir = OMX_DirOutput; // Read Only field
- iPortDef.nBufferCountActual = dummy.nBufferCountActual << 1;
- iPortDef.nBufferCountMin = dummy.nBufferCountMin
- << 1; // Read Only field
- iPortDef.nBufferSize = dummy.nBufferSize << 1; // Read Only field
- status = setPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexInput, &iPortDef);
- EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- status = getPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexInput, &iPortDef);
- EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- EXPECT_EQ(iPortDef.nBufferCountActual, dummy.nBufferCountActual << 1);
- if ((iPortDef.eDir != OMX_DirInput) ||
- (iPortDef.nBufferCountMin != dummy.nBufferCountMin) ||
- (iPortDef.nBufferSize != dummy.nBufferSize)) {
- std::cerr << "[ ] Warning ! Component input port does not "
- "preserve Read-Only fields \n";
- }
- }
- OMX_PARAM_PORTDEFINITIONTYPE oPortDef;
- status = getPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexOutput, &oPortDef);
- EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
- EXPECT_EQ(oPortDef.eDir, OMX_DirOutput);
- EXPECT_EQ(oPortDef.bEnabled, OMX_TRUE);
- EXPECT_EQ(oPortDef.bPopulated, OMX_FALSE);
- EXPECT_GE(oPortDef.nBufferCountMin, 1U);
- EXPECT_GE(oPortDef.nBufferCountActual, oPortDef.nBufferCountMin);
- if (compClass == audio_encoder || compClass == audio_decoder) {
- EXPECT_EQ(oPortDef.eDomain, OMX_PortDomainAudio);
- if (compClass == audio_encoder) {
- oPortDef.format.audio.bFlagErrorConcealment = OMX_TRUE;
- status = setPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexOutput, &oPortDef);
- }
- } else if (compClass == video_encoder || compClass == video_decoder) {
- EXPECT_EQ(oPortDef.eDomain, OMX_PortDomainVideo);
- if (compClass == video_encoder) {
- oPortDef.format.video.bFlagErrorConcealment = OMX_TRUE;
- status = setPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexOutput, &oPortDef);
+ portDef = mirror;
+ portDef.nBufferSize = mirror.nBufferSize << 1;
+ status = setPortParam(omxNode, OMX_IndexParamPortDefinition, i,
+ &portDef);
+ if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
+ status = getPortParam(omxNode, OMX_IndexParamPortDefinition, i,
+ &portDef);
+ if (portDef.nBufferSize != mirror.nBufferSize) {
+ std::cout
+ << "[ ] Warning ! Component input port does "
+ "not preserve Read-Only fields \n";
+ }
}
}
- EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- OMX_PARAM_PORTDEFINITIONTYPE dummy = oPortDef;
- oPortDef.nBufferCountActual = oPortDef.nBufferCountMin - 1;
- status = setPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexOutput, &oPortDef);
- EXPECT_NE(status, ::android::hardware::media::omx::V1_0::Status::OK);
- // Edit Read-Only fields.
- oPortDef.eDir = OMX_DirInput; // Read Only field
- oPortDef.nBufferCountActual = dummy.nBufferCountActual << 1;
- oPortDef.nBufferCountMin = dummy.nBufferCountMin
- << 1; // Read Only field
- oPortDef.nBufferSize = dummy.nBufferSize << 1; // Read Only field
- status = setPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexOutput, &oPortDef);
- EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- status = getPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexOutput, &oPortDef);
- EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- EXPECT_EQ(oPortDef.nBufferCountActual, dummy.nBufferCountActual << 1);
- if ((oPortDef.eDir != OMX_DirOutput) ||
- (oPortDef.nBufferCountMin != dummy.nBufferCountMin) ||
- (oPortDef.nBufferSize != dummy.nBufferSize)) {
- std::cerr << "[ ] Warning ! Component output port does "
- "not preserve Read-Only fields \n";
- }
}
}
// populate port test
-TEST_F(ComponentHidlTest, PopulatePort) {
+TEST_F(ComponentHidlTest, DISABLED_PopulatePort) {
description("Verify bPopulated field of a component port");
- if (disableTest) return;
+ if (disableTest || isSecure) return;
android::hardware::media::omx::V1_0::Status status;
OMX_U32 portBase = 0;
android::Vector<BufferInfo> iBuffer, oBuffer;
+ // set port mode
+ PortMode portMode[2];
+ initPortMode(portMode, isSecure, compClass);
+ status = omxNode->setPortMode(kPortIndexInput, portMode[0]);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ status = omxNode->setPortMode(kPortIndexOutput, portMode[1]);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
- kPortIndexInput, kPortIndexOutput);
+ kPortIndexInput, kPortIndexOutput, portMode);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
// dispatch buffers
for (size_t i = 0; i < oBuffer.size(); i++) {
- dispatchOutputBuffer(omxNode, &oBuffer, i);
+ dispatchOutputBuffer(omxNode, &oBuffer, i, portMode[1]);
}
// flush port
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput);
+ // TODO: Sending empty input buffers is slightly tricky.
+ // Components sometimes process input buffers even when output buffers are
+ // not dispatched. For instance Parsing sequence header does not require
+ // output buffers. In such instances sending 0 size input buffers might
+ // make component to send error events. so lets skip this aspect of testing.
// dispatch buffers
- for (size_t i = 0; i < iBuffer.size(); i++) {
- dispatchInputBuffer(omxNode, &iBuffer, i, 0, 0, 0);
- }
- // flush ports
- flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
- kPortIndexOutput);
+ // for (size_t i = 0; i < iBuffer.size(); i++) {
+ // dispatchInputBuffer(omxNode, &iBuffer, i, 0, 0, 0, portMode[0]);
+ // }
+ // // flush ports
+ // flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
+ // kPortIndexOutput);
// set state to idle
changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
// set state to loaded
android::Vector<BufferInfo> iBuffer, oBuffer;
+ // set port mode
+ PortMode portMode[2];
+ initPortMode(portMode, isSecure, compClass);
+ status = omxNode->setPortMode(kPortIndexInput, portMode[0]);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ status = omxNode->setPortMode(kPortIndexOutput, portMode[1]);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
- kPortIndexInput, kPortIndexOutput);
+ kPortIndexInput, kPortIndexOutput, portMode);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
// dispatch buffers
for (size_t i = 0; i < oBuffer.size(); i++) {
- dispatchOutputBuffer(omxNode, &oBuffer, i);
- }
- // set state to idle
- changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
- // set state to executing
- changeStateIdletoExecute(omxNode, observer);
- // dispatch buffers
- for (size_t i = 0; i < iBuffer.size(); i++) {
- dispatchInputBuffer(omxNode, &iBuffer, i, 0, 0, 0);
+ dispatchOutputBuffer(omxNode, &oBuffer, i, portMode[1]);
}
// set state to idle
changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
+ // // set state to executing
+ // changeStateIdletoExecute(omxNode, observer);
+ // // TODO: Sending empty input buffers is slightly tricky.
+ // // dispatch buffers
+ // for (size_t i = 0; i < iBuffer.size(); i++) {
+ // dispatchInputBuffer(omxNode, &iBuffer, i, 0, 0, 0, portMode[0]);
+ // }
+ // // set state to idle
+ // changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
// set state to loaded
changeStateIdletoLoaded(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput);
}
// state transitions test - monkeying
-TEST_F(ComponentHidlTest, StateTransitions_M) {
+TEST_F(ComponentHidlTest, DISABLED_StateTransitions_M) {
description("Test State Transitions monkeying");
- if (disableTest) return;
+ if (disableTest || isSecure) return;
android::hardware::media::omx::V1_0::Status status;
uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
Message msg;
}
// port enable disable test
-TEST_F(ComponentHidlTest, PortEnableDisable_Loaded) {
+TEST_F(ComponentHidlTest, DISABLED_PortEnableDisable_Loaded) {
description("Test Port Enable and Disable (Component State :: Loaded)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
// Component State :: Idle
android::Vector<BufferInfo> pBuffer[2];
+ // set port mode
+ PortMode portMode[2];
+ initPortMode(portMode, isSecure, compClass);
+ status = omxNode->setPortMode(kPortIndexInput, portMode[0]);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ status = omxNode->setPortMode(kPortIndexOutput, portMode[1]);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &pBuffer[0], &pBuffer[1],
- kPortIndexInput, kPortIndexOutput);
+ kPortIndexInput, kPortIndexOutput, portMode);
for (size_t i = portBase; i < portBase + 2; i++) {
status =
ASSERT_EQ(status,
android::hardware::media::omx::V1_0::Status::TIMED_OUT);
- allocatePortBuffers(omxNode, &pBuffer[i - portBase], i);
+ allocatePortBuffers(omxNode, &pBuffer[i - portBase], i,
+ portMode[i - portBase]);
status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT,
&pBuffer[0], &pBuffer[1]);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
// Component State :: Idle
android::Vector<BufferInfo> pBuffer[2];
+ // set port mode
+ PortMode portMode[2];
+ initPortMode(portMode, isSecure, compClass);
+ status = omxNode->setPortMode(kPortIndexInput, portMode[0]);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ status = omxNode->setPortMode(kPortIndexOutput, portMode[1]);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &pBuffer[0], &pBuffer[1],
- kPortIndexInput, kPortIndexOutput);
+ kPortIndexInput, kPortIndexOutput, portMode);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
// dispatch buffers
for (size_t i = 0; i < pBuffer[1].size(); i++) {
- dispatchOutputBuffer(omxNode, &pBuffer[1], i);
+ dispatchOutputBuffer(omxNode, &pBuffer[1], i, portMode[1]);
}
for (size_t i = portBase; i < portBase + 2; i++) {
ASSERT_EQ(status,
android::hardware::media::omx::V1_0::Status::TIMED_OUT);
- allocatePortBuffers(omxNode, &pBuffer[i - portBase], i);
+ allocatePortBuffers(omxNode, &pBuffer[i - portBase], i,
+ portMode[i - portBase]);
status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT,
&pBuffer[0], &pBuffer[1]);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
}
// port enable disable test - monkeying
-TEST_F(ComponentHidlTest, PortEnableDisable_M) {
+TEST_F(ComponentHidlTest, DISABLED_PortEnableDisable_M) {
description(
"Test Port Enable and Disable Monkeying (Component State :: Loaded)");
- if (disableTest) return;
+ if (disableTest || isSecure) return;
android::hardware::media::omx::V1_0::Status status;
OMX_U32 portBase = 0;
Message msg;
"libhwbinder",
"libnativehelper",
"libutils",
+ "android.hidl.allocator@1.0",
+ "android.hidl.memory@1.0",
"android.hardware.media.omx@1.0",
],
static_libs: ["VtsHalHidlTargetTestBase"],
"-O0",
"-g",
],
+ include_dirs: [
+ "frameworks/native/include/media/openmax/",
+ "hardware/interfaces/media/omx/1.0/vts/functional/common",
+ ],
}
#define LOG_TAG "media_omx_hidl_master_test"
#include <android-base/logging.h>
-#include <VtsHalHidlTargetTestBase.h>
#include <android/hardware/media/omx/1.0/IOmx.h>
+#include <android/hardware/media/omx/1.0/IOmxNode.h>
+#include <android/hardware/media/omx/1.0/IOmxObserver.h>
#include <android/hardware/media/omx/1.0/IOmxStore.h>
#include <android/hardware/media/omx/1.0/types.h>
-#include <getopt.h>
-#include <log/log.h>
+#include <android/hidl/allocator/1.0/IAllocator.h>
+#include <android/hidl/memory/1.0/IMapper.h>
+#include <android/hidl/memory/1.0/IMemory.h>
-using ::android::hardware::media::omx::V1_0::IOmxStore;
using ::android::hardware::media::omx::V1_0::IOmx;
+using ::android::hardware::media::omx::V1_0::IOmxObserver;
+using ::android::hardware::media::omx::V1_0::IOmxNode;
+using ::android::hardware::media::omx::V1_0::IOmxStore;
+using ::android::hardware::media::omx::V1_0::Message;
+using ::android::hardware::media::omx::V1_0::CodecBuffer;
+using ::android::hardware::media::omx::V1_0::PortMode;
+using ::android::hidl::allocator::V1_0::IAllocator;
+using ::android::hidl::memory::V1_0::IMemory;
+using ::android::hidl::memory::V1_0::IMapper;
using ::android::hardware::Return;
using ::android::hardware::Void;
using ::android::hardware::hidl_vec;
using ::android::hardware::hidl_string;
using ::android::sp;
+#include <VtsHalHidlTargetTestBase.h>
+#include <getopt.h>
+#include <media_hidl_test_common.h>
+
// A class for test environment setup
class ComponentTestEnvironment : public ::testing::Environment {
public:
attributes = _nl;
})
.isOk());
- if (attributes.size() == 0)
- std::cerr << "[ ] Warning ! Attribute list empty \n";
+ if (attributes.size() == 0) ALOGV("Warning, Attribute list empty");
}
// get node prefix
hidl_string prefix;
omxStore->getNodePrefix(
[&prefix](hidl_string const& _nl) { prefix = _nl; });
- if (prefix.empty())
- std::cerr << "[ ] Warning ! Node Prefix empty \n";
+ if (prefix.empty()) ALOGV("Warning, Node Prefix empty");
}
// list roles
omxStore->listRoles([&roleList](hidl_vec<IOmxStore::RoleInfo> const& _nl) {
roleList = _nl;
});
- if (roleList.size() == 0)
- std::cerr << "[ ] Warning ! RoleInfo list empty \n";
+ if (roleList.size() == 0) ALOGV("Warning, RoleInfo list empty");
}
-// list components and roles
+// list components and roles.
TEST_F(MasterHidlTest, ListNodes) {
description("enumerate component and roles");
android::hardware::media::omx::V1_0::Status status;
hidl_vec<IOmx::ComponentInfo> nodeList;
+ bool isPass = true;
EXPECT_TRUE(
omx->listNodes([&status, &nodeList](
android::hardware::media::omx::V1_0::Status _s,
})
.isOk());
if (nodeList.size() == 0)
- std::cerr << "[ ] Warning ! ComponentInfo list empty \n";
- else
- displayComponentInfo(nodeList);
+ ALOGV("Warning, ComponentInfo list empty");
+ else {
+ // displayComponentInfo(nodeList);
+ for (size_t i = 0; i < nodeList.size(); i++) {
+ sp<CodecObserver> observer = nullptr;
+ sp<IOmxNode> omxNode = nullptr;
+ observer = new CodecObserver(nullptr);
+ ASSERT_NE(observer, nullptr);
+ EXPECT_TRUE(
+ omx->allocateNode(
+ nodeList[i].mName, observer,
+ [&](android::hardware::media::omx::V1_0::Status _s,
+ sp<IOmxNode> const& _nl) {
+ status = _s;
+ omxNode = _nl;
+ })
+ .isOk());
+ if (omxNode == nullptr) {
+ isPass = false;
+ std::cerr << "[ !OK ] " << nodeList[i].mName.c_str()
+ << "\n";
+ } else {
+ EXPECT_TRUE((omxNode->freeNode()).isOk());
+ omxNode = nullptr;
+ // std::cout << "[ OK ] " << nodeList[i].mName.c_str() <<
+ // "\n";
+ }
+ }
+ }
+ EXPECT_TRUE(isPass);
}
int main(int argc, char** argv) {
isSecure = false;
size_t suffixLen = strlen(".secure");
if (strlen(gEnv->getComponent().c_str()) >= suffixLen) {
+ isSecure =
+ !strcmp(gEnv->getComponent().c_str() +
+ strlen(gEnv->getComponent().c_str()) - suffixLen,
+ ".secure");
}
- isSecure = !strcmp(gEnv->getComponent().c_str() +
- strlen(gEnv->getComponent().c_str()) - suffixLen,
- ".secure");
if (isSecure) disableTest = true;
if (disableTest) std::cout << "[ ] Warning ! Test Disabled\n";
}
eleInfo.close();
// set port mode
- if (isSecure) {
- portMode[0] = PortMode::PRESET_SECURE_BUFFER;
- portMode[1] = PortMode::DYNAMIC_ANW_BUFFER;
- status = omxNode->setPortMode(kPortIndexInput, portMode[0]);
- ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ portMode[0] = PortMode::PRESET_BYTE_BUFFER;
+ portMode[1] = PortMode::DYNAMIC_ANW_BUFFER;
+ status = omxNode->setPortMode(kPortIndexInput, portMode[0]);
+ ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ status = omxNode->setPortMode(kPortIndexOutput, portMode[1]);
+ if (status != ::android::hardware::media::omx::V1_0::Status::OK) {
+ portMode[1] = PortMode::PRESET_BYTE_BUFFER;
status = omxNode->setPortMode(kPortIndexOutput, portMode[1]);
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- } else {
- portMode[0] = PortMode::PRESET_BYTE_BUFFER;
- portMode[1] = PortMode::DYNAMIC_ANW_BUFFER;
- status = omxNode->setPortMode(kPortIndexInput, portMode[0]);
- ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- status = omxNode->setPortMode(kPortIndexOutput, portMode[1]);
- if (status != ::android::hardware::media::omx::V1_0::Status::OK) {
- portMode[1] = PortMode::PRESET_BYTE_BUFFER;
- status = omxNode->setPortMode(kPortIndexOutput, portMode[1]);
- ASSERT_EQ(status,
- ::android::hardware::media::omx::V1_0::Status::OK);
- }
}
// set Port Params
ASSERT_EQ(eleStream.is_open(), true);
decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput, eleStream, &Info, 0, (int)Info.size(),
- portMode[1]);
+ portMode[1], false);
eleStream.close();
waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer,
kPortIndexInput, kPortIndexOutput, portMode[1]);
- testEOS(omxNode, observer, &iBuffer, &oBuffer, false, eosFlag, portMode);
+ testEOS(omxNode, observer, &iBuffer, &oBuffer, true, eosFlag, portMode);
flushPorts(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
kPortIndexOutput);
framesReceived = 0;
isSecure = false;
size_t suffixLen = strlen(".secure");
if (strlen(gEnv->getComponent().c_str()) >= suffixLen) {
+ isSecure =
+ !strcmp(gEnv->getComponent().c_str() +
+ strlen(gEnv->getComponent().c_str()) - suffixLen,
+ ".secure");
}
- isSecure = !strcmp(gEnv->getComponent().c_str() +
- strlen(gEnv->getComponent().c_str()) - suffixLen,
- ".secure");
if (isSecure) disableTest = true;
if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
}
rect.width = buffer->omxBuffer.attr.anwBuffer.width;
rect.height = buffer->omxBuffer.attr.anwBuffer.height;
- if (format == PixelFormat::YV12) {
+ if (format == PixelFormat::YV12 || format == PixelFormat::YCRCB_420_SP ||
+ format == PixelFormat::YCBCR_420_888) {
mapper->lockYCbCr(
buff, buffer->omxBuffer.attr.anwBuffer.usage, rect, fence,
[&](android::hardware::graphics::mapper::V2_0::Error _e,
if (error != android::hardware::graphics::mapper::V2_0::Error::NONE)
return 1;
- EXPECT_EQ(ycbcrLayout.chromaStep, 1U);
char* ipBuffer = static_cast<char*>(ycbcrLayout.y);
for (size_t y = rect.height; y > 0; --y) {
eleStream.read(ipBuffer, rect.width);
if (eleStream.gcount() != rect.width) return 1;
ipBuffer += ycbcrLayout.yStride;
}
+
+ if (format == PixelFormat::YV12)
+ EXPECT_EQ(ycbcrLayout.chromaStep, 1U);
+ else if (format == PixelFormat::YCRCB_420_SP)
+ EXPECT_EQ(ycbcrLayout.chromaStep, 2U);
+
ipBuffer = static_cast<char*>(ycbcrLayout.cb);
for (size_t y = rect.height >> 1; y > 0; --y) {
- eleStream.read(ipBuffer, rect.width >> 1);
- if (eleStream.gcount() != rect.width >> 1) return 1;
+ for (int32_t x = 0; x < (rect.width >> 1); ++x) {
+ eleStream.read(&ipBuffer[ycbcrLayout.chromaStep * x], 1);
+ if (eleStream.gcount() != 1) return 1;
+ }
ipBuffer += ycbcrLayout.cStride;
}
ipBuffer = static_cast<char*>(ycbcrLayout.cr);
for (size_t y = rect.height >> 1; y > 0; --y) {
- eleStream.read(ipBuffer, rect.width >> 1);
- if (eleStream.gcount() != rect.width >> 1) return 1;
+ for (int32_t x = 0; x < (rect.width >> 1); ++x) {
+ eleStream.read(&ipBuffer[ycbcrLayout.chromaStep * x], 1);
+ if (eleStream.gcount() != 1) return 1;
+ }
ipBuffer += ycbcrLayout.cStride;
}
if (error != android::hardware::graphics::mapper::V2_0::Error::NONE)
return 1;
- if (format == PixelFormat::YCBCR_420_888) {
- ycbcrLayout.chromaStep = 1;
- ycbcrLayout.yStride = buffer->omxBuffer.attr.anwBuffer.stride;
- ycbcrLayout.cStride = ycbcrLayout.yStride >> 1;
- ycbcrLayout.y = data;
- ycbcrLayout.cb = static_cast<char*>(ycbcrLayout.y) +
- (ycbcrLayout.yStride * rect.height);
- ycbcrLayout.cr = static_cast<char*>(ycbcrLayout.cb) +
- ((ycbcrLayout.yStride * rect.height) >> 2);
-
- char* ipBuffer = static_cast<char*>(ycbcrLayout.y);
- for (size_t y = rect.height; y > 0; --y) {
- eleStream.read(ipBuffer, rect.width);
- if (eleStream.gcount() != rect.width) return 1;
- ipBuffer += ycbcrLayout.yStride;
- }
- ipBuffer = static_cast<char*>(ycbcrLayout.cb);
- for (size_t y = rect.height >> 1; y > 0; --y) {
- eleStream.read(ipBuffer, rect.width >> 1);
- if (eleStream.gcount() != rect.width >> 1) return 1;
- ipBuffer += ycbcrLayout.cStride;
- }
- ipBuffer = static_cast<char*>(ycbcrLayout.cr);
- for (size_t y = rect.height >> 1; y > 0; --y) {
- eleStream.read(ipBuffer, rect.width >> 1);
- if (eleStream.gcount() != rect.width >> 1) return 1;
- ipBuffer += ycbcrLayout.cStride;
- }
- } else if (format == PixelFormat::YCRCB_420_SP) {
- ycbcrLayout.chromaStep = 2;
- ycbcrLayout.yStride = buffer->omxBuffer.attr.anwBuffer.stride;
- ycbcrLayout.cStride = ycbcrLayout.yStride;
- ycbcrLayout.y = data;
- ycbcrLayout.cr = static_cast<char*>(ycbcrLayout.y) +
- (ycbcrLayout.yStride * rect.height);
- ycbcrLayout.cb = static_cast<char*>(ycbcrLayout.cr) + 1;
-
- char* ipBuffer = static_cast<char*>(ycbcrLayout.y);
- for (size_t y = rect.height; y > 0; --y) {
- eleStream.read(ipBuffer, rect.width);
- if (eleStream.gcount() != rect.width) return 1;
- ipBuffer += ycbcrLayout.yStride;
- }
- ipBuffer = static_cast<char*>(ycbcrLayout.cb);
- for (size_t y = rect.height >> 1; y > 0; --y) {
- for (int32_t x = 0; x<rect.width>> 1; ++x) {
- eleStream.read(&ipBuffer[2 * x], 1);
- if (eleStream.gcount() != 1) return 1;
- }
- ipBuffer += ycbcrLayout.cStride;
- }
- ipBuffer = static_cast<char*>(ycbcrLayout.cr);
- for (size_t y = rect.height >> 1; y > 0; --y) {
- for (int32_t x = 0; x<rect.width>> 1; ++x) {
- eleStream.read(&ipBuffer[2 * x], 1);
- if (eleStream.gcount() != 1) return 1;
- }
- ipBuffer += ycbcrLayout.cStride;
- }
- } else if (format == PixelFormat::BGRA_8888) {
+ if (format == PixelFormat::BGRA_8888) {
char* ipBuffer = static_cast<char*>(data);
for (size_t y = rect.height; y > 0; --y) {
eleStream.read(ipBuffer, rect.width * 4);
// set port mode
PortMode portMode[2];
portMode[0] = portMode[1] = PortMode::PRESET_BYTE_BUFFER;
- if (isSecure && prependSPSPPS) portMode[1] = PortMode::PRESET_SECURE_BUFFER;
status = omxNode->setPortMode(kPortIndexInput, portMode[0]);
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
status = omxNode->setPortMode(kPortIndexOutput, portMode[1]);
return status;
}
-Return<android::hardware::media::omx::V1_0::Status> setRole(
- sp<IOmxNode> omxNode, const char* role) {
- OMX_PARAM_COMPONENTROLETYPE params;
- strcpy((char*)params.cRole, role);
- return setParam(omxNode, OMX_IndexParamStandardComponentRole, ¶ms);
-}
-
void enumerateProfileAndLevel(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile,
std::vector<int32_t>* arrLevel) {
OMX_VIDEO_CODINGTYPE eCompressionFormat, OMX_COLOR_FORMATTYPE eColorFormat,
OMX_U32 xFramerate);
-Return<android::hardware::media::omx::V1_0::Status> setRole(
- sp<IOmxNode> omxNode, const char* role);
-
void enumerateProfileAndLevel(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile,
std::vector<int32_t>* arrLevel);
19 128 0
8 128 0
-615 32 0
-557 32 13500
-311 32 33500
-329 32 53500
-341 32 73500
-370 32 93500
-359 32 113500
-344 32 133500
-335 32 153500
-334 32 173500
-327 32 193500
-330 32 213500
-328 32 233500
-328 32 253500
-343 32 273500
-358 32 293500
-341 32 313500
-326 32 333500
-333 32 353500
-333 32 373500
-402 32 393500
-338 32 413500
-327 32 433500
-334 32 453500
-329 32 473500
-318 32 493500
-322 32 513500
-323 32 533500
-320 32 553500
-325 32 573500
-328 32 593500
-325 32 613500
-304 32 633500
-304 32 653500
-303 32 673500
-299 32 693500
-296 32 713500
-305 32 733500
-307 32 753500
-308 32 773500
-310 32 793500
-331 32 813500
-332 32 833500
-323 32 853500
-310 32 873500
-311 32 893500
-316 32 913500
-308 32 933500
-321 32 953500
-320 32 973500
-310 32 993500
-304 32 1013500
-303 32 1033500
-301 32 1053500
-295 32 1073500
-302 32 1093500
-311 32 1113500
-322 32 1133500
-313 32 1153500
-315 32 1173500
-315 32 1193500
-315 32 1213500
-339 32 1233500
-336 32 1253500
-316 32 1273500
-321 32 1293500
-297 32 1313500
-295 32 1333500
-294 32 1353500
-297 32 1373500
-296 32 1393500
-295 32 1413500
-295 32 1433500
-294 32 1453500
-306 32 1473500
-303 32 1493500
-308 32 1513500
-302 32 1533500
-306 32 1553500
-302 32 1573500
-295 32 1593500
-293 32 1613500
-307 32 1633500
-313 32 1653500
-305 32 1673500
-308 32 1693500
-325 32 1713500
-312 32 1733500
-305 32 1753500
-301 32 1773500
-322 32 1793500
-319 32 1813500
-317 32 1833500
-317 32 1853500
-322 32 1873500
-302 32 1893500
-308 32 1913500
-305 32 1933500
-305 32 1953500
-300 32 1973500
-293 32 1993500
-300 32 2013500
-300 32 2033500
-294 32 2053500
-293 32 2073500
-295 32 2093500
-290 32 2113500
-303 32 2133500
-311 32 2153500
-431 32 2173500
-293 32 2193500
-302 32 2213500
-306 32 2233500
-297 32 2253500
-297 32 2273500
-301 32 2293500
-404 32 2313500
-299 32 2333500
-443 32 2353500
-296 32 2373500
-296 32 2393500
-306 32 2413500
-313 32 2433500
-314 32 2453500
-303 32 2473500
-306 32 2493500
-320 32 2513500
-311 32 2533500
-303 32 2553500
-316 32 2573500
-317 32 2593500
-300 32 2613500
-297 32 2633500
-306 32 2653500
-312 32 2673500
-319 32 2693500
-307 32 2713500
-309 32 2733500
-302 32 2753500
-306 32 2773500
-316 32 2793500
-300 32 2813500
-320 32 2833500
-312 32 2853500
-324 32 2873500
-319 32 2893500
-313 32 2913500
-314 32 2933500
-316 32 2953500
-310 32 2973500
-301 32 2993500
-313 32 3013500
-303 32 3033500
-298 32 3053500
-292 32 3073500
-288 32 3093500
-294 32 3113500
-296 32 3133500
-296 32 3153500
-294 32 3173500
-299 32 3193500
-303 32 3213500
-294 32 3233500
-301 32 3253500
-321 32 3273500
-310 32 3293500
-314 32 3313500
-298 32 3333500
-300 32 3353500
-302 32 3373500
-297 32 3393500
-298 32 3413500
-293 32 3433500
-304 32 3453500
-304 32 3473500
-311 32 3493500
-310 32 3513500
-322 32 3533500
-340 32 3553500
-330 32 3573500
-329 32 3593500
-318 32 3613500
-309 32 3633500
-306 32 3653500
-313 32 3673500
-314 32 3693500
-303 32 3713500
-297 32 3733500
-296 32 3753500
-292 32 3773500
-291 32 3793500
-291 32 3813500
-291 32 3833500
-299 32 3853500
-295 32 3873500
-302 32 3893500
-305 32 3913500
-301 32 3933500
-311 32 3953500
-317 32 3973500
-314 32 3993500
-310 32 4013500
-378 32 4033500
-310 32 4053500
-301 32 4073500
-353 32 4093500
-289 32 4113500
-294 32 4133500
-297 32 4153500
-294 32 4173500
-296 32 4193500
-305 32 4213500
-303 32 4233500
-317 32 4253500
-359 32 4273500
-314 32 4293500
-323 32 4313500
-319 32 4333500
-330 32 4353500
-326 32 4373500
-305 32 4393500
-300 32 4413500
-298 32 4433500
-297 32 4453500
-293 32 4473500
-296 32 4493500
-303 32 4513500
-318 32 4533500
-306 32 4553500
-295 32 4573500
-294 32 4593500
-468 32 4613500
-291 32 4633500
-295 32 4653500
-292 32 4673500
-296 32 4693500
-291 32 4713500
-290 32 4733500
-299 32 4753500
-291 32 4773500
-297 32 4793500
-304 32 4813500
-306 32 4833500
-296 32 4853500
-286 32 4873500
-299 32 4893500
-294 32 4913500
-318 32 4933500
-328 32 4953500
-318 32 4973500
-319 32 4993500
-312 32 5013500
-298 32 5033500
-301 32 5053500
-296 32 5073500
-293 32 5093500
-293 32 5113500
-297 32 5133500
-296 32 5153500
-294 32 5173500
-294 32 5193500
-292 32 5213500
-296 32 5233500
-291 32 5253500
-294 32 5273500
-297 32 5293500
-304 32 5313500
-295 32 5333500
-290 32 5353500
-294 32 5373500
-293 32 5393500
-294 32 5413500
-294 32 5433500
-293 32 5453500
-289 32 5473500
-293 32 5493500
-295 32 5513500
-295 32 5533500
-286 32 5553500
-292 32 5573500
-288 32 5593500
-292 32 5613500
-296 32 5633500
-288 32 5653500
-294 32 5673500
-294 32 5693500
-293 32 5713500
-291 32 5733500
-293 32 5753500
-303 32 5773500
-306 32 5793500
-307 32 5813500
-302 32 5833500
-294 32 5853500
-297 32 5873500
-297 32 5893500
-302 32 5913500
-299 32 5933500
-302 32 5953500
-297 32 5973500
-299 32 5993500
-305 32 6013500
-307 32 6033500
-310 32 6053500
-310 32 6073500
-315 32 6093500
-306 32 6113500
-305 32 6133500
-304 32 6153500
-307 32 6173500
-306 32 6193500
-297 32 6213500
-298 32 6233500
-293 32 6253500
-293 32 6273500
-296 32 6293500
-305 32 6313500
-299 32 6333500
-298 32 6353500
-305 32 6373500
-291 32 6393500
-296 32 6413500
-296 32 6433500
-303 32 6453500
-298 32 6473500
-328 32 6493500
-322 32 6513500
-323 32 6533500
-319 32 6553500
-331 32 6573500
-332 32 6593500
-333 32 6613500
-325 32 6633500
-334 32 6653500
-333 32 6673500
-329 32 6693500
-325 32 6713500
-321 32 6733500
-460 32 6753500
-322 32 6773500
-313 32 6793500
-303 32 6813500
-307 32 6833500
-302 32 6853500
-298 32 6873500
-294 32 6893500
-296 32 6913500
-288 32 6933500
-286 32 6953500
-404 32 6973500
-408 32 6993500
-316 32 7013500
-336 32 7033500
-326 32 7053500
-333 32 7073500
-324 32 7093500
-330 32 7113500
-315 32 7133500
-318 32 7153500
-323 32 7173500
-304 32 7193500
-302 32 7213500
-310 32 7233500
-329 32 7253500
-324 32 7273500
-332 32 7293500
-474 32 7313500
-347 32 7333500
-351 32 7353500
-412 32 7373500
-326 32 7393500
-300 32 7413500
-308 32 7433500
-307 32 7453500
-299 32 7473500
-306 32 7493500
-450 32 7513500
-294 32 7533500
-348 32 7553500
-294 32 7573500
-289 32 7593500
-281 32 7613500
-293 32 7633500
-291 32 7653500
-341 32 7673500
-291 32 7693500
-298 32 7713500
-295 32 7733500
-298 32 7753500
-299 32 7773500
-332 32 7793500
-297 32 7813500
-302 32 7833500
-302 32 7853500
-316 32 7873500
-322 32 7893500
-327 32 7913500
-321 32 7933500
-315 32 7953500
-308 32 7973500
-323 32 7993500
-306 32 8013500
-319 32 8033500
-318 32 8053500
-319 32 8073500
-319 32 8093500
-323 32 8113500
-320 32 8133500
-311 32 8153500
-312 32 8173500
-307 32 8193500
-311 32 8213500
-318 32 8233500
-346 32 8253500
-348 32 8273500
-336 32 8293500
-334 32 8313500
-331 32 8333500
-340 32 8353500
-335 32 8373500
-319 32 8393500
-307 32 8413500
-304 32 8433500
-301 32 8453500
-311 32 8473500
-317 32 8493500
-325 32 8513500
-327 32 8533500
-335 32 8553500
-340 32 8573500
-320 32 8593500
-333 32 8613500
-328 32 8633500
-312 32 8653500
-304 32 8673500
-337 32 8693500
-334 32 8713500
-333 32 8733500
-327 32 8753500
-328 32 8773500
-340 32 8793500
-478 32 8813500
-331 32 8833500
-328 32 8853500
-320 32 8873500
-315 32 8893500
-321 32 8913500
-324 32 8933500
-325 32 8953500
-323 32 8973500
-324 32 8993500
-336 32 9013500
-340 32 9033500
-333 32 9053500
-339 32 9073500
-490 32 9093500
-480 32 9113500
-329 32 9133500
-327 32 9153500
-341 32 9173500
-338 32 9193500
-337 32 9213500
-337 32 9233500
-328 32 9253500
-322 32 9273500
-324 32 9293500
-349 32 9313500
-350 32 9333500
-337 32 9353500
-342 32 9373500
-334 32 9393500
-324 32 9413500
-320 32 9433500
-329 32 9453500
-333 32 9473500
-328 32 9493500
-335 32 9513500
-322 32 9533500
-323 32 9553500
-330 32 9573500
-320 32 9593500
-313 32 9613500
-526 32 9633500
-306 32 9653500
-300 32 9673500
-299 32 9693500
-300 32 9713500
-299 32 9733500
-299 32 9753500
-295 32 9773500
-293 32 9793500
-297 32 9813500
-306 32 9833500
-300 32 9853500
-438 32 9873500
-291 32 9893500
-448 32 9913500
-504 32 9933500
+8 128 0
+618 32 0
+398 32 21000
+582 32 41000
+466 32 61000
+434 32 81000
+419 32 101000
+578 32 121000
+591 32 141000
+293 32 161000
+323 32 181000
+303 32 201000
+319 32 221000
+318 32 241000
+307 32 261000
+539 32 281000
+358 32 301000
+334 32 321000
+308 32 341000
+331 32 361000
+327 32 381000
+357 32 401000
+365 32 421000
+375 32 441000
+370 32 461000
+636 32 481000
+497 32 501000
+360 32 521000
+327 32 541000
+438 32 561000
+323 32 581000
+323 32 601000
+308 32 621000
+313 32 641000
+326 32 661000
+329 32 681000
+324 32 701000
+326 32 721000
+332 32 741000
+336 32 761000
+345 32 781000
+352 32 801000
+380 32 821000
+341 32 841000
+341 32 861000
+347 32 881000
+352 32 901000
+339 32 921000
+366 32 941000
+369 32 961000
+367 32 981000
+342 32 1001000
+344 32 1021000
+339 32 1041000
+312 32 1061000
+306 32 1081000
+307 32 1101000
+308 32 1121000
+319 32 1141000
+297 32 1161000
+294 32 1181000
+298 32 1201000
+474 32 1221000
+424 32 1241000
+278 32 1261000
+290 32 1281000
+281 32 1301000
+295 32 1321000
+277 32 1341000
+305 32 1361000
+293 32 1381000
+284 32 1401000
+296 32 1421000
+298 32 1441000
+316 32 1461000
+302 32 1481000
+300 32 1501000
+283 32 1521000
+604 32 1541000
+474 32 1561000
+277 32 1581000
+285 32 1601000
+278 32 1621000
+295 32 1641000
+301 32 1661000
+317 32 1681000
+301 32 1701000
+594 32 1721000
+296 32 1741000
+374 32 1761000
+301 32 1781000
+296 32 1801000
+300 32 1821000
+285 32 1841000
+308 32 1861000
+304 32 1881000
+286 32 1901000
+294 32 1921000
+300 32 1941000
+324 32 1961000
+315 32 1981000
+326 32 2001000
+311 32 2021000
+300 32 2041000
+304 32 2061000
+307 32 2081000
+304 32 2101000
+301 32 2121000
+296 32 2141000
+299 32 2161000
+298 32 2181000
+300 32 2201000
+300 32 2221000
+303 32 2241000
+303 32 2261000
+303 32 2281000
+308 32 2301000
+304 32 2321000
+295 32 2341000
+300 32 2361000
+300 32 2381000
+293 32 2401000
+302 32 2421000
+548 32 2441000
+338 32 2461000
+311 32 2481000
+304 32 2501000
+304 32 2521000
+299 32 2541000
+298 32 2561000
+294 32 2581000
+298 32 2601000
+300 32 2621000
+301 32 2641000
+305 32 2661000
+309 32 2681000
+303 32 2701000
+313 32 2721000
+302 32 2741000
+304 32 2761000
+304 32 2781000
+304 32 2801000
+300 32 2821000
+434 32 2841000
+571 32 2861000
+386 32 2881000
+323 32 2901000
+415 32 2921000
+277 32 2941000
+401 32 2961000
+388 32 2981000
+337 32 3001000
+540 32 3021000
+516 32 3041000
+316 32 3061000
+301 32 3081000
+298 32 3101000
+302 32 3121000
+301 32 3141000
+299 32 3161000
+295 32 3181000
+281 32 3201000
+296 32 3221000
+300 32 3241000
+295 32 3261000
+308 32 3281000
+296 32 3301000
+297 32 3321000
+276 32 3341000
+281 32 3361000
+291 32 3381000
+294 32 3401000
+281 32 3421000
+277 32 3441000
+274 32 3461000
+298 32 3481000
+293 32 3501000
+279 32 3521000
+275 32 3541000
+282 32 3561000
+289 32 3581000
+300 32 3601000
+289 32 3621000
+295 32 3641000
+301 32 3661000
+306 32 3681000
+301 32 3701000
+305 32 3721000
+296 32 3741000
+296 32 3761000
+377 32 3781000
+297 32 3801000
+293 32 3821000
+290 32 3841000
+298 32 3861000
+303 32 3881000
+304 32 3901000
+316 32 3921000
+298 32 3941000
+319 32 3961000
+330 32 3981000
+316 32 4001000
+316 32 4021000
+286 32 4041000
+272 32 4061000
+257 32 4081000
+240 32 4101000
+229 32 4121000
+223 32 4141000
+225 32 4161000
+223 32 4181000
+232 32 4201000
+234 32 4221000
+224 32 4241000
+351 32 4261000
+309 32 4281000
+350 32 4301000
+437 32 4321000
+277 32 4341000
+291 32 4361000
+271 32 4381000
+266 32 4401000
+264 32 4421000
+285 32 4441000
+280 32 4461000
+276 32 4481000
+278 32 4501000
+262 32 4521000
+262 32 4541000
+246 32 4561000
+253 32 4581000
+289 32 4601000
+264 32 4621000
+285 32 4641000
+278 32 4661000
+266 32 4681000
+275 32 4701000
+264 32 4721000
+264 32 4741000
+275 32 4761000
+268 32 4781000
+262 32 4801000
+266 32 4821000
+262 32 4841000
+246 32 4861000
+284 32 4881000
+291 32 4901000
+294 32 4921000
+294 32 4941000
+294 32 4961000
+296 32 4981000
+294 32 5001000
+300 32 5021000
+293 32 5041000
+298 32 5061000
+295 32 5081000
+301 32 5101000
+301 32 5121000
+302 32 5141000
+303 32 5161000
+300 32 5181000
+301 32 5201000
+302 32 5221000
+296 32 5241000
+297 32 5261000
+300 32 5281000
+295 32 5301000
+349 32 5321000
+351 32 5341000
+333 32 5361000
+267 32 5381000
+291 32 5401000
+270 32 5421000
+258 32 5441000
+266 32 5461000
+252 32 5481000
+251 32 5501000
+323 32 5521000
+398 32 5541000
+383 32 5561000
+295 32 5581000
+260 32 5601000
+413 32 5621000
+288 32 5641000
+299 32 5661000
+277 32 5681000
+295 32 5701000
+296 32 5721000
+305 32 5741000
+300 32 5761000
+305 32 5781000
+293 32 5801000
+305 32 5821000
+455 32 5841000
+302 32 5861000
+293 32 5881000
+289 32 5901000
+283 32 5921000
+289 32 5941000
+275 32 5961000
+279 32 5981000
+626 32 6001000
+335 32 6021000
+324 32 6041000
+331 32 6061000
+334 32 6081000
+322 32 6101000
+339 32 6121000
+339 32 6141000
+329 32 6161000
+339 32 6181000
+328 32 6201000
+330 32 6221000
+312 32 6241000
+527 32 6261000
+324 32 6281000
+322 32 6301000
+313 32 6321000
+306 32 6341000
+303 32 6361000
+304 32 6381000
+311 32 6401000
+302 32 6421000
+294 32 6441000
+296 32 6461000
+293 32 6481000
+297 32 6501000
+287 32 6521000
+300 32 6541000
+324 32 6561000
+304 32 6581000
+303 32 6601000
+303 32 6621000
+324 32 6641000
+340 32 6661000
+357 32 6681000
+355 32 6701000
+349 32 6721000
+358 32 6741000
+378 32 6761000
+591 32 6781000
+525 32 6801000
+378 32 6821000
+356 32 6841000
+353 32 6861000
+347 32 6881000
+334 32 6901000
+330 32 6921000
+334 32 6941000
+352 32 6961000
+344 32 6981000
+356 32 7001000
+356 32 7021000
+351 32 7041000
+346 32 7061000
+350 32 7081000
+366 32 7101000
+504 32 7121000
+360 32 7141000
+366 32 7161000
+369 32 7181000
+363 32 7201000
+345 32 7221000
+347 32 7241000
+338 32 7261000
+332 32 7281000
+318 32 7301000
+307 32 7321000
+302 32 7341000
+308 32 7361000
+317 32 7381000
+304 32 7401000
+313 32 7421000
+314 32 7441000
+302 32 7461000
+299 32 7481000
+300 32 7501000
+295 32 7521000
+296 32 7541000
+298 32 7561000
+601 32 7581000
+489 32 7601000
+303 32 7621000
+323 32 7641000
+304 32 7661000
+328 32 7681000
+332 32 7701000
+356 32 7721000
+356 32 7741000
+340 32 7761000
+333 32 7781000
+332 32 7801000
+321 32 7821000
+455 32 7841000
+328 32 7861000
+314 32 7881000
+310 32 7901000
+300 32 7921000
+327 32 7941000
+317 32 7961000
+309 32 7981000
+305 32 8001000
+299 32 8021000
+312 32 8041000
+309 32 8061000
+300 32 8081000
+319 32 8101000
+329 32 8121000
+323 32 8141000
+332 32 8161000
+340 32 8181000
+339 32 8201000
+319 32 8221000
+323 32 8241000
+320 32 8261000
+322 32 8281000
+314 32 8301000
+310 32 8321000
+300 32 8341000
+294 32 8361000
+324 32 8381000
+325 32 8401000
+305 32 8421000
+306 32 8441000
+298 32 8461000
+302 32 8481000
+298 32 8501000
+295 32 8521000
+294 32 8541000
+295 32 8561000
+288 32 8581000
+310 32 8601000
+301 32 8621000
+401 32 8641000
+324 32 8661000
+309 32 8681000
+294 32 8701000
+306 32 8721000
+318 32 8741000
+312 32 8761000
+325 32 8781000
+352 32 8801000
+351 32 8821000
+343 32 8841000
+377 32 8861000
+409 32 8881000
+424 32 8901000
+366 32 8921000
+341 32 8941000
+330 32 8961000
+342 32 8981000
+328 32 9001000
+333 32 9021000
+334 32 9041000
+340 32 9061000
+347 32 9081000
+354 32 9101000
+342 32 9121000
+323 32 9141000
+311 32 9161000
+297 32 9181000
+286 32 9201000
+290 32 9221000
+288 32 9241000
+291 32 9261000
+439 32 9281000
+278 32 9301000
+506 32 9321000
+441 32 9341000
+333 32 9361000
+416 32 9381000
+446 32 9401000
+219 32 9421000
+353 32 9441000
+307 32 9461000
+222 32 9481000
+221 32 9501000
+235 32 9521000
+294 32 9541000
+239 32 9561000
+251 32 9581000
+259 32 9601000
+263 32 9621000
+283 32 9641000
+423 32 9661000
+296 32 9681000
+299 32 9701000
+322 32 9721000
+296 32 9741000
+489 32 9761000
+481 32 9781000
+505 32 9801000
+292 32 9821000
+390 32 9841000
+279 32 9861000
+442 32 9881000
+426 32 9901000
+408 32 9921000
+272 32 9941000
+484 32 9961000
+443 32 9981000
+440 32 10001000
* RadioError:INTERNAL_ERR
* RadioError:SYSTEM_ERR
* RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_MODEM_STATE
*/
oneway sendDtmfResponse(RadioResponseInfo info);
* RadioError:INVALID_CALL_ID
* RadioError:SYSTEM_ERR
* RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_MODEM_STATE
*/
oneway startDtmfResponse(RadioResponseInfo info);
* RadioError:INTERNAL_ERR
* RadioError:INVALID_CALL_ID
* RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_MODEM_STATE
*/
oneway stopDtmfResponse(RadioResponseInfo info);
*
* Valid errors returned:
* RadioError:NONE
- * RadioError:SIM_FULL
* RadioError:INVALID_ARGUMENTS
* RadioError:NO_MEMORY
- * RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
* RadioError:MODEM_ERR
* RadioError:NO_SUCH_ENTRY
* RadioError:INTERNAL_ERR
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_MODEM_STATE
*/
oneway deleteSmsOnSimResponse(RadioResponseInfo info);
* RadioError:INVALID_CALL_ID
* RadioError:INVALID_STATE
* RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:MODE_NOT_SUPPORTED
*/
oneway sendBurstDtmfResponse(RadioResponseInfo info);
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:INVALID_ARGUMENTS
* RadioError:NO_MEMORY
- * RadioError:REQUEST_RATE_LIMITED
* RadioError:SYSTEM_ERR
* RadioError:MODEM_ERR
* RadioError:NO_SUCH_ENTRY
* RadioError:INTERNAL_ERR
* RadioError:REQUEST_NOT_SUPPORTED
- * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:INVALID_MODEM_STATE
*/
oneway deleteSmsOnRuimResponse(RadioResponseInfo info);
* Valid errors returned:
* RadioError:NONE
* RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:NO_MEMORY
+ * RadioError:INTERNAL_ERR
+ * RadioError:SYSTEM_ERR
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:MODEM_ERR
+ * RadioError:INVALID_MODEM_STATE
*/
oneway getImsRegistrationStateResponse(RadioResponseInfo info, bool isRegistered,
RadioTechnologyFamily ratFamily);
* RadioError:NONE
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:LCE_NOT_SUPPORTED
+ * RadioError:INTERNAL_ERR
*/
oneway pullLceDataResponse(RadioResponseInfo info, LceDataInfo lceInfo);
ASSERT_TRUE(CheckGeneralError() ||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
- radioRsp->rspInfo.error == RadioError::NONE);
+ radioRsp->rspInfo.error == RadioError::NONE ||
+ radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
}
}
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
- radioRsp->rspInfo.error == RadioError::NONE);
+ radioRsp->rspInfo.error == RadioError::NONE ||
+ radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
}
}
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
radioRsp->rspInfo.error == RadioError::NONE ||
- radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED);
+ radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED ||
+ radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
}
}
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
+ ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
+ radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
+ radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
}
}
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || CheckOEMError());
+ ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || CheckOEMError() ||
+ radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
}
}
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
- radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY);
+ radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY ||
+ radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
}
}
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- ASSERT_TRUE(CheckGeneralError());
+ ASSERT_TRUE(CheckGeneralError() ||
+ radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
+ radioRsp->rspInfo.error == RadioError::NONE ||
+ radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
+ radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY ||
+ radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
}
}
using ::android::hardware::Void;
using ::android::sp;
-#define TIMEOUT_PERIOD 65
+#define TIMEOUT_PERIOD 75
#define RADIO_SERVICE_NAME "slot1"
class RadioHidlTest;
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
- radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+ radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
+ radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
}
}
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
- radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+ radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
+ radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
}
}
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
- radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+ radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
+ radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
}
}
ASSERT_TRUE(CheckGeneralError() ||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
- radioRsp->rspInfo.error == RadioError::MODEM_ERR);
+ radioRsp->rspInfo.error == RadioError::MODEM_ERR ||
+ radioRsp->rspInfo.error == RadioError::MODE_NOT_SUPPORTED);
}
}
\ No newline at end of file
include $(BUILD_STATIC_JAVA_LIBRARY)
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.wifi-V1.0-java-constants
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/Constants.java
+$(GEN): $(HIDL)
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/IWifi.hal
+$(GEN): $(LOCAL_PATH)/IWifiApIface.hal
+$(GEN): $(LOCAL_PATH)/IWifiChip.hal
+$(GEN): $(LOCAL_PATH)/IWifiChipEventCallback.hal
+$(GEN): $(LOCAL_PATH)/IWifiEventCallback.hal
+$(GEN): $(LOCAL_PATH)/IWifiIface.hal
+$(GEN): $(LOCAL_PATH)/IWifiNanIface.hal
+$(GEN): $(LOCAL_PATH)/IWifiNanIfaceEventCallback.hal
+$(GEN): $(LOCAL_PATH)/IWifiP2pIface.hal
+$(GEN): $(LOCAL_PATH)/IWifiRttController.hal
+$(GEN): $(LOCAL_PATH)/IWifiRttControllerEventCallback.hal
+$(GEN): $(LOCAL_PATH)/IWifiStaIface.hal
+$(GEN): $(LOCAL_PATH)/IWifiStaIfaceEventCallback.hal
+
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava-constants \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.wifi@1.0
+
+$(GEN):
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+# Avoid dependency cycle of framework.jar -> this-library -> framework.jar
+LOCAL_NO_STANDARD_LIBRARIES := true
+LOCAL_JAVA_LIBRARIES := core-oj
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
include $(call all-makefiles-under,$(LOCAL_PATH))
legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK;
legacy_request->key_info.body.pmk_info.pmk_len =
hidl_request.baseConfigs.securityConfig.pmk.size();
- if (legacy_request->key_info.body.pmk_info.pmk_len > NAN_PMK_INFO_LEN) {
- LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: pmk_len too large";
+ if (legacy_request->key_info.body.pmk_info.pmk_len != NAN_PMK_INFO_LEN) {
+ LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: invalid pmk_len";
return false;
}
memcpy(legacy_request->key_info.body.pmk_info.pmk,
legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK;
legacy_request->key_info.body.pmk_info.pmk_len =
hidl_request.baseConfigs.securityConfig.pmk.size();
- if (legacy_request->key_info.body.pmk_info.pmk_len > NAN_PMK_INFO_LEN) {
- LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: pmk_len too large";
+ if (legacy_request->key_info.body.pmk_info.pmk_len != NAN_PMK_INFO_LEN) {
+ LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: invalid pmk_len";
return false;
}
memcpy(legacy_request->key_info.body.pmk_info.pmk,
if (hidl_request.securityConfig.securityType == NanDataPathSecurityType::PMK) {
legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK;
legacy_request->key_info.body.pmk_info.pmk_len = hidl_request.securityConfig.pmk.size();
- if (legacy_request->key_info.body.pmk_info.pmk_len > NAN_PMK_INFO_LEN) {
- LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: pmk_len too large";
+ if (legacy_request->key_info.body.pmk_info.pmk_len != NAN_PMK_INFO_LEN) {
+ LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: invalid pmk_len";
return false;
}
memcpy(legacy_request->key_info.body.pmk_info.pmk,
if (hidl_request.securityConfig.securityType == NanDataPathSecurityType::PMK) {
legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK;
legacy_request->key_info.body.pmk_info.pmk_len = hidl_request.securityConfig.pmk.size();
- if (legacy_request->key_info.body.pmk_info.pmk_len > NAN_PMK_INFO_LEN) {
- LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: pmk_len too large";
+ if (legacy_request->key_info.body.pmk_info.pmk_len != NAN_PMK_INFO_LEN) {
+ LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: invalid pmk_len";
return false;
}
memcpy(legacy_request->key_info.body.pmk_info.pmk,
/**
* Size limits for parameters used in the NAN interface.
*/
+@export
enum NanParamSizeLimits : uint32_t {
/** Minimum length of Passphrase argument for data-path configuration */
MIN_PASSPHRASE_LENGTH = 8,