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

Commit 4c96b75c authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Remove RefBase from the extractor API"

parents 54c28999 3d21ae3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ status_t SineSource::read(
        x += k;
    }

    buffer->meta_data()->setInt64(
    buffer->meta_data().setInt64(
            kKeyTime, ((int64_t)mPhase * 1000000) / mSampleRate);

    mPhase += numFramesPerBuffer;
+2 −2
Original line number Diff line number Diff line
@@ -114,8 +114,8 @@ public:
        x = x >= 0xa0 ? 0x60 : x + 1;
#endif
        (*buffer)->set_range(0, mSize);
        (*buffer)->meta_data()->clear();
        (*buffer)->meta_data()->setInt64(
        (*buffer)->meta_data().clear();
        (*buffer)->meta_data().setInt64(
                kKeyTime, (mNumFramesOutput * 1000000) / mFrameRate);
        ++mNumFramesOutput;

+4 −4
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ static void playSource(sp<MediaSource> &source) {
                shouldSeek = true;
            } else {
                int64_t timestampUs;
                CHECK(buffer->meta_data()->findInt64(kKeyTime, &timestampUs));
                CHECK(buffer->meta_data().findInt64(kKeyTime, &timestampUs));

                bool failed = false;

@@ -492,12 +492,12 @@ status_t DetectSyncSource::read(

        if (mStreamType == AVC) {
            bool isIDR = isIDRFrame(*buffer);
            (*buffer)->meta_data()->setInt32(kKeyIsSyncFrame, isIDR);
            (*buffer)->meta_data().setInt32(kKeyIsSyncFrame, isIDR);
            if (isIDR) {
                mSawFirstIDRFrame = true;
            }
        } else {
            (*buffer)->meta_data()->setInt32(kKeyIsSyncFrame, true);
            (*buffer)->meta_data().setInt32(kKeyIsSyncFrame, true);
        }

        if (mStreamType != AVC || mSawFirstIDRFrame) {
@@ -591,7 +591,7 @@ static void performSeekTest(const sp<MediaSource> &source) {

        if (err == OK) {
            int64_t timeUs;
            CHECK(buffer->meta_data()->findInt64(kKeyTime, &timeUs));
            CHECK(buffer->meta_data().findInt64(kKeyTime, &timeUs));

            printf("%" PRId64 "\t%" PRId64 "\t%" PRId64 "\n",
                   seekTimeUs, timeUs, seekTimeUs - timeUs);

include/media/MediaSourceBase.h

deleted120000 → 0
+0 −1
Original line number Diff line number Diff line
../../media/libmediaextractor/include/media/MediaSourceBase.h
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
../../media/libmediaextractor/include/media/MediaTrack.h
 No newline at end of file
Loading