Skip to main content
Skip table of contents

Insight Agent for Linux

The native Insight Agent is provided as a shared library with the corresponding header files, as well as the documentation. Link your binary against the provided Insight Library.

Click here to see the sample code.
CPP
#include "lib/insight/include/Agent.hpp"

#include <iostream>
#include <string>
#include <thread>

using namespace std;
using namespace insight;

int main() {

  cout << "Starting Insight Demo App\n";
  cout << "AgentLib version " + Agent::Instance().getVersion() + "\n";

  insight::InsightConfig config = {"collector.insight-stats.com",
                                   "operatorId",
                                   "AgentTesterDeviceId",
                                   "Desktop",
                                   "AgentRefAppManufacturer",
                                   "AgentRefApp",
                                   "1.0",
                                   "Linux",
                                   "0.0",
                                   "Europe/Zurich",
                                   "",
                                   30,
                                   300};

  config.framedropsEnabled = true;
  std::string operatorToken;
  std::cout << "Enter your operator token:" << std::endl;
  std::getline(std::cin, operatorToken);
  config.operatorId = operatorToken;

  insight::UserInfo userInfo = {"RefAppUserId", "RefAppACcountId"};
  insight::Agent::Instance().initialise(config, userInfo);

 
  insight::VODContent vodContent = {"testContentId", "testContentName", 120};
  insight::Agent::Instance().setVODContent(vodContent);

  insight::Agent::Instance().play();
  insight::Agent::Instance().setPosition(0);

  std::this_thread::sleep_for(std::chrono::milliseconds(2500));

  insight::Agent::Instance().playing();

  insight::Agent::Instance().setBitrate(40000, "http://finalsegment.url");

  std::this_thread::sleep_for(std::chrono::milliseconds(2500));

  insight::Agent::Instance().setPosition(2);
  insight::Agent::Instance().buffering();

  std::this_thread::sleep_for(std::chrono::milliseconds(1800));

  insight::Agent::Instance().setSubtitleLanguage("enUS");
  insight::Agent::Instance().playing();
  insight::Agent::Instance().addNamedEvent("Custom Event",
                                           "Custom Description");

  std::this_thread::sleep_for(std::chrono::milliseconds(2500));

  insight::Agent::Instance().seekTo(300);
  insight::Agent::Instance().setPosition(300);
  insight::Agent::Instance().buffering();

  std::this_thread::sleep_for(std::chrono::milliseconds(5000));

  insight::Agent::Instance().playing();

  std::this_thread::sleep_for(std::chrono::milliseconds(10000));
  insight::Agent::Instance().setPosition(3600);

  insight::Agent::Instance().stop();

  std::cout << "Scenario Completed" << std::endl;

  return 0;
}

For additional details, see the provided documentation.

Downloads

Documentation (Cross-platform)

DateTitleDownload
19 Aug 2022InsightAgentInsightAgent-doc-latest.zip

Insight Agent source

VersionDateRelease notesDownload
1.5.102 Nov 2022
  • Fix: agent was crashing if User struct was initialized out of local scope
agent-c-src-1.5.1.zip
1.5.020 Oct 2022
  • Change: retry mechanism is not working anymore in a recursive manner in case of transient errors as it was using extra memory and could lead to a crash after retrying for a few hours.
  • Fix: curl cleanup after making http calls
  • Fix: missing glue code in the Agent class for the new setBitrate() method where the resolution and the codecs can be passed as arguments.
agent-c-src-1.5.0.zip
1.4.019 Aug 2022
  • New feature: ability to set the current frame rate (fps). Also the expected fps for the stream being played can be set in the content information with the new framePerSecondsNominal argument.
  • New feature: ability to report network events with a new addNetworkEvent method (currently only used for the timeToVideoStart event breakdown feature)
  • New feature: timeToVideoStart event breakdown (licence acquisition time details, manifests acquisition time details and segments acquisition time details)
  • New feature: resolution and codecs information can be passed in a new setBitrate method
  • New feature: added new error event with error type (critical, recoverable), the error code is now a string
  • New feature: added playerName, playerVersion and the screen refreshRate in playback metrics
  • Change: the version of the agent can now be retrieved directly from the InsightAgent class.
agent-c-src-1.4.0.zip
1.3.024 Feb 2022
  • New feature: implementation of a retry mechanism in case of the playback metrics and playback events couldn’t be submitted to the backend.
  • Change: HTTP calls are now performed asynchronously. The agent is now using libcurl to make HTTP calls.
  • Change: logging has been simplified and the easylogging++ library has been removed.
agent-c-src-1.3.0.zip
1.2.031 Jan 2022
  • Change: added an integrationMode when the content information is updated with wrong values then an exception is thrown to detect them at integration time. The integrationMode must be disabled for production builds. In that case no exception will be thrown, just an error message will be logged.
    To build the agent in this mode, just add “-D INTEGRATION_MODE” in the GCC flags.
  • Fix: metric timestamp was wrong (it was set at the time of the reporting but it should the timestamp when the sample is created)
  • Change: ensure the agent is sending 0 bitrate downgrades when none are observed but the bitrate is known. If the bitrate is not known, then the attribute is not added in the payload.
  • New feature: added “samplingInterval” and “samplingIntervalMeasured” in the metrics
  • New feature: added “agentVersion” in metrics
  • Change: ensure error messages (and actually any other event property) are below the maximum allowed length (currently the limit is 512 characters).
  • Change: calling setPosition after a stop should not do anything beside logging a warning
  • Change: UserInfo should not contain sensitive information (the following information are now ignored: address, fullName, gender, age, ageRange and category are now ignored. That struct has been deprecated and it is recommended to use the User struct instead.
agent-c-src-1.2.0.zip
1.1.027 Sep 2021
  • New feature: added channelIdSource attribute to LIVE content
agent-c-src-1.1.0.zip
1.0.414 Jun 2021
  • New feature: added corp and node attributes to user information
  • New feature: the quality of the content can be set at anytime (SD, HD, 4K 8K, Unknown)
  • New feature: the network connection type can be set (WiFi, Ethernet, Mobile, Unknown)
agent-c-src-1.0.4.zip
1.0.301 Apr 2021
  • Added micro application to test timestamp generation
  • Downgraded httplib to previous version
  • Fixed reference app initialisation example
agent-c-src-1.0.3.zip
1.0.204 Mar 2021
  • Bugfix an issue that would cause the OS type and version not to be reported correctly
  • Added support to enable or disable framedrops reporting
  • Updated httplib to version v0.8.4
agent-c-src-1.0.2.zip
1.0.103 Feb 2021
  • Bugfix: Timestamps are now typed with int64_t to avoid them from being truncated in some 32bit platforms
  • Enhance logging on timestamps generation
agent-c-src-1.0.1.zip
1.0.003 Feb 2021
  • First complete release
agent-c-src-1.0.0.zip
0.9.003 Feb 2021
  • First version with actual reports to the insight platform
agent-c-src-0.9.0.zip

Sagemcom Broadcom linux armv4 32bit

VersionDateRelease notesDownload
0.9.023 Sep 2020
  • First functional public release. For integration purposes
NativeInsightAgent-0.9.0-Linux-BroadcomArm32.tar.gz



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.