mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Fix parameter names on overridden methods
The dokka javadoc generation tool complains when parameter names don't match between a method and its override. This change updates occurrences where there is currently a mismatch. PiperOrigin-RevId: 387367509
This commit is contained in:
parent
5bc1c4837f
commit
337d5aa9b6
6 changed files with 21 additions and 20 deletions
|
|
@ -1446,8 +1446,7 @@ public abstract class Timeline implements Bundleable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Window getWindow(
|
||||
int windowIndex, Window window, long ignoredDefaultPositionProjectionUs) {
|
||||
public Window getWindow(int windowIndex, Window window, long defaultPositionProjectionUs) {
|
||||
Window w = windows.get(windowIndex);
|
||||
window.set(
|
||||
w.uid,
|
||||
|
|
@ -1524,7 +1523,7 @@ public abstract class Timeline implements Bundleable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Period getPeriod(int periodIndex, Period period, boolean ignoredSetIds) {
|
||||
public Period getPeriod(int periodIndex, Period period, boolean setIds) {
|
||||
Period p = periods.get(periodIndex);
|
||||
period.set(
|
||||
p.id,
|
||||
|
|
|
|||
|
|
@ -809,12 +809,13 @@ public class AnalyticsCollector
|
|||
// BandwidthMeter.EventListener implementation.
|
||||
|
||||
@Override
|
||||
public final void onBandwidthSample(int elapsedMs, long bytesTransferred, long bitrate) {
|
||||
public final void onBandwidthSample(int elapsedMs, long bytesTransferred, long bitrateEstimate) {
|
||||
EventTime eventTime = generateLoadingMediaPeriodEventTime();
|
||||
sendEvent(
|
||||
eventTime,
|
||||
AnalyticsListener.EVENT_BANDWIDTH_ESTIMATE,
|
||||
listener -> listener.onBandwidthEstimate(eventTime, elapsedMs, bytesTransferred, bitrate));
|
||||
listener ->
|
||||
listener.onBandwidthEstimate(eventTime, elapsedMs, bytesTransferred, bitrateEstimate));
|
||||
}
|
||||
|
||||
// DrmSessionEventListener implementation.
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ public final class ServerSideInsertedAdsMediaSource extends BaseMediaSource
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onSourceInfoRefreshed(MediaSource mediaSource, Timeline timeline) {
|
||||
public void onSourceInfoRefreshed(MediaSource source, Timeline timeline) {
|
||||
this.contentTimeline = timeline;
|
||||
if (AdPlaybackState.NONE.equals(adPlaybackState)) {
|
||||
return;
|
||||
|
|
@ -209,7 +209,7 @@ public final class ServerSideInsertedAdsMediaSource extends BaseMediaSource
|
|||
}
|
||||
|
||||
@Override
|
||||
public MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator, long positionUs) {
|
||||
public MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator, long startPositionUs) {
|
||||
SharedMediaPeriod sharedPeriod;
|
||||
if (lastUsedMediaPeriod != null) {
|
||||
sharedPeriod = lastUsedMediaPeriod;
|
||||
|
|
@ -219,16 +219,17 @@ public final class ServerSideInsertedAdsMediaSource extends BaseMediaSource
|
|||
@Nullable
|
||||
SharedMediaPeriod lastExistingPeriod =
|
||||
Iterables.getLast(mediaPeriods.get(id.windowSequenceNumber), /* defaultValue= */ null);
|
||||
if (lastExistingPeriod != null && lastExistingPeriod.canReuseMediaPeriod(id, positionUs)) {
|
||||
if (lastExistingPeriod != null
|
||||
&& lastExistingPeriod.canReuseMediaPeriod(id, startPositionUs)) {
|
||||
sharedPeriod = lastExistingPeriod;
|
||||
} else {
|
||||
long startPositionUs = getStreamPositionUs(positionUs, id, adPlaybackState);
|
||||
long streamPositionUs = getStreamPositionUs(startPositionUs, id, adPlaybackState);
|
||||
sharedPeriod =
|
||||
new SharedMediaPeriod(
|
||||
mediaSource.createPeriod(
|
||||
new MediaPeriodId(id.periodUid, id.windowSequenceNumber),
|
||||
allocator,
|
||||
startPositionUs),
|
||||
streamPositionUs),
|
||||
adPlaybackState);
|
||||
mediaPeriods.put(id.windowSequenceNumber, sharedPeriod);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,18 +73,18 @@ public final class AesCipherDataSink implements DataSink {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void write(byte[] data, int offset, int length) throws IOException {
|
||||
public void write(byte[] buffer, int offset, int length) throws IOException {
|
||||
if (scratch == null) {
|
||||
// In-place mode. Writes over the input data.
|
||||
castNonNull(cipher).updateInPlace(data, offset, length);
|
||||
wrappedDataSink.write(data, offset, length);
|
||||
castNonNull(cipher).updateInPlace(buffer, offset, length);
|
||||
wrappedDataSink.write(buffer, offset, length);
|
||||
} else {
|
||||
// Use scratch space. The original data remains intact.
|
||||
int bytesProcessed = 0;
|
||||
while (bytesProcessed < length) {
|
||||
int bytesToProcess = min(length - bytesProcessed, scratch.length);
|
||||
castNonNull(cipher)
|
||||
.update(data, offset + bytesProcessed, bytesToProcess, scratch, /* outOffset= */ 0);
|
||||
.update(buffer, offset + bytesProcessed, bytesToProcess, scratch, /* outOffset= */ 0);
|
||||
wrappedDataSink.write(scratch, /* offset= */ 0, bytesToProcess);
|
||||
bytesProcessed += bytesToProcess;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1249,10 +1249,10 @@ public final class DashMediaSource extends BaseMediaSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Period getPeriod(int periodIndex, Period period, boolean setIdentifiers) {
|
||||
public Period getPeriod(int periodIndex, Period period, boolean setIds) {
|
||||
Assertions.checkIndex(periodIndex, 0, getPeriodCount());
|
||||
Object id = setIdentifiers ? manifest.getPeriod(periodIndex).id : null;
|
||||
Object uid = setIdentifiers ? (firstPeriodId + periodIndex) : null;
|
||||
Object id = setIds ? manifest.getPeriod(periodIndex).id : null;
|
||||
Object uid = setIds ? (firstPeriodId + periodIndex) : null;
|
||||
return period.set(
|
||||
id,
|
||||
uid,
|
||||
|
|
|
|||
|
|
@ -471,9 +471,9 @@ public final class SsMediaSource extends BaseMediaSource
|
|||
}
|
||||
|
||||
@Override
|
||||
public void releasePeriod(MediaPeriod period) {
|
||||
((SsMediaPeriod) period).release();
|
||||
mediaPeriods.remove(period);
|
||||
public void releasePeriod(MediaPeriod mediaPeriod) {
|
||||
((SsMediaPeriod) mediaPeriod).release();
|
||||
mediaPeriods.remove(mediaPeriod);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in a new issue