1736 Commits

Author SHA1 Message Date
andrewlewis
189a2502c5 Fix order of arguments in Format.copyWithDrmInitData.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124705921
2016-06-15 19:42:58 +01:00
sharjeel
41b86f660c sgpd support in ExoV2
This is basically clone of [] for Exo V2.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124682237
2016-06-15 19:42:58 +01:00
andrewlewis
2a3b4f6780 Don't flip() TextTrackRenderer EoS input buffers.
TextTrackRenderer would unconditionally flip input buffers read from its
source TrackStream, but the data could be null in the case where the buffer
signaled end of stream. Only flip if the corresponding flag is not set.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124559077
2016-06-15 19:42:58 +01:00
eguven
4279e22138 TestUtil.assertOutput() also tests seeking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124556278
2016-06-15 19:42:58 +01:00
aquilescanta
461751b194 Add codec profiles for video container/sample formats.
This allows better decoding support checking.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124550351
2016-06-15 19:42:58 +01:00
olly
ca9bd5e8e4 Define DATA_TYPE constants in C.
Things like manifests are loaded not in the context of a Chunk,
but we want to eventually be reporting all loading events. So
it makes senes to define data types at a global level.

Also added {@code} in a few places for consistency.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124549737
2016-06-15 19:42:58 +01:00
eguven
1afe480a30 FakeExtractorOutput: add option to write dump files to external storage.
So dump files can be created easily.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124455709
2016-06-15 19:42:58 +01:00
eguven
b206cff98c FakeExtractorInput: Fix exception type
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124446331
2016-06-15 19:42:42 +01:00
tasnimsunny
b4746eddb3 Add cache initializtion signal to CacheEvictor
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124374161
2016-06-15 19:42:12 +01:00
eguven
4b3c72c057 FlacExtractorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124357946
2016-06-15 19:42:12 +01:00
eguven
544d88ca56 PsExtractorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124355441
2016-06-15 19:42:12 +01:00
eguven
110c819939 FragmentedMp4ExtractorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124346810
2016-06-15 19:42:12 +01:00
olly
4a3980c71e Add format change events to SimpleExoPlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124344637
2016-06-15 19:42:12 +01:00
eguven
80b10b5fc1 TestUtil.consumeTestData(): Make sure extractor doesn't use the position holder out of purpose.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124335837
2016-06-15 19:42:09 +01:00
eguven
98b7e7f4e2 AdtsExtractorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124335597
2016-06-15 19:42:09 +01:00
eguven
57d6c49e73 TsExtractorTest: Speed up the test with a smaller test sample file.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124333753
2016-06-15 19:42:09 +01:00
eguven
b5a9e4181b FlacJni: Add exceptions to jni methods' definitions.
These methods call read(...) method which may throw these exceptions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124332828
2016-06-15 19:42:09 +01:00
eguven
cec658d573 ExtractorInput.setRetryPosition(): Called when reading fails and the required retry position is different from the last position.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124242428
2016-06-15 19:42:04 +01:00
olly
1a1a454d09 Remove stray break from HLS playlist parser.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124225444
2016-06-15 19:42:04 +01:00
olly
aa73e137d6 Propagate manifest format info through to renderers.
DASH and SS manifests define potentially useful information
that isn't present in the actual media streams. Primarily
the representation id, but bitrate, fps and language may
also be defined only at the manifest leve. This change merges
the information into the sample format that's propagated to
the renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124225175
2016-06-15 19:42:04 +01:00
olly
cb9a64da33 Merge ID3 parsing improvements from GitHub.
- Parse APIC and TextInformation frames.
- In MPEG-TS, don't mind if packets contain end padding.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124079930
2016-06-15 19:42:04 +01:00
olly
444d21563c Fix MediaCodecUtil regression.
On older devices getCapabilitiesForType calls fail for some
secondary codecs. We didn't used to call getCapabilitiesForType
on secondary codecs, and so avoided this issue.

This change suppresses any exceptions encountered when
querying secondary decoders on API levels prior to N, to
restore previous behavior when a failure occurs.

Issue: #1534
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124010242
2016-06-15 19:42:04 +01:00
andrewlewis
e684e42994 Clean up DefaultDataSources and add factory for okhttp DataSources.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123991352
2016-06-15 19:42:04 +01:00
olly
c622483f79 Enable seamless rejoing for Vp9 extension.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123982330
2016-06-15 19:42:04 +01:00
olly
afa1ad1a6a Keep playback position advancing when all renderers are disabled.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123977520
2016-06-15 19:42:04 +01:00
olly
69bd31f7c2 Fix video renderer rejoining.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123976645
2016-06-15 19:42:03 +01:00
andrewlewis
a100175b72 Rename TrackRenderer.reset to TrackRenderer.onReset.
This allows the TrackRenderer superclass to do things when the renderer is
reset, and makes resetting consistent with other 'events' on renderers.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123974633
2016-06-15 19:42:03 +01:00
olly
ff745ac444 Make ExtractorSampleSource constructor consistent.
The allocator and buffering policy (e.g. how large the buffer
is) is moving to the top level as part of playlist support,
so it no longer makes sense to inject these parameters as
args into ExtractorSampleSource's constructor.

