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

Commit 0e4c08eb authored by Chong Zhang's avatar Chong Zhang
Browse files

build core bufferqueue functionalities into bqhelper

Statically build the bufferqueue logic from libgui into
libstagefright_bufferqueue_helper, so that we don't need
to link to the entire libgui.

In updateable codecs, the dependencies (except llndk) are
copied onto the apex, and loaded into a separate namespace
at runtime. Trimming down unused dependencies help on both
storage and runtime memory footprint.

bug: 128894663

Change-Id: I2f696aa85143f74f753fbb0320dce5aee88846c4
parent ab09f6e6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
#include <memory>

#include <C2Component.h>
#include <media/stagefright/bqhelper/WGraphicBufferProducer.h>
#include <media/stagefright/codec2/1.0/InputSurfaceConnection.h>

namespace android {
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@

#include <C2Component.h>
#include <media/stagefright/bqhelper/GraphicBufferSource.h>
#include <media/stagefright/bqhelper/WGraphicBufferProducer.h>
#include <media/stagefright/codec2/1.0/InputSurfaceConnection.h>

namespace android {
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@
#include <codec2/hidl/1.0/types.h>

#include <android-base/file.h>
#include <gui/bufferqueue/2.0/B2HGraphicBufferProducer.h>
#include <media/stagefright/bqhelper/GraphicBufferSource.h>
#include <utils/Errors.h>

+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include <android/hardware/graphics/bufferqueue/2.0/IGraphicBufferProducer.h>
#include <android/hardware/media/c2/1.0/IInputSink.h>
#include <android/hardware/media/c2/1.0/IInputSurface.h>
#include <gui/IGraphicBufferProducer.h>
#include <hidl/Status.h>
#include <media/stagefright/bqhelper/GraphicBufferSource.h>

+9 −4
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@
 * limitations under the License.
 */

#ifndef ANDROID_HARDWARE_MEDIA_OMX_V1_0__CONVERSION_H
#define ANDROID_HARDWARE_MEDIA_OMX_V1_0__CONVERSION_H
#ifndef ANDROID_HARDWARE_MEDIA_OMX_V1_0_UTILS_CONVERSION_H
#define ANDROID_HARDWARE_MEDIA_OMX_V1_0_UTILS_CONVERSION_H

#include <vector>
#include <list>
@@ -258,7 +258,12 @@ inline status_t toStatusT(Status const& t) {
 */
// convert: Status -> status_t
inline status_t toStatusT(Return<Status> const& t) {
    return t.isOk() ? toStatusT(static_cast<Status>(t)) : UNKNOWN_ERROR;
    if (t.isOk()) {
        return toStatusT(static_cast<Status>(t));
    } else if (t.isDeadObject()) {
        return DEAD_OBJECT;
    }
    return UNKNOWN_ERROR;
}

/**
@@ -938,4 +943,4 @@ inline OMX_TICKS toOMXTicks(uint64_t t) {
}  // namespace hardware
}  // namespace android

#endif  // ANDROID_HARDWARE_MEDIA_OMX_V1_0__CONVERSION_H
#endif  // ANDROID_HARDWARE_MEDIA_OMX_V1_0_UTILS_CONVERSION_H
Loading