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

Commit 69d3d8a9 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Expand mediaextractor dumpsys

Bug: 22775369
Change-Id: I3366a52ba7a00d1685a2211465f2f18f143d0efc
parent 953c59c5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <binder/IInterface.h>
#include <media/stagefright/foundation/ABase.h>
#include <utils/Errors.h>
#include <utils/String8.h>

namespace android {

@@ -44,6 +45,8 @@ public:
    // Get the flags of the source.
    // Refer to DataSource:Flags for the definition of the flags.
    virtual uint32_t getFlags() = 0;
    // get a description of the source, e.g. the url or filename it is based on
    virtual String8 toString() = 0;

private:
    DISALLOW_EVIL_CONSTRUCTORS(IDataSource);
+12 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#define IMEDIA_EXTRACTOR_BASE_H_

#include <media/IMediaSource.h>
#include <media/IDataSource.h>

namespace android {

@@ -69,6 +70,17 @@ public:
                                uint32_t flags = 0);
};

void registerMediaExtractor(
        const sp<IMediaExtractor> &extractor,
        const sp<IDataSource> &source,
        const char *mime);

void registerMediaSource(
        const sp<IMediaExtractor> &extractor,
        const sp<IMediaSource> &source);

status_t dumpExtractors(int fd, const Vector<String16>& args);


}  // namespace android

+4 −0
Original line number Diff line number Diff line
@@ -78,6 +78,10 @@ public:
        return 0;
    }

    virtual String8 toString() {
        return String8("<unspecified>");
    }

    virtual status_t reconnectAtOffset(off64_t offset) {
        return ERROR_UNSUPPORTED;
    }
+5 −0
Original line number Diff line number Diff line
@@ -43,6 +43,10 @@ public:

    virtual void getDrmInfo(sp<DecryptHandle> &handle, DrmManagerClient **client);

    virtual String8 toString() {
        return mName;
    }

protected:
    virtual ~FileSource();

@@ -51,6 +55,7 @@ private:
    int64_t mOffset;
    int64_t mLength;
    Mutex mLock;
    String8 mName;

    /*for DRM*/
    sp<DecryptHandle> mDecryptHandle;
+3 −1
Original line number Diff line number Diff line
@@ -258,6 +258,7 @@ public:

    bool hasData(uint32_t key) const;

    String8 toString() const;
    void dumpToLog() const;

    status_t writeToParcel(Parcel &parcel);
@@ -278,7 +279,8 @@ private:
        void clear();
        void setData(uint32_t type, const void *data, size_t size);
        void getData(uint32_t *type, const void **data, size_t *size) const;
        String8 asString() const;
        // may include hexdump of binary data if verbose=true
        String8 asString(bool verbose) const;

    private:
        uint32_t mType;
Loading