Instantiating the allocator and buffer size inside of the
source is temporary and only until they're moved up.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123968976
2016-06-15 19:42:03 +01:00
aquilescanta
6fd610fc5f Added max video size selection to DefaultTrackSelectionPolicy.
It is possible to add use of this feature in the demo app, restricting the selected
tracks to the viewport size. But it should be added in a future CL.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123965232
2016-06-15 19:42:03 +01:00
eguven
ebd37cfb8e Moved testutils package to a seperate module so it can be accessed by the tests in other modules.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123964784
2016-06-15 19:42:03 +01:00
aquilescanta
105ef1da2d Discard trailing ctts entries with 0 sample counts
The bug this cl fixes is basically an uncaught case of []

Issue: #1567
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123963779
2016-06-15 19:42:03 +01:00
olly
443a656ada Fix build.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123958609
2016-06-15 19:42:03 +01:00
olly
7ef028c67b Fix delivery of onLoadCanceled to occur before thread dies.
This removes "message sent on dead thread" warnings in nearly
all cases, and guarantees delivery of load cancelation to event
listeners.

Issue: #426
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123957691
2016-06-15 19:42:03 +01:00
olly
8e717e2dee Properly disable sample queues when not selected.
- The main goal of this change is to remove the need for
  discardSamplesForDisabledTracks() in continueBuffering
  in HlsTrackStreamWrapper and ExtractorSampleSource. As
  a result we'll also save one Allocation per disabled
  track.
- Another benefit of this change is that Allocator.trim
  calls can no longer be dropped. This could previously
  happen on player release if the playback thread's
  Looper quit before delivery of onLoadCanceled which
  performed the trim in the case that a load needed to be
  canceled at the time of the release.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123957434
2016-06-15 19:42:03 +01:00
olly
14cb76a112 Make ExoPlayer systrace consistent.
Plus remove some unused util methods + make a few
warnings go away.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123888046
2016-06-15 19:42:03 +01:00
olly
5cde3aa314 Show toast if media contains only unplayable audio/video.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123885817
2016-06-15 19:42:03 +01:00
olly
00aef6ddb7 Always include extension renderers in SimplePlayer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123868547
2016-06-15 19:42:03 +01:00
olly
4888592c76 Fix HLS track selection.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123851448
2016-06-15 19:42:02 +01:00
eguven
94fa2ecfe5 WavExtractorTest and TsExtractorTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123848524
2016-06-15 19:42:02 +01:00
olly
ed19a582a7 Suppress source release failures.
This is similar to suppression of failures disabling the
renderers (in the block above).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123847812
2016-06-15 19:42:02 +01:00
andrewlewis
0565d8e100 Handle non-AAC/AVC encrypted audio/video sample entries.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123847497
2016-06-15 19:42:02 +01:00
eguven
ecad3bb396 MatroskaExtractorTest: removed unused local variables.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123847017
2016-06-15 19:42:02 +01:00
eguven
d99679a960 flv, mkv and mp4 extractor sample tests.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123845660
2016-06-15 19:42:02 +01:00
olly
e652116806 Treat unchecking of all boxes as disabling, not default.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123845317
2016-06-15 19:42:02 +01:00
olly
eb021cabd1 Small cleanup.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123739334
2016-06-15 19:42:02 +01:00
olly
53b50a61fe Use manifest load start time to dictate refresh period.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123734239
2016-06-15 19:42:02 +01:00
olly
7f70ee911b Clean up chunked Sample/Chunk sources.
- Remove need for SampleSources to ref ChunkSources.
- Correctly propagate errors loading manifests through
  ChunkSource components.
- Fix some misc warnings.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123732918
2016-06-15 19:42:02 +01:00
eguven
7aae5805b8 Added Mp3ExtractorTest and modified Mp3Extractor to pass the test.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123640738
2016-06-15 19:42:02 +01:00
eguven
5a4d82c7c2 TestUtil.assertOutput() uses "*.unklen.dump" file if only it exists and simulateUnknownLength is true.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123638992
2016-06-15 19:41:53 +01:00
olly
911d86bf2f Use Loader directly for manifest + utc timing loads.
Aside from deleting code, this change (a) adds retry
functionality for initial manifest fetches, (b) uses
the same loader for the utc timing fetch as for the
manifest.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123634812
2016-06-15 19:41:53 +01:00