Commit Graph

292 Commits

Author SHA1 Message Date
Ying Wang
34a6f735dd Add liblog
Bug: 8580410
Change-Id: Idf0dba57f4bebc94b0ddd78316ef3450f0f9f21c
2013-04-09 21:35:57 -07:00
Fred Gylys-Colwell
b8ff509887 Add More Logging to Sample Player
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
2012-12-21 16:35:03 -08:00
Fred Gylys-Colwell
35585d4f8f am 4810c96e: am ec683063: am 7bd6a810: Merge "Update Widevine Libraries Version 4.5.0.10088" into jb-mr1.1-dev
* commit '4810c96e6f6ec7ce9fac4659a421ae958797c1c3':
  Update Widevine Libraries Version 4.5.0.10088
2012-11-27 18:44:10 -08:00
Fred Gylys-Colwell
9477a252d3 Update Widevine Libraries Version 4.5.0.10088
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
2012-11-09 12:50:44 -08:00
Jeff Tinker
5971f35ca3 am da9633d4: am 7fc32e3d: am aac68688: Update Widevine Libraries Version 4.5.0.10087
* commit 'da9633d448fae2577f8eade14ed83b8895fc9a42':
  Update Widevine Libraries Version 4.5.0.10087
2012-10-23 21:46:40 -07:00
Jeff Tinker
aac6868830 Update Widevine Libraries Version 4.5.0.10087
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
2012-10-23 12:33:51 -07:00
John "Juce" Bruce
e8cad9485c Cannot Rewind WVM in MediaCodec Mode
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
2012-10-15 14:22:37 -07:00
John "Juce" Bruce
c671e40432 Merge "[WVDRM] Fix effectively-unlimited memory usage" into jb-mr1-dev 2012-10-04 11:37:33 -07:00
John "Juce" Bruce
2ce9ab8e67 [WVDRM] Fix effectively-unlimited memory usage
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
2012-10-03 19:12:35 -07:00
Fred Gylys-Colwell
b1a1aa7b86 Update Widevine Libraries Version 4.5.0.10086
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
2012-10-02 13:43:35 -07:00
Jeff Tinker
71422e7a2a Merge "[WVDRM] Fix for stuttering on low bandwidth" into jb-mr1-dev 2012-10-02 01:26:13 -07:00
Edwin Wong
624f38bb0c Merge "Revert "When Running in MediaCodec Mode, Widevine Freezes If You Rewind"" into jb-mr1-dev 2012-10-01 15:20:10 -07:00
Jeff Tinker
54993c50e9 [WVDRM] Fix for stuttering on low bandwidth
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
2012-10-01 15:17:07 -07:00
Fred Gylys-Colwell
59e30852dd Update Widevine Libraries Version 4.5.0.10085
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
2012-09-28 18:11:34 -07:00
Edwin Wong
ca21c93f66 Revert "When Running in MediaCodec Mode, Widevine Freezes If You Rewind"
This reverts commit 2e0e32f9f7

Change-Id: I1362839633bca4260d83f470a780d93b8de431ca

related-to-bug: 7216099
related-to-bug: 7223566
2012-09-28 17:47:37 -07:00
Edwin Wong
4fffa0ff6a Fixed mediacodec mode's fatal error when eos is encountered.
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>
2012-09-26 22:46:35 -07:00
Gene Morgan
4e3efb415b Keep local file open for DrmManagerService::acquireDrmInfo().
Bug: 7208979
Change-Id: I1b7798929f55b956e43bb9ed1a0f41dec9342be4
2012-09-21 17:50:10 -07:00
Fred Gylys-Colwell
845e53e684 Update Widevine Libraries Version 4.5.0.10082
This change updates the Widevine binary libraries.

It includes
https://widevine-internal-review.googlesource.com/1330
Add an argument to AcquireDrmInfo() for passing in the FD of an open file.

IMPORTANT: This change should be merge at the same time as these two:

https://googleplex-android-review.googlesource.com/226382
https://googleplex-android-review.googlesource.com/222797

bug: 7092908
bug: 6769768

Change-Id: I6931f9e4783234348ab384275fdc2ba374f6b591
2012-09-20 11:54:02 -07:00
Gene Morgan
8cd5d09119 Allow DRM client to pass the FD of an open file to the DRM server.
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
2012-09-20 11:42:09 -07:00
John "Juce" Bruce
b092b158d2 Merge "When Running in MediaCodec Mode, Widevine Freezes If You Rewind" into jb-mr1-dev 2012-09-18 14:37:52 -07:00
Jeff Tinker
86cddd376b Merge "[WVDRM] Allow adaptive logging of more than 10 tracks" into jb-mr1-dev 2012-09-18 11:23:58 -07:00
John "Juce" Bruce
2e0e32f9f7 When Running in MediaCodec Mode, Widevine Freezes If You Rewind
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
2012-09-17 15:54:42 -07:00
Jeff Tinker
33b24fba9d [WVDRM] Allow adaptive logging of more than 10 tracks
Change-Id: I9d2f8efcc658532dc2a0b1d69b8551444120f664
related-to-bug: 7173307
2012-09-17 15:08:42 -07:00
Fred Gylys-Colwell
38e5d5912c Merge "Add InfoListener to Widevine Test Application" into jb-mr1-dev 2012-09-14 12:54:36 -07:00
James Dong
be20f24819 Revert "Update Widevine Libraries to Version 4.5.0.10079"
This reverts commit 8bbea70f79.

