8207 Commits

Author SHA1 Message Date
tonihei
40101094ba Add option to send messages at end of stream.
This simplifies sending messages to the end of a stream. This was
already possible, but users needed to wait until the duration is known
before sending the message. This duration resolution can happen as part of the message position resolution.

PiperOrigin-RevId: 294626984
2020-02-13 15:44:56 +00:00
kimvde
7a8ab7ce68 FakeTrackOutput: test all the formats sent
PiperOrigin-RevId: 294621946
2020-02-13 15:44:47 +00:00
tonihei
29c43b5e24 Move common bookkeeping to MediaCodecRenderer.
This is a no-op change and just moves some duplicated logic into the
base class.

PiperOrigin-RevId: 294615218
2020-02-13 15:44:38 +00:00
kimvde
bdfd24290f Share FLAC extractor tests between both extractors
PiperOrigin-RevId: 294614958
2020-02-13 15:44:29 +00:00
kimvde
1c232b1bdf Add possibility to write extractor dump files to device
PiperOrigin-RevId: 294613898
2020-02-13 15:44:20 +00:00
olly
1440cad5ed Fix build warnings under exoplayer/v2/library
- Removes empty <p> tag in javadoc
- Removes incorrect parameter name warnings for var args.

PiperOrigin-RevId: 294555651
2020-02-13 15:44:11 +00:00
olly
440468603a Add Format peak and average bitrate (hidden for now)
Issue: #2863
PiperOrigin-RevId: 294531127
2020-02-13 15:44:03 +00:00
olly
1cbe3f72e6 DataSpec: Deprecate most constructors
Keeping (Uri) and (Uri, position, length) to avoid needing
Builder for the trivial case.

PiperOrigin-RevId: 294530226
2020-02-13 15:43:54 +00:00
olly
c7b6a2e045 DataSpec: Add customData field.
PiperOrigin-RevId: 294520836
2020-02-13 15:43:45 +00:00
olly
14d3ed09d5 Add DataSpec.Builder
PiperOrigin-RevId: 294518763
2020-02-13 15:43:35 +00:00
Daniele Bonaldo
e99a7f6cd2 Merge branch 'dev-v2' into subtitle_color_in_cue_class
# Conflicts:
#	library/core/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParser.java
2020-02-12 17:07:23 +01:00
olly
7a849e11f7 Fix demo app download notification
PiperOrigin-RevId: 294503035
2020-02-11 22:10:44 +00:00
olly
147f70bf5b Format: Move language into common fields section
Language is already applicable to image formats as well.
It can also apply to video formats. For example when the
video contains burnt in subtitles. Also, some animation
studios produce multiple variants of animations, in which
text within the scene itself (e.g., a signpost) is
replaced to be language specific.

PiperOrigin-RevId: 294500227
2020-02-11 22:10:35 +00:00
olly
39c65c658e DataSpec: Make DataSpecTest more useful
- Replace tests specific to HTTP request headers with tests that
  more generally test constructor correctness.
- Add test specifically around the constructor that infers the
  HTTP method from postBody, since that's a non-trivial bit of
  constructor logic.

Note: In general, I'm not sure this type of test (i.e., testing a
bit of trivial copying through a constructor) is worth the cost
of writing and maintaining them. That said, checking the new
uriPositionOffset is calculated correctly is non-trivial, as is
the HTTP method inference, so keeping them for now.
PiperOrigin-RevId: 294488684
2020-02-11 22:10:26 +00:00
olly
829282fa12 Replace DataSpec.absoluteStreamPosition with uriPositionOffset
This is a preliminary step toward adding a DataSpec.Builder,
which is needed for sanity when adding DataSpec.customData.

The existing absoluteStreamPosition field is very error prone,
because anyone using a Builder to adjust the request position
will need to remember to adjust two values:

dataSpec
    .buildUpon()
    .setAbsoluteStreamPosition(x)
    .setPosition(x)
    .build();

