Merge "Downgrade generated test harness for NDK libc++" into oc-mr1-dev
diff --git a/cas/1.0/vts/functional/Android.bp b/cas/1.0/vts/functional/Android.bp
new file mode 100644
index 0000000..d601235
--- /dev/null
+++ b/cas/1.0/vts/functional/Android.bp
@@ -0,0 +1,23 @@
+//
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+cc_test {
+ name: "VtsHalCasV1_0TargetTest",
+ defaults: ["VtsHalTargetTestDefaults"],
+ srcs: ["VtsHalCasV1_0TargetTest.cpp"],
+ static_libs: ["android.hardware.cas@1.0"],
+}
+
diff --git a/cas/1.0/vts/functional/VtsHalCasV1_0TargetTest.cpp b/cas/1.0/vts/functional/VtsHalCasV1_0TargetTest.cpp
new file mode 100644
index 0000000..f346bae
--- /dev/null
+++ b/cas/1.0/vts/functional/VtsHalCasV1_0TargetTest.cpp
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "mediacas_hidl_hal_test"
+
+#include <VtsHalHidlTargetTestBase.h>
+#include <android-base/logging.h>
+#include <android/hardware/cas/1.0/ICas.h>
+#include <android/hardware/cas/1.0/ICasListener.h>
+#include <android/hardware/cas/1.0/IDescramblerBase.h>
+#include <android/hardware/cas/1.0/IMediaCasService.h>
+#include <hidl/HidlSupport.h>
+#include <hidl/HidlTransportSupport.h>
+
+#include <cinttypes>
+#include <utility>
+
+// CA System Ids used for testing
+#define CLEAR_KEY_SYSTEM_ID 0xF6D8
+#define INVALID_SYSTEM_ID 0
+
+using android::Condition;
+using android::hardware::cas::V1_0::ICas;
+using android::hardware::cas::V1_0::ICasListener;
+using android::hardware::cas::V1_0::IDescramblerBase;
+using android::hardware::cas::V1_0::IMediaCasService;
+using android::hardware::cas::V1_0::HidlCasPluginDescriptor;
+using android::hardware::Void;
+using android::hardware::hidl_vec;
+using android::hardware::Return;
+using android::Mutex;
+using android::sp;
+
+namespace {
+
+class MediaCasHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+ public:
+ virtual void SetUp() override {
+ mService = ::testing::VtsHalHidlTargetTestBase::getService<IMediaCasService>();
+ ASSERT_NE(mService, nullptr);
+ }
+
+ sp<IMediaCasService> mService;
+
+ protected:
+ static void description(const std::string& description) {
+ RecordProperty("description", description);
+ }
+};
+
+class MediaCasListener : public ICasListener {
+ public:
+ virtual ::android::hardware::Return<void> onEvent(
+ int32_t event, int32_t arg, const ::android::hardware::hidl_vec<uint8_t>& data) override {
+ ALOGI("Info: received event: %d, arg: %d, size: %zu", event, arg, data.size());
+
+ return Void();
+ }
+};
+
+TEST_F(MediaCasHidlTest, EnumeratePlugins) {
+ description("Test enumerate plugins");
+ hidl_vec<HidlCasPluginDescriptor> descriptors;
+ EXPECT_TRUE(mService
+ ->enumeratePlugins([&descriptors](
+ hidl_vec<HidlCasPluginDescriptor> const& desc) { descriptors = desc; })
+ .isOk());
+
+ if (descriptors.size() == 0) {
+ ALOGW("[ WARN ] enumeratePlugins list empty");
+ return;
+ }
+
+ sp<MediaCasListener> casListener = new MediaCasListener();
+ for (size_t i = 0; i < descriptors.size(); i++) {
+ int32_t caSystemId = descriptors[i].caSystemId;
+ bool status = mService->isSystemIdSupported(caSystemId);
+ ASSERT_EQ(status, true);
+
+ status = mService->isDescramblerSupported(caSystemId);
+ ASSERT_EQ(status, true);
+
+ sp<ICas> mediaCas = mService->createPlugin(caSystemId, casListener);
+ ASSERT_NE(mediaCas, nullptr);
+
+ sp<IDescramblerBase> descramblerBase = mService->createDescrambler(caSystemId);
+ ASSERT_NE(descramblerBase, nullptr);
+ }
+}
+
+TEST_F(MediaCasHidlTest, TestInvalidSystemIdFails) {
+ description("Test failure for invalid system ID");
+ sp<MediaCasListener> casListener = new MediaCasListener();
+
+ ASSERT_FALSE(mService->isSystemIdSupported(INVALID_SYSTEM_ID));
+ ASSERT_FALSE(mService->isDescramblerSupported(INVALID_SYSTEM_ID));
+
+ sp<ICas> mediaCas = mService->createPlugin(INVALID_SYSTEM_ID, casListener);
+ EXPECT_EQ(mediaCas, nullptr);
+
+ sp<IDescramblerBase> descramblerBase = mService->createDescrambler(INVALID_SYSTEM_ID);
+ EXPECT_EQ(descramblerBase, nullptr);
+}
+
+TEST_F(MediaCasHidlTest, TestClearKeyPluginInstalled) {
+ description("Test if ClearKey plugin is installed");
+ hidl_vec<HidlCasPluginDescriptor> descriptors;
+ EXPECT_TRUE(mService
+ ->enumeratePlugins([&descriptors](
+ hidl_vec<HidlCasPluginDescriptor> const& _desc) { descriptors = _desc; })
+ .isOk());
+
+ if (descriptors.size() == 0) {
+ ALOGW("[ WARN ] enumeratePlugins list empty");
+ }
+
+ for (size_t i = 0; i < descriptors.size(); i++) {
+ int32_t caSystemId = descriptors[i].caSystemId;
+ if (CLEAR_KEY_SYSTEM_ID == caSystemId) {
+ return;
+ }
+ }
+
+ ASSERT_TRUE(false) << "ClearKey plugin not installed";
+}
+
+} // anonymous namespace
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ int status = RUN_ALL_TESTS();
+ LOG(INFO) << "Test result = " << status;
+ return status;
+}
diff --git a/cas/Android.bp b/cas/Android.bp
index 57532a0..8208d3d 100644
--- a/cas/Android.bp
+++ b/cas/Android.bp
@@ -1,6 +1,7 @@
// This is an autogenerated file, do not edit.
subdirs = [
"1.0",
+ "1.0/vts/functional",
"1.0/default",
"native/1.0",
]
diff --git a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp
index 8520757..b8a1634 100644
--- a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp
+++ b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp
@@ -171,7 +171,7 @@
{"mp3", mp3}, {"amrnb", amrnb}, {"amrwb", amrwb},
{"aac", aac}, {"vorbis", vorbis}, {"opus", opus},
{"pcm", pcm}, {"g711alaw", g711alaw}, {"g711mlaw", g711mlaw},
- {"gsm", gsm}, {"raw", raw},
+ {"gsm", gsm}, {"raw", raw}, {"flac", flac},
};
const size_t kNumStringToName =
sizeof(kStringToName) / sizeof(kStringToName[0]);
@@ -204,6 +204,7 @@
{g711mlaw, OMX_AUDIO_CodingG711},
{gsm, OMX_AUDIO_CodingGSMFR},
{raw, OMX_AUDIO_CodingPCM},
+ {flac, OMX_AUDIO_CodingFLAC},
};
static const size_t kNumCompToCoding =
sizeof(kCompToCoding) / sizeof(kCompToCoding[0]);
@@ -219,7 +220,7 @@
framesReceived = 0;
timestampUs = 0;
timestampDevTest = false;
- if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
+ if (disableTest) std::cout << "[ WARN ] Test Disabled \n";
}
virtual void TearDown() override {
@@ -263,9 +264,8 @@
EXPECT_EQ(tsHit, true)
<< "TimeStamp not recognized";
} else {
- std::cerr
- << "[ ] Warning ! Received non-zero "
- "output / TimeStamp not recognized \n";
+ std::cout << "[ INFO ] Received non-zero "
+ "output / TimeStamp not recognized \n";
}
}
}
@@ -301,6 +301,7 @@
g711mlaw,
gsm,
raw,
+ flac,
unknown_comp,
};
@@ -431,6 +432,16 @@
*nSampleRate = param.nSampleRate;
break;
}
+ case OMX_AUDIO_CodingFLAC: {
+ OMX_AUDIO_PARAM_FLACTYPE param;
+ status = getPortParam(omxNode, OMX_IndexParamAudioFlac,
+ kPortIndexInput, ¶m);
+ ASSERT_EQ(status,
+ ::android::hardware::media::omx::V1_0::Status::OK);
+ *nChannels = param.nChannels;
+ *nSampleRate = param.nSampleRate;
+ break;
+ }
default:
ASSERT_TRUE(false);
break;
@@ -472,6 +483,9 @@
"bbb_gsm_1ch_8khz_13kbps.info"},
{AudioDecHidlTest::standardComp::raw, "bbb_raw_1ch_8khz_s32le.raw",
"bbb_raw_1ch_8khz_s32le.info"},
+ {AudioDecHidlTest::standardComp::flac,
+ "bbb_flac_stereo_680kbps_48000hz.flac",
+ "bbb_flac_stereo_680kbps_48000hz.info"},
};
for (size_t i = 0; i < sizeof(kCompToURL) / sizeof(kCompToURL[0]); ++i) {
@@ -628,39 +642,16 @@
AudioDecHidlTest::standardComp comp, bool signalEOS = true) {
android::hardware::media::omx::V1_0::Status status;
Message msg;
-
- // dispatch output buffers
- for (size_t i = 0; i < oBuffer->size(); i++) {
- dispatchOutputBuffer(omxNode, oBuffer, i);
- }
- // dispatch input buffers
+ size_t index;
uint32_t flags = 0;
int frameID = offset;
- for (size_t i = 0; (i < iBuffer->size()) && (frameID < (int)Info->size()) &&
- (frameID < (offset + range));
- i++) {
- char* ipBuffer = static_cast<char*>(
- static_cast<void*>((*iBuffer)[i].mMemory->getPointer()));
- ASSERT_LE((*Info)[frameID].bytesCount,
- static_cast<int>((*iBuffer)[i].mMemory->getSize()));
- eleStream.read(ipBuffer, (*Info)[frameID].bytesCount);
- ASSERT_EQ(eleStream.gcount(), (*Info)[frameID].bytesCount);
- flags = (*Info)[frameID].flags;
- if (signalEOS && ((frameID == (int)Info->size() - 1) ||
- (frameID == (offset + range - 1))))
- flags |= OMX_BUFFERFLAG_EOS;
- dispatchInputBuffer(omxNode, iBuffer, i, (*Info)[frameID].bytesCount,
- flags, (*Info)[frameID].timestamp);
- frameID++;
- }
-
int timeOut = TIMEOUT_COUNTER_Q;
bool iQueued, oQueued;
+
while (1) {
iQueued = oQueued = false;
status =
observer->dequeueMessage(&msg, DEFAULT_TIMEOUT_Q, iBuffer, oBuffer);
-
// Port Reconfiguration
if (status == android::hardware::media::omx::V1_0::Status::OK &&
msg.type == Message::Type::EVENT) {
@@ -673,7 +664,6 @@
if (frameID == (int)Info->size() || frameID == (offset + range)) break;
// Dispatch input buffer
- size_t index = 0;
if ((index = getEmptyBufferID(iBuffer)) < iBuffer->size()) {
char* ipBuffer = static_cast<char*>(
static_cast<void*>((*iBuffer)[index].mMemory->getPointer()));
@@ -682,6 +672,11 @@
eleStream.read(ipBuffer, (*Info)[frameID].bytesCount);
ASSERT_EQ(eleStream.gcount(), (*Info)[frameID].bytesCount);
flags = (*Info)[frameID].flags;
+ // Indicate to omx core that the buffer contains a full frame worth
+ // of data
+ flags |= OMX_BUFFERFLAG_ENDOFFRAME;
+ // Indicate the omx core that this is the last buffer it needs to
+ // process
if (signalEOS && ((frameID == (int)Info->size() - 1) ||
(frameID == (offset + range - 1))))
flags |= OMX_BUFFERFLAG_EOS;
@@ -691,10 +686,12 @@
frameID++;
iQueued = true;
}
+ // Dispatch output buffer
if ((index = getEmptyBufferID(oBuffer)) < oBuffer->size()) {
dispatchOutputBuffer(omxNode, oBuffer, index);
oQueued = true;
}
+ // Reset Counters when either input or output buffer is dispatched
if (iQueued || oQueued)
timeOut = TIMEOUT_COUNTER_Q;
else
@@ -716,7 +713,7 @@
}
// port format enumeration
-TEST_F(AudioDecHidlTest, DISABLED_EnumeratePortFormat) {
+TEST_F(AudioDecHidlTest, EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
@@ -822,11 +819,7 @@
}
// end of sequence test
-// 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) {
+TEST_F(AudioDecHidlTest, EOSTest_M) {
description("Test end of stream monkeying");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
diff --git a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp
index 038830d..dd5f16a 100644
--- a/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp
+++ b/media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp
@@ -206,7 +206,7 @@
}
if (i == kNumCompToCoding) disableTest = true;
eosFlag = false;
- if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
+ if (disableTest) std::cout << "[ WARN ] Test Disabled \n";
}
virtual void TearDown() override {
@@ -376,44 +376,25 @@
bool signalEOS = true) {
android::hardware::media::omx::V1_0::Status status;
Message msg;
-
- // dispatch output buffers
- for (size_t i = 0; i < oBuffer->size(); i++) {
- dispatchOutputBuffer(omxNode, oBuffer, i);
- }
- // dispatch input buffers
+ size_t index;
int bytesCount = samplesPerFrame * nChannels * 2;
int32_t timestampIncr =
(int)(((float)samplesPerFrame / nSampleRate) * 1000000);
uint64_t timestamp = 0;
uint32_t flags = 0;
- for (size_t i = 0; i < iBuffer->size() && nFrames != 0; i++) {
- char* ipBuffer = static_cast<char*>(
- static_cast<void*>((*iBuffer)[i].mMemory->getPointer()));
- ASSERT_LE(bytesCount,
- static_cast<int>((*iBuffer)[i].mMemory->getSize()));
- eleStream.read(ipBuffer, bytesCount);
- if (eleStream.gcount() != bytesCount) break;
- if (signalEOS && (nFrames == 1)) flags = OMX_BUFFERFLAG_EOS;
- dispatchInputBuffer(omxNode, iBuffer, i, bytesCount, flags, timestamp);
- timestamp += timestampIncr;
- nFrames--;
- }
-
int timeOut = TIMEOUT_COUNTER_Q;
bool iQueued, oQueued;
+
while (1) {
iQueued = oQueued = false;
status =
observer->dequeueMessage(&msg, DEFAULT_TIMEOUT_Q, iBuffer, oBuffer);
-
if (status == android::hardware::media::omx::V1_0::Status::OK)
ASSERT_TRUE(false);
if (nFrames == 0) break;
// Dispatch input buffer
- size_t index = 0;
if ((index = getEmptyBufferID(iBuffer)) < iBuffer->size()) {
char* ipBuffer = static_cast<char*>(
static_cast<void*>((*iBuffer)[index].mMemory->getPointer()));
@@ -421,7 +402,8 @@
static_cast<int>((*iBuffer)[index].mMemory->getSize()));
eleStream.read(ipBuffer, bytesCount);
if (eleStream.gcount() != bytesCount) break;
- if (signalEOS && (nFrames == 1)) flags = OMX_BUFFERFLAG_EOS;
+ flags = OMX_BUFFERFLAG_ENDOFFRAME;
+ if (signalEOS && (nFrames == 1)) flags |= OMX_BUFFERFLAG_EOS;
dispatchInputBuffer(omxNode, iBuffer, index, bytesCount, flags,
timestamp);
timestamp += timestampIncr;
@@ -433,6 +415,7 @@
dispatchOutputBuffer(omxNode, oBuffer, index);
oQueued = true;
}
+ // Reset Counters when either input or output buffer is dispatched
if (iQueued || oQueued)
timeOut = TIMEOUT_COUNTER_Q;
else
@@ -454,7 +437,7 @@
}
// port format enumeration
-TEST_F(AudioEncHidlTest, DISABLED_EnumeratePortFormat) {
+TEST_F(AudioEncHidlTest, EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
diff --git a/media/omx/1.0/vts/functional/common/Android.bp b/media/omx/1.0/vts/functional/common/Android.bp
index af55e3a..cdc52fb 100644
--- a/media/omx/1.0/vts/functional/common/Android.bp
+++ b/media/omx/1.0/vts/functional/common/Android.bp
@@ -28,6 +28,7 @@
"android.hidl.allocator@1.0",
"android.hidl.memory@1.0",
"android.hardware.media.omx@1.0",
+ "android.hardware.graphics.allocator@2.0",
],
}
@@ -38,6 +39,8 @@
// Link to these statically as they are not guaranteed to be on the device.
static_libs: [
"VtsHalMediaOmxV1_0CommonUtil",
+ "android.hardware.graphics.allocator@2.0",
+ "android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.bufferqueue@1.0",
"android.hardware.graphics.common@1.0",
"android.hardware.media.omx@1.0",
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 1ef645c..9eab10c 100644
--- 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
@@ -22,6 +22,9 @@
#include <android-base/logging.h>
+#include <android/hardware/graphics/allocator/2.0/IAllocator.h>
+#include <android/hardware/graphics/mapper/2.0/IMapper.h>
+#include <android/hardware/graphics/mapper/2.0/types.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>
@@ -29,7 +32,10 @@
#include <android/hidl/allocator/1.0/IAllocator.h>
#include <android/hidl/memory/1.0/IMapper.h>
#include <android/hidl/memory/1.0/IMemory.h>
+#include <cutils/atomic.h>
+using ::android::hardware::graphics::common::V1_0::BufferUsage;
+using ::android::hardware::graphics::common::V1_0::PixelFormat;
using ::android::hardware::media::omx::V1_0::IOmx;
using ::android::hardware::media::omx::V1_0::IOmxObserver;
using ::android::hardware::media::omx::V1_0::IOmxNode;
@@ -186,6 +192,73 @@
return status;
}
+void allocateGraphicBuffers(sp<IOmxNode> omxNode, OMX_U32 portIndex,
+ BufferInfo* buffer, uint32_t nFrameWidth,
+ uint32_t nFrameHeight, int32_t* nStride,
+ int format) {
+ android::hardware::media::omx::V1_0::Status status;
+ sp<android::hardware::graphics::allocator::V2_0::IAllocator> allocator =
+ android::hardware::graphics::allocator::V2_0::IAllocator::getService();
+ ASSERT_NE(nullptr, allocator.get());
+
+ sp<android::hardware::graphics::mapper::V2_0::IMapper> mapper =
+ android::hardware::graphics::mapper::V2_0::IMapper::getService();
+ ASSERT_NE(mapper.get(), nullptr);
+
+ android::hardware::graphics::mapper::V2_0::IMapper::BufferDescriptorInfo
+ descriptorInfo;
+ uint32_t usage;
+
+ descriptorInfo.width = nFrameWidth;
+ descriptorInfo.height = nFrameHeight;
+ descriptorInfo.layerCount = 1;
+ descriptorInfo.format = static_cast<PixelFormat>(format);
+ descriptorInfo.usage = static_cast<uint64_t>(BufferUsage::CPU_READ_OFTEN);
+ omxNode->getGraphicBufferUsage(
+ portIndex,
+ [&status, &usage](android::hardware::media::omx::V1_0::Status _s,
+ uint32_t _n1) {
+ status = _s;
+ usage = _n1;
+ });
+ if (status == android::hardware::media::omx::V1_0::Status::OK) {
+ descriptorInfo.usage |= usage;
+ }
+
+ ::android::hardware::hidl_vec<uint32_t> descriptor;
+ android::hardware::graphics::mapper::V2_0::Error error;
+ mapper->createDescriptor(
+ descriptorInfo, [&error, &descriptor](
+ android::hardware::graphics::mapper::V2_0::Error _s,
+ ::android::hardware::hidl_vec<uint32_t> _n1) {
+ error = _s;
+ descriptor = _n1;
+ });
+ EXPECT_EQ(error, android::hardware::graphics::mapper::V2_0::Error::NONE);
+
+ static volatile int32_t nextId = 0;
+ uint64_t id = static_cast<uint64_t>(getpid()) << 32;
+ allocator->allocate(
+ descriptor, 1,
+ [&](android::hardware::graphics::mapper::V2_0::Error _s, uint32_t _n1,
+ const ::android::hardware::hidl_vec<
+ ::android::hardware::hidl_handle>& _n2) {
+ ASSERT_EQ(android::hardware::graphics::mapper::V2_0::Error::NONE,
+ _s);
+ *nStride = _n1;
+ buffer->omxBuffer.nativeHandle = _n2[0];
+ buffer->omxBuffer.attr.anwBuffer.width = nFrameWidth;
+ buffer->omxBuffer.attr.anwBuffer.height = nFrameHeight;
+ buffer->omxBuffer.attr.anwBuffer.stride = _n1;
+ buffer->omxBuffer.attr.anwBuffer.format = descriptorInfo.format;
+ buffer->omxBuffer.attr.anwBuffer.usage = descriptorInfo.usage;
+ buffer->omxBuffer.attr.anwBuffer.layerCount =
+ descriptorInfo.layerCount;
+ buffer->omxBuffer.attr.anwBuffer.id =
+ id | static_cast<uint32_t>(android_atomic_inc(&nextId));
+ });
+}
+
// allocate buffers needed on a component port
void allocateBuffer(sp<IOmxNode> omxNode, BufferInfo* buffer, OMX_U32 portIndex,
OMX_U32 nBufferSize, PortMode portMode) {
@@ -243,13 +316,32 @@
buffer->id = id;
});
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ } else if (portMode == PortMode::PRESET_ANW_BUFFER) {
+ OMX_PARAM_PORTDEFINITIONTYPE portDef;
+ status = getPortParam(omxNode, OMX_IndexParamPortDefinition, portIndex,
+ &portDef);
+ int32_t nStride;
+ buffer->owner = client;
+ buffer->omxBuffer.type = CodecBuffer::Type::ANW_BUFFER;
+ allocateGraphicBuffers(omxNode, portIndex, buffer,
+ portDef.format.video.nFrameWidth,
+ portDef.format.video.nFrameHeight, &nStride,
+ portDef.format.video.eColorFormat);
+ omxNode->useBuffer(
+ portIndex, buffer->omxBuffer,
+ [&status, &buffer](android::hardware::media::omx::V1_0::Status _s,
+ uint32_t id) {
+ status = _s;
+ buffer->id = id;
+ });
+ ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
}
}
// allocate buffers needed on a component port
void allocatePortBuffers(sp<IOmxNode> omxNode,
android::Vector<BufferInfo>* buffArray,
- OMX_U32 portIndex, PortMode portMode) {
+ OMX_U32 portIndex, PortMode portMode, bool allocGrap) {
android::hardware::media::omx::V1_0::Status status;
OMX_PARAM_PORTDEFINITIONTYPE portDef;
@@ -263,6 +355,13 @@
BufferInfo buffer;
allocateBuffer(omxNode, &buffer, portIndex, portDef.nBufferSize,
portMode);
+ if (allocGrap && portMode == PortMode::DYNAMIC_ANW_BUFFER) {
+ int32_t nStride;
+ allocateGraphicBuffers(omxNode, portIndex, &buffer,
+ portDef.format.video.nFrameWidth,
+ portDef.format.video.nFrameHeight, &nStride,
+ portDef.format.video.eColorFormat);
+ }
buffArray->push(buffer);
}
}
@@ -274,7 +373,7 @@
android::Vector<BufferInfo>* iBuffer,
android::Vector<BufferInfo>* oBuffer,
OMX_U32 kPortIndexInput, OMX_U32 kPortIndexOutput,
- PortMode* portMode) {
+ PortMode* portMode, bool allocGrap) {
android::hardware::media::omx::V1_0::Status status;
Message msg;
PortMode defaultPortMode[2], *pm;
@@ -293,14 +392,14 @@
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
// allocate buffers on input port
- allocatePortBuffers(omxNode, iBuffer, kPortIndexInput, pm[0]);
+ allocatePortBuffers(omxNode, iBuffer, kPortIndexInput, pm[0], allocGrap);
// Dont switch states until the ports are populated
status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
// allocate buffers on output port
- allocatePortBuffers(omxNode, oBuffer, kPortIndexOutput, pm[1]);
+ allocatePortBuffers(omxNode, oBuffer, kPortIndexOutput, pm[1], allocGrap);
// As the ports are populated, check if the state transition is complete
status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
@@ -440,6 +539,7 @@
status =
omxNode->fillBuffer((*buffArray)[bufferIndex].id, t, fenceNh);
break;
+ case PortMode::PRESET_ANW_BUFFER:
case PortMode::PRESET_SECURE_BUFFER:
case PortMode::PRESET_BYTE_BUFFER:
t.sharedMemory = android::hardware::hidl_memory();
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 94a0194..e23d781 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
@@ -133,6 +133,7 @@
if (it->type ==
android::hardware::media::omx::V1_0::Message::Type::EVENT) {
*msg = *it;
+ if (callBack) callBack(*it, nullptr);
it = msgQueue.erase(it);
// OMX_EventBufferFlag event is sent when the component has
// processed a buffer with its EOS flag set. This event is
@@ -302,13 +303,15 @@
void allocatePortBuffers(sp<IOmxNode> omxNode,
android::Vector<BufferInfo>* buffArray,
OMX_U32 portIndex,
- PortMode portMode = PortMode::PRESET_BYTE_BUFFER);
+ PortMode portMode = PortMode::PRESET_BYTE_BUFFER,
+ bool allocGrap = false);
void changeStateLoadedtoIdle(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
android::Vector<BufferInfo>* iBuffer,
android::Vector<BufferInfo>* oBuffer,
OMX_U32 kPortIndexInput, OMX_U32 kPortIndexOutput,
- PortMode* portMode = nullptr);
+ PortMode* portMode = nullptr,
+ bool allocGrap = false);
void changeStateIdletoLoaded(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
android::Vector<BufferInfo>* iBuffer,
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 2ec86b2..d7c731f 100644
--- a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
+++ b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
@@ -181,7 +181,7 @@
strlen(gEnv->getComponent().c_str()) - suffixLen,
".secure");
}
- if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
+ if (disableTest) std::cout << "[ WARN ] Test Disabled \n";
}
virtual void TearDown() override {
@@ -290,7 +290,7 @@
}
// port format enumeration
-TEST_F(ComponentHidlTest, DISABLED_EnumeratePortFormat) {
+TEST_F(ComponentHidlTest, EnumeratePortFormat) {
description("Test Component on Mandatory Port Parameters (Port Format)");
if (disableTest) return;
android::hardware::media::omx::V1_0::Status status;
@@ -397,14 +397,44 @@
EXPECT_NE(status,
::android::hardware::media::omx::V1_0::Status::OK);
- // Edit Read-Only fields.
+ // Port Direction - Read Only
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);
+ if (portDef.eDir != mirror.eDir) {
+ std::cerr << "[ ERROR ] port direction has to be read only "
+ "but is changeable \n";
+ }
setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &mirror);
+ // Port Min BufferCount - Read Only
+ portDef = mirror;
+ portDef.nBufferCountMin += 1;
+ setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ getPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ if (portDef.nBufferCountMin != mirror.nBufferCountMin) {
+ std::cerr << "[ ERROR ] port Min BufferCount has to be "
+ "read only but is changeable \n";
+ }
+ EXPECT_EQ(portDef.nBufferCountMin, mirror.nBufferCountMin);
+ setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &mirror);
+
+ // Port Actual BufferCount
+ 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);
+ }
+
+ // Port BufferSize is although read only as per OMX-IL 1.2, android
+ // doesnt abide by this.
+ // Decrease buffer size
portDef = mirror;
OMX_U32 nBufferSize = portDef.nBufferSize >> 1;
if (nBufferSize != 0) {
@@ -428,43 +458,21 @@
(compClass == video_decoder && i == kPortIndexInput)) {
double dev = (portDef.nBufferSize / (double)nBufferSize);
dev -= 1;
- if (dev < 0 || dev > 0.1) EXPECT_TRUE(false);
+ if (dev < 0 || dev > 0.1) {
+ std::cerr << "[ ERROR ] port buffer size deviation "
+ "larger than expected \n";
+ }
} else {
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);
- }
-
+ // Increase buffer size
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";
- }
- }
+ setPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ getPortParam(omxNode, OMX_IndexParamPortDefinition, i, &portDef);
+ EXPECT_EQ(portDef.nBufferSize, (mirror.nBufferSize << 1));
}
}
}
@@ -583,6 +591,109 @@
kPortIndexInput, kPortIndexOutput);
}
+// Flush test - monkeying
+TEST_F(ComponentHidlTest, Flush_M) {
+ description("Test Flush monkeying");
+ if (disableTest) return;
+ android::hardware::media::omx::V1_0::Status status;
+ uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
+ Message msg;
+
+ status = setRole(omxNode, gEnv->getRole().c_str());
+ ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ OMX_PORT_PARAM_TYPE params;
+ if (compClass == audio_decoder || compClass == audio_encoder) {
+ status = getParam(omxNode, OMX_IndexParamAudioInit, ¶ms);
+ } else {
+ status = getParam(omxNode, OMX_IndexParamVideoInit, ¶ms);
+ }
+ if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
+ ASSERT_EQ(params.nPorts, 2U);
+ kPortIndexInput = params.nStartPortNumber;
+ kPortIndexOutput = kPortIndexInput + 1;
+ }
+
+ 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);
+
+ // // Flush all ports ; receive error OMX_ErrorIncorrectStateOperation
+ // status = omxNode->sendCommand(toRawCommandType(OMX_CommandFlush),
+ // OMX_ALL);
+ // ASSERT_NE(status, android::hardware::media::omx::V1_0::Status::OK);
+
+ // set state to idle
+ changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
+ kPortIndexInput, kPortIndexOutput, portMode);
+
+ // // Flush all ports ; receive error OMX_ErrorIncorrectStateOperation
+ // status = omxNode->sendCommand(toRawCommandType(OMX_CommandFlush),
+ // OMX_ALL);
+ // ASSERT_NE(status, android::hardware::media::omx::V1_0::Status::OK);
+
+ // set state to executing
+ changeStateIdletoExecute(omxNode, observer);
+ // dispatch buffers
+ for (size_t i = 0; i < oBuffer.size(); i++) {
+ dispatchOutputBuffer(omxNode, &oBuffer, i, portMode[1]);
+ }
+
+ // // flush invalid port, expecting OMX_ErrorBadPortIndex
+ // status = omxNode->sendCommand(toRawCommandType(OMX_CommandFlush),
+ // RANDOM_INDEX);
+ // ASSERT_NE(status, android::hardware::media::omx::V1_0::Status::OK);
+
+ // Flush all ports
+ status = omxNode->sendCommand(toRawCommandType(OMX_CommandFlush), OMX_ALL);
+ ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
+
+ for (int j = 0; j < 2; j++) {
+ status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT_PE, &iBuffer,
+ &oBuffer);
+ ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
+ ASSERT_EQ(msg.type, Message::Type::EVENT);
+ ASSERT_EQ(msg.data.eventData.event, OMX_EventCmdComplete);
+ ASSERT_EQ(msg.data.eventData.data1, OMX_CommandFlush);
+ if (msg.data.eventData.data2 == kPortIndexInput) {
+ // test if client got all its buffers back
+ for (size_t i = 0; i < iBuffer.size(); ++i) {
+ EXPECT_EQ(iBuffer[i].owner, client);
+ }
+ } else if (msg.data.eventData.data2 == kPortIndexOutput) {
+ // test if client got all its buffers back
+ for (size_t i = 0; i < oBuffer.size(); ++i) {
+ EXPECT_EQ(oBuffer[i].owner, client);
+ }
+ } else {
+ EXPECT_TRUE(false) << "Bad port Index";
+ }
+ }
+
+ // SPECIAL CASE: When OMX_ALL is used as argument, Android OMX Core sends
+ // an additional flush event with argument OMX_ALL. This we believe is
+ // not recognized by OMX-IL Spec. So read this event and ignore it
+ status =
+ observer->dequeueMessage(&msg, DEFAULT_TIMEOUT_PE, &iBuffer, &oBuffer);
+ if (status == android::hardware::media::omx::V1_0::Status::OK) {
+ ASSERT_EQ(msg.type, Message::Type::EVENT);
+ ASSERT_EQ(msg.data.eventData.event, OMX_EventCmdComplete);
+ ASSERT_EQ(msg.data.eventData.data1, OMX_CommandFlush);
+ ASSERT_EQ(msg.data.eventData.data2, OMX_ALL);
+ }
+
+ // set state to idle
+ changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
+ // set state to loaded
+ changeStateIdletoLoaded(omxNode, observer, &iBuffer, &oBuffer,
+ kPortIndexInput, kPortIndexOutput);
+}
+
// test port mode configuration when the component is in various states
TEST_F(ComponentHidlTest, PortModeConfig) {
description("Test Port Mode Configuration");
diff --git a/media/omx/1.0/vts/functional/video/Android.bp b/media/omx/1.0/vts/functional/video/Android.bp
index e251a15..f0da2b3 100644
--- a/media/omx/1.0/vts/functional/video/Android.bp
+++ b/media/omx/1.0/vts/functional/video/Android.bp
@@ -21,10 +21,6 @@
"VtsHalMediaOmxV1_0TargetVideoDecTest.cpp",
"media_video_hidl_test_common.cpp"
],
- static_libs: [
- "android.hardware.graphics.allocator@2.0",
- "android.hardware.graphics.mapper@2.0",
- ],
}
cc_test {
@@ -36,6 +32,5 @@
],
static_libs: [
"libnativewindow",
- "android.hardware.graphics.mapper@2.0",
],
}
diff --git a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
index a5b5524..6b01285 100644
--- a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
+++ b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
@@ -17,9 +17,6 @@
#define LOG_TAG "media_omx_hidl_video_dec_test"
#include <android-base/logging.h>
-#include <android/hardware/graphics/allocator/2.0/IAllocator.h>
-#include <android/hardware/graphics/mapper/2.0/IMapper.h>
-#include <android/hardware/graphics/mapper/2.0/types.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>
@@ -27,10 +24,7 @@
#include <android/hidl/allocator/1.0/IAllocator.h>
#include <android/hidl/memory/1.0/IMapper.h>
#include <android/hidl/memory/1.0/IMemory.h>
-#include <cutils/atomic.h>
-using ::android::hardware::graphics::common::V1_0::BufferUsage;
-using ::android::hardware::graphics::common::V1_0::PixelFormat;
using ::android::hardware::media::omx::V1_0::IOmx;
using ::android::hardware::media::omx::V1_0::IOmxObserver;
using ::android::hardware::media::omx::V1_0::IOmxNode;
@@ -219,6 +213,7 @@
timestampUs = 0;
timestampDevTest = false;
isSecure = false;
+ portSettingsChange = false;
size_t suffixLen = strlen(".secure");
if (strlen(gEnv->getComponent().c_str()) >= suffixLen) {
isSecure =
@@ -227,7 +222,7 @@
".secure");
}
if (isSecure) disableTest = true;
- if (disableTest) std::cout << "[ ] Warning ! Test Disabled\n";
+ if (disableTest) std::cout << "[ WARN ] Test Disabled \n";
}
virtual void TearDown() override {
@@ -271,9 +266,8 @@
EXPECT_EQ(tsHit, true)
<< "TimeStamp not recognized";
} else {
- std::cout
- << "[ ] Warning ! Received non-zero "
- "output / TimeStamp not recognized \n";
+ std::cout << "[ INFO ] Received non-zero "
+ "output / TimeStamp not recognized \n";
}
}
}
@@ -295,6 +289,13 @@
}
#endif
}
+ } else if (msg.type == Message::Type::EVENT) {
+ if (msg.data.eventData.event == OMX_EventPortSettingsChanged) {
+ if ((msg.data.eventData.data2 == OMX_IndexParamPortDefinition ||
+ msg.data.eventData.data2 == 0)) {
+ portSettingsChange = true;
+ }
+ }
}
}
@@ -322,6 +323,7 @@
::android::List<uint64_t> timestampUslist;
bool timestampDevTest;
bool isSecure;
+ bool portSettingsChange;
protected:
static void description(const std::string& description) {
@@ -369,122 +371,61 @@
}
}
+// number of elementary streams per component
+#define STREAM_COUNT 2
// LookUpTable of clips and metadata for component testing
void GetURLForComponent(VideoDecHidlTest::standardComp comp, char* mURL,
- char* info) {
+ char* info, size_t streamIndex = 1) {
struct CompToURL {
VideoDecHidlTest::standardComp comp;
- const char* mURL;
- const char* info;
+ const char mURL[STREAM_COUNT][512];
+ const char info[STREAM_COUNT][512];
};
+ ASSERT_TRUE(streamIndex < STREAM_COUNT);
+
static const CompToURL kCompToURL[] = {
{VideoDecHidlTest::standardComp::avc,
- "bbb_avc_1920x1080_5000kbps_30fps.h264",
- "bbb_avc_1920x1080_5000kbps_30fps.info"},
+ {"bbb_avc_176x144_300kbps_60fps.h264",
+ "bbb_avc_1920x1080_5000kbps_30fps.h264"},
+ {"bbb_avc_176x144_300kbps_60fps.info",
+ "bbb_avc_1920x1080_5000kbps_30fps.info"}},
{VideoDecHidlTest::standardComp::hevc,
- "bbb_hevc_640x360_1600kbps_30fps.hevc",
- "bbb_hevc_640x360_1600kbps_30fps.info"},
+ {"bbb_hevc_176x144_176kbps_60fps.hevc",
+ "bbb_hevc_640x360_1600kbps_30fps.hevc"},
+ {"bbb_hevc_176x144_176kbps_60fps.info",
+ "bbb_hevc_640x360_1600kbps_30fps.info"}},
{VideoDecHidlTest::standardComp::mpeg2,
- "bbb_mpeg2_176x144_105kbps_25fps.m2v",
- "bbb_mpeg2_176x144_105kbps_25fps.info"},
+ {"bbb_mpeg2_176x144_105kbps_25fps.m2v",
+ "bbb_mpeg2_352x288_1mbps_60fps.m2v"},
+ {"bbb_mpeg2_176x144_105kbps_25fps.info",
+ "bbb_mpeg2_352x288_1mbps_60fps.info"}},
{VideoDecHidlTest::standardComp::h263,
- "bbb_h263_352x288_300kbps_12fps.h263",
- "bbb_h263_352x288_300kbps_12fps.info"},
+ {"", "bbb_h263_352x288_300kbps_12fps.h263"},
+ {"", "bbb_h263_352x288_300kbps_12fps.info"}},
{VideoDecHidlTest::standardComp::mpeg4,
- "bbb_mpeg4_1280x720_1000kbps_25fps.m4v",
- "bbb_mpeg4_1280x720_1000kbps_25fps.info"},
- {VideoDecHidlTest::standardComp::vp8, "bbb_vp8_640x360_2mbps_30fps.vp8",
- "bbb_vp8_640x360_2mbps_30fps.info"},
+ {"", "bbb_mpeg4_1280x720_1000kbps_25fps.m4v"},
+ {"", "bbb_mpeg4_1280x720_1000kbps_25fps.info"}},
+ {VideoDecHidlTest::standardComp::vp8,
+ {"bbb_vp8_176x144_240kbps_60fps.vp8",
+ "bbb_vp8_640x360_2mbps_30fps.vp8"},
+ {"bbb_vp8_176x144_240kbps_60fps.info",
+ "bbb_vp8_640x360_2mbps_30fps.info"}},
{VideoDecHidlTest::standardComp::vp9,
- "bbb_vp9_640x360_1600kbps_30fps.vp9",
- "bbb_vp9_640x360_1600kbps_30fps.info"},
+ {"bbb_vp9_176x144_285kbps_60fps.vp9",
+ "bbb_vp9_640x360_1600kbps_30fps.vp9"},
+ {"bbb_vp9_176x144_285kbps_60fps.info",
+ "bbb_vp9_640x360_1600kbps_30fps.info"}},
};
for (size_t i = 0; i < sizeof(kCompToURL) / sizeof(kCompToURL[0]); ++i) {
if (kCompToURL[i].comp == comp) {
- strcat(mURL, kCompToURL[i].mURL);
- strcat(info, kCompToURL[i].info);
+ strcat(mURL, kCompToURL[i].mURL[streamIndex]);
+ strcat(info, kCompToURL[i].info[streamIndex]);
return;
}
}
}
-void allocateGraphicBuffers(sp<IOmxNode> omxNode, OMX_U32 portIndex,
- android::Vector<BufferInfo>* buffArray,
- uint32_t nFrameWidth, uint32_t nFrameHeight,
- int32_t* nStride, int format, uint32_t count) {
- android::hardware::media::omx::V1_0::Status status;
- sp<android::hardware::graphics::allocator::V2_0::IAllocator> allocator =
- android::hardware::graphics::allocator::V2_0::IAllocator::getService();
- ASSERT_NE(nullptr, allocator.get());
-
- sp<android::hardware::graphics::mapper::V2_0::IMapper> mapper =
- android::hardware::graphics::mapper::V2_0::IMapper::getService();
- ASSERT_NE(mapper.get(), nullptr);
-
- android::hardware::graphics::mapper::V2_0::IMapper::BufferDescriptorInfo
- descriptorInfo;
- uint32_t usage;
-
- descriptorInfo.width = nFrameWidth;
- descriptorInfo.height = nFrameHeight;
- descriptorInfo.layerCount = 1;
- descriptorInfo.format = static_cast<PixelFormat>(format);
- descriptorInfo.usage = static_cast<uint64_t>(BufferUsage::CPU_READ_OFTEN);
- omxNode->getGraphicBufferUsage(
- portIndex,
- [&status, &usage](android::hardware::media::omx::V1_0::Status _s,
- uint32_t _n1) {
- status = _s;
- usage = _n1;
- });
- if (status == android::hardware::media::omx::V1_0::Status::OK) {
- descriptorInfo.usage |= usage;
- }
-
- ::android::hardware::hidl_vec<uint32_t> descriptor;
- android::hardware::graphics::mapper::V2_0::Error error;
- mapper->createDescriptor(
- descriptorInfo, [&error, &descriptor](
- android::hardware::graphics::mapper::V2_0::Error _s,
- ::android::hardware::hidl_vec<uint32_t> _n1) {
- error = _s;
- descriptor = _n1;
- });
- EXPECT_EQ(error, android::hardware::graphics::mapper::V2_0::Error::NONE);
-
- EXPECT_EQ(buffArray->size(), count);
-
- static volatile int32_t nextId = 0;
- uint64_t id = static_cast<uint64_t>(getpid()) << 32;
- allocator->allocate(
- descriptor, count,
- [&](android::hardware::graphics::mapper::V2_0::Error _s, uint32_t _n1,
- const ::android::hardware::hidl_vec<
- ::android::hardware::hidl_handle>& _n2) {
- ASSERT_EQ(android::hardware::graphics::mapper::V2_0::Error::NONE,
- _s);
- *nStride = _n1;
- ASSERT_EQ(count, _n2.size());
- for (uint32_t i = 0; i < count; i++) {
- buffArray->editItemAt(i).omxBuffer.nativeHandle = _n2[i];
- buffArray->editItemAt(i).omxBuffer.attr.anwBuffer.width =
- nFrameWidth;
- buffArray->editItemAt(i).omxBuffer.attr.anwBuffer.height =
- nFrameHeight;
- buffArray->editItemAt(i).omxBuffer.attr.anwBuffer.stride = _n1;
- buffArray->editItemAt(i).omxBuffer.attr.anwBuffer.format =
- descriptorInfo.format;
- buffArray->editItemAt(i).omxBuffer.attr.anwBuffer.usage =
- descriptorInfo.usage;
- buffArray->editItemAt(i).omxBuffer.attr.anwBuffer.layerCount =
- descriptorInfo.layerCount;
- buffArray->editItemAt(i).omxBuffer.attr.anwBuffer.id =
- id | static_cast<uint32_t>(android_atomic_inc(&nextId));
- }
- });
-}
-
// port settings reconfiguration during runtime. reconfigures frame dimensions
void portReconfiguration(sp<IOmxNode> omxNode, sp<CodecObserver> observer,
android::Vector<BufferInfo>* iBuffer,
@@ -568,22 +509,7 @@
android::hardware::media::omx::V1_0::Status::TIMED_OUT);
allocatePortBuffers(omxNode, oBuffer, kPortIndexOutput,
- oPortMode);
- if (oPortMode != PortMode::PRESET_BYTE_BUFFER) {
- OMX_PARAM_PORTDEFINITIONTYPE portDef;
-
- status = getPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexOutput, &portDef);
- ASSERT_EQ(
- status,
- ::android::hardware::media::omx::V1_0::Status::OK);
- allocateGraphicBuffers(omxNode, kPortIndexOutput, oBuffer,
- portDef.format.video.nFrameWidth,
- portDef.format.video.nFrameHeight,
- &portDef.format.video.nStride,
- portDef.format.video.eColorFormat,
- portDef.nBufferCountActual);
- }
+ oPortMode, true);
status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT,
iBuffer, oBuffer);
ASSERT_EQ(status,
@@ -611,14 +537,14 @@
}
} else if (msg.data.eventData.data2 ==
OMX_IndexConfigCommonOutputCrop) {
- std::cout << "[ ] Warning ! OMX_EventPortSettingsChanged/ "
+ std::cout << "[ INFO ] OMX_EventPortSettingsChanged/ "
"OMX_IndexConfigCommonOutputCrop not handled \n";
} else if (msg.data.eventData.data2 == OMX_IndexVendorStartUnused + 3) {
- std::cout << "[ ] Warning ! OMX_EventPortSettingsChanged/ "
+ std::cout << "[ INFO ] OMX_EventPortSettingsChanged/ "
"kDescribeColorAspectsIndex not handled \n";
}
} else if (msg.data.eventData.event == OMX_EventError) {
- std::cout << "[ ] Warning ! OMX_EventError/ "
+ std::cerr << "[ ERROR ] OMX_EventError/ "
"Decode Frame Call might be failed \n";
return;
} else {
@@ -674,39 +600,16 @@
bool signalEOS = true) {
android::hardware::media::omx::V1_0::Status status;
Message msg;
-
- // dispatch output buffers
- for (size_t i = 0; i < oBuffer->size(); i++) {
- dispatchOutputBuffer(omxNode, oBuffer, i, oPortMode);
- }
- // dispatch input buffers
+ size_t index;
uint32_t flags = 0;
int frameID = offset;
- for (size_t i = 0; (i < iBuffer->size()) && (frameID < (int)Info->size()) &&
- (frameID < (offset + range));
- i++) {
- char* ipBuffer = static_cast<char*>(
- static_cast<void*>((*iBuffer)[i].mMemory->getPointer()));
- ASSERT_LE((*Info)[frameID].bytesCount,
- static_cast<int>((*iBuffer)[i].mMemory->getSize()));
- eleStream.read(ipBuffer, (*Info)[frameID].bytesCount);
- ASSERT_EQ(eleStream.gcount(), (*Info)[frameID].bytesCount);
- flags = (*Info)[frameID].flags;
- if (signalEOS && ((frameID == (int)Info->size() - 1) ||
- (frameID == (offset + range - 1))))
- flags |= OMX_BUFFERFLAG_EOS;
- dispatchInputBuffer(omxNode, iBuffer, i, (*Info)[frameID].bytesCount,
- flags, (*Info)[frameID].timestamp);
- frameID++;
- }
-
int timeOut = TIMEOUT_COUNTER_Q;
bool iQueued, oQueued;
+
while (1) {
iQueued = oQueued = false;
status =
observer->dequeueMessage(&msg, DEFAULT_TIMEOUT_Q, iBuffer, oBuffer);
-
// Port Reconfiguration
if (status == android::hardware::media::omx::V1_0::Status::OK &&
msg.type == Message::Type::EVENT) {
@@ -718,7 +621,6 @@
if (frameID == (int)Info->size() || frameID == (offset + range)) break;
// Dispatch input buffer
- size_t index = 0;
if ((index = getEmptyBufferID(iBuffer)) < iBuffer->size()) {
char* ipBuffer = static_cast<char*>(
static_cast<void*>((*iBuffer)[index].mMemory->getPointer()));
@@ -727,6 +629,11 @@
eleStream.read(ipBuffer, (*Info)[frameID].bytesCount);
ASSERT_EQ(eleStream.gcount(), (*Info)[frameID].bytesCount);
flags = (*Info)[frameID].flags;
+ // Indicate to omx core that the buffer contains a full frame worth
+ // of data
+ flags |= OMX_BUFFERFLAG_ENDOFFRAME;
+ // Indicate the omx core that this is the last buffer it needs to
+ // process
if (signalEOS && ((frameID == (int)Info->size() - 1) ||
(frameID == (offset + range - 1))))
flags |= OMX_BUFFERFLAG_EOS;
@@ -736,10 +643,12 @@
frameID++;
iQueued = true;
}
+ // Dispatch output buffer
if ((index = getEmptyBufferID(oBuffer)) < oBuffer->size()) {
dispatchOutputBuffer(omxNode, oBuffer, index, oPortMode);
oQueued = true;
}
+ // Reset Counters when either input or output buffer is dispatched
if (iQueued || oQueued)
timeOut = TIMEOUT_COUNTER_Q;
else
@@ -972,30 +881,14 @@
setDefaultPortParam(omxNode, kPortIndexOutput, OMX_VIDEO_CodingUnused,
eColorFormat, nFrameWidth, nFrameHeight, 0, xFramerate);
- // disabling adaptive playback.
- omxNode->prepareForAdaptivePlayback(kPortIndexOutput, false, 1920, 1080);
-
android::Vector<BufferInfo> iBuffer, oBuffer;
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
- kPortIndexInput, kPortIndexOutput, portMode);
+ kPortIndexInput, kPortIndexOutput, portMode, true);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
- if (portMode[1] != PortMode::PRESET_BYTE_BUFFER) {
- OMX_PARAM_PORTDEFINITIONTYPE portDef;
-
- status = getPortParam(omxNode, OMX_IndexParamPortDefinition,
- kPortIndexOutput, &portDef);
- ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
- allocateGraphicBuffers(
- omxNode, kPortIndexOutput, &oBuffer,
- portDef.format.video.nFrameWidth, portDef.format.video.nFrameHeight,
- &portDef.format.video.nStride, portDef.format.video.eColorFormat,
- portDef.nBufferCountActual);
- }
-
// Port Reconfiguration
eleStream.open(mURL, std::ifstream::binary);
ASSERT_EQ(eleStream.is_open(), true);
@@ -1015,6 +908,148 @@
kPortIndexInput, kPortIndexOutput);
}
+// Test for adaptive playback support
+TEST_F(VideoDecHidlTest, AdaptivePlaybackTest) {
+ description("Tests for Adaptive Playback support");
+ if (disableTest) return;
+ if (!(compName == avc || compName == hevc || compName == vp8 ||
+ compName == vp9 || compName == mpeg2))
+ return;
+ android::hardware::media::omx::V1_0::Status status;
+ uint32_t kPortIndexInput = 0, kPortIndexOutput = 1;
+ status = setRole(omxNode, gEnv->getRole().c_str());
+ ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ OMX_PORT_PARAM_TYPE params;
+ status = getParam(omxNode, OMX_IndexParamVideoInit, ¶ms);
+ if (status == ::android::hardware::media::omx::V1_0::Status::OK) {
+ ASSERT_EQ(params.nPorts, 2U);
+ kPortIndexInput = params.nStartPortNumber;
+ kPortIndexOutput = kPortIndexInput + 1;
+ }
+
+ // set port mode
+ 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);
+ }
+
+ // prepare for adaptive playback
+ uint32_t adaptiveMaxWidth = 320;
+ uint32_t adaptiveMaxHeight = 240;
+ status = omxNode->prepareForAdaptivePlayback(
+ kPortIndexOutput, true, adaptiveMaxWidth, adaptiveMaxHeight);
+ if (strncmp(gEnv->getComponent().c_str(), "OMX.google.", 11) == 0) {
+ // SoftOMX Decoders donot support graphic buffer modes. So for them
+ // support for adaptive play back is mandatory in Byte Buffer mode
+ ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ } else {
+ // for vendor codecs, support for adaptive play back is optional
+ // in byte buffer mode.
+ if (portMode[1] == PortMode::PRESET_BYTE_BUFFER) return;
+ if (status != ::android::hardware::media::omx::V1_0::Status::OK) return;
+ }
+
+ // TODO: Handle this better !!!
+ // Without the knowledge of the maximum resolution of the frame to be
+ // decoded it is not possible to choose the size of the input buffer.
+ // The value below is based on the info. files of clips in res folder.
+ status = setPortBufferSize(omxNode, kPortIndexInput, 482304);
+ ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+
+ // set Port Params
+ uint32_t nFrameWidth, nFrameHeight, xFramerate;
+ getInputChannelInfo(omxNode, kPortIndexInput, &nFrameWidth, &nFrameHeight,
+ &xFramerate);
+ // get default color format
+ OMX_COLOR_FORMATTYPE eColorFormat = OMX_COLOR_FormatUnused;
+ getDefaultColorFormat(omxNode, kPortIndexOutput, portMode[1],
+ &eColorFormat);
+ ASSERT_NE(eColorFormat, OMX_COLOR_FormatUnused);
+ status =
+ setVideoPortFormat(omxNode, kPortIndexOutput, OMX_VIDEO_CodingUnused,
+ eColorFormat, xFramerate);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ setDefaultPortParam(omxNode, kPortIndexOutput, OMX_VIDEO_CodingUnused,
+ eColorFormat, nFrameWidth, nFrameHeight, 0, xFramerate);
+
+ android::Vector<BufferInfo> iBuffer, oBuffer;
+
+ // set state to idle
+ changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
+ kPortIndexInput, kPortIndexOutput, portMode, true);
+ // set state to executing
+ changeStateIdletoExecute(omxNode, observer);
+
+ timestampDevTest = true;
+ uint32_t timestampOffset = 0;
+ for (uint32_t i = 0; i < STREAM_COUNT * 2; i++) {
+ std::ifstream eleStream, eleInfo;
+ char mURL[512], info[512];
+ android::Vector<FrameData> Info;
+ strcpy(mURL, gEnv->getRes().c_str());
+ strcpy(info, gEnv->getRes().c_str());
+ GetURLForComponent(compName, mURL, info, i % STREAM_COUNT);
+ eleInfo.open(info);
+ ASSERT_EQ(eleInfo.is_open(), true);
+ int bytesCount = 0;
+ uint32_t flags = 0;
+ uint32_t timestamp = 0;
+ uint32_t timestampMax = 0;
+ while (1) {
+ if (!(eleInfo >> bytesCount)) break;
+ eleInfo >> flags;
+ eleInfo >> timestamp;
+ timestamp += timestampOffset;
+ Info.push_back({bytesCount, flags, timestamp});
+ if (timestampDevTest && (flags != OMX_BUFFERFLAG_CODECCONFIG))
+ timestampUslist.push_back(timestamp);
+ if (timestampMax < timestamp) timestampMax = timestamp;
+ }
+ timestampOffset = timestampMax;
+ eleInfo.close();
+
+ // Port Reconfiguration
+ eleStream.open(mURL, std::ifstream::binary);
+ ASSERT_EQ(eleStream.is_open(), true);
+ decodeNFrames(omxNode, observer, &iBuffer, &oBuffer, kPortIndexInput,
+ kPortIndexOutput, eleStream, &Info, 0, (int)Info.size(),
+ portMode[1], false);
+ eleStream.close();
+
+ getInputChannelInfo(omxNode, kPortIndexInput, &nFrameWidth,
+ &nFrameHeight, &xFramerate);
+ if ((nFrameWidth > adaptiveMaxWidth) ||
+ (nFrameHeight > adaptiveMaxHeight)) {
+ if (nFrameWidth > adaptiveMaxWidth) adaptiveMaxWidth = nFrameWidth;
+ if (nFrameHeight > adaptiveMaxHeight)
+ adaptiveMaxHeight = nFrameHeight;
+ EXPECT_TRUE(portSettingsChange);
+ } else {
+ // In DynamicANW Buffer mode, its ok to do a complete
+ // reconfiguration even if a partial reconfiguration is sufficient.
+ if (portMode[1] != PortMode::DYNAMIC_ANW_BUFFER)
+ EXPECT_FALSE(portSettingsChange);
+ }
+ portSettingsChange = false;
+ }
+ waitOnInputConsumption(omxNode, observer, &iBuffer, &oBuffer,
+ kPortIndexInput, kPortIndexOutput, portMode[1]);
+ testEOS(omxNode, observer, &iBuffer, &oBuffer, true, eosFlag, portMode,
+ portReconfiguration, kPortIndexInput, kPortIndexOutput, nullptr);
+ if (timestampDevTest) EXPECT_EQ(timestampUslist.empty(), true);
+ // set state to idle
+ changeStateExecutetoIdle(omxNode, observer, &iBuffer, &oBuffer);
+ // set state to executing
+ changeStateIdletoLoaded(omxNode, observer, &iBuffer, &oBuffer,
+ kPortIndexInput, kPortIndexOutput);
+}
+
// end of sequence test
TEST_F(VideoDecHidlTest, EOSTest_M) {
description("Test End of stream monkeying");
@@ -1057,7 +1092,7 @@
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
- kPortIndexInput, kPortIndexOutput, portMode);
+ kPortIndexInput, kPortIndexOutput, portMode, true);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
@@ -1145,7 +1180,7 @@
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
- kPortIndexInput, kPortIndexOutput, portMode);
+ kPortIndexInput, kPortIndexOutput, portMode, true);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
@@ -1233,10 +1268,16 @@
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
// set port mode
+ portMode[0] = PortMode::PRESET_BYTE_BUFFER;
+ portMode[1] = PortMode::PRESET_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]);
- ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ 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
uint32_t nFrameWidth, nFrameHeight, xFramerate;
@@ -1258,7 +1299,7 @@
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
- kPortIndexInput, kPortIndexOutput, portMode);
+ kPortIndexInput, kPortIndexOutput, portMode, true);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
@@ -1353,7 +1394,7 @@
// set state to idle
changeStateLoadedtoIdle(omxNode, observer, &iBuffer, &oBuffer,
- kPortIndexInput, kPortIndexOutput, portMode);
+ kPortIndexInput, kPortIndexOutput, portMode, true);
// set state to executing
changeStateIdletoExecute(omxNode, observer);
diff --git a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp
index 23f051d..df90ccc 100644
--- a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp
+++ b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp
@@ -237,7 +237,7 @@
".secure");
}
if (isSecure) disableTest = true;
- if (disableTest) std::cerr << "[ ] Warning ! Test Disabled\n";
+ if (disableTest) std::cout << "[ WARN ] Test Disabled \n";
}
virtual void TearDown() override {
@@ -278,9 +278,8 @@
EXPECT_EQ(tsHit, true)
<< "TimeStamp not recognized";
} else {
- std::cerr
- << "[ ] Warning ! Received non-zero "
- "output / TimeStamp not recognized \n";
+ std::cout << "[ INFO ] Received non-zero "
+ "output / TimeStamp not recognized \n";
}
}
}
@@ -442,7 +441,7 @@
status = setPortConfig(omxNode, OMX_IndexConfigVideoIntraVOPRefresh,
portIndex, ¶m);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
- std::cerr << "[ ] Warning ! unable to request IDR \n";
+ std::cout << "[ INFO ] unable to request IDR \n";
}
// modify bitrate
@@ -453,7 +452,7 @@
status =
setPortConfig(omxNode, OMX_IndexConfigVideoBitrate, portIndex, ¶m);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
- std::cerr << "[ ] Warning ! unable to change Bitrate \n";
+ std::cout << "[ INFO ] unable to change Bitrate \n";
}
// modify framerate
@@ -465,7 +464,7 @@
status = setPortConfig(omxNode, OMX_IndexConfigVideoFramerate, portIndex,
¶m);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
- std::cerr << "[ ] Warning ! unable to change Framerate \n";
+ std::cout << "[ INFO ] unable to change Framerate \n";
return status;
}
@@ -479,7 +478,7 @@
(OMX_INDEXTYPE)OMX_IndexConfigAndroidIntraRefresh,
portIndex, ¶m);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
- std::cerr << "[ ] Warning ! unable to change Refresh Period\n";
+ std::cout << "[ INFO ] unable to change Refresh Period\n";
}
// set intra refresh interval
@@ -505,7 +504,7 @@
status = setPortParam(omxNode, OMX_IndexParamVideoIntraRefresh, portIndex,
¶m);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
- std::cerr << "[ ] Warning ! unable to set Refresh Period \n";
+ std::cout << "[ INFO ] unable to set Refresh Period \n";
}
void setLatency(sp<IOmxNode> omxNode, OMX_U32 portIndex, uint32_t latency) {
@@ -515,7 +514,7 @@
status = setPortConfig(omxNode, (OMX_INDEXTYPE)OMX_IndexConfigLatency,
portIndex, ¶m);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
- std::cerr << "[ ] Warning ! unable to set latency\n";
+ std::cout << "[ INFO ] unable to set latency\n";
}
void getLatency(sp<IOmxNode> omxNode, OMX_U32 portIndex, uint32_t* latency) {
@@ -524,7 +523,7 @@
status = getPortConfig(omxNode, (OMX_INDEXTYPE)OMX_IndexConfigLatency,
portIndex, ¶m);
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
- std::cerr << "[ ] Warning ! unable to get latency\n";
+ std::cout << "[ INFO ] unable to get latency\n";
else
*latency = param.nU32;
}
@@ -983,58 +982,25 @@
sp<CodecProducerListener> listener = nullptr) {
android::hardware::media::omx::V1_0::Status status;
Message msg;
- uint32_t ipCount = 0;
+ uint64_t timestamp = 0;
+ uint32_t flags = 0;
+ int timeOut = TIMEOUT_COUNTER_Q;
+ bool iQueued, oQueued;
+ uint32_t ipCount = 0;
if (ipCount == 0) {
status = changeFrameRate(omxNode, portIndexOutput, (24U << 16));
if (status == ::android::hardware::media::omx::V1_0::Status::OK)
xFramerate = (24U << 16);
}
-
- // dispatch output buffers
- for (size_t i = 0; i < oBuffer->size(); i++) {
- dispatchOutputBuffer(omxNode, oBuffer, i);
- }
- // dispatch input buffers
int32_t timestampIncr = (int)((float)1000000 / (xFramerate >> 16));
- // timestamp scale = Nano sec
- if (inputDataIsMeta) timestampIncr *= 1000;
- uint64_t timestamp = 0;
- uint32_t flags = 0;
- for (size_t i = 0; i < iBuffer->size() && nFrames != 0; i++) {
- if (inputDataIsMeta) {
- if (listener->freeBuffers > listener->minUnDequeuedCount) {
- if (dispatchGraphicBuffer(omxNode, producer, listener, iBuffer,
- portIndexInput, eleStream, timestamp))
- break;
- timestamp += timestampIncr;
- nFrames--;
- ipCount++;
- }
- } else {
- char* ipBuffer = static_cast<char*>(
- static_cast<void*>((*iBuffer)[i].mMemory->getPointer()));
- ASSERT_LE(bytesCount,
- static_cast<int>((*iBuffer)[i].mMemory->getSize()));
- if (fillByteBuffer(omxNode, ipBuffer, portIndexInput, eleStream))
- break;
- if (signalEOS && (nFrames == 1)) flags = OMX_BUFFERFLAG_EOS;
- dispatchInputBuffer(omxNode, iBuffer, i, bytesCount, flags,
- timestamp);
- if (timestampUslist) timestampUslist->push_back(timestamp);
- timestamp += timestampIncr;
- nFrames--;
- ipCount++;
- }
- }
+ if (inputDataIsMeta) timestampIncr *= 1000; // timestamp scale: Nano sec
- int timeOut = TIMEOUT_COUNTER_Q;
- bool iQueued, oQueued;
while (1) {
iQueued = oQueued = false;
status =
observer->dequeueMessage(&msg, DEFAULT_TIMEOUT_Q, iBuffer, oBuffer);
-
+ // Port Reconfiguration
if (status == android::hardware::media::omx::V1_0::Status::OK) {
ASSERT_EQ(msg.type, Message::Type::EVENT);
if (msg.data.eventData.event == OMX_EventPortSettingsChanged) {
@@ -1046,7 +1012,7 @@
break;
} else if (msg.data.eventData.event == OMX_EventDataSpaceChanged) {
// TODO: how am i supposed to respond now?
- std::cout << "[ ] Info ! OMX_EventDataSpaceChanged \n";
+ std::cout << "[ INFO ] OMX_EventDataSpaceChanged \n";
} else {
ASSERT_TRUE(false);
}
@@ -1076,7 +1042,8 @@
if (fillByteBuffer(omxNode, ipBuffer, portIndexInput,
eleStream))
break;
- if (signalEOS && (nFrames == 1)) flags = OMX_BUFFERFLAG_EOS;
+ flags = OMX_BUFFERFLAG_ENDOFFRAME;
+ if (signalEOS && (nFrames == 1)) flags |= OMX_BUFFERFLAG_EOS;
dispatchInputBuffer(omxNode, iBuffer, index, bytesCount, flags,
timestamp);
if (timestampUslist) timestampUslist->push_back(timestamp);
@@ -1086,10 +1053,12 @@
iQueued = true;
}
}
+ // Dispatch output buffer
if ((index = getEmptyBufferID(oBuffer)) < oBuffer->size()) {
dispatchOutputBuffer(omxNode, oBuffer, index);
oQueued = true;
}
+ // Reset Counters when either input or output buffer is dispatched
if (iQueued || oQueued)
timeOut = TIMEOUT_COUNTER_Q;
else
@@ -1098,6 +1067,7 @@
EXPECT_TRUE(false) << "Wait on Input/Output is found indefinite";
break;
}
+ // Runtime Param Configuration
if (ipCount == 15) {
changeBitrate(omxNode, portIndexOutput, 768000);
requestIDR(omxNode, portIndexOutput);
@@ -1266,8 +1236,7 @@
status = setParam(omxNode, static_cast<OMX_INDEXTYPE>(index), ¶m);
}
if (status != ::android::hardware::media::omx::V1_0::Status::OK)
- std::cerr
- << "[ ] Warning ! unable to prependSPSPPSToIDRFrames\n";
+ std::cout << "[ INFO ] unable to prependSPSPPSToIDRFrames\n";
else
prependSPSPPS = true;
diff --git a/media/res/bbb_avc_176x144_300kbps_60fps.h264 b/media/res/bbb_avc_176x144_300kbps_60fps.h264
new file mode 100644
index 0000000..da1e75d
--- /dev/null
+++ b/media/res/bbb_avc_176x144_300kbps_60fps.h264
Binary files differ
diff --git a/media/res/bbb_avc_176x144_300kbps_60fps.info b/media/res/bbb_avc_176x144_300kbps_60fps.info
new file mode 100644
index 0000000..d88b540
--- /dev/null
+++ b/media/res/bbb_avc_176x144_300kbps_60fps.info
@@ -0,0 +1,62 @@
+28 128 0
+10 128 0
+4780 32 33333
+960 0 100000
+480 0 66666
+246 0 50000
+264 0 83333
+1160 0 166666
+404 0 133333
+237 0 116666
+193 0 150000
+936 0 233333
+384 0 200000
+199 0 183333
+275 0 216666
+1086 0 300000
+520 0 266666
+301 0 250000
+270 0 283333
+1232 0 366666
+559 0 333333
+287 0 316666
+274 0 350000
+1084 0 433333
+485 0 400000
+307 0 383333
+284 0 416666
+1052 0 500000
+504 0 466666
+298 0 450000
+327 0 483333
+1189 0 566666
+358 0 533333
+172 0 516666
+185 0 550000
+1115 0 633333
+463 0 600000
+218 0 583333
+255 0 616666
+1155 0 700000
+622 0 666666
+356 0 650000
+341 0 683333
+1240 0 766666
+610 0 733333
+341 0 716666
+380 0 750000
+1326 0 833333
+620 0 800000
+396 0 783333
+353 0 816666
+1196 0 900000
+623 0 866666
+375 0 850000
+362 0 883333
+1192 0 966666
+654 0 933333
+359 0 916666
+352 0 950000
+828 0 1016666
+436 0 983333
+401 0 1000000
diff --git a/media/res/bbb_flac_stereo_680kbps_48000hz.flac b/media/res/bbb_flac_stereo_680kbps_48000hz.flac
new file mode 100644
index 0000000..db94d8e
--- /dev/null
+++ b/media/res/bbb_flac_stereo_680kbps_48000hz.flac
Binary files differ
diff --git a/media/res/bbb_flac_stereo_680kbps_48000hz.info b/media/res/bbb_flac_stereo_680kbps_48000hz.info
new file mode 100644
index 0000000..c572430
--- /dev/null
+++ b/media/res/bbb_flac_stereo_680kbps_48000hz.info
@@ -0,0 +1,415 @@
+42 128 0
+1386 32 0
+2401 32 24000
+2321 32 48000
+2367 32 72000
+2370 32 96000
+2334 32 120000
+2396 32 144000
+2375 32 168000
+2431 32 192000
+2428 32 216000
+2334 32 240000
+2261 32 264000
+2124 32 288000
+2152 32 312000
+2295 32 336000
+2183 32 360000
+2393 32 384000
+2400 32 408000
+2246 32 432000
+2289 32 456000
+2400 32 480000
+2335 32 504000
+2294 32 528000
+2260 32 552000
+2206 32 576000
+2185 32 600000
+2155 32 624000
+2118 32 648000
+2094 32 672000
+2050 32 696000
+2059 32 720000
+2030 32 744000
+2022 32 768000
+2078 32 792000
+2082 32 816000
+2094 32 840000
+2111 32 864000
+2043 32 888000
+2023 32 912000
+2024 32 936000
+2056 32 960000
+2108 32 984000
+2138 32 1008000
+2140 32 1032000
+2111 32 1056000
+2110 32 1080000
+2137 32 1104000
+2157 32 1128000
+2174 32 1152000
+2200 32 1176000
+2203 32 1200000
+2237 32 1224000
+2261 32 1248000
+2215 32 1272000
+2133 32 1296000
+2091 32 1320000
+2088 32 1344000
+2122 32 1368000
+2139 32 1392000
+2146 32 1416000
+2231 32 1440000
+2282 32 1464000
+2273 32 1488000
+2304 32 1512000
+2292 32 1536000
+2255 32 1560000
+2181 32 1584000
+2081 32 1608000
+2012 32 1632000
+2011 32 1656000
+2066 32 1680000
+2069 32 1704000
+2120 32 1728000
+2141 32 1752000
+2148 32 1776000
+2181 32 1800000
+2176 32 1824000
+2240 32 1848000
+2297 32 1872000
+2325 32 1896000
+2336 32 1920000
+2329 32 1944000
+2299 32 1968000
+2322 32 1992000
+2347 32 2016000
+2287 32 2040000
+2286 32 2064000
+2269 32 2088000
+2320 32 2112000
+2305 32 2136000
+2384 32 2160000
+2429 32 2184000
+2370 32 2208000
+2365 32 2232000
+2361 32 2256000
+2370 32 2280000
+2393 32 2304000
+2342 32 2328000
+2325 32 2352000
+2334 32 2376000
+2316 32 2400000
+2317 32 2424000
+2305 32 2448000
+2360 32 2472000
+2331 32 2496000
+2332 32 2520000
+2361 32 2544000
+2417 32 2568000
+2438 32 2592000
+2403 32 2616000
+2386 32 2640000
+2382 32 2664000
+2350 32 2688000
+2355 32 2712000
+2383 32 2736000
+2384 32 2760000
+2383 32 2784000
+2373 32 2808000
+2374 32 2832000
+2347 32 2856000
+2353 32 2880000
+2381 32 2904000
+2401 32 2928000
+2401 32 2952000
+2385 32 2976000
+2382 32 3000000
+2328 32 3024000
+2303 32 3048000
+2272 32 3072000
+2270 32 3096000
+2312 32 3120000
+2273 32 3144000
+2330 32 3168000
+2339 32 3192000
+2296 32 3216000
+2317 32 3240000
+2440 32 3264000
+2353 32 3288000
+2346 32 3312000
+2303 32 3336000
+2308 32 3360000
+2287 32 3384000
+2316 32 3408000
+2367 32 3432000
+2335 32 3456000
+2350 32 3480000
+2395 32 3504000
+2408 32 3528000
+2413 32 3552000
+2415 32 3576000
+2468 32 3600000
+2437 32 3624000
+2372 32 3648000
+2371 32 3672000
+2341 32 3696000
+2328 32 3720000
+2273 32 3744000
+2244 32 3768000
+2233 32 3792000
+2229 32 3816000
+2252 32 3840000
+2236 32 3864000
+2217 32 3888000
+2179 32 3912000
+2251 32 3936000
+2192 32 3960000
+2199 32 3984000
+2212 32 4008000
+2190 32 4032000
+2102 32 4056000
+2120 32 4080000
+2167 32 4104000
+2024 32 4128000
+2010 32 4152000
+2067 32 4176000
+2035 32 4200000
+2051 32 4224000
+2012 32 4248000
+2066 32 4272000
+2025 32 4296000
+1987 32 4320000
+1972 32 4344000
+1966 32 4368000
+1999 32 4392000
+1987 32 4416000
+1922 32 4440000
+2020 32 4464000
+2072 32 4488000
+2021 32 4512000
+2017 32 4536000
+2099 32 4560000
+2064 32 4584000
+2109 32 4608000
+2093 32 4632000
+2090 32 4656000
+2148 32 4680000
+2184 32 4704000
+2179 32 4728000
+2152 32 4752000
+2143 32 4776000
+2159 32 4800000
+2123 32 4824000
+2129 32 4848000
+2147 32 4872000
+2192 32 4896000
+2051 32 4920000
+2116 32 4944000
+2124 32 4968000
+2088 32 4992000
+2073 32 5016000
+2146 32 5040000
+2133 32 5064000
+2073 32 5088000
+2059 32 5112000
+2044 32 5136000
+2012 32 5160000
+2034 32 5184000
+2053 32 5208000
+2013 32 5232000
+1981 32 5256000
+2094 32 5280000
+2076 32 5304000
+1968 32 5328000
+2028 32 5352000
+2031 32 5376000
+2020 32 5400000
+2019 32 5424000
+2030 32 5448000
+2015 32 5472000
+1962 32 5496000
+2070 32 5520000
+2087 32 5544000
+1964 32 5568000
+2069 32 5592000
+2034 32 5616000
+1994 32 5640000
+1985 32 5664000
+2030 32 5688000
+2066 32 5712000
+1954 32 5736000
+1733 32 5760000
+1649 32 5784000
+1652 32 5808000
+1631 32 5832000
+1656 32 5856000
+1672 32 5880000
+1667 32 5904000
+1696 32 5928000
+1672 32 5952000
+1701 32 5976000
+1651 32 6000000
+1674 32 6024000
+1695 32 6048000
+1702 32 6072000
+1707 32 6096000
+1694 32 6120000
+1727 32 6144000
+1730 32 6168000
+1708 32 6192000
+1704 32 6216000
+1735 32 6240000
+1758 32 6264000
+1753 32 6288000
+1748 32 6312000
+1763 32 6336000
+1737 32 6360000
+1783 32 6384000
+1839 32 6408000
+1861 32 6432000
+1832 32 6456000
+1947 32 6480000
+1939 32 6504000
+1926 32 6528000
+1896 32 6552000
+1909 32 6576000
+1869 32 6600000
+1900 32 6624000
+1896 32 6648000
+1883 32 6672000
+1903 32 6696000
+1895 32 6720000
+1865 32 6744000
+1878 32 6768000
+1881 32 6792000
+1861 32 6816000
+1791 32 6840000
+1787 32 6864000
+1798 32 6888000
+1811 32 6912000
+1824 32 6936000
+1895 32 6960000
+2079 32 6984000
+2034 32 7008000
+2038 32 7032000
+2018 32 7056000
+2030 32 7080000
+2067 32 7104000
+1982 32 7128000
+1911 32 7152000
+1904 32 7176000
+1874 32 7200000
+1876 32 7224000
+1944 32 7248000
+1977 32 7272000
+1977 32 7296000
+1979 32 7320000
+2012 32 7344000
+1961 32 7368000
+1773 32 7392000
+1780 32 7416000
+1801 32 7440000
+1892 32 7464000
+1869 32 7488000
+1936 32 7512000
+2154 32 7536000
+2226 32 7560000
+2159 32 7584000
+2253 32 7608000
+2286 32 7632000
+2214 32 7656000
+2111 32 7680000
+2027 32 7704000
+1994 32 7728000
+1882 32 7752000
+1887 32 7776000
+1993 32 7800000
+1962 32 7824000
+1982 32 7848000
+1966 32 7872000
+1962 32 7896000
+1928 32 7920000
+1878 32 7944000
+1857 32 7968000
+1885 32 7992000
+1919 32 8016000
+1904 32 8040000
+1909 32 8064000
+1909 32 8088000
+1933 32 8112000
+1824 32 8136000
+1756 32 8160000
+1733 32 8184000
+1705 32 8208000
+1755 32 8232000
+1756 32 8256000
+1725 32 8280000
+1761 32 8304000
+1736 32 8328000
+1706 32 8352000
+1662 32 8376000
+1604 32 8400000
+1613 32 8424000
+1692 32 8448000
+1736 32 8472000
+1779 32 8496000
+1768 32 8520000
+1758 32 8544000
+1708 32 8568000
+1642 32 8592000
+1645 32 8616000
+1581 32 8640000
+1651 32 8664000
+1731 32 8688000
+1743 32 8712000
+1717 32 8736000
+1715 32 8760000
+1646 32 8784000
+1551 32 8808000
+1563 32 8832000
+1649 32 8856000
+1742 32 8880000
+1724 32 8904000
+1676 32 8928000
+1664 32 8952000
+1587 32 8976000
+1497 32 9000000
+1503 32 9024000
+1644 32 9048000
+1658 32 9072000
+1680 32 9096000
+1611 32 9120000
+1694 32 9144000
+1668 32 9168000
+1677 32 9192000
+1604 32 9216000
+1567 32 9240000
+1639 32 9264000
+1552 32 9288000
+1486 32 9312000
+1494 32 9336000
+1480 32 9360000
+1509 32 9384000
+1457 32 9408000
+1423 32 9432000
+1459 32 9456000
+1444 32 9480000
+1424 32 9504000
+1413 32 9528000
+1498 32 9552000
+1455 32 9576000
+1393 32 9600000
+1638 32 9624000
+1919 32 9648000
+1979 32 9672000
+1894 32 9696000
+2002 32 9720000
+2062 32 9744000
+2098 32 9768000
+1919 32 9792000
+1738 32 9816000
+1890 32 9840000
+1971 32 9864000
+2429 32 9888000
+1861 32 9912000
diff --git a/media/res/bbb_hevc_176x144_176kbps_60fps.hevc b/media/res/bbb_hevc_176x144_176kbps_60fps.hevc
new file mode 100644
index 0000000..f82236f
--- /dev/null
+++ b/media/res/bbb_hevc_176x144_176kbps_60fps.hevc
Binary files differ
diff --git a/media/res/bbb_hevc_176x144_176kbps_60fps.info b/media/res/bbb_hevc_176x144_176kbps_60fps.info
new file mode 100644
index 0000000..702b853
--- /dev/null
+++ b/media/res/bbb_hevc_176x144_176kbps_60fps.info
@@ -0,0 +1,61 @@
+1695 128 0
+1938 32 33333
+471 0 83333
+153 0 66666
+99 0 50000
+657 0 150000
+260 0 116666
+115 0 100000
+99 0 133333
+622 0 216666
+211 0 183333
+79 0 166666
+95 0 200000
+597 0 283333
+288 0 250000
+145 0 233333
+147 0 266666
+676 0 350000
+284 0 316666
+144 0 300000
+131 0 333333
+658 0 416666
+270 0 383333
+101 0 366666
+151 0 400000
+529 0 483333
+257 0 450000
+98 0 433333
+160 0 466666
+664 0 566666
+186 0 533333
+147 0 500000
+67 0 516666
+78 0 550000
+575 0 633333
+230 0 600000
+134 0 583333
+114 0 616666
+629 0 700000
+224 0 666666
+138 0 650000
+129 0 683333
+645 0 750000
+264 0 733333
+145 0 716666
+705 0 816666
+365 0 783333
+156 0 766666
+160 0 800000
+725 0 883333
+330 0 850000
+138 0 833333
+162 0 866666
+638 0 950000
+337 0 916666
+170 0 900000
+133 0 933333
+432 0 1016666
+287 0 983333
+130 0 966666
+136 0 1000000
diff --git a/media/res/bbb_mpeg2_352x288_1mbps_60fps.info b/media/res/bbb_mpeg2_352x288_1mbps_60fps.info
new file mode 100644
index 0000000..d5290d7
--- /dev/null
+++ b/media/res/bbb_mpeg2_352x288_1mbps_60fps.info
@@ -0,0 +1,60 @@
+16680 32 16666
+17017 0 33333
+10534 0 50000
+10289 0 66666
+3698 0 83333
+2776 0 100000
+1936 0 116666
+1493 0 133333
+1217 0 150000
+993 0 166666
+805 0 183333
+857 0 200000
+5082 32 216666
+812 0 233333
+718 0 250000
+746 0 266666
+762 0 283333
+865 0 300000
+782 0 316666
+833 0 333333
+750 0 350000
+819 0 366666
+826 0 383333
+846 0 400000
+4522 32 416666
+678 0 433333
+718 0 450000
+803 0 466666
+769 0 483333
+762 0 500000
+587 0 516666
+635 0 533333
+658 0 550000
+714 0 566666
+677 0 583333
+699 0 600000
+4616 32 616666
+800 0 633333
+831 0 650000
+928 0 666666
+869 0 683333
+931 0 700000
+930 0 716666
+974 0 733333
+978 0 750000
+932 0 766666
+918 0 783333
+978 0 800000
+4655 32 816666
+897 0 833333
+896 0 850000
+883 0 866666
+949 0 883333
+965 0 900000
+951 0 916666
+901 0 933333
+965 0 950000
+955 0 966666
+948 0 983333
+968 0 1000000
diff --git a/media/res/bbb_mpeg2_352x288_1mbps_60fps.m2v b/media/res/bbb_mpeg2_352x288_1mbps_60fps.m2v
new file mode 100644
index 0000000..2f67c2b
--- /dev/null
+++ b/media/res/bbb_mpeg2_352x288_1mbps_60fps.m2v
Binary files differ
diff --git a/media/res/bbb_vp8_176x144_240kbps_60fps.info b/media/res/bbb_vp8_176x144_240kbps_60fps.info
new file mode 100644
index 0000000..559f425
--- /dev/null
+++ b/media/res/bbb_vp8_176x144_240kbps_60fps.info
@@ -0,0 +1,60 @@
+10271 32 0
+106 0 17000
+134 0 33000
+149 0 50000
+152 0 67000
+159 0 83000
+114 0 100000
+723 0 117000
+175 0 133000
+186 0 150000
+201 0 167000
+270 0 183000
+383 0 200000
+255 0 217000
+286 0 233000
+273 0 250000
+1224 0 267000
+220 0 283000
+231 0 300000
+192 0 317000
+182 0 333000
+289 0 350000
+204 0 367000
+237 0 383000
+187 0 400000
+898 0 417000
+231 0 433000
+266 0 450000
+278 0 467000
+205 0 483000
+255 0 500000
+169 0 517000
+233 0 533000
+1011 0 550000
+202 0 567000
+251 0 583000
+223 0 600000
+283 0 617000
+362 0 633000
+217 0 650000
+245 0 667000
+960 0 683000
+233 0 700000
+286 0 717000
+272 0 733000
+254 0 750000
+331 0 767000
+218 0 783000
+261 0 800000
+981 0 817000
+226 0 833000
+226 0 850000
+279 0 867000
+225 0 883000
+295 0 900000
+175 0 917000
+249 0 933000
+996 0 950000
+169 0 967000
+224 0 983000
diff --git a/media/res/bbb_vp8_176x144_240kbps_60fps.vp8 b/media/res/bbb_vp8_176x144_240kbps_60fps.vp8
new file mode 100644
index 0000000..6eba56c
--- /dev/null
+++ b/media/res/bbb_vp8_176x144_240kbps_60fps.vp8
Binary files differ
diff --git a/media/res/bbb_vp9_176x144_285kbps_60fps.info b/media/res/bbb_vp9_176x144_285kbps_60fps.info
new file mode 100644
index 0000000..2f7d35b
--- /dev/null
+++ b/media/res/bbb_vp9_176x144_285kbps_60fps.info
@@ -0,0 +1,60 @@
+6939 32 0
+6818 0 17000
+310 0 33000
+273 0 50000
+267 0 67000
+239 0 83000
+232 0 100000
+222 0 117000
+186 0 133000
+194 0 150000
+189 0 167000
+18 0 183000
+2014 0 200000
+297 0 217000
+287 0 233000
+237 0 250000
+263 0 267000
+238 0 283000
+257 0 300000
+229 0 317000
+187 0 333000
+191 0 350000
+18 0 367000
+2203 0 383000
+265 0 400000
+224 0 417000
+254 0 433000
+252 0 450000
+273 0 467000
+208 0 483000
+154 0 500000
+182 0 517000
+138 0 533000
+18 0 550000
+2502 0 567000
+286 0 583000
+304 0 600000
+341 0 617000
+259 0 633000
+275 0 650000
+222 0 667000
+254 0 683000
+253 0 700000
+225 0 717000
+18 0 733000
+2501 0 750000
+282 0 767000
+298 0 783000
+252 0 800000
+242 0 817000
+250 0 833000
+260 0 850000
+218 0 867000
+213 0 883000
+144 0 900000
+18 0 917000
+233 0 933000
+254 0 950000
+229 0 967000
+239 0 983000
diff --git a/media/res/bbb_vp9_176x144_285kbps_60fps.vp9 b/media/res/bbb_vp9_176x144_285kbps_60fps.vp9
new file mode 100644
index 0000000..2633c8a
--- /dev/null
+++ b/media/res/bbb_vp9_176x144_285kbps_60fps.vp9
Binary files differ