227 Commits

Author SHA1 Message Date
andrewlewis
d58008eeb7 Rename BufferProcessor to AudioProcessor.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148763781
2017-02-28 17:35:35 +00:00
andrewlewis
1120e10273 Add GVR spatial audio rendering extension.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148658631
2017-02-28 17:33:23 +00:00
andrewlewis
5985f28e1b Add GVR extension and GvrBufferProcessor.
A GvrBufferProcessor can be passed to the player by overriding SimpleExoPlayer's
buildBufferProcessors method.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148442114
2017-02-28 13:47:18 +00:00
anjalibh
84def0d048 Implement VP9 profile 2 - 10 bit BT2020 support with libvpx. This code truncates the 10 bits to 8. We'll later update this to upload half-float or 16 bit short textures.
Pending: Convert BT2020 to DCI-P3 before render.

I'll add the same code to V2 after initial review.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148403349
2017-02-28 13:47:18 +00:00
olly
d99cb28e6a Correctly handle a SampleStream ending without providing a format
I'm going to introduce an EmptySampleStream that will be used in
some cases in conjunction as part of 608/EMSG support. This change
avoids EmptySampleStream having to provide a dummy format.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=148383831
2017-02-28 13:47:18 +00:00
olly
3bc320faaf Fix misleading method names.
Issue: #2414

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147325759
2017-02-15 17:00:40 +00:00
eguven
ef41303a04 Keep FlacStreamInfo unobfuscated as it is accessed from native methods
Issue: #2427

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146905629
2017-02-15 16:54:16 +00:00
olly
d3f4da749c Propagate track type through ExtractorOutput.track
This allows binding by track type in ChunkExtractorWrapper, which
allows the EMSG and 608 tracks to be enabled on FragmentedMp4Extractor
in DefaultDashChunkSource. ChunkExtractorWrapper currently binds these
to DummyTrackOutputs.

Note: I wanted to pass the mimeType instead, since it's a more specific,
but unfortunately there's at least one place where it's not known at the
point of invoking track() (FlvExtractor).

Issue #2176

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146471082
2017-02-15 16:49:47 +00:00
eguven
ebc5e327e6 Fix FLAC extension native part compilation issues
Issue: #2352

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146469547
2017-02-15 16:48:44 +00:00
andrewlewis
74acbe04e3 Pass an array of BufferProcessors to the AudioTrack.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146215966
2017-02-15 16:41:32 +00:00
Devin Tuchsen
6becba8c42
Only use ALAC workaround if sample rate is 0
This prevents the workaround from occuring once FFmpeg has the bug
patched.
2017-01-28 15:36:38 -06:00
Devin Tuchsen
f7b2452d46
Reference ALAC sample rate bug 2017-01-28 15:09:15 -06:00
Devin Tuchsen
24724158b1
Use ParseableByteArray to get ALAC sample rate 2017-01-22 13:58:45 -06:00
Devin Tuchsen
30c59c7a3f
Apple Lossless (ALAC) support 2017-01-13 20:16:49 -06:00
olly
1eede5d5bb Fix gradle/proguard setup
- Add proguard rules for libraries/extensions into .aar files
- Add proguard rules to retain CEA608/708 decoder constructors
- Remove lots of default config from gradle files
- Remove disabling of abort on lint error
- Enable optimizations on release builds of demo app

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144350233
2017-01-13 17:27:25 +00:00
olly
3547c9034e Report audio decoder adaptation support correctly
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144219518
2017-01-13 17:05:45 +00:00
olly
9d48d4e486 Support setting default headers on HttpDataSource.Factory's
Issue: #2166

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143703258
2017-01-05 21:57:36 +00:00
eguven
4a0f224e12 Add a new flag to DataSpec which permits content to be cached even if its length can not be resolved
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143560360
2017-01-04 23:07:58 +00:00
mef
dbfb187b6a [Cronet] Replace usage of deprecated UrlRequestException with CronetException.
- Errors reported by native stack use org.chromium.net.NetworkException class.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=143475649
2017-01-04 23:07:45 +00:00
andrewlewis
f45751872d Move track sample index updates out of getPosition(long).
This requires knowing the seek time in Extractor.seek, so that it's possible to
pick the latest synchronization sample at/before the seek time for each track
(rather than the earliest synchronization sample after the seek position).

