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

Commit acfeedce authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Log MediaExtractor entry point to MediaMetrics"

parents 76bbcacd 79c34f22
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ void SimplePlayer::onMessageReceived(const sp<AMessage> &msg) {
status_t SimplePlayer::onPrepare() {
    CHECK_EQ(mState, UNPREPARED);

    mExtractor = new NuMediaExtractor;
    mExtractor = new NuMediaExtractor(NuMediaExtractor::EntryPoint::OTHER);

    status_t err = mExtractor->setDataSource(
            NULL /* httpService */, mPath.c_str());
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ static int decode(

    static int64_t kTimeout = 500ll;

    sp<NuMediaExtractor> extractor = new NuMediaExtractor;
    sp<NuMediaExtractor> extractor = new NuMediaExtractor(NuMediaExtractor::EntryPoint::OTHER);
    if (extractor->setDataSource(NULL /* httpService */, path) != OK) {
        fprintf(stderr, "unable to instantiate extractor.\n");
        return 1;
+2 −1
Original line number Diff line number Diff line
@@ -319,7 +319,8 @@ static int decode(

    static int64_t kTimeout = 500ll;

    sp<NuMediaExtractor> extractor = new NuMediaExtractor;
    sp<NuMediaExtractor> extractor = new NuMediaExtractor(NuMediaExtractor::EntryPoint::OTHER);

    if (extractor->setDataSource(NULL /* httpService */, path) != OK) {
        fprintf(stderr, "unable to instantiate extractor.\n");
        return 1;
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ static int muxing(
        int trimEndTimeMs,
        int rotationDegrees,
        MediaMuxer::OutputFormat container = MediaMuxer::OUTPUT_FORMAT_MPEG_4) {
    sp<NuMediaExtractor> extractor = new NuMediaExtractor;
    sp<NuMediaExtractor> extractor = new NuMediaExtractor(NuMediaExtractor::EntryPoint::OTHER);
    if (extractor->setDataSource(NULL /* httpService */, path) != OK) {
        fprintf(stderr, "unable to instantiate extractor. %s\n", path);
        return 1;
+19 −1
Original line number Diff line number Diff line
@@ -38,7 +38,8 @@ enum {
    FLAGS,
    SETMEDIACAS,
    NAME,
    GETMETRICS
    GETMETRICS,
    SETENTRYPOINT
};

class BpMediaExtractor : public BpInterface<IMediaExtractor> {
@@ -142,6 +143,13 @@ public:
        }
        return nm;
    }

    virtual status_t setEntryPoint(EntryPoint entryPoint) {
        Parcel data, reply;
        data.writeInterfaceToken(BpMediaExtractor::getInterfaceDescriptor());
        data.writeInt32(static_cast<int32_t>(entryPoint));
        return remote()->transact(SETENTRYPOINT, data, &reply);
    }
};

IMPLEMENT_META_INTERFACE(MediaExtractor, "android.media.IMediaExtractor");
@@ -232,6 +240,16 @@ status_t BnMediaExtractor::onTransact(
            reply->writeString8(nm);
            return NO_ERROR;
        }
        case SETENTRYPOINT: {
            ALOGV("setEntryPoint");
            CHECK_INTERFACE(IMediaExtractor, data, reply);
            int32_t entryPoint;
            status_t err = data.readInt32(&entryPoint);
            if (err == OK) {
                setEntryPoint(EntryPoint(entryPoint));
            }
            return err;
        }
        default:
            return BBinder::onTransact(code, data, reply, flags);
    }
Loading