summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/ACodec.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/stagefright/ACodec.h')
-rw-r--r--include/media/stagefright/ACodec.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h
index bbecc80..f7a3df7 100644
--- a/include/media/stagefright/ACodec.h
+++ b/include/media/stagefright/ACodec.h
@@ -160,11 +160,25 @@ private:
sp<ABuffer> mData;
sp<GraphicBuffer> mGraphicBuffer;
+ int mFenceFd;
+
+ // The following field and 4 methods are used for debugging only
+ bool mIsReadFence;
+ // Store |fenceFd| and set read/write flag. Log error, if there is already a fence stored.
+ void setReadFence(int fenceFd, const char *dbg);
+ void setWriteFence(int fenceFd, const char *dbg);
+ // Log error, if the current fence is not a read/write fence.
+ void checkReadFence(const char *dbg);
+ void checkWriteFence(const char *dbg);
};
static const char *_asString(BufferInfo::Status s);
void dumpBuffers(OMX_U32 portIndex);
+ // If |fd| is non-negative, waits for fence with |fd| and logs an error if it fails. Returns
+ // the error code or OK on success. If |fd| is negative, it returns OK
+ status_t waitForFence(int fd, const char *dbg);
+
#if TRACK_BUFFER_TIMING
struct BufferStats {
int64_t mEmptyBufferTimeUs;