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

Commit 307f6056 authored by Dongwon Kang's avatar Dongwon Kang
Browse files

Remove unused MediaSource::setBuffers

Originally added with Ie03b285265099db, but the use case was gone with
OMXCodec.

Test: make checkbuild
Bug: 67908542
Change-Id: I6c4953126ab80f876a6dca258e112bb2eaee440d
parent 3d2c309b
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -212,11 +212,6 @@ public:
        return remote()->transact(PAUSE, data, &reply);
        return remote()->transact(PAUSE, data, &reply);
    }
    }


    virtual status_t setBuffers(const Vector<MediaBuffer *> & buffers __unused) {
        ALOGV("setBuffers NOT IMPLEMENTED");
        return ERROR_UNSUPPORTED; // default
    }

private:
private:


    uint32_t mBuffersSinceStop; // Buffer tracking variable
    uint32_t mBuffersSinceStop; // Buffer tracking variable
+0 −12
Original line number Original line Diff line number Diff line
@@ -95,14 +95,6 @@ public:
    // until a subsequent read-with-seek. Currently only supported by
    // until a subsequent read-with-seek. Currently only supported by
    // OMXCodec.
    // OMXCodec.
    virtual status_t pause()  = 0;
    virtual status_t pause()  = 0;

    // The consumer of this media source requests that the given buffers
    // are to be returned exclusively in response to read calls.
    // This will be called after a successful start() and before the
    // first read() call.
    // Callee assumes ownership of the buffers if no error is returned.
    virtual status_t setBuffers(const Vector<MediaBuffer *> & /* buffers */) = 0;

};
};


class BnMediaSource: public BnInterface<IMediaSource>
class BnMediaSource: public BnInterface<IMediaSource>
@@ -117,10 +109,6 @@ public:
        return ERROR_UNSUPPORTED;
        return ERROR_UNSUPPORTED;
    }
    }


    virtual status_t setBuffers(const Vector<MediaBuffer *> & /* buffers */) {
        return ERROR_UNSUPPORTED;
    }

    // TODO: Implement this for local media sources.
    // TODO: Implement this for local media sources.
    virtual status_t readMultiple(
    virtual status_t readMultiple(
            Vector<MediaBuffer *> * /* buffers */, uint32_t /* maxNumBuffers = 1 */,
            Vector<MediaBuffer *> * /* buffers */, uint32_t /* maxNumBuffers = 1 */,
+0 −9
Original line number Original line Diff line number Diff line
@@ -343,15 +343,6 @@ int64_t NuPlayer2::GenericSource::getLastReadPosition() {
    }
    }
}
}


status_t NuPlayer2::GenericSource::setBuffers(
        bool audio, Vector<MediaBuffer *> &buffers) {
    Mutex::Autolock _l(mLock);
    if (mIsSecure && !audio && mVideoTrack.mSource != NULL) {
        return mVideoTrack.mSource->setBuffers(buffers);
    }
    return INVALID_OPERATION;
}

bool NuPlayer2::GenericSource::isStreaming() const {
bool NuPlayer2::GenericSource::isStreaming() const {
    Mutex::Autolock _l(mLock);
    Mutex::Autolock _l(mLock);
    return mIsStreaming;
    return mIsStreaming;
+0 −2
Original line number Original line Diff line number Diff line
@@ -82,8 +82,6 @@ struct NuPlayer2::GenericSource : public NuPlayer2::Source,
        int64_t seekTimeUs,
        int64_t seekTimeUs,
        MediaPlayer2SeekMode mode = MediaPlayer2SeekMode::SEEK_PREVIOUS_SYNC) override;
        MediaPlayer2SeekMode mode = MediaPlayer2SeekMode::SEEK_PREVIOUS_SYNC) override;


    virtual status_t setBuffers(bool audio, Vector<MediaBuffer *> &buffers);

    virtual bool isStreaming() const;
    virtual bool isStreaming() const;


    // Modular DRM
    // Modular DRM
+0 −4
Original line number Original line Diff line number Diff line
@@ -121,10 +121,6 @@ struct NuPlayer2::Source : public AHandler {
        return INVALID_OPERATION;
        return INVALID_OPERATION;
    }
    }


    virtual status_t setBuffers(bool /* audio */, Vector<MediaBuffer *> &/* buffers */) {
        return INVALID_OPERATION;
    }

    virtual bool isRealTime() const {
    virtual bool isRealTime() const {
        return false;
        return false;
    }
    }
Loading