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

Insight Agent source

The following files are available to download from the NAGRA Insight Help Centre.

Version

New features

Fixes

Changes

Download

1.5.1

Release date: 02 Nov 2022

There are no new features in this release.

Agent was crashing if User struct was initialized out of local scope

There are no other changes in this release.

agent-c-src-1.5.1.zip

1.5.0

Release date: 20 Oct 2022

There were no new features in this release.

curl cleanup after making http calls

Missing glue code in the Agent class for the new setBitrate() method where the resolution and the codecs can be passed as arguments.

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.

agent-c-src-1.5.0.zip

1.4.0

Release date: 19 Aug 2022

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.

Ability to report network events with a new addNetworkEvent method (currently only used for the timeToVideoStart event breakdown feature)

timeToVideoStart event breakdown (licence acquisition time details, manifests acquisition time details and segments acquisition time details)

Resolution and codecs information can be passed in a new setBitrate method

Added new error event with error type (critical, recoverable), the error code is now a string

Added playerName, playerVersion and the screen refreshRate in playback metrics

There were no fixes in this release.

The version of the agent can now be retrieved directly from the InsightAgent class.

agent-c-src-1.4.0.zip

1.3.0

Release date: 24 Feb 2022

Implementation of a retry mechanism in case of the playback metrics and playback events couldn’t be submitted to the backend.

There were no fixes in this release.

HTTP calls are now performed asynchronously. The agent is now using libcurl to make HTTP calls.

Logging has been simplified and the easylogging++ library has been removed.

agent-c-src-1.3.0.zip

1.2.0

Release date: 31 Jan 2022

Added “samplingInterval” and “samplingIntervalMeasured” in the metrics

Added “agentVersion” in metrics

Metric timestamp was wrong (it was set at the time of the reporting but it should the timestamp when the sample is created)

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.

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.

Ensure error messages (and actually any other event property) are below the maximum allowed length (currently the limit is 512 characters).

Calling setPosition after a stop should not do anything beside logging a warning

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.0

Release date: 27 Sep 2021

Added channelIdSource attribute to LIVE content

There were no fixes in this release.

There were no other changes in this release.

agent-c-src-1.1.0.zip

1.0.4

Release date: 14 Jun 2021

Added corp and node attributes to user information

The quality of the content can be set at anytime (SD, HD, 4K 8K, Unknown)

The network connection type can be set (WiFi, Ethernet, Mobile, Unknown)

There were no fixes in this release.

There were no other changes in this release.

insight-agent-c-src-1.0.4.zip

1.0.3

Release date: 01 Apr 2021

There were no new features in this release.

Reference app initialisation example

Added micro application to test timestamp generation

Downgraded httplib to previous version

insight-agent-c-src-1.0.3.zip

1.0.2

Release date: 04 Mar 2021

There were no new features in this release.

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

insight-agent-c-src-1.0.2.zip

1.0.1

Release date: 03 Feb 2021

Enhance logging on timestamps generation

Timestamps are now typed with int64_t to avoid them from being truncated in some 32bit platforms

There were no other changes in this release.

insight-agent-c-src-1.0.1.zip

1.0.0

Release date: 03 Feb 2021

First complete release

There were no fixes in this release.

There were no other changes in this release.

insight-agent-c-src-1.0.0.zip

0.9.0

Release date: 03 Feb 2021

First version with actual reports to the insight platform

There were no fixes in this release.

There were no other changes in this release.

insight-agent-c-src-0.9.0.zip

NativeInsightAgent-0.9.0-Linux-BroadcomArm32.tar.gz

Sagemcom Broadcom linux armv4 32bit

The following files are available to download from the NAGRA Insight Help Centre.

Version

New features

Fixes

Changes

Download

0.9.0

Release date: 23 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.