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

Commit f9b5b733 authored by Kensuke Miyagi's avatar Kensuke Miyagi Committed by Android (Google) Code Review
Browse files

Merge "Fix Tuner#shareFrontendFromTuner()"

parents e3bba2bf 83f407bb
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -56,6 +56,19 @@ Status TunerDemux::setFrontendDataSource(const std::shared_ptr<ITunerFrontend>&
    return Status::ok();
}

Status TunerDemux::setFrontendDataSourceById(int frontendId) {
    if (mDemux == nullptr) {
        ALOGE("IDemux is not initialized");
        return Status::fromServiceSpecificError(static_cast<int32_t>(Result::UNAVAILABLE));
    }

    Result res = mDemux->setFrontendDataSource(frontendId);
    if (res != Result::SUCCESS) {
        return ::ndk::ScopedAStatus::fromServiceSpecificError(static_cast<int32_t>(res));
    }
    return Status::ok();
}

Status TunerDemux::openFilter(
        int type, int subType, int bufferSize, const std::shared_ptr<ITunerFilterCallback>& cb,
        std::shared_ptr<ITunerFilter>* _aidl_return) {
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ public:
    TunerDemux(sp<IDemux> demux, int demuxId);
    virtual ~TunerDemux();
    Status setFrontendDataSource(const shared_ptr<ITunerFrontend>& frontend) override;
    Status setFrontendDataSourceById(int frontendId) override;
    Status openFilter(
        int mainType, int subtype, int bufferSize, const shared_ptr<ITunerFilterCallback>& cb,
        shared_ptr<ITunerFilter>* _aidl_return) override;
+5 −0
Original line number Diff line number Diff line
@@ -35,6 +35,11 @@ interface ITunerDemux {
     */
    void setFrontendDataSource(in ITunerFrontend frontend);

    /**
     * Set a frontend resource by ID as data input of the demux
     */
    void setFrontendDataSourceById(in int frontendId);

    /**
     * Open a new filter in the demux
     */
+2 −2
Original line number Diff line number Diff line
@@ -43,10 +43,10 @@ interface ITunerService {
    /**
     * Retrieve the frontend's information.
     *
     * @param frontendHandle the handle of the frontend granted by TRM.
     * @param frontendId the ID of the frontend.
     * @return the information of the frontend.
     */
    TunerFrontendInfo getFrontendInfo(in int frontendHandle);
    TunerFrontendInfo getFrontendInfo(in int frontendId);

    /**
     * Get Dtmb Frontend Capabilities.