This fixes or suppresses all reported issues by the code review linter tools.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=210107759
The doc can be improved by enumerating and linking all possible values from
the interface doc.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=209772309
This CL adds support for seeking within PS streams by using binary search. For
any seek timestamp, it tries to find the location in the stream where SCR
timestamp is close to the target timestamp, and return this position as the
seek position.
Github: #4476.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206787691
Rewrite FlacBinarySearchSeeker and extract out the core binary search algorithm
into BinarySearchSeeker class so it can be re-used for other formats.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=206012900
The DefaultEventListener was added for selective overrides. Now that Java 8
support is enabled, these selective listener overrides can be implemented
more easily and more flexible using default methods.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=201695490
Currently, ExoPlayer only supports seeking for FLAC files with a SEEKTABLE.
This CL adds support seeking for cases when the FLAC files do not have a
SEEKTABLE by searching for individual frames within the file using binary
search.
Github: #1088.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196816398
Added FlacBinarySearchSeeker, which supports seeking in a FLAC stream by searching for individual frames within the file using binary search.
Github: #1808.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=196587198
Supports extracting data from AMR container format for both narrow and wide
band formats. Also added AmrExtractor as one of the default extractor to be
used in DefaultExtractorsFactory.
GitHub: #2527.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=194407507
LibFlac internally can skip ID3 tags correctly. Therefore, we don't need to keep track of the whole ID3 header section and skip through this section in Java code. We can just set the whole stream to the native library, and it will handle skipping ID3 tags correctly.
The only thing that the Java part need to do is peeking and parsing ID3 tags (if present), in order to populate the track format metadata.
GitHub: #4055.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193327602
Also add testing media to verify FLAC extension can play these sample rates.
Github: #3769.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192783193
Support parsing ID3 tags at the beginning of FLAC files, even though FLAC spec
does not require this.
GitHub: #4055.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=192127929
These don't seem to be needed anymore. All tests run without them in gradle
and Blaze.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=191867518
1. Allow retaining a decoder without any reconfiguration, in addition
to retaining with reconfiguration (and not retaining)
2. Fix retention logic for video decoders to take into account changing
ColorInfo
3. Allow retention of audio decoders when possible
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187500285
- Change 'compile' configuration (deprecared) to using 'implementation'
and 'api' configurations instead.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=187311778
There are 4 tests which can't currently be moved:
- DownloadManagerTest explicitly uses the main looper which isn't easily
supported because the test runs on this thread.
- ContentDataSourceTest uses an AssetFileDescriptor which wraps a
ParcelFileDescriptor. It seems Robolectric doesn't correctly forward the
inner wrapped file descriptor leading to NPE.
- CacheContentIndexTest and SimpleCacheSpanTest both work fine with Gradle
but fail with seemingly valid test failures on Blaze.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=185366678
The pending exception will be thrown upon returning to Java
from native, but we should return early rather than continuing
to execute the native method to the end so as to avoid undefined
behavior. Note that the return value is irrelevant (because the
pending exception will be thrown).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=184119606
Android NDK r9 in [] is deprecated (see []
Update the ExoPlayer flac extensions to use android_jni_library.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182017669
Partial reads were performed once using a partial size of 1 byte.
This was not enough to detect problems which only occur in combination
with IOExceptions. Partial reads are now only applied when no exception
is thrown.
Moreover, the tests didn't check whether the total number of sampled bytes
is what it is supposed to be. Added a field to the data dumps checking
the total number of bytes in the sampled data.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=181296545
If the library is not available, no tracks can be selected and the
tests silently run through by immediately switching to ended state
without error.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178904347
Add Builder pattern to ExtractorMediaSource and mark existing constructors as
deprecated.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176088810
This allows simplified listener implementations as most listeners
will not listen to all possible notifications.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170177821
This allows listeners to easily determine the source of the discontinuity.
Reasons can be period transitions, seeks, and internal reasons.
Listeners still using the deprecated ExoPlayer.EventListener interface were
updated to Player.EventListener.
GitHub: #3252
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=168549612
Currently FlacDecoder/FlacExtractor always perform resampling to 16bit. In some
case (with 24bit audio), this might lower the audio quality if the system
supports 24bit audio.
Since AudioTrack implementation supports resampling, we will remove the
resampling step, and return an output with the same bits-per-sample as the original stream.
User can choose to re-sample to 16bit in AudioTrack if necessary.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167494350
- Fix Ogg extractor to work without sniffing.
- Fix extractors to handle seek() before init().
- Add tests for both issues.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=163992343
This cleans up test the TestUtil class that in large parts consisted of
assertions for Extractor tests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=160829066