Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6379ef2b authored by Fyodor Kyslov's avatar Fyodor Kyslov
Browse files

Put APV Codec creation under flag

Bug: 376770121
Bug: 363333555

Test: manual, verifying that codec is not created when flag is not set
Change-Id: I04a9be9972107475c8960faaa3212aae51bf965e
parent cf6dc3f5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1231,6 +1231,10 @@ class C2SoftApvDecFactory : public C2ComponentFactory {
}  // namespace android

__attribute__((cfi_canonical_jump_table)) extern "C" ::C2ComponentFactory* CreateCodec2Factory() {
    if (!android::media::swcodec::flags::apv_software_codec()) {
        ALOGV("APV SW Codec is not enabled");
        return nullptr;
    }
    return new ::android::C2SoftApvDecFactory();
}

+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@
#define LOG_TAG "C2SoftApvEnc"
#include <log/log.h>

#include <android_media_swcodec_flags.h>

#include <media/hardware/VideoAPI.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MediaErrors.h>
@@ -1267,6 +1269,10 @@ class C2SoftApvEncFactory : public C2ComponentFactory {
}  // namespace android

__attribute__((cfi_canonical_jump_table)) extern "C" ::C2ComponentFactory* CreateCodec2Factory() {
    if (!android::media::swcodec::flags::apv_software_codec()) {
        ALOGV("APV SW Codec is not enabled");
        return nullptr;
    }
    return new ::android::C2SoftApvEncFactory();
}