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

Commit 4d3e6945 authored by Ray Essick's avatar Ray Essick
Browse files

Multiple extractors from same client vs clients binder space

Lowered limits for when to use shared buffers vs inline data and how
much total data to allow in a mediasource binder transaction.  Fix typo
limiting MediaSource / extractor to only 1 mediabuffer as shared memory.

Bug: 115848790
Test: poc from bug
parent be32a246
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ public:
    virtual media_status_t getFormat(AMediaFormat *);

    virtual media_status_t read(MediaBufferHelper **buffer, const ReadOptions *options = NULL);
    virtual bool supportNonblockingRead() { return true; }
    bool supportsNonBlockingRead() override { return true; }
    virtual media_status_t fragmentedRead(
            MediaBufferHelper **buffer, const ReadOptions *options = NULL);

+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ struct WAVSource : public MediaTrackHelper {
    virtual media_status_t read(
            MediaBufferHelper **buffer, const ReadOptions *options = NULL);

    virtual bool supportNonblockingRead() { return true; }
    bool supportsNonBlockingRead() override { return true; }

protected:
    virtual ~WAVSource();
+2 −2
Original line number Diff line number Diff line
@@ -126,8 +126,8 @@ public:

    static const size_t kBinderMediaBuffers = 4; // buffers managed by BnMediaSource
    static const size_t kTransferSharedAsSharedThreshold = 4 * 1024;  // if >= shared, else inline
    static const size_t kTransferInlineAsSharedThreshold = 64 * 1024; // if >= shared, else inline
    static const size_t kInlineMaxTransfer = 256 * 1024; // Binder size limited to BINDER_VM_SIZE.
    static const size_t kTransferInlineAsSharedThreshold = 8 * 1024; // if >= shared, else inline
    static const size_t kInlineMaxTransfer = 64 * 1024; // Binder size limited to BINDER_VM_SIZE.

protected:
    virtual ~BnMediaSource();