Furthermore, the difference between position and
absoluteStreamPosition is irrelevant in nearly all cases. In
the core library, the difference is only relevant when initializing
AES encryption/decryption to write/read cache files.

Replacing absoluteStreamPosition with uriPositionOffset will
simplify the code block above to:

dataSpec
    .buildUpon()
    .setPosition(x)
    .build();

PiperOrigin-RevId: 294485644
2020-02-11 22:10:17 +00:00
kimvde
58bc460ba3 Write extractor dumps to testdata
PiperOrigin-RevId: 294465827
2020-02-11 22:10:08 +00:00
kim-vde
fed0acc253 Merge pull request #6949 from DolbyLaboratories:dev-v2-assets
PiperOrigin-RevId: 294441610
2020-02-11 17:12:55 +00:00
christosts
f59755f51c Fix JavaDoc
Replace Thread with thread on documentation.

PiperOrigin-RevId: 294401357
2020-02-11 17:12:45 +00:00
christosts
bc02643df0 Async queuing on MultiLockAsyncMediaCodecAdapter
Add support for asynchronous input buffer queueing in the
MultiLockAsyncMediaCodecAdapter.

PiperOrigin-RevId: 294397811
2020-02-11 17:12:37 +00:00
olly
12187c9048 Apply minimal layout change according to view size
- Add method to scale scrubber handle of DefaultTimeBar

PiperOrigin-RevId: 294366734
2020-02-11 17:12:29 +00:00
kimvde
363599dd54 Move assets from dash to testdata module
PiperOrigin-RevId: 294241169
2020-02-11 17:12:21 +00:00
kimvde
22ce744095 Move assets from core to testdata module
PiperOrigin-RevId: 294239472
2020-02-11 17:12:13 +00:00
tonihei
66aa35f581 Select adaptive audio tracks based on the best track in the group.
Currently, the subset of audio tracks for adaptation is selected
purely based on the size of the subset in the track group, completely
ignoring the previously selected best individual track.

This change ignores all tracks with a different configuration than the
previously selected best track.

PiperOrigin-RevId: 294231806
2020-02-11 17:12:06 +00:00
bachinger
0eb0267131 deprecate and rename onLoadingChanged
PiperOrigin-RevId: 294222083
2020-02-11 17:11:58 +00:00
christosts
5725acb789 Defer MediaCodec queueing to background thread
The DedicatedThreadAsyncMediaCodecAdapter supports enqueueing
input buffers in a background Thread.

PiperOrigin-RevId: 294202744
2020-02-11 17:11:50 +00:00
aquilescanta
278e1aff4d Revert accidental change in media.exolist.
PiperOrigin-RevId: 294193213
2020-02-11 17:11:43 +00:00
aquilescanta
ac8a2e80e1 Prepare and release DrmSessionManager in Renderers
Issue: #6951
PiperOrigin-RevId: 294187695
2020-02-11 17:11:35 +00:00
kimvde
7c85ca08cf Fix ExtractorAsserts Javadoc
PiperOrigin-RevId: 294184891
2020-02-11 17:11:26 +00:00
olly
7d19a85c59 DataSpec: Cleanup
PiperOrigin-RevId: 294183213
2020-02-11 17:11:19 +00:00
bachinger
3dc9225bab remove deprecated usage of onPlayerStateChanged in ui components
PiperOrigin-RevId: 294182858
2020-02-11 17:11:11 +00:00
christosts
d8802df62e Add interface MediaCodecInputBufferEnqueuer
MediaCodecInputBufferEnqueuer wraps MediaCodec queue operations.

PiperOrigin-RevId: 294182717
2020-02-11 17:11:04 +00:00
bachinger
016bacd178 remove deprecated usage of onPlayerStateChanged
PiperOrigin-RevId: 294181886
2020-02-11 17:10:56 +00:00
andrewlewis
fc24a0d52d Fix API check warning
PiperOrigin-RevId: 294179427
2020-02-11 17:10:49 +00:00
bachinger
c02933ac0a rename getPlaybackError
PiperOrigin-RevId: 294074348
2020-02-11 17:10:41 +00:00
kimvde
ecc04b2b6f ExtractorAsserts: always test against .unklen.dump files
This allows the file to be created automatically when
FakeExtractorOutput#WRITE_DUMP is true.