Also remove the STATE_AFTER_SEEK state which should no longer be needed.

Issue: #2167

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=141432598
2016-12-12 16:15:38 +00:00
andrewlewis
f7132a7a73 Fix compiler warning about assignment in conditional.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140332890
2016-11-30 21:54:45 +00:00
mgersh
cbf5988803 Switch to Cronet 56_0_2924_0
This is the second CL in the 3 CL process to switch Cronet versions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140074017
2016-11-25 20:18:32 +00:00
cchiappini
ba49f51380 Cronet README fix
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140043801
2016-11-25 20:18:32 +00:00
andrewlewis
77715fbfbe Fix some analysis warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139901449
2016-11-25 20:18:32 +00:00
olly
4846146827 Fix internal build to use new Cronet jars
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139803684
2016-11-21 19:14:06 +00:00
andrewlewis
ae0ac55b8d Add support for resetting the AudioTrack stream type.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139797714
2016-11-21 19:13:34 +00:00
andrewlewis
1a62dad980 Remove TODO in ffmpeg extension README.md.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139453745
2016-11-18 12:52:05 +00:00
olly
61c9c16954 Make sure we report video size after Surface is set
Issue: #2077

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139451511
2016-11-18 12:50:41 +00:00
hoangtc
74383716a6 Update exoplayerv2 vp9 extension.
Reset RenderedFirstFrame when setting OuputBufferRenderer.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139100783
2016-11-18 12:45:24 +00:00
aquilescanta
6d5d054b45 Fix lint in FlacExtractor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=139064912
2016-11-18 12:44:53 +00:00
vigneshv
ee8a7f17ff vp9_extension: Fix potential integer overflows
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138652561
2016-11-10 21:15:21 +00:00
hoangtc
4cd8c77053 Add layer of indirection for DRM.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=138383979
2016-11-10 21:14:29 +00:00
olly
2c54363204 Report track groups and selections through ExoPlayer
TrackSelector no longer has a listener. Instead, tracks
change events are reported through ExoPlayer.EventListener.
Applications interested in retrieving the selection info
should retrieve it directly from the TrackSelector by
calling an exposed getter.

Pretty sure the ref'd issue is fixed as a side effect of
this change.

Issue: #1942

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=137183073
2016-10-27 12:27:55 +01:00
andrewlewis
a0fe258e8d Fix/suppress some analysis warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136710546
2016-10-24 11:44:49 +01:00
olly
0cff74dc70 Clean up okhttp extension Javadoc
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136702598
2016-10-24 11:41:52 +01:00
Oliver Woodman
aa660acf03 Fix typo in comments 2016-10-20 12:00:35 +01:00
olly
aa1002a0d6 Rollback "Add REQUIRE_HTTPS flag"
*** Reason for rollback ***

Flag doesn't enforce what it says it enforces, due to redirects

*** Original change description ***

Add REQUIRE_HTTPS flag

Note that it's not possible for the library to enforce that
the flag is adhered to, since it's possible for applications
to inject custom implementations of DataSource (there's no
requirement they even extend HttpDataSource for network
requesting implementations). It's possible for applications
to replace pretty much anything in the library, so there's
no other place we could put the flag where we could make
this guarantee. Hence this is a best-effort that will work
when...

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136583459
2016-10-19 17:00:03 +01:00
olly
1cfc432bb8 Add REQUIRE_HTTPS flag
Note that it's not possible for the library to enforce that
the flag is adhered to, since it's possible for applications
to inject custom implementations of DataSource (there's no
requirement they even extend HttpDataSource for network
requesting implementations). It's possible for applications
to replace pretty much anything in the library, so there's
no other place we could put the flag where we could make
this guarantee. Hence this is a best-effort that will work
when using HttpDataSource implementations that we provide.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136500947
2016-10-19 17:00:03 +01:00
kapishnikov
d3f78e4808 Deprecate call to new UrlRequest.Builder(...)
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136399474
2016-10-19 16:59:38 +01:00
olly
6acf59c4fc Fix Widevine L3 provisioning in V2
1. HttpMediaDrmCallback.executeProvisionRequest needs to specify
   an empty byte[], else we do a GET instead of a POST.
