Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Debug log of drm errors
Browse files Browse the repository at this point in the history
  • Loading branch information
xlz-jbleclere committed Jan 20, 2021
1 parent 9bc951b commit ff5b5bd
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions source/drm_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,16 @@ limitations under the License.
#define TRY try {

#define CATCH_AND_THROW \
logDrmCtrlError(); \
logDrmCtrlTrngStatus(); \
sLogger->flush(); \
} \
catch( const std::exception &e ) { \
logDrmCtrlError(); \
logDrmCtrlTrngStatus(); \
Fatal( e.what() ); \
sLogger->flush(); \
throw; \
}

#define CATCH \
catch( const std::exception &e ) { \
logDrmCtrlError(); \
logDrmCtrlTrngStatus(); \
Fatal( e.what() ); \
sLogger->flush(); \
}
Expand Down Expand Up @@ -988,6 +982,13 @@ class DRM_LOCAL DrmManager::Impl {
}
}

void uninitDrmInterface() {
if ( mDrmController ) {
mDrmController.reset( nullptr );
Debug( "DRM Controller SDK is uninitialized" );
}
}

// Get DRM HDK version
std::string getDrmCtrlVersion() const {
std::string drmVersion;
Expand Down Expand Up @@ -2200,6 +2201,9 @@ class DRM_LOCAL DrmManager::Impl {
}
} catch( ... ) {}
unlockDrmToInstance();
logDrmCtrlError();
logDrmCtrlTrngStatus();
uninitDrmInterface();
Debug( "Exiting Impl destructor" );
CATCH_AND_THROW
}
Expand Down

0 comments on commit ff5b5bd

Please sign in to comment.