Contains the following, BC-Triaged fixes:
Bug: 8767242
Media player error -1010 on playback
Bug: 8342523
Android Media player is able to play WVM content if license is
already acquired
Change-Id: I3ee7863a5bf214fb8c4e4aefdd05f5062d568617
Some OEMCrypto calls are happening before OEMCrypto_Initialize.
This change moves initialization earlier so it occurs before
any other calls to OEMCrypto.
bug: 10582250
Change-Id: Ic8992e8f0738dbfeb10074a4e1543bb9931a49d5
Make getBufferPercentage() and getPosition() work when the
media is reset.
Change-Id: I7d696fd9b5c62b42aa0d29348e73f1f5755eb075
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 9516405
When stopping media, getBufferPercentage() and getPosition() may
still be called by MediaController, unless we disable it.
Change-Id: I947fbfb2de724bdcb3121ca9fb204c8bea2a84b2
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 9516405
When the video packets are clear, they are being
combined into a full frame between MediaExtractor or
DecryptCallback (where packets are never > 64k) and
MediaCrypto/DecryptVideo (where we are seeing clear
packets > 64k).
The max block size to be passed to DecryptVideo is
specified as 64K, handling of packets larger than 64K
is undefined and OEM implementation-dependent. In the
Nexus 10 case, it generates a SEG. fault.
Solution:
Add mClearSizes vector to keep track of each clear
packet size for android_media_MediaExtractor_getSampleCryptoInfo()
to process.
In android_media_MediaExtractor_getSampleCryptoInfo(), if it
does not see kKeyEncryptedSizes meta data, it will not
process the clear vector that contains the actual packet
sizes. Add a kKeyEncryptedSizes meta data that contains a zero
length size packet to trick the JNI code to process the
clear packets.
related-to-bug: 9261447
Change-Id: Ib0b655a95e099856babaf649f4a95fc7f9c17d41
Only the first 64K of the movie is pulled when sniffing,
if the widevine version metadata is not present in the
sniff buffer then a "format unsupported" error would occur.
This change increases the sniff buffer size to 128K.
bug: 9351294
Change-Id: If162cbea6915bf2b70122afd30e556e9206e8e43
Because the Widevine Sample Play is frequently used to report bugs, it is
helpful to have users' actions logged. This change prints to the android log
whenever the user changes settings, clicks play, full screen, acquire rights,
etc.
This code does not change the build and is not delivered to customers. It is
delivered to vendors.
Change-Id: I62c34c2f1683af881a3c326a48f039b463ca3e8e
This change updates the Widevine binary libraries.
It includes the change:
Turn on IPv6 Compatibility.
https://widevine-internal-review.googlesource.com/2242
bug: 7471810
Change-Id: I09beacb7853435f21c263e226a3dcaff74afbd2b
This change updates the Widevine binary libraries.
It includes the change:
Correct error returned by ProcessDrmInfo
https://widevine-internal-review.googlesource.com/#/c/1870/
bug:7320744
Change-Id: Ic73a5dfa70140093224e9ce651947b224bdeccb9
The solution previously checked in as 2e0e3 is re-introduced here. However,
the MediaCodec-compatible heuristic is not used unless WVM is in Crypto Plugin
(i.e. Media Codec) mode.
To repeat from last time: The problem here is that WVM cannot independently
seek the audio and video read heads, but the API assumes it can. WVM does the
right thing for AwesomePlayer-based playback (essentially ignoring audio
seeks) but the wrong thing for MediaCodec-based playback. For MediaCodec
mode, we should respect the first seek we get for a given destination and
ignore the second.
In this part, the new heuristic is reintroduced, but the old heuristic is
maintained for use in non-Crypto Plugin mode.
Bug: 6793514
Change-Id: I7ced2bf20af117a57eec27490b0920d906a8a684
Change 14f0d to read the maximum buffer size from a device property did not
work correctly on Mako and Prime devices, as they did not have the property
set, and the code to fall back to a default value was not working. An empty
string would be read instead of the default value, resulting in a maximum of
zero. Because Widevine Media Kit would then subtract a few megabytes from this,
it would underflow, giving a maximum buffer size of several gigabytes. This
would lead to the download code trying to pre-buffer the entire, many-gigabyte
movie. As the media server's memory usage grew and grew, other programs would
become starved for memory, leading to most other processes on the phone being
forced to close. Eventually, the playback app, the media server, or some other
crucial piece of functionality would be starved, resulting in a crash.
The fix is to fix how we get the default, so that when the property is not
available, we get a sensible result. We check the return value of property_get.
If it is greater than zero, the property was read successfully, and we parse
the answer. If it is equal to (or less than) zero, we fall back to the default
value.
Bug: 7222769
Change-Id: Ie6186a0533036ab8fa45b1e467611d55f7c345ac
This change updates the Widevine binary libraries.
It includes the change:
Corrected error returned on timeout
https://widevine-internal-review.googlesource.com/1617
b/6758866
Change-Id: I81ac5d14823499b83a237406e7c5d345a15f6434
Reintroduces the play/pause rebuffering logic we eliminated
in JB zero day to fix double spins and slow startup - but
activates that logic only based on a comparison of the
current bandwidth measurement and the lowest bitrate track
in the movie.
Needs to be submitted with related changes in /frameworks/av
bug: 7230071
Change-Id: Ib3859a961bd3901a9c4df01eeab2b8b75f49aefe
This change updates the Widevine binary libraries.
It includes the change:
https://widevine-internal-review.googlesource.com/1400
Cleaned Up Locks and Removed Pause/Resume
bug: 6799914
Change-Id: I5e266e4d8bdc92e88e488d90aa5312ac740303b0
The FATAL EXCEPTION is caused by the decrypt function returning -EINVAL
when OEMCrypto decrypt returns an error. The fix is not to call
OEMCrypto decrypt when eos is reached.
related-to-bug: 7216928
related-to-bug: 7217609
Change-Id: I8f006905386e2cdfb907d4ab15c766ae69f20f00
Signed-off-by: Iliyan Malchev <malchev@google.com>
This allows a DRM client to open a locally-cached file on behalf of the
DRM server so the DRM server no longer requires the sdcard_r permission
to access the file's metadata. Specifically, this adds an optional
attribute FileDescriptorKey to the DrmInfoRequest.
This change is dependent on this Widevine CL:
https://widevine-internal-review.googlesource.com/#/c/1330/
Relevant bug reports:
bug: 6426185
Change-Id: Ia7bcb2455c7a55fa4c7c7061de4d672957c7ac0a
There was a subtle interaction between Widevine's libraries and MediaCodec
mode. Widevine's code assumed (erroneously) that video seeks would always
happen before audio seeks, and because we can't seek audio and video
independently from each other, we would ignore audio seeks but respect video
seeks. This led to a problem since MediaCodec mode calls seeks in arbitrary
order.
Fix is to always respect the first request we get to seek and ignore the
second.
Bug: 6793514
Change-Id: Ic9ec60e0e0f606c7a0de6283dd4c30318eebdbad
In order to test the MediaPlayer info events, an OnInfoListener was added to
the VideoPlayerView class. It is set to listen to events coming from the
videoView. This allows testers to verify that events are occuring.
Note: This change was made by Alexander Oliphant who does not have write
permission to commit to the Android tree.
Change-Id: Ia2faa927b4fe2850e15644bd332e50601a424c4a
Error code from the plugin is not propagated from WVMExtractorImpl.cpp to the MediaPlayer.
The two APIs addresses this issue and provide a path for the player to retrieve the last error.
Change-Id: I60040eaf2d396379eecca46bfe333c44a39c35ec
related-to-bug: 7073630
Widevine Library for Level 1 and 3: Version 4.5.0.10079 AES 601_AndroidOS_J
This library has the following changes:
https://widevine-internal-review.googlesource.com/1320
Fix multicore synchronization issue in Pump.cpp
https://widevine-internal-review.googlesource.com/1343
Call OEMCrypto_Terminate in DRM Plugin After Setup. (JB MR1)
related-to-bug: 7078790
related-to-bug: 7092908
related-to-bug: 6769768
Change-Id: I4a03b60a1f030d710a2b2dd7f2a1ac3746ec846b
Because Widevine's libraries were not seeking to the start of playback, the
first bitrate track in the video was being selected rather than the most
bandwidth-appropriate. For low-bandwidth connections, this could lead to a
"locked to group-of-pictures" scenario where Widevine quickly realizes that it
needs to change bitrates but cannot change until the next I-frame, which at the
current bandwidth will not arrive before it runs out of data. The result is
frames being delivered late, leading to the "Much Too Late" message from
AwesomePlayer reported in the bug.
The solution is to start playback slightly differently, allowing us to use our
adaptive streaming logic to select the initial bitrate for the video. By
specifying a start point at the beginning of the movie instead of just "now,"
we cause a seek internally, which allows us to adapt bitrates immediately at
the start of playback rather than after it has begun. This is the common way
of starting playback on other Widevine platforms. Android has been an
exception until now.
Bug: 6621556
Change-Id: Iaf98106f7f597ae3f0375129ac3a93aa3cb04a2c
Widevine Library for Level 1: Version 4.5.0.8008 AES 601_AndroidOS_J
Widevine Library for Level 3: Version 4.5.0.8010 AES 601_AndroidOS_J
Note: The current built procedure updates the minor version number separately for
the L1 and L3 libraries. This will change in the near future.
This library includes the following changes:
https://widevine-internal-review.googlesource.com/1260
Remove Variable sAfterSeek for Release Builds
https://widevine-internal-review.googlesource.com/1228
Pause WVMK Session while seeking in order to remove race condition where data gets pulled
https://widevine-internal-review.googlesource.com/1143
Use closed-range HTTP GETs in ABR client.
https://widevine-internal-review.googlesource.com/1110
Ported ABR improvements from 6.0.0 as part of b/6500173. Changes as per Edwin's review.
Change-Id: I1e1fbda84a016356b3a1dbafd98c5d2e4935d505
related-to-bug: 6189953
related-to-bug: 6948238
related-to-bug: 6500173
The property ro.com.widevine.cachesize may be set on a device to override the
default stream buffer cache size.
related-to-bug: 6819880
Change-Id: I27da154e38289c5d1f5f2f5f424202253d0721cc