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

Commit 1971e2c1 authored by Pin-chih Lin's avatar Pin-chih Lin Committed by Wonsik Kim
Browse files

Codec2Buffer: add size info to client-based output byte buffer

In byte-buffer mode of Codec2.0 ConstGraphicBlockBuffer would be allocated
bigger size (width * height * 4). Adding size info as image convertor
reported by setRange() is beneficial for app to be able to get actual
frame buffer size in byte-buffer mode.

Bug: 130398258
Bug: 132140935
Test: manual
Test: run CtsMediaTestCases
Change-Id: Ieb04d77ac28e88d687fa79fbd8dad2584e83a63b
parent b472cf07
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -739,6 +739,7 @@ bool ConstGraphicBlockBuffer::copy(const std::shared_ptr<C2Buffer> &buffer) {
        ALOGD("ConstGraphicBlockBuffer::copy: set back buffer failed");
        return false;
    }
    setRange(0, aBuffer->size());  // align size info
    converter.copyToMediaImage();
    setImageData(converter.imageData());
    mBufferRef = buffer;