o related-to-bug: 7132419
2012-09-14 00:04:20 -07:00
Fred Gylys-Colwell
da4abe2680 Add InfoListener to Widevine Test Application
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
2012-09-13 16:40:34 -07:00
Edwin Wong
d72b67cdeb Add getError and setError to propagate error code from WVMMediaExtractor up to player.
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
2012-09-11 17:38:57 -07:00
Fred Gylys-Colwell
8bbea70f79 Update Widevine Libraries to Version 4.5.0.10079
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
2012-09-06 19:25:05 -07:00
Fred Gylys-Colwell
73ca7025eb Merge "Update Widevine Libraries to Version 4.5.0.8008 and 8010." into jb-mr1-dev 2012-08-29 11:20:52 -07:00
John "Juce" Bruce
521a13b5d7 Merge "Widevine Delivers Frames "Much Too Late" On Startup" into jb-mr1-dev 2012-08-24 15:03:12 -07:00
Jeffrey Tinker
b7ee02ec6e Merge "Add missing MODULE_OWNER tags for com.google.widevine.software.drm*" into jb-mr1-dev 2012-08-23 17:24:54 -07:00
Jeffrey Tinker
415ce6714a Merge "Send current bandwidth info event when buffering occurs" into jb-mr1-dev 2012-08-23 17:24:37 -07:00
Jeffrey Tinker
9dfa377534 Merge "Configure the Widevine cache buffer size via a property" into jb-mr1-dev 2012-08-23 17:22:57 -07:00
John "Juce" Bruce
c6c8b6f27b Widevine Delivers Frames "Much Too Late" On Startup
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
2012-08-23 16:49:46 -07:00
Jeffrey Tinker
7f55378af6 Add missing MODULE_OWNER tags for com.google.widevine.software.drm*
Change-Id: I749b312b9fd6098b5f099c6f637360f27769184c
2012-08-23 16:31:49 -07:00
Fred Gylys-Colwell
b89b498f8a Update Widevine Libraries to Version 4.5.0.8008 and 8010.
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
2012-08-23 10:09:31 -07:00
Jeffrey Tinker
326dde3b28 Send current bandwidth info event when buffering occurs
There is a dependent change in frameworks/av

Change-Id: Ic189654486936a501a1b45c5acb442753303d362
related-to-bug: 5883234
2012-08-23 02:01:21 -07:00
Fred Gylys-Colwell
ac570e0ccc Merge "Update Widevine Libraries to Version 4.5.0.8005 and 8007." into jb-mr1-dev 2012-08-22 15:00:55 -07:00
James Dong
20e8e2b01c Merge "Let getOriginalMimeType() take a fd passed from Java applications" into jb-mr1-dev 2012-08-22 14:50:22 -07:00
Jeffrey Tinker
14f0deafac Configure the Widevine cache buffer size via a property
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
2012-08-22 09:37:36 -07:00
Fred Gylys-Colwell
6a6c1522a9 Update Widevine Libraries to Version 4.5.0.8005 and 8007.
Widevine Library for Level 1: Version 4.5.0.8005 AES 601_AndroidOS_J
Widevine Library for Level 3: Version 4.5.0.8007 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.

Log file from https://googleplex-android-review.googlesource.com follows:
----------------------------------------------------------------------
commit b26352bc14498a87178678a9cf02fb29733ec7fb
Author: Fred Gylys-Colwell <fredgc@google.com>
Date:   Mon Aug 20 14:48:46 2012 -0700

    Update Version Number

    The official build script currently modifies the minor number and the major
    number, but does not yet modify the branch.  This is planned work. As a
    stop-gap measure, I changed this value by hand.

    I also modified the header file so that the version numbers may be modified on
    the command line with a -D instead of running a script that modifies the header
    file on the build machine.

    Change-Id: I2216600bf19ea6f268e711516d45f466b0d312da

commit 2334062773bbb32a3e0cab27770bd03cd8793c45
Merge: 429cc40 02ecdff
Author: Thomas Inskip <tinskip@google.com>
Date:   Mon Aug 20 11:30:55 2012 -0700

    Merge "Remove "Truncated File" warning at end of file." into RC/4.5.0/601_AndroidOS_J

commit 429cc4089c733f04785aaa09ed0b5d8fed76a567
Author: John Bruce <juce@google.com>
Date:   Fri Aug 17 14:36:06 2012 -0700

    Revert "Android has moved the NDK in their tree, so our Jamfiles need to be updated."

    This reverts commit d8e792ee61825b9090cec5f1096ba41fde7a5d7e

    Change-Id: I31470f0962591816f9a96b74866ca97c5e47ba38

