CmcdConfiguration


@UnstableApi
public final class CmcdConfiguration


Represents a configuration for the Common Media Client Data (CMCD) logging.

Summary

Nested types

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = )
@Documented
@Target(value = TYPE_USE)
public annotation CmcdConfiguration.CmcdKey

Indicates that the annotated element represents a CMCD key.

@Retention(value = RetentionPolicy.SOURCE)
@IntDef(value = )
@Documented
@Target(value = TYPE_USE)
public annotation CmcdConfiguration.DataTransmissionMode

Indicates the mode used for data transmission.

public interface CmcdConfiguration.Factory

Factory for CmcdConfiguration instances.

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = )
@Documented
@Target(value = TYPE_USE)
public annotation CmcdConfiguration.HeaderKey

Header keys SHOULD be allocated to one of the four defined header names based upon their expected level of variability:

Represents configuration which can vary on each request.

Constants

static final String
static final String
static final String
static final String
static final String
KEY_CMCD_OBJECT = "CMCD-Object"
static final String
KEY_CMCD_REQUEST = "CMCD-Request"
static final String
KEY_CMCD_SESSION = "CMCD-Session"
static final String
KEY_CMCD_STATUS = "CMCD-Status"
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int

Maximum length for ID fields.

static final int
static final int

Public fields

final @Nullable String

A GUID identifying the current content, or null if unset.

final int

Mode used for data transmission.

final CmcdConfiguration.RequestConfig

Dynamic request specific configuration.

final @Nullable String

A GUID identifying the current playback session, or null if unset.

Public constructors

CmcdConfiguration(
    @Nullable String sessionId,
    @Nullable String contentId,
    CmcdConfiguration.RequestConfig requestConfig
)

Creates an instance with dataTransmissionMode set to MODE_REQUEST_HEADER.

CmcdConfiguration(
    @Nullable String sessionId,
    @Nullable String contentId,
    CmcdConfiguration.RequestConfig requestConfig,
    @CmcdConfiguration.DataTransmissionMode int dataTransmissionMode
)

Creates an instance.

Public methods

boolean

Returns whether logging bitrate is allowed based on the request configuration.

boolean

Returns whether logging buffer length is allowed based on the request configuration.

boolean

Returns whether logging buffer starvation is allowed based on the request configuration.

boolean

Returns whether logging content ID is allowed based on the request configuration.

boolean

Returns whether logging deadline is allowed based on the request configuration.

boolean

Returns whether logging maximum requested throughput is allowed based on the request configuration.

boolean

Returns whether logging measured throughput is allowed based on the request configuration.

boolean

Returns whether logging next object request is allowed based on the request configuration.

boolean

Returns whether logging next range request is allowed based on the request configuration.

boolean

Returns whether logging object duration is allowed based on the request configuration.

boolean

Returns whether logging object type is allowed based on the request configuration.

boolean

Returns whether logging playback rate is allowed based on the request configuration.

boolean

Returns whether logging session ID is allowed based on the request configuration.

boolean

Returns whether logging startup is allowed based on the request configuration.

boolean

Returns whether logging stream type is allowed based on the request configuration.

boolean

Returns whether logging streaming format is allowed based on the request configuration.

boolean

Returns whether logging top bitrate is allowed based on the request configuration.

Constants

CMCD_QUERY_PARAMETER_KEY

public static final String CMCD_QUERY_PARAMETER_KEY = "CMCD"

KEY_BITRATE

public static final String KEY_BITRATE = "br"

KEY_BUFFER_LENGTH

public static final String KEY_BUFFER_LENGTH = "bl"

KEY_BUFFER_STARVATION

public static final String KEY_BUFFER_STARVATION = "bs"

KEY_CMCD_OBJECT

public static final String KEY_CMCD_OBJECT = "CMCD-Object"

KEY_CMCD_REQUEST

public static final String KEY_CMCD_REQUEST = "CMCD-Request"

KEY_CMCD_SESSION

public static final String KEY_CMCD_SESSION = "CMCD-Session"

KEY_CMCD_STATUS

public static final String KEY_CMCD_STATUS = "CMCD-Status"

KEY_CONTENT_ID

public static final String KEY_CONTENT_ID = "cid"

KEY_DEADLINE

public static final String KEY_DEADLINE = "dl"

KEY_MAXIMUM_REQUESTED_BITRATE

public static final String KEY_MAXIMUM_REQUESTED_BITRATE = "rtp"

KEY_MEASURED_THROUGHPUT

public static final String KEY_MEASURED_THROUGHPUT = "mtp"

KEY_NEXT_OBJECT_REQUEST

public static final String KEY_NEXT_OBJECT_REQUEST = "nor"

KEY_NEXT_RANGE_REQUEST

public static final String KEY_NEXT_RANGE_REQUEST = "nrr"

KEY_OBJECT_DURATION

public static final String KEY_OBJECT_DURATION = "d"

