Merge changes from topic 'xml-effects-conf'
* changes:
Add VTS test for validating audio effects config against XML schema
Can not specify an audio effect for the default stream
Configure audio effects libraries with relative path
Audio effect XSD: Give effect proxy its own tag
Revert "Revert of "Audio: Add XML schema for audio effects configuration""
diff --git a/bluetooth/1.0/default/async_fd_watcher.cc b/bluetooth/1.0/default/async_fd_watcher.cc
index bc0bc92..78676b2 100644
--- a/bluetooth/1.0/default/async_fd_watcher.cc
+++ b/bluetooth/1.0/default/async_fd_watcher.cc
@@ -24,7 +24,7 @@
#include <map>
#include <mutex>
#include <thread>
-#include <utils/Log.h>
+#include <log/log.h>
#include <vector>
#include "fcntl.h"
#include "sys/select.h"
diff --git a/bluetooth/1.0/default/bluetooth_address.cc b/bluetooth/1.0/default/bluetooth_address.cc
index 65dc6a6..fd53e78 100644
--- a/bluetooth/1.0/default/bluetooth_address.cc
+++ b/bluetooth/1.0/default/bluetooth_address.cc
@@ -19,6 +19,7 @@
#include <cutils/properties.h>
#include <errno.h>
#include <fcntl.h>
+#include <unistd.h>
#include <utils/Log.h>
namespace android {
diff --git a/bluetooth/1.0/default/h4_protocol.cc b/bluetooth/1.0/default/h4_protocol.cc
index 2008b00..054ed39 100644
--- a/bluetooth/1.0/default/h4_protocol.cc
+++ b/bluetooth/1.0/default/h4_protocol.cc
@@ -22,6 +22,7 @@
#include <fcntl.h>
#include <log/log.h>
#include <sys/uio.h>
+#include <unistd.h>
namespace android {
namespace hardware {
diff --git a/bluetooth/1.0/default/hci_packetizer.cc b/bluetooth/1.0/default/hci_packetizer.cc
index 2da1254..fde08ac 100644
--- a/bluetooth/1.0/default/hci_packetizer.cc
+++ b/bluetooth/1.0/default/hci_packetizer.cc
@@ -21,6 +21,7 @@
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
+#include <unistd.h>
#include <utils/Log.h>
namespace {
diff --git a/bluetooth/1.0/default/hci_protocol.cc b/bluetooth/1.0/default/hci_protocol.cc
index 5d6f1d1..bf94dfe 100644
--- a/bluetooth/1.0/default/hci_protocol.cc
+++ b/bluetooth/1.0/default/hci_protocol.cc
@@ -20,6 +20,7 @@
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
+#include <unistd.h>
#include <log/log.h>
namespace android {
diff --git a/camera/device/1.0/default/Android.bp b/camera/device/1.0/default/Android.bp
index 1a349d6..e0b31f0 100644
--- a/camera/device/1.0/default/Android.bp
+++ b/camera/device/1.0/default/Android.bp
@@ -26,6 +26,9 @@
static_libs: [
"android.hardware.camera.common@1.0-helper"
],
+ header_libs: [
+ "media_plugin_headers",
+ ],
include_dirs: [
"frameworks/native/include/media/openmax"
],
diff --git a/cas/1.0/default/Android.bp b/cas/1.0/default/Android.bp
index 953aa37..6da5cc4 100644
--- a/cas/1.0/default/Android.bp
+++ b/cas/1.0/default/Android.bp
@@ -32,4 +32,8 @@
"liblog",
"libutils",
],
+ header_libs: [
+ "libstagefright_foundation_headers",
+ "media_plugin_headers",
+ ],
}
diff --git a/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.cpp b/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.cpp
index 7240964..4c68219 100644
--- a/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.cpp
+++ b/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.cpp
@@ -46,47 +46,6 @@
#include <media_hidl_test_common.h>
#include <memory>
-Return<android::hardware::media::omx::V1_0::Status> setAudioPortFormat(
- sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_AUDIO_CODINGTYPE eEncoding) {
- OMX_U32 index = 0;
- OMX_AUDIO_PARAM_PORTFORMATTYPE portFormat;
- std::vector<OMX_AUDIO_CODINGTYPE> arrEncoding;
- android::hardware::media::omx::V1_0::Status status;
-
- while (1) {
- portFormat.nIndex = index;
- status = getPortParam(omxNode, OMX_IndexParamAudioPortFormat, portIndex,
- &portFormat);
- if (status != ::android::hardware::media::omx::V1_0::Status::OK) break;
- arrEncoding.push_back(portFormat.eEncoding);
- index++;
- if (index == 512) {
- // enumerated way too many formats, highly unusual for this to
- // happen.
- EXPECT_LE(index, 512U)
- << "Expecting OMX_ErrorNoMore but not received";
- break;
- }
- }
- if (!index) return status;
- for (index = 0; index < arrEncoding.size(); index++) {
- if (arrEncoding[index] == eEncoding) {
- portFormat.eEncoding = arrEncoding[index];
- break;
- }
- }
- if (index == arrEncoding.size()) {
- ALOGE("setting default Port format %x", (int)arrEncoding[0]);
- portFormat.eEncoding = arrEncoding[0];
- }
- // In setParam call nIndex shall be ignored as per omx-il specification.
- // see how this holds up by corrupting nIndex
- portFormat.nIndex = RANDOM_INDEX;
- status = setPortParam(omxNode, OMX_IndexParamAudioPortFormat, portIndex,
- &portFormat);
- return status;
-}
-
void enumerateProfile(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile) {
android::hardware::media::omx::V1_0::Status status;
diff --git a/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.h b/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.h
index 70142f2..b187d28 100644
--- a/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.h
+++ b/media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.h
@@ -20,16 +20,8 @@
#include <media_hidl_test_common.h>
/*
- * Random Index used for monkey testing while get/set parameters
- */
-#define RANDOM_INDEX 1729
-
-/*
* Common audio utils
*/
-Return<android::hardware::media::omx::V1_0::Status> setAudioPortFormat(
- sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_AUDIO_CODINGTYPE eEncoding);
-
void enumerateProfile(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile);
diff --git a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp
index e81e6dd..d30a75c 100755
--- a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp
+++ b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp
@@ -60,6 +60,113 @@
return setParam(omxNode, OMX_IndexParamStandardComponentRole, ¶ms);
}
+// get/set video component port format
+Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
+ sp<IOmxNode> omxNode, OMX_U32 portIndex,
+ OMX_VIDEO_CODINGTYPE eCompressionFormat, OMX_COLOR_FORMATTYPE eColorFormat,
+ OMX_U32 xFramerate) {
+ OMX_U32 index = 0;
+ OMX_VIDEO_PARAM_PORTFORMATTYPE portFormat;
+ std::vector<OMX_COLOR_FORMATTYPE> arrColorFormat;
+ std::vector<OMX_VIDEO_CODINGTYPE> arrCompressionFormat;
+ android::hardware::media::omx::V1_0::Status status;
+
+ while (1) {
+ portFormat.nIndex = index;
+ status = getPortParam(omxNode, OMX_IndexParamVideoPortFormat, portIndex,
+ &portFormat);
+ if (status != ::android::hardware::media::omx::V1_0::Status::OK) break;
+ if (eCompressionFormat == OMX_VIDEO_CodingUnused)
+ arrColorFormat.push_back(portFormat.eColorFormat);
+ else
+ arrCompressionFormat.push_back(portFormat.eCompressionFormat);
+ index++;
+ if (index == 512) {
+ // enumerated way too many formats, highly unusual for this to
+ // happen.
+ EXPECT_LE(index, 512U)
+ << "Expecting OMX_ErrorNoMore but not received";
+ break;
+ }
+ }
+ if (!index) return status;
+ if (eCompressionFormat == OMX_VIDEO_CodingUnused) {
+ for (index = 0; index < arrColorFormat.size(); index++) {
+ if (arrColorFormat[index] == eColorFormat) {
+ portFormat.eColorFormat = arrColorFormat[index];
+ break;
+ }
+ }
+ if (index == arrColorFormat.size()) {
+ ALOGE("setting default color format %x", (int)arrColorFormat[0]);
+ portFormat.eColorFormat = arrColorFormat[0];
+ }
+ portFormat.eCompressionFormat = OMX_VIDEO_CodingUnused;
+ } else {
+ for (index = 0; index < arrCompressionFormat.size(); index++) {
+ if (arrCompressionFormat[index] == eCompressionFormat) {
+ portFormat.eCompressionFormat = arrCompressionFormat[index];
+ break;
+ }
+ }
+ if (index == arrCompressionFormat.size()) {
+ ALOGE("setting default compression format %x",
+ (int)arrCompressionFormat[0]);
+ portFormat.eCompressionFormat = arrCompressionFormat[0];
+ }
+ portFormat.eColorFormat = OMX_COLOR_FormatUnused;
+ }
+ // In setParam call nIndex shall be ignored as per omx-il specification.
+ // see how this holds up by corrupting nIndex
+ portFormat.nIndex = RANDOM_INDEX;
+ portFormat.xFramerate = xFramerate;
+ status = setPortParam(omxNode, OMX_IndexParamVideoPortFormat, portIndex,
+ &portFormat);
+ return status;
+}
+
+// get/set audio component port format
+Return<android::hardware::media::omx::V1_0::Status> setAudioPortFormat(
+ sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_AUDIO_CODINGTYPE eEncoding) {
+ OMX_U32 index = 0;
+ OMX_AUDIO_PARAM_PORTFORMATTYPE portFormat;
+ std::vector<OMX_AUDIO_CODINGTYPE> arrEncoding;
+ android::hardware::media::omx::V1_0::Status status;
+
+ while (1) {
+ portFormat.nIndex = index;
+ status = getPortParam(omxNode, OMX_IndexParamAudioPortFormat, portIndex,
+ &portFormat);
+ if (status != ::android::hardware::media::omx::V1_0::Status::OK) break;
+ arrEncoding.push_back(portFormat.eEncoding);
+ index++;
+ if (index == 512) {
+ // enumerated way too many formats, highly unusual for this to
+ // happen.
+ EXPECT_LE(index, 512U)
+ << "Expecting OMX_ErrorNoMore but not received";
+ break;
+ }
+ }
+ if (!index) return status;
+ for (index = 0; index < arrEncoding.size(); index++) {
+ if (arrEncoding[index] == eEncoding) {
+ portFormat.eEncoding = arrEncoding[index];
+ break;
+ }
+ }
+ if (index == arrEncoding.size()) {
+ ALOGE("setting default Port format %x", (int)arrEncoding[0]);
+ portFormat.eEncoding = arrEncoding[0];
+ }
+ // In setParam call nIndex shall be ignored as per omx-il specification.
+ // see how this holds up by corrupting nIndex
+ portFormat.nIndex = RANDOM_INDEX;
+ status = setPortParam(omxNode, OMX_IndexParamAudioPortFormat, portIndex,
+ &portFormat);
+ return status;
+}
+
// allocate buffers needed on a component port
void allocatePortBuffers(sp<IOmxNode> omxNode,
android::Vector<BufferInfo>* buffArray,
diff --git a/media/omx/1.0/vts/functional/common/media_hidl_test_common.h b/media/omx/1.0/vts/functional/common/media_hidl_test_common.h
index d617e45..c0e03f6 100644
--- a/media/omx/1.0/vts/functional/common/media_hidl_test_common.h
+++ b/media/omx/1.0/vts/functional/common/media_hidl_test_common.h
@@ -36,6 +36,11 @@
#define DEFAULT_TIMEOUT 100000
#define TIMEOUT_COUNTER (10000000 / DEFAULT_TIMEOUT)
+/*
+ * Random Index used for monkey testing while get/set parameters
+ */
+#define RANDOM_INDEX 1729
+
enum bufferOwner {
client,
component,
@@ -259,6 +264,14 @@
Return<android::hardware::media::omx::V1_0::Status> setRole(
sp<IOmxNode> omxNode, const char* role);
+Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
+ sp<IOmxNode> omxNode, OMX_U32 portIndex,
+ OMX_VIDEO_CODINGTYPE eCompressionFormat, OMX_COLOR_FORMATTYPE eColorFormat,
+ OMX_U32 xFramerate);
+
+Return<android::hardware::media::omx::V1_0::Status> setAudioPortFormat(
+ sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_AUDIO_CODINGTYPE eEncoding);
+
void allocatePortBuffers(sp<IOmxNode> omxNode,
android::Vector<BufferInfo>* buffArray,
OMX_U32 portIndex,
diff --git a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
index 357c11e..178db15 100644
--- a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
+++ b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
@@ -203,9 +203,6 @@
}
};
-// 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;
@@ -225,113 +222,6 @@
return;
}
-// get/set video component port format
-Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
- sp<IOmxNode> omxNode, OMX_U32 portIndex,
- OMX_VIDEO_CODINGTYPE eCompressionFormat, OMX_COLOR_FORMATTYPE eColorFormat,
- OMX_U32 xFramerate) {
- OMX_U32 index = 0;
- OMX_VIDEO_PARAM_PORTFORMATTYPE portFormat;
- std::vector<OMX_COLOR_FORMATTYPE> arrColorFormat;
- std::vector<OMX_VIDEO_CODINGTYPE> arrCompressionFormat;
- android::hardware::media::omx::V1_0::Status status;
-
- while (1) {
- portFormat.nIndex = index;
- status = getPortParam(omxNode, OMX_IndexParamVideoPortFormat, portIndex,
- &portFormat);
- if (status != ::android::hardware::media::omx::V1_0::Status::OK) break;
- if (eCompressionFormat == OMX_VIDEO_CodingUnused)
- arrColorFormat.push_back(portFormat.eColorFormat);
- else
- arrCompressionFormat.push_back(portFormat.eCompressionFormat);
- index++;
- if (index == 512) {
- // enumerated way too many formats, highly unusual for this to
- // happen.
- EXPECT_LE(index, 512U)
- << "Expecting OMX_ErrorNoMore but not received";
- break;
- }
- }
- if (!index) return status;
- if (eCompressionFormat == OMX_VIDEO_CodingUnused) {
- for (index = 0; index < arrColorFormat.size(); index++) {
- if (arrColorFormat[index] == eColorFormat) {
- portFormat.eColorFormat = arrColorFormat[index];
- break;
- }
- }
- if (index == arrColorFormat.size()) {
- ALOGE("setting default color format %x", (int)arrColorFormat[0]);
- portFormat.eColorFormat = arrColorFormat[0];
- }
- portFormat.eCompressionFormat = OMX_VIDEO_CodingUnused;
- } else {
- for (index = 0; index < arrCompressionFormat.size(); index++) {
- if (arrCompressionFormat[index] == eCompressionFormat) {
- portFormat.eCompressionFormat = arrCompressionFormat[index];
- break;
- }
- }
- if (index == arrCompressionFormat.size()) {
- ALOGE("setting default compression format %x",
- (int)arrCompressionFormat[0]);
- portFormat.eCompressionFormat = arrCompressionFormat[0];
- }
- portFormat.eColorFormat = OMX_COLOR_FormatUnused;
- }
- // In setParam call nIndex shall be ignored as per omx-il specification.
- // see how this holds up by corrupting nIndex
- portFormat.nIndex = RANDOM_INDEX;
- portFormat.xFramerate = xFramerate;
- status = setPortParam(omxNode, OMX_IndexParamVideoPortFormat, portIndex,
- &portFormat);
- return status;
-}
-
-// get/set audio component port format
-Return<android::hardware::media::omx::V1_0::Status> setAudioPortFormat(
- sp<IOmxNode> omxNode, OMX_U32 portIndex, OMX_AUDIO_CODINGTYPE eEncoding) {
- OMX_U32 index = 0;
- OMX_AUDIO_PARAM_PORTFORMATTYPE portFormat;
- std::vector<OMX_AUDIO_CODINGTYPE> arrEncoding;
- android::hardware::media::omx::V1_0::Status status;
-
- while (1) {
- portFormat.nIndex = index;
- status = getPortParam(omxNode, OMX_IndexParamAudioPortFormat, portIndex,
- &portFormat);
- if (status != ::android::hardware::media::omx::V1_0::Status::OK) break;
- arrEncoding.push_back(portFormat.eEncoding);
- index++;
- if (index == 512) {
- // enumerated way too many formats, highly unusual for this to
- // happen.
- EXPECT_LE(index, 512U)
- << "Expecting OMX_ErrorNoMore but not received";
- break;
- }
- }
- if (!index) return status;
- for (index = 0; index < arrEncoding.size(); index++) {
- if (arrEncoding[index] == eEncoding) {
- portFormat.eEncoding = arrEncoding[index];
- break;
- }
- }
- if (index == arrEncoding.size()) {
- ALOGE("setting default Port format %x", (int)arrEncoding[0]);
- portFormat.eEncoding = arrEncoding[0];
- }
- // In setParam call nIndex shall be ignored as per omx-il specification.
- // see how this holds up by corrupting nIndex
- portFormat.nIndex = RANDOM_INDEX;
- status = setPortParam(omxNode, OMX_IndexParamAudioPortFormat, portIndex,
- &portFormat);
- return status;
-}
-
// test dispatch message API call
TEST_F(ComponentHidlTest, dispatchMsg) {
description("test dispatch message API call");
diff --git a/media/omx/1.0/vts/functional/video/media_video_hidl_test_common.cpp b/media/omx/1.0/vts/functional/video/media_video_hidl_test_common.cpp
index 77763d1..91aecf2 100644
--- a/media/omx/1.0/vts/functional/video/media_video_hidl_test_common.cpp
+++ b/media/omx/1.0/vts/functional/video/media_video_hidl_test_common.cpp
@@ -52,68 +52,6 @@
#include <media_video_hidl_test_common.h>
#include <memory>
-Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
- sp<IOmxNode> omxNode, OMX_U32 portIndex,
- OMX_VIDEO_CODINGTYPE eCompressionFormat, OMX_COLOR_FORMATTYPE eColorFormat,
- OMX_U32 xFramerate) {
- OMX_U32 index = 0;
- OMX_VIDEO_PARAM_PORTFORMATTYPE portFormat;
- std::vector<OMX_COLOR_FORMATTYPE> arrColorFormat;
- std::vector<OMX_VIDEO_CODINGTYPE> arrCompressionFormat;
- android::hardware::media::omx::V1_0::Status status;
-
- while (1) {
- portFormat.nIndex = index;
- status = getPortParam(omxNode, OMX_IndexParamVideoPortFormat, portIndex,
- &portFormat);
- if (status != ::android::hardware::media::omx::V1_0::Status::OK) break;
- if (eCompressionFormat == OMX_VIDEO_CodingUnused)
- arrColorFormat.push_back(portFormat.eColorFormat);
- else
- arrCompressionFormat.push_back(portFormat.eCompressionFormat);
- index++;
- if (index == 512) {
- // enumerated way too many formats, highly unusual for this to
- // happen.
- EXPECT_LE(index, 512U)
- << "Expecting OMX_ErrorNoMore but not received";
- break;
- }
- }
- if (!index) return status;
- if (eCompressionFormat == OMX_VIDEO_CodingUnused) {
- for (index = 0; index < arrColorFormat.size(); index++) {
- if (arrColorFormat[index] == eColorFormat) {
- portFormat.eColorFormat = arrColorFormat[index];
- break;
- }
- }
- if (index == arrColorFormat.size()) {
- ALOGE("setting default color format %x", (int)arrColorFormat[0]);
- portFormat.eColorFormat = arrColorFormat[0];
- }
- portFormat.eCompressionFormat = OMX_VIDEO_CodingUnused;
- } else {
- for (index = 0; index < arrCompressionFormat.size(); index++) {
- if (arrCompressionFormat[index] == eCompressionFormat) {
- portFormat.eCompressionFormat = arrCompressionFormat[index];
- break;
- }
- }
- if (index == arrCompressionFormat.size()) {
- ALOGE("setting default compression format %x",
- (int)arrCompressionFormat[0]);
- portFormat.eCompressionFormat = arrCompressionFormat[0];
- }
- portFormat.eColorFormat = OMX_COLOR_FormatUnused;
- }
- portFormat.nIndex = 0;
- portFormat.xFramerate = xFramerate;
- status = setPortParam(omxNode, OMX_IndexParamVideoPortFormat, portIndex,
- &portFormat);
- return status;
-}
-
void enumerateProfileAndLevel(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile,
std::vector<int32_t>* arrLevel) {
diff --git a/media/omx/1.0/vts/functional/video/media_video_hidl_test_common.h b/media/omx/1.0/vts/functional/video/media_video_hidl_test_common.h
index e492779..e6a61d4 100644
--- a/media/omx/1.0/vts/functional/video/media_video_hidl_test_common.h
+++ b/media/omx/1.0/vts/functional/video/media_video_hidl_test_common.h
@@ -17,20 +17,10 @@
#ifndef MEDIA_VIDEO_HIDL_TEST_COMMON_H
#define MEDIA_VIDEO_HIDL_TEST_COMMON_H
-/*
- * Random Index used for monkey testing while get/set parameters
- */
-#define RANDOM_INDEX 1729
/*
* Common video utils
*/
-
-Return<android::hardware::media::omx::V1_0::Status> setVideoPortFormat(
- sp<IOmxNode> omxNode, OMX_U32 portIndex,
- OMX_VIDEO_CODINGTYPE eCompressionFormat, OMX_COLOR_FORMATTYPE eColorFormat,
- OMX_U32 xFramerate);
-
void enumerateProfileAndLevel(sp<IOmxNode> omxNode, OMX_U32 portIndex,
std::vector<int32_t>* arrProfile,
std::vector<int32_t>* arrLevel);