commit d8e792ee61825b9090cec5f1096ba41fde7a5d7e
Author: John "Juce" Bruce <juce@google.com>
Date:   Wed Aug 15 19:01:30 2012 -0700

    Android has moved the NDK in their tree, so our Jamfiles need to be updated.

commit 02ecdff3dfcc93cac828bd973a41f33f067f9bcb
Author: Fred Gylys-Colwell <fredgc@google.com>
Date:   Fri Aug 17 09:37:35 2012 -0700

    Remove "Truncated File" warning at end of file.

    Previously, when ExternalClient finds the end of file, it sets the
    error flag to mark the file as truncated.  This does not usually
    cause a problem, because errors at the end of file can be ignored.

    If we need to mark the file as truncated, we could either check that
    the length of the file is actually shorter than expected, or check
    that an end-of-stream marker has not already been added to the memory
    chunk queue.

    related-to-bug: 6635366 Could not terminate a DRM local playback session, probably due to -1004

commit a248147b0ca7db78dc42ba2e0c885044db97fe49
Author: John "Juce" Bruce <juce@google.com>
Date:   Wed Aug 15 12:31:58 2012 -0700

    Fixing references to renamed DIST variable in Jamfile for Android OS Plugin builds.

commit e251fff6623fab83ed2b052a0af3a1114d409f47
Author: Fred Gylys-Colwell <fredgc@google.com>
Date:   Wed Aug 8 14:57:37 2012 -0700

    Updated Jam files so that android master is set at compile time.

    I replaced references to the /usr/local/android-master with the variable
    ANDROID_DIST so that it can be set at compile time.  The default is still
    /usr/local/android-master, so the change should be transparent.

    I changed DIST and ANDROID_MASTER both to be ANDROID_DIST in the Jam files
    so that there is only one variable with that meaning.

    I also updated the path for the loader script armelf.xsc.  This location is now
    specified in the main Jamrules file as ARMELF_PATH.

    Change-Id: I2d6945546198cdf3ab828346418bd4b07ea8c176

--------------------------------------------------------------------------------------------------

Change-Id: I99f445a44f0124c61532fdccfc8f620d10e15659
related-to-bug: 6635366
2012-08-21 14:18:42 -07:00
Edwin Wong
196fe01488 Add GetVersion API to query the client plugin version.
Includes Widevine libraries 4.5.0.8097

Change-Id: I7590d5a60f300f6686887f62ae127b86f76e6f94
related-to-bug: 6000505
2012-08-10 18:23:54 -07:00
James Dong
adad411ea6 Let getOriginalMimeType() take a fd passed from Java applications
This patch completes the change needed for widevine drm plugin.

o related-to-bug: 6426185

Change-Id: Ib9897be6264506f1c96eecca8be1de016f3b0b86
2012-08-09 14:04:13 -07:00
Edwin Wong
c4d88be1fb Fixed: screen time out during streaming in mediacodec mode.
Also, print log to indicate if the device is provisioned or not.

Change-Id: I674e2fe4531cc79b4bf307939c4b08ba19207244
related-to-bug: 6821614
2012-08-05 16:31:25 -07:00
Edwin Wong
e9f5431e78 Revert Widevine 6.0.0 -> 4.5.0 libraries
Includes Widevine libraries Version 4.5.0.7809

Also fixed samplePlayer's MediaCodec mode not running and
WVDrmInfoRequestStatusKey returning incorrect value.

Change-Id: Ibcc6d313790670a908ada93be80d6bf55a67b4ed
related-to-bug: 6929628
related-to-bug: 6833718
related-to-bug: 6889322
2012-08-03 13:33:58 -07:00
Nick Kralevich
735ec731f2 fix build.
Change-Id: I2450066baee49ef621f9607803de3e4dd11561c2
2012-07-13 18:52:18 -07:00
Jeff Tinker
2c8bb4721b am d734bc25: Increase Widevine stream buffer size from 10MB to 16MB for Q
* commit 'd734bc25b01b5df40b026e658a0053cc63b8bcbd':
  Increase Widevine stream buffer size from 10MB to 16MB for Q
2012-07-13 13:40:42 -07:00
Jeff Tinker
d734bc25b0 Increase Widevine stream buffer size from 10MB to 16MB for Q
Provide better support for 1080p video streaming.

Change-Id: I3d17f7bdc631ee82b9062445dca8ebd42eaf8d8a
related-to-bug: 6818319
2012-07-13 10:20:24 -07:00
Jean-Baptiste Queru
c0fe913cec am 8af7a13b: Clarify ownership of widevine files.
* commit '8af7a13b611ecf0b19550ac6fef6e1c026daf63b':
  Clarify ownership of widevine files.
2012-06-19 07:25:37 -07:00
Jean-Baptiste Queru
8af7a13b61 Clarify ownership of widevine files.
Bug: 6611375
Change-Id: I1e9436716411db775c33d55cbd7dcb185bdc856d
2012-06-19 07:07:20 -07:00