Loading drm/libmediadrm/DrmUtils.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -326,6 +326,9 @@ char logPriorityToChar(::V1_4::LogPriority priority) { std::string GetExceptionMessage(status_t err, const char *msg, const Vector<::V1_4::LogMessage> &logs) { std::string ruler("=============================="); std::string header("Beginning of DRM Plugin Log"); std::string footer("End of DRM Plugin Log"); String8 msg8; if (msg) { msg8 += msg; Loading @@ -333,6 +336,7 @@ std::string GetExceptionMessage(status_t err, const char *msg, } auto errStr = StrCryptoError(err); msg8 += errStr.c_str(); msg8 += String8::format("\n%s %s %s", ruler.c_str(), header.c_str(), ruler.c_str()); for (auto log : logs) { time_t seconds = log.timeMs / 1000; Loading @@ -347,6 +351,7 @@ std::string GetExceptionMessage(status_t err, const char *msg, msg8 += String8::format("\n %s.%03d %c %s", timeStr.c_str(), ms, p, log.message.c_str()); } msg8 += String8::format("\n%s %s %s", ruler.c_str(), footer.c_str(), ruler.c_str()); return msg8.c_str(); } Loading media/libaaudio/src/binding/SharedMemoryParcelable.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,8 @@ SharedMemoryParcelable SharedMemoryParcelable::dup() const { } void SharedMemoryParcelable::setup(const unique_fd& fd, int32_t sizeInBytes) { mFd.reset(::dup(fd.get())); // store a duplicate fd constexpr int minFd = 3; // skip over stdout, stdin and stderr mFd.reset(fcntl(fd.get(), F_DUPFD_CLOEXEC, minFd)); // store a duplicate FD ALOGV("setup(fd = %d -> %d, size = %d) this = %p\n", fd.get(), mFd.get(), sizeInBytes, this); mSizeInBytes = sizeInBytes; } Loading media/libmedia/IMediaExtractor.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,8 @@ enum { SETMEDIACAS, NAME, GETMETRICS, SETENTRYPOINT SETENTRYPOINT, SETLOGSESSIONID }; class BpMediaExtractor : public BpInterface<IMediaExtractor> { Loading Loading @@ -150,6 +151,13 @@ public: data.writeInt32(static_cast<int32_t>(entryPoint)); return remote()->transact(SETENTRYPOINT, data, &reply); } virtual status_t setLogSessionId(const String8& logSessionId) { Parcel data, reply; data.writeInterfaceToken(BpMediaExtractor::getInterfaceDescriptor()); data.writeString8(logSessionId); return remote()->transact(SETLOGSESSIONID, data, &reply); } }; IMPLEMENT_META_INTERFACE(MediaExtractor, "android.media.IMediaExtractor"); Loading Loading @@ -250,6 +258,16 @@ status_t BnMediaExtractor::onTransact( } return err; } case SETLOGSESSIONID: { ALOGV("setLogSessionId"); CHECK_INTERFACE(IMediaExtractor, data, reply); String8 logSessionId; status_t status = data.readString8(&logSessionId); if (status == OK) { setLogSessionId(logSessionId); } return status; } default: return BBinder::onTransact(code, data, reply, flags); } Loading media/libmedia/include/android/IMediaExtractor.h +2 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,8 @@ public: }; virtual status_t setEntryPoint(EntryPoint entryPoint) = 0; virtual status_t setLogSessionId(const String8& logSessionId) = 0; }; Loading media/libstagefright/NuMediaExtractor.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -885,4 +885,15 @@ status_t NuMediaExtractor::getAudioPresentations( return ERROR_UNSUPPORTED; } status_t NuMediaExtractor::setLogSessionId(const String8& logSessionId) { if (mImpl == nullptr) { return ERROR_UNSUPPORTED; } status_t status = mImpl->setLogSessionId(logSessionId); if (status != OK) { ALOGW("Failed to set log session id: %d.", status); } return status; } } // namespace android Loading
drm/libmediadrm/DrmUtils.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -326,6 +326,9 @@ char logPriorityToChar(::V1_4::LogPriority priority) { std::string GetExceptionMessage(status_t err, const char *msg, const Vector<::V1_4::LogMessage> &logs) { std::string ruler("=============================="); std::string header("Beginning of DRM Plugin Log"); std::string footer("End of DRM Plugin Log"); String8 msg8; if (msg) { msg8 += msg; Loading @@ -333,6 +336,7 @@ std::string GetExceptionMessage(status_t err, const char *msg, } auto errStr = StrCryptoError(err); msg8 += errStr.c_str(); msg8 += String8::format("\n%s %s %s", ruler.c_str(), header.c_str(), ruler.c_str()); for (auto log : logs) { time_t seconds = log.timeMs / 1000; Loading @@ -347,6 +351,7 @@ std::string GetExceptionMessage(status_t err, const char *msg, msg8 += String8::format("\n %s.%03d %c %s", timeStr.c_str(), ms, p, log.message.c_str()); } msg8 += String8::format("\n%s %s %s", ruler.c_str(), footer.c_str(), ruler.c_str()); return msg8.c_str(); } Loading
media/libaaudio/src/binding/SharedMemoryParcelable.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,8 @@ SharedMemoryParcelable SharedMemoryParcelable::dup() const { } void SharedMemoryParcelable::setup(const unique_fd& fd, int32_t sizeInBytes) { mFd.reset(::dup(fd.get())); // store a duplicate fd constexpr int minFd = 3; // skip over stdout, stdin and stderr mFd.reset(fcntl(fd.get(), F_DUPFD_CLOEXEC, minFd)); // store a duplicate FD ALOGV("setup(fd = %d -> %d, size = %d) this = %p\n", fd.get(), mFd.get(), sizeInBytes, this); mSizeInBytes = sizeInBytes; } Loading
media/libmedia/IMediaExtractor.cpp +19 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,8 @@ enum { SETMEDIACAS, NAME, GETMETRICS, SETENTRYPOINT SETENTRYPOINT, SETLOGSESSIONID }; class BpMediaExtractor : public BpInterface<IMediaExtractor> { Loading Loading @@ -150,6 +151,13 @@ public: data.writeInt32(static_cast<int32_t>(entryPoint)); return remote()->transact(SETENTRYPOINT, data, &reply); } virtual status_t setLogSessionId(const String8& logSessionId) { Parcel data, reply; data.writeInterfaceToken(BpMediaExtractor::getInterfaceDescriptor()); data.writeString8(logSessionId); return remote()->transact(SETLOGSESSIONID, data, &reply); } }; IMPLEMENT_META_INTERFACE(MediaExtractor, "android.media.IMediaExtractor"); Loading Loading @@ -250,6 +258,16 @@ status_t BnMediaExtractor::onTransact( } return err; } case SETLOGSESSIONID: { ALOGV("setLogSessionId"); CHECK_INTERFACE(IMediaExtractor, data, reply); String8 logSessionId; status_t status = data.readString8(&logSessionId); if (status == OK) { setLogSessionId(logSessionId); } return status; } default: return BBinder::onTransact(code, data, reply, flags); } Loading
media/libmedia/include/android/IMediaExtractor.h +2 −0 Original line number Diff line number Diff line Loading @@ -72,6 +72,8 @@ public: }; virtual status_t setEntryPoint(EntryPoint entryPoint) = 0; virtual status_t setLogSessionId(const String8& logSessionId) = 0; }; Loading
media/libstagefright/NuMediaExtractor.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -885,4 +885,15 @@ status_t NuMediaExtractor::getAudioPresentations( return ERROR_UNSUPPORTED; } status_t NuMediaExtractor::setLogSessionId(const String8& logSessionId) { if (mImpl == nullptr) { return ERROR_UNSUPPORTED; } status_t status = mImpl->setLogSessionId(logSessionId); if (status != OK) { ALOGW("Failed to set log session id: %d.", status); } return status; } } // namespace android