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

Commit df80e7f6 authored by Sungtak Lee's avatar Sungtak Lee Committed by Gerrit Code Review
Browse files

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

parents 24c5a9f4 95fa087c
Loading
Loading
Loading
Loading
+16 −0
Original line number Original line Diff line number Diff line
@@ -403,6 +403,22 @@ ScopedAStatus Component::configureVideoTunnel(
    return ScopedAStatus::fromServiceSpecificError(Status::OMITTED);
    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) {
void Component::initListener(const std::shared_ptr<Component>& self) {
    if (__builtin_available(android __ANDROID_API_T__, *)) {
    if (__builtin_available(android __ANDROID_API_T__, *)) {
        std::shared_ptr<C2Component::Listener> c2listener =
        std::shared_ptr<C2Component::Listener> c2listener =
+7 −0
Original line number Original line Diff line number Diff line
@@ -273,6 +273,13 @@ ScopedAStatus ComponentStore::listComponents(
    return ScopedAStatus::ok();
    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) {
void ComponentStore::onInterfaceLoaded(const std::shared_ptr<C2ComponentInterface> &intf) {
    // invalidate unsupported struct descriptors if a new interface is loaded as it may have
    // invalidate unsupported struct descriptors if a new interface is loaded as it may have
    // exposed new descriptors
    // exposed new descriptors
+8 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,9 @@
#include <aidl/android/hardware/media/c2/IComponentInterface.h>
#include <aidl/android/hardware/media/c2/IComponentInterface.h>
#include <aidl/android/hardware/media/c2/IComponentListener.h>
#include <aidl/android/hardware/media/c2/IComponentListener.h>
#include <aidl/android/hardware/media/c2/IComponentStore.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 <C2Component.h>
#include <C2Buffer.h>
#include <C2Buffer.h>
@@ -71,6 +74,11 @@ struct Component : public BnComponent {
    ::ndk::ScopedAStatus configureVideoTunnel(
    ::ndk::ScopedAStatus configureVideoTunnel(
            int32_t avSyncHwId,
            int32_t avSyncHwId,
            common::NativeHandle* handle) override;
            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:
protected:
    c2_status_t mInit;
    c2_status_t mInit;
+3 −0
Original line number Original line Diff line number Diff line
@@ -23,6 +23,7 @@


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


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