Skip to content

Commit

Permalink
Fix Dackka/Metalava errors in av1, flac, ffmpeg, midi, and opus modules
Browse files Browse the repository at this point in the history
This uses `@hide` on `protected final` methods to hide them from Dackka
javadoc generation, since these methods are inaccessible to developers
anyway. These symbols will still (currently) be included in artefacts
distributed on Maven (because we don't run Metalava as part of
generating these artefacts).

In some cases I had to change the visibility/finality of methods to make
them `protected final` before adding the `@hide` annotation (but
the impact should be very low, since most of these methods were either
already unusable by app developers, or they shouldn't have been used).

#minor-release

PiperOrigin-RevId: 487472907
  • Loading branch information
icbaker authored and microkatz committed Nov 10, 2022
1 parent 9041d7b commit 1cd488a
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,13 @@ public String getName() {
C.FORMAT_HANDLED, ADAPTIVE_SEAMLESS, TUNNELING_NOT_SUPPORTED);
}

/**
* {@inheritDoc}
*
* @hide
*/
@Override
protected Gav1Decoder createDecoder(Format format, @Nullable CryptoConfig cryptoConfig)
protected final Gav1Decoder createDecoder(Format format, @Nullable CryptoConfig cryptoConfig)
throws Gav1DecoderException {
TraceUtil.beginSection("createGav1Decoder");
int initialInputBufferSize =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,15 @@ public String getName() {
}

@Override
public final @AdaptiveSupport int supportsMixedMimeTypeAdaptation() {
public @AdaptiveSupport int supportsMixedMimeTypeAdaptation() {
return ADAPTIVE_NOT_SEAMLESS;
}

/**
* {@inheritDoc}
*
* @hide
*/
@Override
protected FfmpegAudioDecoder createDecoder(Format format, @Nullable CryptoConfig cryptoConfig)
throws FfmpegDecoderException {
Expand All @@ -121,8 +126,13 @@ protected FfmpegAudioDecoder createDecoder(Format format, @Nullable CryptoConfig
return decoder;
}

/**
* {@inheritDoc}
*
* @hide
*/
@Override
public Format getOutputFormat(FfmpegAudioDecoder decoder) {
protected Format getOutputFormat(FfmpegAudioDecoder decoder) {
Assertions.checkNotNull(decoder);
return new Format.Builder()
.setSampleMimeType(MimeTypes.AUDIO_RAW)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ public String getName() {
}
}

/**
* {@inheritDoc}
*
* @hide
*/
@Override
protected FlacDecoder createDecoder(Format format, @Nullable CryptoConfig cryptoConfig)
throws FlacDecoderException {
Expand All @@ -116,6 +121,11 @@ protected FlacDecoder createDecoder(Format format, @Nullable CryptoConfig crypto
return decoder;
}

/**
* {@inheritDoc}
*
* @hide
*/
@Override
protected Format getOutputFormat(FlacDecoder decoder) {
return getOutputFormat(decoder.getStreamMetadata());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,13 @@ public String getName() {
}
}

/**
* {@inheritDoc}
*
* @hide
*/
@Override
protected OpusDecoder createDecoder(Format format, @Nullable CryptoConfig cryptoConfig)
protected final OpusDecoder createDecoder(Format format, @Nullable CryptoConfig cryptoConfig)
throws OpusDecoderException {
TraceUtil.beginSection("createOpusDecoder");
@SinkFormatSupport
Expand All @@ -119,8 +124,13 @@ protected OpusDecoder createDecoder(Format format, @Nullable CryptoConfig crypto
return decoder;
}

/**
* {@inheritDoc} g
*
* @hide
*/
@Override
protected Format getOutputFormat(OpusDecoder decoder) {
protected final Format getOutputFormat(OpusDecoder decoder) {
@C.PcmEncoding
int pcmEncoding = decoder.outputFloat ? C.ENCODING_PCM_FLOAT : C.ENCODING_PCM_16BIT;
return Util.getPcmFormat(pcmEncoding, decoder.channelCount, OpusDecoder.SAMPLE_RATE);
Expand Down

0 comments on commit 1cd488a

Please sign in to comment.