Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consumption Reporting - Support for mediaConsumed, startTime and duration in ConsumptionReportingUnit #52

Closed
dsilhavy opened this issue Sep 27, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dsilhavy
Copy link
Contributor

dsilhavy commented Sep 27, 2023

Description

As part of the ConsumptionReportingUnit type as defined in 26.512 Table 11.3.3.2 the mediaConsumed property identifies the consumed media. In the case of DASH, the value of the Representation@id attribute shall be quoted. Moreover, the startTime and the duration property define the time when a consumption reporting unit started and the duration of a specific consumption unit respectively.

Implementation

Exoplayer exposes the onDownstreamFormatChanged callback to get a notification when a Representation is switched. As media segments are not multiplexed we get an individual event for video and audio segments. Following up the discussion in 5G-MAG/rt-5gms-media-session-handler#3 we decided to report the currently selected Representation as long as a new one is selected:

If the same Representation is still being consumed when it's time to send the next consumption report, I would say that this Consumption Reporting Unit is repeated as the first one in that next report, with the same startTime as before, but a longer duration.

For that reason, we need to maintain the mime type of each Representation. A switch of the video Representation should not affect the reporting of the audio Representation consumption.

Example

Based on the implementation in #51. Note that mimeType and finished are added for convenience and will be removed for the final report.

Playback start

consumptionReportingUnits: [
    {
      mediaConsumed: 'v3_257',
      mediaEndpointAddress: null,
      startTime: '2023-09-27T11:06:35Z',
      duration: 1,
      locations: null,
      mimeType: 'video/mp4',
      finished: false
    },
    {
      mediaConsumed: 'v4_258',
      mediaEndpointAddress: null,
      startTime: '2023-09-27T11:06:35Z',
      duration: 1,
      locations: null,
      mimeType: 'audio/mp4',
      finished: false
    }
  ]

Representation Switch

consumptionReportingUnits: [
    {
      mediaConsumed: 'v3_257',
      mediaEndpointAddress: null,
      startTime: '2023-09-27T11:06:35Z',
      duration: 12,
      locations: null,
      mimeType: 'video/mp4',
      finished: true
    },
    {
      mediaConsumed: 'v4_258',
      mediaEndpointAddress: null,
      startTime: '2023-09-27T11:06:35Z',
      duration: 21,
      locations: null,
      mimeType: 'audio/mp4',
      finished: false
    },
    {
      mediaConsumed: 'v7_257',
      mediaEndpointAddress: null,
      startTime: '2023-09-27T11:06:47Z',
      duration: 9,
      locations: null,
      mimeType: 'video/mp4',
      finished: false
    }
  ]

Removal of finished entry

consumptionReportingUnits: [
    {
      mediaConsumed: 'v4_258',
      mediaEndpointAddress: null,
      startTime: '2023-09-27T11:06:35Z',
      duration: 31,
      locations: null,
      mimeType: 'audio/mp4',
      finished: false
    },
    {
      mediaConsumed: 'v7_257',
      mediaEndpointAddress: null,
      startTime: '2023-09-27T11:06:47Z',
      duration: 19,
      locations: null,
      mimeType: 'video/mp4',
      finished: false
    }
  ]
@dsilhavy
Copy link
Contributor Author

Implemented according to the example above in #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant