Skip to content

Debugging and run tests

Stefano Gottardo edited this page Feb 25, 2022 · 1 revision

Debugging with Visual Studio

  1. Build InputStream Adaptive as Debug mode (see How to build)
  2. In the InputStream Adaptive sources folder, open the folder \build\inputstream.adaptive-prefix\src\inputstream.adaptive-build then open with Visual Studio the project file inputstream.adaptive.sln
  3. Run Kodi and install the builded InputStream Adaptive zip, or as alternative, before run Kodi, replace existing ISAdaptive files under Kodi app user folder \Kodi\addons\inputstream.adaptive with the builded files that you can find under Kodi sources \addons\inputstream.adaptive
  4. With Kodi running, on Visual Studio, open the menu Debug -> Attach to process, in the new window select kodi.exe and click Attach button
  5. Now when you will play a video you can debug the code

NOTICE: The Widevine library does not allow debugging DRM streaming videos, this will cause a crash or malfunctions. Therefore if you need to debug a DRM stream it will not be possible, the only solution is to search for a similar non-DRM video stream and debug with it. On How to test a stream page you can find some links that provide some non-DRM streams to be used for testing purpose.

NOTE: The tree files list in Visual Studio are referred to the platform used, therefore for example you cannot see in the tree files list the files for android build (e.g. wvdecrypter_android.cpp). If you need to show all files open ISAdaptive from Visual Studio as folder (then without load the .sln), with a side effect you will not have IntelliSense enabled for C++17 or higher.

How to run InputStream Adaptive tests with Visual Studio

The tests helps to check the right execution of specified parts of source code, for example the parsing of MPD/HSL manifest data. All tests are contained inside src\test\ folder.

To run all tests and get the log output:

  1. Build InputStream Adaptive as Debug mode (see How to build)
  2. In the InputStream Adaptive sources folder, open the folder \build\inputstream.adaptive-prefix\src\inputstream.adaptive-build then open with Visual Studio the project file inputstream.adaptive.sln
  3. Select RUN_TESTS project, open his context menu (right click) and select Build to execute all tests
  4. On Output window tab (usually placed below screen) you can see the log result of all tests

NOTE: Every time you modify the source code, before build RUN_TESTS, you must build inputstream.adaptive_test project to update the test build.

Clone this wiki locally