KEY_OBJECT_TYPE

public static final String KEY_OBJECT_TYPE = "ot"

KEY_PLAYBACK_RATE

public static final String KEY_PLAYBACK_RATE = "pr"

KEY_SESSION_ID

public static final String KEY_SESSION_ID = "sid"

KEY_STARTUP

public static final String KEY_STARTUP = "su"

KEY_STREAMING_FORMAT

public static final String KEY_STREAMING_FORMAT = "sf"

KEY_STREAM_TYPE

public static final String KEY_STREAM_TYPE = "st"

KEY_TOP_BITRATE

public static final String KEY_TOP_BITRATE = "tb"

KEY_VERSION

public static final String KEY_VERSION = "v"

MAX_ID_LENGTH

public static final int MAX_ID_LENGTH = 64

Maximum length for ID fields.

MODE_QUERY_PARAMETER

public static final int MODE_QUERY_PARAMETER = 1

MODE_REQUEST_HEADER

public static final int MODE_REQUEST_HEADER = 0

Public fields

contentId

public final @Nullable String contentId

A GUID identifying the current content, or null if unset.

This value is consistent across multiple different sessions and devices and is defined and updated at the discretion of the service provider. Maximum length is 64 characters.

dataTransmissionMode

@CmcdConfiguration.DataTransmissionMode
public final int dataTransmissionMode

Mode used for data transmission.

requestConfig

public final CmcdConfiguration.RequestConfig requestConfig

Dynamic request specific configuration.

sessionId

public final @Nullable String sessionId

A GUID identifying the current playback session, or null if unset.

A playback session typically ties together segments belonging to a single media asset. Maximum length is 64 characters.

Public constructors

CmcdConfiguration

public CmcdConfiguration(
    @Nullable String sessionId,
    @Nullable String contentId,
    CmcdConfiguration.RequestConfig requestConfig
)

Creates an instance with dataTransmissionMode set to MODE_REQUEST_HEADER.

CmcdConfiguration

public CmcdConfiguration(
    @Nullable String sessionId,
    @Nullable String contentId,
    CmcdConfiguration.RequestConfig requestConfig,
    @CmcdConfiguration.DataTransmissionMode int dataTransmissionMode
)

Creates an instance.

Public methods

isBitrateLoggingAllowed

public boolean isBitrateLoggingAllowed()

Returns whether logging bitrate is allowed based on the request configuration.

isBufferLengthLoggingAllowed

public boolean isBufferLengthLoggingAllowed()

Returns whether logging buffer length is allowed based on the request configuration.

isBufferStarvationLoggingAllowed

public boolean isBufferStarvationLoggingAllowed()

Returns whether logging buffer starvation is allowed based on the request configuration.

isContentIdLoggingAllowed

public boolean isContentIdLoggingAllowed()

Returns whether logging content ID is allowed based on the request configuration.

isDeadlineLoggingAllowed

public boolean isDeadlineLoggingAllowed()

Returns whether logging deadline is allowed based on the request configuration.

isMaximumRequestThroughputLoggingAllowed

public boolean isMaximumRequestThroughputLoggingAllowed()

Returns whether logging maximum requested throughput is allowed based on the request configuration.

isMeasuredThroughputLoggingAllowed

public boolean isMeasuredThroughputLoggingAllowed()

Returns whether logging measured throughput is allowed based on the request configuration.

isNextObjectRequestLoggingAllowed

public boolean isNextObjectRequestLoggingAllowed()

Returns whether logging next object request is allowed based on the request configuration.

isNextRangeRequestLoggingAllowed

public boolean isNextRangeRequestLoggingAllowed()

Returns whether logging next range request is allowed based on the request configuration.

isObjectDurationLoggingAllowed

public boolean isObjectDurationLoggingAllowed()

Returns whether logging object duration is allowed based on the request configuration.

isObjectTypeLoggingAllowed

public boolean isObjectTypeLoggingAllowed()

Returns whether logging object type is allowed based on the request configuration.

isPlaybackRateLoggingAllowed

public boolean isPlaybackRateLoggingAllowed()

Returns whether logging playback rate is allowed based on the request configuration.

isSessionIdLoggingAllowed

public boolean isSessionIdLoggingAllowed()

Returns whether logging session ID is allowed based on the request configuration.

isStartupLoggingAllowed

public boolean isStartupLoggingAllowed()

Returns whether logging startup is allowed based on the request configuration.

isStreamTypeLoggingAllowed

public boolean isStreamTypeLoggingAllowed()

Returns whether logging stream type is allowed based on the request configuration.

isStreamingFormatLoggingAllowed

public boolean isStreamingFormatLoggingAllowed()

Returns whether logging streaming format is allowed based on the request configuration.

isTopBitrateLoggingAllowed

public boolean isTopBitrateLoggingAllowed()

Returns whether logging top bitrate is allowed based on the request configuration.