Commit graph

43 commits

Author SHA1 Message Date
aquilescanta
e71cdb1bad Filter track support by profile and level
This CL only provides checks for HEVC codecs and adds codec information to Format
instances in DASH. Right now, we check that the supported profiles are advertised
individually and that the supported level is equal or higher than the requested codec
level.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125470489
2016-07-07 20:22:02 +01:00
olly
df4e4a72fa Print the name of the decoder we failed to query.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=124712775
2016-06-15 19:42:58 +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
olly
800006d08d Remove TODOs that we have little urge to actually do.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123410274
2016-06-15 19:41:53 +01:00
olly
83b43a6fe6 Assume 360p 4:3 H264 is supported from JB.
Issue: #1534
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122742666
2016-06-15 19:41:33 +01:00
olly
23769fe82e Work around broken AAC decoder.
Issue: #1528
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122421357
2016-06-15 19:41:32 +01:00
olly
b53a941ffd Fix crash (by calling correct DecoderInfo constructor).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122159478
2016-06-15 19:41:31 +01:00
olly
7301b53829 Add MediaCodecSelector.getPassthroughDecoderInfo.
Issue: #1518
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122157463
2016-06-15 19:41:30 +01:00
olly
af78ff849a Add MediaCodecSelector.getPassthroughDecoderInfo.
Issue: #1518
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=122080068
2016-06-15 19:41:30 +01:00
olly
58c0ab1779 Broaden OMX.SEC.MP3.Decoder blacklisting.
Issue: #398
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121949973
2016-06-15 19:41:30 +01:00
olly
27132bb2da Update MediaCodecUtil in V2.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121566154
2016-06-15 19:40:38 +01:00
olly
2e0518f47b Apply Android studio code analysis suggestions.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120326293
2016-06-15 19:39:09 +01:00
olly
e7a27245e7 Use new-style for loops specifically for arrays.
As per: http://developer.android.com/training/articles/perf-tips.html
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117716743
2016-06-15 19:38:06 +01:00
olly
a1c74cb259 Give a calculation for H.264 level picture size limits.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=117220482
2016-06-15 19:37:44 +01:00
olly
335bb0aff2 Implement decoder capability checks in MediaCodecTrackRenderers.
[Step 4 - Partial, of []

- The capabilities checks previously performed in VideoFormatSelectorUtil
  are now performed in MediaCodecVideoTrackRenderer. This means they'll be
  useful for non-chunk use cases (e.g. when using ExtractorSampleSource).
- Added capabilities checks for audio in MediaCodecAudioTrackRenderer. We
  didn't check audio capabilities previously.
- Added functionality to allow a TrackRenderer to indicate the extent of
  its adaptive support.

The idea here is that a TrackSelector (to be introduced) will have access to:

(a) TrackGroups from the SampleSource that indicate whether they support
adaptive playbacks and the formats of each individual track.
(b) TrackRenderers that indicate whether they support adaptive playbacks as
well as how capable they are of rendering formats of individual tracks.

This is everything that a TrackSelector needs from the player components in
order to decide how to wire things up. Note that a TrackSelector may opt to
treat FORMAT_EXCEEDS_CAPABILITIES as FORMAT_HANDLED at its own risk, if it
thinks that it (or the user) knows better. This is a request that we've seen
from third parties for better handling cases where capabilities aren't
accurately reported by the underlying platform.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=114427428
2016-06-15 18:54:50 +01:00
olly
be47148940 ExoPlayer V2 Refactor - Step 4
Notes:
1. The logic in ExoPlayerImplInternal is very temporary, until we
   have proper TrackSelector implementations. Ignore the fact that
   it's crazy and has loads of nesting.
2. This change removes all capabilities checking. TrackRenderer
   implementations will be updated to perform these checks in a
   subsequent CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113151233
2016-06-15 18:54:26 +01:00
olly
6cb20525cb ExoPlayer V2 Refactor - Step 3
Move binding of tracks<->renderers to ExoPlayerImplInternal.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=113046018
2016-06-15 18:54:26 +01:00
andrewlewis
783467b8fb Work around broken MP3 decoder.
Issue: #398
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112412961
2016-01-18 19:22:47 +00:00
olly
df7a96a7c4 Map SDK_INT for dev devices.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=112162208
2016-01-14 18:14:00 +00:00
olly
9bcd1069b1 Blacklist CIPVorbisDecoder.
Issue: #1111
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111326378
2016-01-04 20:59:22 +00:00
olly
dd497b1259 Don't check a framerate if we don't have one.
Seems (marginally) nicer than making one up :). I didn't
realize there was a method that didn't require a framerate
to be passed!
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=110456874
2016-01-04 20:57:58 +00:00
yauhen
7fce590db2 blacklisted broken mp3 decoder on api lower than 20 2015-12-14 17:50:54 +03:00
andrewlewis
20e3ca73ec Don't use CIPMP3Decoder.
Issue: #1000
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109318738
2015-12-07 19:54:56 +00:00
Andrew Lewis
b64986ce82 Blacklist bad decoders 2015-10-29 16:28:00 +00:00
Oliver Woodman
aa647745a2 No-op re-orderings. 2015-10-12 17:59:14 +01:00
Oliver Woodman
9b4e9723e5 Don't use SEC VP8 decoder on Galaxy S3s.
The only Samsung devices with names starting "d2" that we're aware of
are Galaxy S3 variants, and also one Samsung Galaxy Pocket Neo d2aio
SAMSUNG-SGH-I747Z. This change speculatively includes that device too because
its name is very similar to SAMSUNG-SGH-I747 which is known to be affected.

