Loading drm/mediadrm/plugins/clearkey/hidl/DrmFactory.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,19 @@ Return<void> DrmFactory::getSupportedCryptoSchemes( return Void(); } Return<void> DrmFactory::debug(const hidl_handle& fd, const hidl_vec<hidl_string>& /*args*/) { if (fd.getNativeHandle() == nullptr || fd->numFds < 1) { ALOGE("%s: missing fd for writing", __FUNCTION__); return Void(); } FILE* out = fdopen(dup(fd->data[0]), "w"); uint32_t currentSessions = SessionLibrary::get()->numOpenSessions(); fprintf(out, "current open sessions: %u\n", currentSessions); fclose(out); return Void(); } } // namespace clearkey } // namespace V1_3 } // namespace drm Loading drm/mediadrm/plugins/clearkey/hidl/include/DrmFactory.h +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ namespace clearkey { using ::android::hardware::drm::V1_1::SecurityLevel; using ::android::hardware::hidl_array; using ::android::hardware::hidl_handle; using ::android::hardware::hidl_string; using ::android::hardware::Return; Loading @@ -55,6 +56,8 @@ struct DrmFactory : public IDrmFactory { Return<void> getSupportedCryptoSchemes( getSupportedCryptoSchemes_cb _hidl_cb) override; Return<void> debug(const hidl_handle& fd, const hidl_vec<hidl_string>& args); private: CLEARKEY_DISALLOW_COPY_AND_ASSIGN(DrmFactory); }; Loading Loading
drm/mediadrm/plugins/clearkey/hidl/DrmFactory.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,19 @@ Return<void> DrmFactory::getSupportedCryptoSchemes( return Void(); } Return<void> DrmFactory::debug(const hidl_handle& fd, const hidl_vec<hidl_string>& /*args*/) { if (fd.getNativeHandle() == nullptr || fd->numFds < 1) { ALOGE("%s: missing fd for writing", __FUNCTION__); return Void(); } FILE* out = fdopen(dup(fd->data[0]), "w"); uint32_t currentSessions = SessionLibrary::get()->numOpenSessions(); fprintf(out, "current open sessions: %u\n", currentSessions); fclose(out); return Void(); } } // namespace clearkey } // namespace V1_3 } // namespace drm Loading
drm/mediadrm/plugins/clearkey/hidl/include/DrmFactory.h +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ namespace clearkey { using ::android::hardware::drm::V1_1::SecurityLevel; using ::android::hardware::hidl_array; using ::android::hardware::hidl_handle; using ::android::hardware::hidl_string; using ::android::hardware::Return; Loading @@ -55,6 +56,8 @@ struct DrmFactory : public IDrmFactory { Return<void> getSupportedCryptoSchemes( getSupportedCryptoSchemes_cb _hidl_cb) override; Return<void> debug(const hidl_handle& fd, const hidl_vec<hidl_string>& args); private: CLEARKEY_DISALLOW_COPY_AND_ASSIGN(DrmFactory); }; Loading