Merge "V4L2Decoder: Use TRY_DECODER_CMD when checking flush support" into main
diff --git a/OWNERS b/OWNERS
index 1ca37c4..b5bf037 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,8 +1,5 @@
-# Default owners are top 3 active developers of the past 1 or 2 years
-# or people with more than 10 commits last year.
-# Please update this list if you find better owner candidates.
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
+
+# Note that AOSP _is_ the upstream for this project,
+# so the janitors are not generally useful.
+include platform/system/core:/janitors/OWNERS #{LAST_RESORT_SUGGESTION}
diff --git a/common/FormatConverter.cpp b/common/FormatConverter.cpp
index cb1a049..15e59ed 100644
--- a/common/FormatConverter.cpp
+++ b/common/FormatConverter.cpp
@@ -3,6 +3,7 @@
// found in the LICENSE file.
//#define LOG_NDEBUG 0
+#define ATRACE_TAG ATRACE_TAG_VIDEO
#define LOG_TAG "FormatConverter"
#include <v4l2_codec2/common/FormatConverter.h>
@@ -19,6 +20,7 @@
#include <libyuv.h>
#include <ui/GraphicBuffer.h>
#include <utils/Log.h>
+#include <utils/Trace.h>
#include <v4l2_codec2/common/VideoTypes.h> // for HalPixelFormat
@@ -176,6 +178,7 @@
c2_status_t FormatConverter::convertBlock(uint64_t frameIndex,
const C2ConstGraphicBlock& inputBlock,
C2ConstGraphicBlock* convertedBlock) {
+ ATRACE_CALL();
const C2GraphicView& inputView = inputBlock.map().get();
C2PlanarLayout inputLayout = inputView.layout();
diff --git a/components/EncodeComponent.cpp b/components/EncodeComponent.cpp
index 45c1952..65de283 100644
--- a/components/EncodeComponent.cpp
+++ b/components/EncodeComponent.cpp
@@ -3,6 +3,7 @@
// found in the LICENSE file
//#define LOG_NDEBUG 0
+#define ATRACE_TAG ATRACE_TAG_VIDEO
#define LOG_TAG "EncodeComponent"
#include <v4l2_codec2/components/EncodeComponent.h>
@@ -22,6 +23,7 @@
#include <media/stagefright/MediaDefs.h>
#include <ui/GraphicBuffer.h>
#include <ui/Size.h>
+#include <utils/Trace.h>
#include <v4l2_codec2/common/EncodeHelpers.h>
#include <v4l2_codec2/common/FormatConverter.h>
@@ -385,6 +387,7 @@
}
void EncodeComponent::startTask(bool* success, ::base::WaitableEvent* done) {
+ ATRACE_CALL();
ALOGV("%s()", __func__);
ALOG_ASSERT(mEncoderTaskRunner->RunsTasksInCurrentSequence());
@@ -393,6 +396,7 @@
}
void EncodeComponent::stopTask(::base::WaitableEvent* done) {
+ ATRACE_CALL();
ALOGV("%s()", __func__);
ALOG_ASSERT(mEncoderTaskRunner->RunsTasksInCurrentSequence());
@@ -413,6 +417,7 @@
}
void EncodeComponent::queueTask(std::unique_ptr<C2Work> work) {
+ ATRACE_CALL();
ALOGV("%s()", __func__);
ALOG_ASSERT(mEncoderTaskRunner->RunsTasksInCurrentSequence());
ALOG_ASSERT(mEncoder);
@@ -603,6 +608,7 @@
void EncodeComponent::flushTask(::base::WaitableEvent* done,
std::list<std::unique_ptr<C2Work>>* const flushedWork) {
+ ATRACE_CALL();
ALOGV("%s()", __func__);
ALOG_ASSERT(mEncoderTaskRunner->RunsTasksInCurrentSequence());
@@ -630,6 +636,7 @@
}
bool EncodeComponent::updateEncodingParameters() {
+ ATRACE_CALL();
ALOGV("%s()", __func__);
ALOG_ASSERT(mEncoderTaskRunner->RunsTasksInCurrentSequence());
@@ -699,6 +706,7 @@
}
bool EncodeComponent::encode(C2ConstGraphicBlock block, uint64_t index, int64_t timestamp) {
+ ATRACE_CALL();
ALOGV("%s()", __func__);
ALOG_ASSERT(mEncoderTaskRunner->RunsTasksInCurrentSequence());
ALOG_ASSERT(mEncoder);
@@ -768,6 +776,7 @@
}
void EncodeComponent::flush() {
+ ATRACE_CALL();
ALOGV("%s()", __func__);
ALOG_ASSERT(mEncoderTaskRunner->RunsTasksInCurrentSequence());
@@ -799,6 +808,7 @@
}
void EncodeComponent::fetchOutputBlock(uint32_t size, std::unique_ptr<BitstreamBuffer>* buffer) {
+ ATRACE_CALL();
ALOGV("Fetching linear block (size: %u)", size);
std::shared_ptr<C2LinearBlock> block;
c2_status_t status = mOutputBlockPool->fetchLinearBlock(
@@ -982,6 +992,7 @@
}
void EncodeComponent::reportWork(std::unique_ptr<C2Work> work) {
+ ATRACE_CALL();
ALOG_ASSERT(work);
ALOGV("%s(): Reporting work item as finished (index: %llu, timestamp: %llu)", __func__,
work->input.ordinal.frameIndex.peekull(), work->input.ordinal.timestamp.peekull());