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

Commit fc69b8e5 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Fix supportsNonblockingRead

This was accidentally removed in a previous CL
Bug: 111407253
Test: yes

Change-Id: I9348357d4311bec3cc5540dc3c9e99c9aad92e26
parent c5fee0a8
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);