PiperOrigin-RevId: 293834547
2020-02-11 17:10:33 +00:00
olly
2722969d0c Cast void* to JniContext* using static_cast.
static_cast is more appropriate than reinrerpret_cast for casting from
void* to JniContext*. See Section 7.2.1 (page 173) in The C++
Programming Language, 4th Edition and
https://stackoverflow.com/questions/310451/should-i-use-static-cast-or-reinterpret-cast-when-casting-a-void-to-whatever

PiperOrigin-RevId: 293812940
2020-02-11 17:10:26 +00:00
kimvde
b081b6ea4a Move assets from vp9 to testdata module
PiperOrigin-RevId: 293781786
2020-02-11 17:10:18 +00:00
kimvde
bcbb7d23fa Move assets from opus to testdata module
PiperOrigin-RevId: 293780365
2020-02-11 17:10:10 +00:00
kimvde
e4eb55a291 Move asssets from smoothstreaming to testdata module
PiperOrigin-RevId: 293774012
2020-02-11 17:10:03 +00:00
olly
0915998add Switch to new libgav1 frame buffer callback API.
The new code in Libgav1GetFrameBuffer is copied from
libgav1/src/frame_buffer_callback_adaptor.cc. It may become libgav1
utility functions available to libgav1 clients in the future.

The Libgav1FrameBuffer struct in the old frame buffer callback API is
defined as follows:

  typedef struct Libgav1FrameBuffer {
    uint8_t* data[3];
    size_t size[3];
    void* private_data;
  } Libgav1FrameBuffer;

Copy these three fields to the JniFrameBuffer class as private data
members and add the RawBuffer() and Id() getter methods.

The existing AlignTo16 function is replaced by the copied Align template
function.

PiperOrigin-RevId: 293709205
2020-02-11 17:09:55 +00:00
bachinger
e8293b92d8 remove deprecated usage of onPlayerStateChanged in ImaAdsLoader
PiperOrigin-RevId: 293612280
2020-02-11 17:09:47 +00:00
kimvde
b69918a21e Move assets from extractor to testdata module
PiperOrigin-RevId: 293608745
2020-02-11 17:09:39 +00:00
kimvde
cbaa4a7c57 Avoid sending duplicate formats in AC3 extractor
PiperOrigin-RevId: 293582663
2020-02-11 17:09:31 +00:00
krocard
9875c5d2b4 AudioCapabilities: Missing int class annotation
PiperOrigin-RevId: 293565660
2020-02-11 17:09:23 +00:00
kimvde
04af8e60ba Add the possibility to specify the dump files path in ExtractorAsserts
PiperOrigin-RevId: 293554489
2020-02-11 17:09:16 +00:00
kimvde
79a3bad4c3 Move assets from FLAC extension to testdata
PiperOrigin-RevId: 293553412
2020-02-11 17:09:08 +00:00
kimvde
011efcc522 Move FLAC assets from extractor to testdata module
PiperOrigin-RevId: 293552271
2020-02-11 17:09:00 +00:00
andrewlewis
0dd8e6a7c1 Add GL demo app
Demonstrates rendering to a GLSurfaceView while applying a GL shader.

Issue: #6920
PiperOrigin-RevId: 293551724
2020-02-11 17:08:53 +00:00
kimvde
e3f43ee2ce Create testdata module
This module will allow sharing sample data between modules.

PiperOrigin-RevId: 293545495
2020-02-11 17:08:45 +00:00
olly
f58eb17320 Fix Lint.ThenChange paths
PiperOrigin-RevId: 293367878
2020-02-11 17:08:38 +00:00