Conviva Client Library
Data Fields
ccl_player_t Struct Reference

Structure of function pointers for poll updates to Conviva. More...

#include <ccl_player_if.h>

Data Fields

void(* start_monitoring )(void *player_data, ccl_notifier_t *notifier, ccl_notifier_context_t *notifier_context)
 Notification that Conviva will start monitoring this ccl_player_t. More...
 
void(* stop_monitoring )(void *player_data)
 Notification that Conviva stopped monitoring this ccl_player_t. More...
 
int(* get_playhead_time )(void *player_data)
 Retrieves the current position of the play head, in milliseconds. More...
 
int(* get_buffer_length )(void *player_data)
 Retrieves the number of milliseconds worth of data present in the video buffer. More...
 
double(* get_rendered_framerate )(void *player_data)
 Retrieves the current rendered frame rate, in frames per second. More...
 
int(* get_min_buffer_length )(void *player_data)
 Retrieves the minimum buffer length threshold (in milliseconds) for the video to keep playing. More...
 
const char *(* get_player_type )(void *player_data)
 Retrieves the type of the video player being monitored. More...
 
const char *(* get_player_version )(void *player_data)
 Retrieves the version of the video player being monitored. More...
 

Detailed Description

Structure of function pointers for poll updates to Conviva.

The implementation of these functions must use video player APIs to gather video playback data.
Conviva will call these functions when needed.

Field Documentation

◆ get_buffer_length

int(* ccl_player_t::get_buffer_length) (void *player_data)

Retrieves the number of milliseconds worth of data present in the video buffer.

This function retrieves the number of milliseconds of video can still be played without more data being downloaded.

Parameters
player_dataContext/data for the video player to query information from.
Returns
Current buffer length in milliseconds. -1 if not available.

◆ get_min_buffer_length

int(* ccl_player_t::get_min_buffer_length) (void *player_data)

Retrieves the minimum buffer length threshold (in milliseconds) for the video to keep playing.

Or phrased differently, the exact buffer length which will cause the video player to transition from playing to buffering.

Parameters
player_dataContext/data for the video player to query information from.
Returns
Minimum buffer length in milliseconds. -1 if not available.

◆ get_player_type

const char*(* ccl_player_t::get_player_type) (void *player_data)

Retrieves the type of the video player being monitored.

Parameters
player_dataContext/data for the video player to query information from.
Returns
Video player type. NULL if not available.

◆ get_player_version

const char*(* ccl_player_t::get_player_version) (void *player_data)

Retrieves the version of the video player being monitored.

Parameters
player_dataContext/data for the video player to query information from.
Returns
Video player version. NULL if not available.

◆ get_playhead_time

int(* ccl_player_t::get_playhead_time) (void *player_data)

Retrieves the current position of the play head, in milliseconds.

The current position within the video content measures how far along into the video we are, relative the start of the content.

Parameters
player_dataContext/data for the video player to query information from.
Returns
Current position in milliseconds. -1 if not available.

◆ get_rendered_framerate

double(* ccl_player_t::get_rendered_framerate) (void *player_data)

Retrieves the current rendered frame rate, in frames per second.

A moving average over the last couple seconds is recommended.
Rendered frame rate of 0 indicates no video frames have been rendered during the last sampling window.

Parameters
player_dataContext/data for the video player to query information from.
Returns
Current rendered frame rate, in frames per second. -1.0 if not available.

◆ start_monitoring

void(* ccl_player_t::start_monitoring) (void *player_data, ccl_notifier_t *notifier, ccl_notifier_context_t *notifier_context)

Notification that Conviva will start monitoring this ccl_player_t.

This function is called when ccl_player_t is attached to a monitoring session via ccl_session_player_attach().
player_data is the player context passed to ccl_session_player_attach().
References to notifier and notifier_context should be stored and used for push notifications.

See also
stop_monitoring()
Parameters
player_dataContext/data for the video player to be monitored.
notifierccl_notifier_t to use for push notifications for this video player.
notifier_contextContext to pass along when pushing notifications to notifier.

◆ stop_monitoring

void(* ccl_player_t::stop_monitoring) (void *player_data)

Notification that Conviva stopped monitoring this ccl_player_t.

This function is called when ccl_player_t is detached from a monitoring session via ccl_session_player_detach().
Prior references to notifier and notifier_context should be NULL'ed.

See also
start_monitoring()
Parameters
player_dataContext/data for the video player to stop monitoring for.