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

Commit 543e82fc authored by Sungtak Lee's avatar Sungtak Lee Committed by Automerger Merge Worker
Browse files

Merge "media.c2 aidl: apply interface change for IInputSurface" into main am:...

Merge "media.c2 aidl: apply interface change for IInputSurface" into main am: df80e7f6 am: e48cdf94

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2897280



Change-Id: Ieae7778da3b97ff252af8ee1bbe514d09d5437d2
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6192631d e48cdf94
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -403,6 +403,22 @@ ScopedAStatus Component::configureVideoTunnel(
    return ScopedAStatus::fromServiceSpecificError(Status::OMITTED);
}

ScopedAStatus Component::connectToInputSurface(
        const std::shared_ptr<IInputSurface>& inputSurface,
        std::shared_ptr<IInputSurfaceConnection> *connection) {
    // TODO
    (void)inputSurface;
    (void)connection;
    return ScopedAStatus::fromServiceSpecificError(Status::OMITTED);
}

ScopedAStatus Component::asInputSink(
        std::shared_ptr<IInputSink> *sink) {
    // TODO
    (void)sink;
    return ScopedAStatus::fromServiceSpecificError(Status::OMITTED);
}

void Component::initListener(const std::shared_ptr<Component>& self) {
    if (__builtin_available(android __ANDROID_API_T__, *)) {
        std::shared_ptr<C2Component::Listener> c2listener =
+7 −0
Original line number Diff line number Diff line
@@ -273,6 +273,13 @@ ScopedAStatus ComponentStore::listComponents(
    return ScopedAStatus::ok();
}

ScopedAStatus ComponentStore::createInputSurface(
        std::shared_ptr<IInputSurface> *inputSurface) {
    // TODO
    (void)inputSurface;
    return ScopedAStatus::fromServiceSpecificError(Status::OMITTED);
}

void ComponentStore::onInterfaceLoaded(const std::shared_ptr<C2ComponentInterface> &intf) {
    // invalidate unsupported struct descriptors if a new interface is loaded as it may have
    // exposed new descriptors
+8 −0
Original line number Diff line number Diff line
@@ -27,6 +27,9 @@
#include <aidl/android/hardware/media/c2/IComponentInterface.h>
#include <aidl/android/hardware/media/c2/IComponentListener.h>
#include <aidl/android/hardware/media/c2/IComponentStore.h>
#include <aidl/android/hardware/media/c2/IInputSink.h>
#include <aidl/android/hardware/media/c2/IInputSurface.h>
#include <aidl/android/hardware/media/c2/IInputSurfaceConnection.h>

#include <C2Component.h>
#include <C2Buffer.h>
@@ -71,6 +74,11 @@ struct Component : public BnComponent {
    ::ndk::ScopedAStatus configureVideoTunnel(
            int32_t avSyncHwId,
            common::NativeHandle* handle) override;
    ::ndk::ScopedAStatus connectToInputSurface(
            const std::shared_ptr<IInputSurface>& inputSurface,
            std::shared_ptr<IInputSurfaceConnection> *connection) override;
    ::ndk::ScopedAStatus asInputSink(
            std::shared_ptr<IInputSink> *sink) override;

protected:
    c2_status_t mInit;
+3 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@

#include <aidl/android/hardware/media/bufferpool2/IClientManager.h>
#include <aidl/android/hardware/media/c2/BnComponentStore.h>
#include <aidl/android/hardware/media/c2/IInputSurface.h>

#include <C2Component.h>
#include <C2Param.h>
@@ -85,6 +86,8 @@ struct ComponentStore : public BnComponentStore {
            std::shared_ptr<IComponentInterface> *intf) override;
    virtual ::ndk::ScopedAStatus listComponents(
            std::vector<IComponentStore::ComponentTraits>* traits) override;
    virtual ::ndk::ScopedAStatus createInputSurface(
            std::shared_ptr<IInputSurface> *inputSurface) override;
    virtual ::ndk::ScopedAStatus getStructDescriptors(
            const std::vector<int32_t>& indices,
            std::vector<StructDescriptor> *descs) override;