2. Content-Type should not be set when making the provision
   request, since there's no body.
3. DataSource implementations must correctly handle a non-null
   body with zero length. CronetDataSource was not handling this
   case. DefaultHttpDataSource was, but made a code modification
   to make it a little clearer. OkHttpDataSource seems to handle
   the case correctly, and it doens't look like the code can be
   made clearer.

Issue #1925

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=136042641
2016-10-14 10:42:43 +01:00
olly
94c7ee7252 Cronet - Skip if server doesn't support range requests
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135819142
2016-10-14 10:42:43 +01:00
olly
907b9bf4f6 Sanitize threading in CronetDataSource
- Move nearly all logic onto the calling thread (i.e. the thread
  calling open/read/close), to make threading correctness more
  obvious.
- Document which variables are read/written from which thread, and
  why the call sequences are safe.
- Fix thread safety issue that I think could probably cause data
  corruption in the case of a read timeout followed by another
  request into the DataSource.

Also:

- Relaxed content length checking to be consistent with the other
  http DataSource implementations, and avoided parsing the headers
  where they're not used.
- Fixed missing generics in CronetDataSourceFactory.
- Added TODO to work with servers that don't support partial range
  requests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135702217
2016-10-11 18:16:28 +01:00
olly
97020e0bab CronetDataSource: Fix getContentLength logging
This is a minor cleanup. The main thing it fixes is that
the "Inconsistent headers" and "Unexpected Content-Range"
log messages were printing List<String> objects, rather
than the actual headers they are supposed to print.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135378074
2016-10-11 18:16:28 +01:00
olly
d95baa3ee9 CronetDataSource: Fix thread safety issue with requestProperties
The access in fillCurrentRequestPostBody wasn't protected with
synchronization. Furthermore, just synchronizing it wouldn't be
sufficient, since what we really need to check is whether the
Content-Type header has been added to the UrlRequest.Builder.
The contents of requestProperties may have changed between the
headers being added to UrlRequest.Builder and the call to
fillCurrentRequestPostBody.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135376904
2016-10-11 18:16:28 +01:00
olly
661b14020e Partial cleanup of CronetDataSource II
- Allow null Content-Type in response headers.
- Inline validateResponse, just because it makes it clearer
  what thread it's being executed on when inlined.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135375063
2016-10-11 18:16:28 +01:00
olly
ba56f9165c Partial cleanup of CronetDataSource
- Fix bug in getCurrentRequestStatus where we weren't
  blocking on the condition variable.
- Make methods static where possible.
- Clean up getUri implementation.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135373586
2016-10-11 18:16:28 +01:00
olly
5803b2538d No-op reorder of CronetDataSource methods
This change is a no-op reodering, as a precursor to
further cleanup. The public methods are grouped by
the class/interface they implement. The private methods
are ordered with things that will become static in
a subsequent change at the bottom.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135372629
2016-10-11 18:16:28 +01:00
ojw28
93c2133f29 Merge pull request #1909 from kaorimatz/okhttp-call-factory
Use Call.Factory instead of OkHttpClient
2016-10-09 14:41:46 +01:00
Satoshi Matsumoto
880bdc181a Use Call.Factory instead of OkHttpClient
This allows using alternate implementation of an HTTP client. We can use
OkHttpClient as before as it implements Call.Factory.
2016-10-07 21:00:27 +09:00
olly
2cf339e095 Bump version to 2.0.2 + document inclusion of OkHttp extension
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=135260806
2016-10-05 21:20:34 +01:00