mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 10:44:41 +00:00
omx vts: update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference BUG=161896447 Change-Id: I0ced401233497bbbfce90e9b84147bb08399e421
This commit is contained in:
@@ -785,8 +785,8 @@ const std::vector<std::tuple<std::string, std::string, std::string>>& getTestPar
|
||||
for (IOmx::ComponentInfo info : componentInfos) {
|
||||
for (std::string role : info.mRoles) {
|
||||
if (filter.empty()) {
|
||||
if (kWhiteListRoles.find(role.c_str()) == kWhiteListRoles.end()) {
|
||||
// This is for component test and the role is not in the white list.
|
||||
if (kKnownRoles.find(role.c_str()) == kKnownRoles.end()) {
|
||||
// This is for component test and the role is not supported.
|
||||
continue;
|
||||
}
|
||||
} else if (role.find(filter) == std::string::npos) {
|
||||
|
||||
@@ -78,8 +78,8 @@ enum bufferOwner {
|
||||
unknown,
|
||||
};
|
||||
|
||||
// White list audio/video roles to be tested.
|
||||
static std::set<std::string> kWhiteListRoles{
|
||||
// List known and thus tested audio/video roles.
|
||||
static std::set<std::string> kKnownRoles{
|
||||
"audio_encoder.aac", "audio_encoder.amrnb", "audio_encoder.amrwb",
|
||||
"audio_encoder.flac", "audio_decoder.aac", "audio_decoder.amrnb",
|
||||
"audio_decoder.amrwb", "audio_decoder.flac", "audio_decoder.g711alaw",
|
||||
|
||||
@@ -289,11 +289,11 @@ struct CodecProducerListener : public IProducerListener {
|
||||
};
|
||||
|
||||
// Mock IOmxBufferSource class. GraphicBufferSource.cpp in libstagefright/omx/
|
||||
// implements this class. Below is dummy class introduced to test if callback
|
||||
// implements this class. Below class is introduced to test if callback
|
||||
// functions are actually being called or not
|
||||
struct DummyBufferSource : public IOmxBufferSource {
|
||||
struct MockBufferSource : public IOmxBufferSource {
|
||||
public:
|
||||
DummyBufferSource(sp<IOmxNode> node) {
|
||||
MockBufferSource(sp<IOmxNode> node) {
|
||||
callback = 0;
|
||||
executing = false;
|
||||
omxNode = node;
|
||||
@@ -311,7 +311,7 @@ struct DummyBufferSource : public IOmxBufferSource {
|
||||
android::Vector<BufferInfo> iBuffer, oBuffer;
|
||||
};
|
||||
|
||||
Return<void> DummyBufferSource::onOmxExecuting() {
|
||||
Return<void> MockBufferSource::onOmxExecuting() {
|
||||
executing = true;
|
||||
callback |= 0x1;
|
||||
size_t index;
|
||||
@@ -332,25 +332,25 @@ Return<void> DummyBufferSource::onOmxExecuting() {
|
||||
return Void();
|
||||
};
|
||||
|
||||
Return<void> DummyBufferSource::onOmxIdle() {
|
||||
Return<void> MockBufferSource::onOmxIdle() {
|
||||
callback |= 0x2;
|
||||
executing = false;
|
||||
return Void();
|
||||
};
|
||||
|
||||
Return<void> DummyBufferSource::onOmxLoaded() {
|
||||
Return<void> MockBufferSource::onOmxLoaded() {
|
||||
callback |= 0x4;
|
||||
return Void();
|
||||
};
|
||||
|
||||
Return<void> DummyBufferSource::onInputBufferAdded(uint32_t buffer) {
|
||||
Return<void> MockBufferSource::onInputBufferAdded(uint32_t buffer) {
|
||||
(void)buffer;
|
||||
EXPECT_EQ(executing, false);
|
||||
callback |= 0x8;
|
||||
return Void();
|
||||
};
|
||||
|
||||
Return<void> DummyBufferSource::onInputBufferEmptied(
|
||||
Return<void> MockBufferSource::onInputBufferEmptied(
|
||||
uint32_t buffer, const ::android::hardware::hidl_handle& fence) {
|
||||
(void)fence;
|
||||
callback |= 0x10;
|
||||
@@ -1143,7 +1143,7 @@ TEST_P(VideoEncHidlTest, BufferSourceCallBacks) {
|
||||
setupRAWPort(omxNode, kPortIndexInput, nFrameWidth, nFrameHeight, 0,
|
||||
xFramerate, eColorFormat);
|
||||
|
||||
sp<DummyBufferSource> buffersource = new DummyBufferSource(omxNode);
|
||||
sp<MockBufferSource> buffersource = new MockBufferSource(omxNode);
|
||||
ASSERT_NE(buffersource, nullptr);
|
||||
status = omxNode->setInputSurface(buffersource);
|
||||
ASSERT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
|
||||
|
||||
Reference in New Issue
Block a user