Loading media/extractors/midi/MidiExtractor.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ MidiExtractor::~MidiExtractor() ALOGV("MidiExtractor dtor"); AMediaFormat_delete(mFileMetadata); AMediaFormat_delete(mTrackMetadata); delete mEngine; } size_t MidiExtractor::countTracks() Loading media/extractors/mpeg2/MPEG2PSExtractor.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -734,6 +734,7 @@ media_status_t MPEG2PSExtractor::Track::read( if (inMeta.findData(kKeySEI, &bufType, &bufData, &bufSize)) { AMediaFormat_setBuffer(outMeta, AMEDIAFORMAT_KEY_SEI, bufData, bufSize); } mbuf->release(); return AMEDIA_OK; } Loading media/extractors/mpeg2/MPEG2TSExtractor.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ media_status_t MPEG2TSSource::read( if (inMeta.findData(kKeySEI, &bufType, &bufData, &bufSize)) { AMediaFormat_setBuffer(outMeta, AMEDIAFORMAT_KEY_SEI, bufData, bufSize); } mbuf->release(); return AMEDIA_OK; } Loading media/libmedia/MidiIoWrapper.cpp +5 −12 Original line number Diff line number Diff line Loading @@ -50,24 +50,15 @@ MidiIoWrapper::MidiIoWrapper(int fd, off64_t offset, int64_t size) { mDataSource = nullptr; } MidiIoWrapper::MidiIoWrapper(DataSourceBase *source) { ALOGV("MidiIoWrapper(DataSource)"); mFd = -1; mDataSource = source; off64_t l; if (mDataSource->getSize(&l) == OK) { mLength = l; } else { mLength = 0; } } class DataSourceUnwrapper : public DataSourceBase { public: explicit DataSourceUnwrapper(CDataSource *csource) { mSource = csource; } virtual ~DataSourceUnwrapper() {} virtual status_t initCheck() const { return OK; } // Returns the number of bytes read, or -1 on failure. It's not an error if Loading Loading @@ -98,6 +89,7 @@ private: MidiIoWrapper::MidiIoWrapper(CDataSource *csource) { ALOGV("MidiIoWrapper(CDataSource)"); mFd = -1; mBase = 0; mDataSource = new DataSourceUnwrapper(csource); off64_t l; if (mDataSource->getSize(&l) == OK) { Loading @@ -112,6 +104,7 @@ MidiIoWrapper::~MidiIoWrapper() { if (mFd >= 0) { close(mFd); } delete mDataSource; } int MidiIoWrapper::readAt(void *buffer, int offset, int size) { Loading media/libmedia/include/media/MidiIoWrapper.h +2 −2 Original line number Diff line number Diff line Loading @@ -24,12 +24,12 @@ namespace android { struct CDataSource; class DataSourceUnwrapper; class MidiIoWrapper { public: explicit MidiIoWrapper(const char *path); explicit MidiIoWrapper(int fd, off64_t offset, int64_t size); explicit MidiIoWrapper(DataSourceBase *source); explicit MidiIoWrapper(CDataSource *csource); ~MidiIoWrapper(); Loading @@ -43,7 +43,7 @@ private: int mFd; off64_t mBase; int64_t mLength; DataSourceBase *mDataSource; DataSourceUnwrapper *mDataSource; EAS_FILE mEasFile; }; Loading Loading
media/extractors/midi/MidiExtractor.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ MidiExtractor::~MidiExtractor() ALOGV("MidiExtractor dtor"); AMediaFormat_delete(mFileMetadata); AMediaFormat_delete(mTrackMetadata); delete mEngine; } size_t MidiExtractor::countTracks() Loading
media/extractors/mpeg2/MPEG2PSExtractor.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -734,6 +734,7 @@ media_status_t MPEG2PSExtractor::Track::read( if (inMeta.findData(kKeySEI, &bufType, &bufData, &bufSize)) { AMediaFormat_setBuffer(outMeta, AMEDIAFORMAT_KEY_SEI, bufData, bufSize); } mbuf->release(); return AMEDIA_OK; } Loading
media/extractors/mpeg2/MPEG2TSExtractor.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -224,7 +224,7 @@ media_status_t MPEG2TSSource::read( if (inMeta.findData(kKeySEI, &bufType, &bufData, &bufSize)) { AMediaFormat_setBuffer(outMeta, AMEDIAFORMAT_KEY_SEI, bufData, bufSize); } mbuf->release(); return AMEDIA_OK; } Loading
media/libmedia/MidiIoWrapper.cpp +5 −12 Original line number Diff line number Diff line Loading @@ -50,24 +50,15 @@ MidiIoWrapper::MidiIoWrapper(int fd, off64_t offset, int64_t size) { mDataSource = nullptr; } MidiIoWrapper::MidiIoWrapper(DataSourceBase *source) { ALOGV("MidiIoWrapper(DataSource)"); mFd = -1; mDataSource = source; off64_t l; if (mDataSource->getSize(&l) == OK) { mLength = l; } else { mLength = 0; } } class DataSourceUnwrapper : public DataSourceBase { public: explicit DataSourceUnwrapper(CDataSource *csource) { mSource = csource; } virtual ~DataSourceUnwrapper() {} virtual status_t initCheck() const { return OK; } // Returns the number of bytes read, or -1 on failure. It's not an error if Loading Loading @@ -98,6 +89,7 @@ private: MidiIoWrapper::MidiIoWrapper(CDataSource *csource) { ALOGV("MidiIoWrapper(CDataSource)"); mFd = -1; mBase = 0; mDataSource = new DataSourceUnwrapper(csource); off64_t l; if (mDataSource->getSize(&l) == OK) { Loading @@ -112,6 +104,7 @@ MidiIoWrapper::~MidiIoWrapper() { if (mFd >= 0) { close(mFd); } delete mDataSource; } int MidiIoWrapper::readAt(void *buffer, int offset, int size) { Loading
media/libmedia/include/media/MidiIoWrapper.h +2 −2 Original line number Diff line number Diff line Loading @@ -24,12 +24,12 @@ namespace android { struct CDataSource; class DataSourceUnwrapper; class MidiIoWrapper { public: explicit MidiIoWrapper(const char *path); explicit MidiIoWrapper(int fd, off64_t offset, int64_t size); explicit MidiIoWrapper(DataSourceBase *source); explicit MidiIoWrapper(CDataSource *csource); ~MidiIoWrapper(); Loading @@ -43,7 +43,7 @@ private: int mFd; off64_t mBase; int64_t mLength; DataSourceBase *mDataSource; DataSourceUnwrapper *mDataSource; EAS_FILE mEasFile; }; Loading