Top-level module for the Conviva Client Library. More...
Data Structures | |
| struct | ad_pod_info_t |
| struct | ccl_settings_t |
| Conviva Client Library settings. More... | |
Macros | |
| #define | CCL_SUCCESS 0 |
| #define | CCL_ERROR -1 |
| #define | CCL_MAX_URL_LENGTH 256 |
| #define | CCL_MAX_APP_NAME_LENGTH 64 |
| #define | CCL_MAX_USER_ID_LENGTH 64 |
| #define | CCL_APP_MAX_SCREEN_NAME_LEN 1024 |
| #define | CCL_APP_MAX_SCREEN_ID_LEN 38 |
| #define | CCL_MAX_CLIENT_ID_LEN_EXT 49 |
Typedefs | |
| typedef struct ccl_session | ccl_session_t |
| Conviva monitoring session. | |
Enumerations | |
| enum | ccl_log_level_t { CCL_LOG_LEVEL_NONE = 0 , CCL_LOG_LEVEL_ERROR = 1 , CCL_LOG_LEVEL_WARN = 2 , CCL_LOG_LEVEL_INFO = 3 , CCL_LOG_LEVEL_DEBUG = 4 } |
| Log level. More... | |
| enum | ad_player_t { CONTENT = 0 , SEPARATE = 1 , Unknown = 2 } |
| enum | ad_type_t { CLIENT_SIDE , SERVER_SIDE , AD_TYPE_UNKNOWN } |
| enum | ad_position_t { BUMPER = 0 , PREROLL , MIDROLL , POSTROLL , POD_POSITION_Unknown = 99 } |
Functions | |
| void | ccl_settings_create (ccl_settings_t *settings) |
| Create a new ccl_settings_t. | |
| void | ccl_settings_destroy (ccl_settings_t *settings) |
| Destroy an existing ccl_settings_t. | |
| int | ccl_init (const char *customer_key, const ccl_platform_t *platform_interface, const ccl_settings_t *settings) |
| Initializes the library. | |
| void | ccl_cleanup (void) |
| Releases the library and all tied up memory/resources. | |
| ccl_session_t * | ccl_session_create (ccl_content_info_t *content_info) |
| Create a new monitoring session. | |
| ccl_session_t * | ccl_ad_session_create (ccl_session_t *content_session, ccl_content_info_t *ad_content_info) |
| Create a new AD monitoring session. | |
| int | ccl_session_destroy (ccl_session_t *session) |
| Destroy an existing monitoring session. | |
| int | ccl_session_player_attach (ccl_session_t *session, const ccl_player_t *player, void *player_data) |
| Link a video player to a monitoring session. | |
| int | ccl_session_player_detach (ccl_session_t *session) |
| Unlink current video player from a monitoring session. | |
| int | ccl_session_ad_start (ccl_session_t *session) |
| Notify Conviva that preroll advertisement has started. | |
| int | ccl_session_ad_end (ccl_session_t *session) |
| Notify Conviva that a preroll ad has ended. | |
| int | ccl_session_report_error (ccl_session_t *session, const char *error_message, int is_fatal) |
| Notify Conviva that an error has occurred. | |
| int | ccl_send_event (const char *name, ccl_dictionary_t *attributes) |
| Report a custom event to Conviva. | |
| int | ccl_session_send_event (ccl_session_t *session, const char *name, ccl_dictionary_t *attributes) |
| Report a custom event to Conviva. | |
| void | ccl_session_update_content_info (ccl_session_t *session, const ccl_content_info_t *content_info) |
| Update metadata content for the session. | |
| void | ccl_notify_network_connection_type (const char *type) |
| Notify a change of network connection type. | |
| void | ccl_notify_network_signal_strength (double value) |
| Notify a change of network wireless signal strength. | |
| void | ccl_notify_network_wifi_link_encryption (const char *name) |
| Notify a change of WiFi SSID. | |
| int | ccl_session_set_video_size (ccl_session_t *session, int width, int height) |
| Notify Conviva of a video resolution change. | |
| unsigned int | ccl_session_get_session_id (ccl_session_t *session) |
| Gets the Conviva session ID for a session. | |
| char * | ccl_get_client_id (void) |
| Gets the Conviva Client ID. | |
| int | report_ad_break_started (ccl_session_t *session, ad_player_t ad_player, ad_type_t ad_type, ad_pod_info_t *pod_info) |
| Informs content session that the ad break has started. | |
| int | report_ad_break_ended (ccl_session_t *session, ad_player_t ad_player, ad_type_t ad_type, ad_pod_info_t *pod_info) |
| Informs content session that the ad break has ended. | |
| int | cat_start_tracker (char *app_name, char *user_id) |
| creates tracker for eco | |
| int | cat_stop_tracker (void) |
| stop the app tracker | |
Top-level module for the Conviva Client Library.
The application should call ccl_init() to initialize the library before making any other calls.
To monitor each viewing experience, a Conviva monitoring session should be created via ccl_session_create() upon playback request by the viewer.
Each monitoring session can be dynamically tied to a video player via ccl_session_player_attach(). Used with ccl_player_t and ccl_notifier_t, video playback data can then be reporting for that monitoring session.
When a video player is no longer relevant for the monitoring session, the link can be severed using ccl_session_player_detach().
When playback for that piece of content ends/fails/is cancelled, the session should be destroyed using ccl_session_destroy().
The application should call ccl_cleanup() to release the library when it is no longer needed.
| #define CCL_APP_MAX_SCREEN_ID_LEN 38 |
| #define CCL_APP_MAX_SCREEN_NAME_LEN 1024 |
| #define CCL_ERROR -1 |
| #define CCL_MAX_APP_NAME_LENGTH 64 |
| #define CCL_MAX_CLIENT_ID_LEN_EXT 49 |
| #define CCL_MAX_URL_LENGTH 256 |
| #define CCL_MAX_USER_ID_LENGTH 64 |
| #define CCL_SUCCESS 0 |
| typedef struct ccl_session ccl_session_t |
Conviva monitoring session.
| enum ad_player_t |
| enum ad_position_t |
| enum ad_type_t |
| enum ccl_log_level_t |
| int cat_start_tracker | ( | char * | app_name, |
| char * | user_id | ||
| ) |
creates tracker for eco
| app_name | specifies name of the application ; |
| user_id | (optional) specifies the current user of the application. |
| int cat_stop_tracker | ( | void | ) |
stop the app tracker
| ccl_session_t * ccl_ad_session_create | ( | ccl_session_t * | content_session, |
| ccl_content_info_t * | ad_content_info | ||
| ) |
Create a new AD monitoring session.
A new monitoring session should be created for each piece of Ad content.
| content_session | instance of video content |
| ad_content_info | Metadata associated with the ad content to be monitored. |
| void ccl_cleanup | ( | void | ) |
Releases the library and all tied up memory/resources.
| char * ccl_get_client_id | ( | void | ) |
Gets the Conviva Client ID.
| int ccl_init | ( | const char * | customer_key, |
| const ccl_platform_t * | platform_interface, | ||
| const ccl_settings_t * | settings | ||
| ) |
Initializes the library.
One-time synchronous call required to initialize the library.
| customer_key | The Conviva customer key associated with your Conviva account. |
| platform_interface | Your implementation of ccl_platform_t for your device. |
| settings | Optional. Custom settings for the library. |
| void ccl_notify_network_connection_type | ( | const char * | type | ) |
Notify a change of network connection type.
The type of network connection can be "3G", "4G", "WiFi", "LTE", and etc. When the type is unknown, set "Other".
| type | network connection type |
| void ccl_notify_network_signal_strength | ( | double | value | ) |
Notify a change of network wireless signal strength.
| value | Signal strength. |
| void ccl_notify_network_wifi_link_encryption | ( | const char * | name | ) |
Notify a change of WiFi SSID.
| ssid | WiFi SSID. |
Notify a change of WiFi Link Encryption.
Example values are "WEP", "WEP2", "WPA", "WPA2".
| name | Link encryption. |
| int ccl_send_event | ( | const char * | name, |
| ccl_dictionary_t * | attributes | ||
| ) |
Report a custom event to Conviva.
Part of the Conviva Player Insight feature.
Each event has a name and a list of key-value pair attributes.
| name | Name of the event. |
| attributes | Optional. Attributes associated with the event. |
| int ccl_session_ad_end | ( | ccl_session_t * | session | ) |
Notify Conviva that a preroll ad has ended.
Use right after playing preroll advertisement.
| session | Pointer to a ccl_session_t. |
| int ccl_session_ad_start | ( | ccl_session_t * | session | ) |
Notify Conviva that preroll advertisement has started.
Use right before playing preroll advertisement.
| session | Pointer to a ccl_session_t. |
| ccl_session_t * ccl_session_create | ( | ccl_content_info_t * | content_info | ) |
Create a new monitoring session.
A new monitoring session should be created for each piece of video content, at the time playback is requested by the viewer.
| content_info | Metadata associated with the content to be monitored. |
| int ccl_session_destroy | ( | ccl_session_t * | session | ) |
Destroy an existing monitoring session.
An existing monitoring session should be destroyed when video playback for the content ends, fails or is cancelled by the viewer.
| session | Pointer to the ccl_session_t to destroy. |
| unsigned int ccl_session_get_session_id | ( | ccl_session_t * | session | ) |
Gets the Conviva session ID for a session.
| session | Pointer to a ccl_session_t. |
| int ccl_session_player_attach | ( | ccl_session_t * | session, |
| const ccl_player_t * | player, | ||
| void * | player_data | ||
| ) |
Link a video player to a monitoring session.
Attach a video player to a monitoring session.
Generally used right after ccl_session_create.
To properly handle midroll advertisement, it is sometimes necessary to use this method after a midroll ad.
If you are using multiple video players over the course of a single monitoring session, you may have to call this multiple times as well.
| session | Pointer to a ccl_session_t. |
| player | Interface to the video player. |
| player_data | Context data for the video player. |
| int ccl_session_player_detach | ( | ccl_session_t * | session | ) |
Unlink current video player from a monitoring session.
Detaches the current video player from a monitoring session.
Generally used right before calling ccl_session_destroy.
To properly handle midroll advertisement, it is sometimes necessary to use this method before a midroll ad.
If you are using multiple video players over the course of a single monitoring session, you may have to call this multiple times as well.
| session | Pointer to a ccl_session_t. |
| int ccl_session_report_error | ( | ccl_session_t * | session, |
| const char * | error_message, | ||
| int | is_fatal | ||
| ) |
Notify Conviva that an error has occurred.
To report errors from the video player, use set_error instead.
| session | Pointer to a ccl_session_t. |
| error_message | A message describing the error. |
| is_fatal | Whether the error can prevent playback altogether. When in doubt, set to true. |
| int ccl_session_send_event | ( | ccl_session_t * | session, |
| const char * | name, | ||
| ccl_dictionary_t * | attributes | ||
| ) |
Report a custom event to Conviva.
Part of the Conviva Player Insight feature.
Each event has a name and a list of key-value pair attributes.
| name | Name of the event. |
| attributes | Optional. Attributes associated with the event. |
| int ccl_session_set_video_size | ( | ccl_session_t * | session, |
| int | width, | ||
| int | height | ||
| ) |
Notify Conviva of a video resolution change.
| session | Pointer to a ccl_session_t. |
| width | Width of video resolution. |
| height | Height of video resolution. |
| void ccl_session_update_content_info | ( | ccl_session_t * | session, |
| const ccl_content_info_t * | content_info | ||
| ) |
Update metadata content for the session.
NOTE: Only those metadata values that were not previously set are updated.
| session | Pointer to a ccl_session_t. |
| content_info | Metadata associated with the content to be monitored. |
| void ccl_settings_create | ( | ccl_settings_t * | settings | ) |
Create a new ccl_settings_t.
| settings | instance to ccl_settings_t structure which will be set to default values |
| void ccl_settings_destroy | ( | ccl_settings_t * | settings | ) |
Destroy an existing ccl_settings_t.
| settings | instance to ccl_settings_t structure which needs to be destroyed |
| int report_ad_break_ended | ( | ccl_session_t * | session, |
| ad_player_t | ad_player, | ||
| ad_type_t | ad_type, | ||
| ad_pod_info_t * | pod_info | ||
| ) |
Informs content session that the ad break has ended.
| ad_type | specifies type of the ad (server side / client side); |
| ad_player | informs Conviva SDK which player is used to play the ads - the same as main video content or separate instance. |
| pod_info | (optional) pod information can be passed |
| int report_ad_break_started | ( | ccl_session_t * | session, |
| ad_player_t | ad_player, | ||
| ad_type_t | ad_type, | ||
| ad_pod_info_t * | pod_info | ||
| ) |
Informs content session that the ad break has started.
| ad_type | specifies type of the ad (server side / client side); |
| ad_player | informs Conviva SDK which player is used to play the ads - the same as main video content or separate instance. |
| pod_info | (optional) pod information can be passed |