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

Commit 8551bb0c authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix supportsNonblockingRead

This was accidentally removed in a previous CL.

Bug: 111407253
Test: CTS
Change-Id: I15ff51625b0a3439ec456e79387296f433445e74
parent 61c80f1f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -113,6 +113,12 @@ struct MediaTrack
    virtual status_t read(
            MediaBufferBase **buffer, const ReadOptions *options = NULL) = 0;

    // Returns true if |read| supports nonblocking option, otherwise false.
    // |readMultiple| if supported, always allows the nonblocking option.
    virtual bool supportNonblockingRead() {
        return false;
    }

    virtual ~MediaTrack();

private:
+4 −0
Original line number Diff line number Diff line
@@ -54,6 +54,10 @@ status_t RemoteMediaSource::read(
    return mSource->read(buffer, reinterpret_cast<const MediaSource::ReadOptions*>(options));
}

bool RemoteMediaSource::supportNonblockingRead() {
    return mSource->supportNonblockingRead();
}

status_t RemoteMediaSource::pause() {
    return ERROR_UNSUPPORTED;
}
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ public:
    virtual status_t read(
            MediaBufferBase **buffer,
            const MediaSource::ReadOptions *options = NULL);
    virtual bool supportNonblockingRead();
    virtual status_t pause();
    virtual status_t setStopTimeUs(int64_t stopTimeUs);