Skip to content

Commit

Permalink
Add support for recordingSessionId for QoE metrics reports
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Mar 15, 2024
1 parent aaf4e97 commit d89db56
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class QoEMetricsReportingController(
}

lateinit var reportingClientId: String
private lateinit var recordingSessionId: String
private val availableQoeMetricsReporterExoplayerByScheme =
mutableMapOf<String, KClass<QoeMetricsReporterExoplayer>>()
private val activeQoeMetricsReporterById = mutableMapOf<String, QoeMetricsReporterExoplayer>()
Expand All @@ -48,6 +49,7 @@ class QoEMetricsReportingController(

override fun handleTriggerPlayback(playbackRequest: PlaybackRequest) {
resetState()
recordingSessionId = playbackRequest.mediaStreamingSessionIdentifier
setLastQoeMetricsRequests(
playbackRequest.qoeMetricsRequests
)
Expand Down Expand Up @@ -138,7 +140,8 @@ class QoEMetricsReportingController(
val qoeMetricsReport =
qoeMetricsReporterForConfigurationId.getQoeMetricsReport(
qoeMetricsRequest,
reportingClientId
reportingClientId,
recordingSessionId
)
qoeMetricsReporterForConfigurationId.resetState()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ interface IQoeMetricsReporter {

fun initialize(lastQoeMetricsRequest: QoeMetricsRequest)

fun getQoeMetricsReport(qoeMetricsRequest: QoeMetricsRequest, reportingClientId: String) : String
fun getQoeMetricsReport(
qoeMetricsRequest: QoeMetricsRequest,
reportingClientId: String,
recordingSessionId: String
): String

fun reset()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,15 @@ class QoeMetricsReporterExoplayer(
@SuppressLint("Range")
override fun getQoeMetricsReport(
qoeMetricsRequest: QoeMetricsRequest,
reportingClientId: String
reportingClientId: String,
recordingSessionId: String
): String {
try {
val qoeMetricsReport = QoeReport()
qoeMetricsReport.reportTime = utils.getCurrentXsDateTime()
qoeMetricsReport.periodId = exoPlayerAdapter.getCurrentPeriodId()
qoeMetricsReport.reportPeriod = qoeMetricsRequest.reportingInterval?.toInt()
qoeMetricsReport.recordingSessionId = recordingSessionId

if (shouldReportMetric(Metrics.BUFFER_LEVEL, qoeMetricsRequest.metrics)) {
if (bufferLevel.entries.size > 0) {
Expand Down

0 comments on commit d89db56

Please sign in to comment.