Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion media/codec2/vndk/C2Fence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,10 @@ std::vector<int> ExtractFdsFromCodec2SyncFence(const C2Fence& fence) {
return retFds;
}

C2Fence _C2FenceFactory::CreateSyncFence(int fenceFd) {
return CreateSyncFence(fenceFd, true);
}

C2Fence _C2FenceFactory::CreateSyncFence(int fenceFd, bool validate) {
std::shared_ptr<C2Fence::Impl> p;
if (fenceFd >= 0) {
Expand Down Expand Up @@ -812,4 +816,3 @@ C2Fence _C2FenceFactory::CreateFromNativeHandle(
}
return C2Fence(p);
}

5 changes: 4 additions & 1 deletion media/codec2/vndk/include/C2FenceFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ struct _C2FenceFactory {
* \param validate If true, the fence fd will be validated to ensure
* it is a valid pending sync fence fd.
*/
static C2Fence CreateSyncFence(int fenceFd, bool validate = true);
// Keep the legacy one-argument ABI for vendor Codec2 implementations that
// were built before fence validation became an explicit parameter.
static C2Fence CreateSyncFence(int fenceFd);
static C2Fence CreateSyncFence(int fenceFd, bool validate);

/*
* Create C2Fence from list of sync fence fds, while also merging them to
Expand Down