Issue: #548
2015-10-12 12:28:14 +01:00
Ian Bird
6a5cd68892 Make MediaCodecUtil.getMediaCodecInfo public 2015-10-09 12:33:01 +01:00
Oliver Woodman
3538e57797 Work around incorrect timestamp handling on Sony Xperia E.
Also include more Sony Xperia Z devices in the MP3 workaround.
2015-09-18 18:20:47 +01:00
Oliver Woodman
ab46d263ad Use decoders with names that don't start "OMX.".
There is no guarantee codec names start with this prefix in >= L.

Issue: #782
2015-09-15 13:41:42 +01:00
Oliver Woodman
e770e5c24b Multi-track - The (nearly) final step.
- Migrate demo app to use new APIs.
- Add multi-track support for ExtractorSampleSource case.
- Add multi-track support for SmoothStreaming use case.

The final step is to add support back for the DASH use case and
delete MultiTrackChunkSource. This is blocked on multi-period support
landing, in order to prevent a horrendous merge conflict. We also
need to update HLS to expose sensible track information.

Issue: #514
2015-08-19 16:29:30 +01:00
Oliver Woodman
574e554e01 Make classes/methods final to prevent uncontrolled extension. 2015-08-03 15:18:09 +01:00
Andrew Lewis
2358004951 Add device-specific workarounds for VP8 and MP3.
Avoid using the VP8 decoder on Samsung Galaxy S4 Mini.
Issue: #548

Avoid using the MP3 decoder on Sony Xperia Z/API level 16.
Issue: #377
2015-07-10 11:47:24 +01:00
Andrew Lewis
02d5cb8109 Use Build.DEVICE not Build.PRODUCT.
On HTC Butterfly these match, but Build.DEVICE is actually the right value to
use.

Issue: #377
2015-05-29 12:52:05 +01:00
Oliver Woodman
99edc6a4b4 Avoid using OMX.qcom.audio.decoder.mp3 on HTC Butterfly.
This OMX component is listed but can't be instantiated on this device.

According to the GitHub issue, some other devices are also affected, so these
will have to be added too.

Issue: #377
2015-05-28 17:07:12 +01:00
Oliver Woodman
ac54b4f696 Cleanup/Sync with internal tree 2015-05-22 21:45:13 +01:00
Oliver Woodman
67d0154960 Use Java7 <> syntax 2015-05-22 21:40:22 +01:00
Oliver Woodman
fea2140d57 Add ability to query size/rate support in MediaCodecUtil. 2015-04-10 23:15:52 +01:00
Oliver Woodman
a879819dd3 Force callers into MediaCodecUtil to catch any exceptions that occur.
Issue: #217
Issue: #228
2015-01-12 17:40:55 +00:00
Oliver Woodman
f15e3973e0 Fix discovery of secure decoders on some L devices. 2014-12-10 14:05:51 +00:00
Oliver Woodman
6a544da2f8 Use new MediaCodecList APIs on L. 2014-11-18 18:58:04 +00:00
Oliver Woodman
59688397fa Suppress deprecation warnings 2014-11-13 16:08:43 +00:00
Oliver Woodman
192cdc66a2 Ignore secure decoders. They shouldn't be explicitly listed. 2014-10-27 11:00:04 +00:00
Oliver Woodman
27ab5c83a6 Initial drop. 1.0.10. 2014-06-16 12:56:04 +01:00