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

Commit e7f94032 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "extractors: allow OEM to control output type for WAV/FLAC" into android10-dev

parents c3fa11b6 b8a6f890
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ cc_library_shared {
    ],

    shared_libs: [
        "libbase",
        "libbinder_ndk",
        "liblog",
        "libmediandk",
+3 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
// libFLAC parser
#include "FLAC/stream_decoder.h"

#include <android-base/properties.h>
#include <android/binder_ibinder.h> // for AIBinder_getCallingUid
#include <audio_utils/primitives.h>
#include <media/MediaExtractorPluginApi.h>
@@ -47,7 +48,8 @@ namespace android {
// (Note: duplicated with WAVExtractor.cpp)
static inline bool shouldExtractorOutputFloat(int bitsPerSample)
{
    return bitsPerSample > 16 && AIBinder_getCallingUid() == AID_MEDIA;
    return bitsPerSample > 16 && AIBinder_getCallingUid() == AID_MEDIA
                              && android::base::GetBoolProperty("media.extractor.float", true);
}

class FLACParser;
+1 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ cc_library_shared {
    ],

    shared_libs: [
        "libbase",
        "libbinder_ndk",
        "liblog",
        "libmediandk",
+3 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

#include "WAVExtractor.h"

#include <android-base/properties.h>
#include <android/binder_ibinder.h> // for AIBinder_getCallingUid
#include <audio_utils/primitives.h>
#include <media/stagefright/foundation/ADebug.h>
@@ -43,7 +44,8 @@ namespace android {
// (Note: duplicated with FLACExtractor.cpp)
static inline bool shouldExtractorOutputFloat(int bitsPerSample)
{
    return bitsPerSample > 16 && AIBinder_getCallingUid() == AID_MEDIA;
    return bitsPerSample > 16 && AIBinder_getCallingUid() == AID_MEDIA
                              && android::base::GetBoolProperty("media.extractor.float", true);
}

enum {