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

Commit 26523582 authored by Lucas Gates's avatar Lucas Gates Committed by Android (Google) Code Review
Browse files

Merge "Tuner Default HAL change dvr buffer size for CF"

parents 1180aa11 1707ec47
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -432,12 +432,12 @@ Filter::~Filter() {

    if (mSharedAvMemHandle != nullptr) {
        *out_avMemory = ::android::dupToAidl(mSharedAvMemHandle);
        *_aidl_return = BUFFER_SIZE_16M;
        *_aidl_return = BUFFER_SIZE;
        mUsingSharedAvMem = true;
        return ::ndk::ScopedAStatus::ok();
    }

    int av_fd = createAvIonFd(BUFFER_SIZE_16M);
    int av_fd = createAvIonFd(BUFFER_SIZE);
    if (av_fd < 0) {
        return ::ndk::ScopedAStatus::fromServiceSpecificError(
                static_cast<int32_t>(Result::OUT_OF_MEMORY));
@@ -454,7 +454,7 @@ Filter::~Filter() {
    mUsingSharedAvMem = true;

    *out_avMemory = ::android::dupToAidl(mSharedAvMemHandle);
    *_aidl_return = BUFFER_SIZE_16M;
    *_aidl_return = BUFFER_SIZE;
    return ::ndk::ScopedAStatus::ok();
}

@@ -1168,7 +1168,7 @@ void Filter::createMediaEvent(vector<DemuxFilterEvent>& events) {
    mediaEvent.isPesPrivateData = true;
    mediaEvent.extraMetaData.set<DemuxFilterMediaEventExtraMetaData::Tag::audio>(audio);

    int av_fd = createAvIonFd(BUFFER_SIZE_16M);
    int av_fd = createAvIonFd(BUFFER_SIZE);
    if (av_fd == -1) {
        return;
    }
+3 −1
Original line number Diff line number Diff line
@@ -50,7 +50,9 @@ using ::android::AidlMessageQueue;
using ::android::hardware::EventFlag;

using FilterMQ = AidlMessageQueue<int8_t, SynchronizedReadWrite>;
const uint32_t BUFFER_SIZE_16M = 0x1000000;
// Large buffer size can lead to sudden crashes due to being de-allocated
// by the memory management system. Change the buffer size when needed.
const uint32_t BUFFER_SIZE = 0x800000;  // 8 MB

class Demux;
class Dvr;