Skip to content

Commit

Permalink
Add remaining PlaybackStatsListener metrics.
Browse files Browse the repository at this point in the history
This adds all the non-playback-state metrics, like format, error, bandwidth and
renderer performance metrics.

PiperOrigin-RevId: 250668854
  • Loading branch information
tonihei committed May 30, 2019
1 parent 77595da commit fd1179a
Show file tree
Hide file tree
Showing 4 changed files with 842 additions and 17 deletions.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### dev-v2 (not yet released) ###

* Add `PlaybackStatsListener` to collect `PlaybackStats` for playbacks analysis
and analytics reporting (TODO: link to developer guide page/blog post).
* Add basic DRM support to the Cast demo app.
* Add `ResolvingDataSource` for just-in-time resolution of `DataSpec`s
([#5779](https://github.com/google/ExoPlayer/issues/5779)).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,38 @@ public Format copyWithBitrate(int bitrate) {
accessibilityChannel);
}

public Format copyWithVideoSize(int width, int height) {
return new Format(
id,
label,
selectionFlags,
roleFlags,
bitrate,
codecs,
metadata,
containerMimeType,
sampleMimeType,
maxInputSize,
initializationData,
drmInitData,
subsampleOffsetUs,
width,
height,
frameRate,
rotationDegrees,
pixelWidthHeightRatio,
projectionData,
stereoMode,
colorInfo,
channelCount,
sampleRate,
pcmEncoding,
encoderDelay,
encoderPadding,
language,
accessibilityChannel);
}

/**
* Returns the number of pixels if this is a video format whose {@link #width} and {@link #height}
* are known, or {@link #NO_VALUE} otherwise
Expand Down
Loading

0 comments on commit fd1179a

Please sign in to comment.