1126 Commits

Author SHA1 Message Date
Andy Hung
f7162a3a43 Merge "AudioEffect: return DEAD_OBJECT for FAILED_TRANSACTION" into oc-dev am: 52f57cb720
am: 24ac07e1e0

Change-Id: I0c662869ebda4d99a81a0c31407a47ea6699a907
2017-05-17 01:46:12 +00:00
Andy Hung
24ac07e1e0 Merge "AudioEffect: return DEAD_OBJECT for FAILED_TRANSACTION" into oc-dev
am: 52f57cb720

Change-Id: Idb0f8a1565c4eb36ad0031a86b244f698e9cefbd
2017-05-17 01:39:55 +00:00
Andy Hung
32d516381c AudioEffect: return DEAD_OBJECT for FAILED_TRANSACTION
Test: CTS AudioSecurityTest
Bug: 38346284
Change-Id: I96b4995c2d11b4a33c4b2fa6987922e26c91d336
2017-05-16 12:33:56 -07:00
Jeff Tinker
dffb216140 Merge "Fix drm hal resource leaks" into oc-dev am: 63398bbd71
am: 8b1e0e1254

Change-Id: I14d864345f84d801aef48b45af1c59a1e08f7087
2017-05-15 20:14:15 +00:00
Jeff Tinker
8b1e0e1254 Merge "Fix drm hal resource leaks" into oc-dev
am: 63398bbd71

Change-Id: Iae4c7f407e638dd2dba5acfc43a3ca894f665bd4
2017-05-15 20:03:16 +00:00
Jeff Tinker
94dd36cae9 Fix drm hal resource leaks
bug:36408047
test: manual testing to verify leaks are fixed
Change-Id: Ic6a29572874a9fe30f36e7fdabb68d2ddeffb278
2017-05-15 09:27:18 -07:00
Colin Cross
0ece443558 Update path for libmediandk headers
Platform usages of libmediandk headers are now in media/.

Test: builds
Change-Id: I16385cab86ae9cac225304557df416bbb232ecf3
(cherry picked from commit c8ed45d38f3b42e06c9e0980e133a84181752b5e)
2017-05-05 20:03:42 +00:00
Colin Cross
28f320c5be Merge "Update path for libmediandk headers" 2017-05-05 20:02:14 +00:00
Eino-Ville Talvala
2e385f76f8 Merge "Merge "ImageWriter: Attach non-opaque Images as well." into oc-dev am: 97258cd731" into oc-dev-plus-aosp
am: 74d76f406b

Change-Id: I0ace22eb4cb7e4c90baf3ff066a400e609f5e620
2017-05-05 16:37:28 +00:00
Colin Cross
c8ed45d38f Update path for libmediandk headers
Platform usages of libmediandk headers are now in media/.

Test: builds
Change-Id: I16385cab86ae9cac225304557df416bbb232ecf3
2017-05-04 17:58:11 -07:00
Eino-Ville Talvala
07ad459c84 ImageWriter: Attach non-opaque Images as well.
With all the work under the hood of ImageReader/Writer in the last few
releases, this is much more straightforward to enable.

Only trick is to ensure that the Image detached from the ImageReader
correctly clears out its planes, if present.

Bug: 19962027
Test: Camera CTS still passes on angler, sailfish, ryu
Change-Id: Ic8a1f3e2f45cf15971d76e308a5af25eb2fd66f1
2017-05-04 11:04:56 -07:00
Wei Jia
f316c99123 Merge "MediaPlayer: fix new API seekTo to address API review." into oc-dev am: 62a3aa745a
am: f38aa207b2

Change-Id: Ib2c0db36dd3f9958f0ecb714a1b6e73d73e3455d
2017-04-21 21:25:04 +00:00
Wei Jia
bebeaf9ae3 MediaPlayer: fix new API seekTo to address API review.
Test: compiles
Bug: 36790516
Bug: 37514763
Change-Id: I91307d10e6c9bc65779651c056053b3a025b0d50
2017-04-21 11:05:13 -07:00
Mike Reed
7c0ae0f58b bitmaps and pixelrefs no longer need lock/unlock
Test: covered by CtsGraphicsTestCases and hwui_unit_tests

Change-Id: I42a25961a2eb3755d2fd22a617aa21a24ec0994f
2017-04-18 10:22:42 -04:00
Ray Essick
10353e3601 Rework getMetrics() api per API council
Reworking the media metrics getMetrics() calls (currently in MediaCodec,
MediaExtractor, MediaPlayer, and MediaRecorder) to fit new direction
from the API Council.

Drop the MediaMetricsSet that we had in the first round; go back
to a PersistableBundle as the return type. Moves the key definitions
from MediaMetricsSet.MediaCodec to MediaCodec.MetricsConstants

Bug: 37083862
Test: ran the corresponding CTS tests
Change-Id: I7905959ad2109887dd8fd16f0eb2831247abab2a
2017-04-14 17:24:42 -07:00
TreeHugger Robot
fd89a95f35 Merge changes from topic 'api-review' into oc-dev
* changes:
  MediaCas: combine openSession methods
  MediaCas: address comments for API reviews
2017-04-13 06:23:51 +00:00
Chong Zhang
addc39ec27 MediaCas: address comments for API reviews
- Wrap session id byte array in Session object

- Move session operations from MediaCas to Session

- Remove position prarameters on descramble() method

- Retrieve cas info for a track by getCasInfo() instead
  of getDrmInitData().

bug: 22804304
bug: 36791613
bug: 36783335

Change-Id: Ib3ad8d6a2f679c0e60d2bb025ac5999339722306
2017-04-11 13:13:22 -07:00
Zhijun He
916d8ac650 ImageReader/Writer: add usage flag support
Also add an ImageWriter ctor to take additional arugment (format)

Test: ImageReader and Writer CTS tests
Bug: 32766711
Change-Id: I99e3862dd5b9a85c9df7879c14c84b68a35718ec
2017-04-10 23:38:32 +00:00
Ray Essick
ed5b028693 Move MediaMetrics into its own library
Changes for the new HAL structure have brought about a build time
circular dependency between libmedia and libmediadrm. This set of
changes the media metrics code into its own library and arranges
for the relevant consumers of the media metrics code to link
to this new library (where they had previously picked it up by
including libmedia).

Bug: 36990807
Test: build, boot.
2017-04-05 14:01:00 -07:00
Mathias Agopian
845eef05ff Remove useless GraphicBuffer() constructor
Test: compiled & run
Bug: 36869708
Change-Id: Ie825979cd03874904b6f953ece4a05d4a0d52253
2017-04-03 17:51:15 -07:00
Chong Zhang
dadee0c33e MediaCas: rethrow MediaCas specific exception
Translate ServiceSpecificException from aidl to CAS-specific
exceptions. Also, throw CAS specific exception for descramble().

bug: 22804304

Change-Id: I6d68c335c87fbb95fd8cc227e432eed4e5951550
2017-03-24 14:28:43 -07:00
Jerry Zhang
e30d5723e4 Merge "Add support for MTP perceived device type property." am: b6ed343e85 am: 7644b885c7
am: 136f37b88f

Change-Id: I446cd52e5fd8cda48e9af46ee3faee5578cae286
2017-03-20 21:54:28 +00:00
Ray Essick
5204ad0a2a Merge "Integrate API Council feedback into Media Metrics APIs" 2017-03-16 01:02:25 +00:00
Ray Essick
f2d0e40bf0 Integrate API Council feedback into Media Metrics APIs
Integrates the API Council's feedback into the Media Metrics
related APIs.
-- return types for the getMetrics() calls
-- definition of keys in the set of data that comes back

Bug: 35811992
Test: booted, CTS subset, checked dumpsys media.metrics output
Change-Id: Ib750f9631bd3453be3132760273ccfff0a891f88
2017-03-15 11:43:08 -07:00
Paul Mclean
b8feaa5eaa Merge "Switching Native MIDI API to an "opaque pointers" model." 2017-03-11 17:49:22 +00:00
Paul McLean
71f672b98a Switching Native MIDI API to an "opaque pointers" model.
Test: manual

Change-Id: Ic181008427e6e81106d867cc3a70deef8c591841
2017-03-10 15:54:16 -07:00
Robert Shih
252f3b20bb JNI ImageReader: propagate exceptions when creating surface planes
Bug: 36082388
Test: Manual
Change-Id: I4a0ad08c9b3c53aa7ca702e1c6e2d486b788f3ff
2017-03-10 18:18:00 +00:00
Andy Hung
d4f1e86190 VolumeShaper: Update Builder methods and Object overrides
Builder methods now throw IllegalArgumentExceptions on invalid
conditions.

Object hashCode, toString, equals updated for element-wise structural
equivalence.

Test: CTS VolumeShaperTest
Bug: 31015569
Change-Id: I02860a51da58d8207145a9b8a5d2cb13806774b4
2017-03-08 10:52:26 -08:00
TreeHugger Robot
227bdecf02 Merge "fallout of cleaning-up libutils includes" 2017-03-04 00:52:50 +00:00
Mathias Agopian
df7707cb4f fallout of cleaning-up libutils includes
Test: run & compile
Bug: n/a
Change-Id: I0f6a0be03f4b120b1b5876aae0c0618c025d9f2b
2017-03-03 12:37:54 -08:00
Mikhail Naganov
c276c59eb5 nativemidi: Prototype demonstrating native access to IMidiDeviceServer
Framework changes and a demo app
Comment and finalized Native MIDI API
Replaced fixed PortRegistry tables with std::map.
more error handling.
Removed not-very-useful MidiDeviceManager class.
Made Java API functions @hide.

Bug: 30252756

Test: Manual
Change-Id: Iae98e589f38ef6d625ff0842401193fe98c5d881
2017-03-03 12:00:33 -07:00
Chong Zhang
d5927ae883 MediaCas: add framework APIs
Java API changes to support MediaCas framework.

Also add partial-frame related enums to MediaCodec,
MediaCodecInfo, and MediaExtractor as a way to indicate
a input frame contains partial data.

Test: basic test app and test plugin to execise the code path;
impelenting playback of CAS-secured MPEG2TS streams, including
a Widevine-based CAS plugin, locally modified ExoPlayer and
Android TV Tuner input.

bug: 22804304
Change-Id: Ia4ba1d4046f7588e42bfb21e726390457d2fc8e3
2017-02-22 17:27:01 -08:00
Ray Essick
8020105fb2 Merge "Metrics for android.media.MediaRecorder" 2017-02-17 22:39:40 +00:00
Hassan Shojania
06b25fb236 Modular DRM for MediaPlayer
Bug:  34559906
Test: Manual through the test app
Change-Id: I1b1ca61e74f250d63ff5ff462905facb81fe44e0
2017-02-15 18:44:54 -08:00
Ray Essick
b0bd62f96c Metrics for android.media.MediaRecorder
Implementation of getMetrics() API and underlying metrics gathering
for android.media.MediaRecorder.

Bug: 35150984
Test: hacked CTS, observing of 'dumpsys media.metrics'
2017-02-12 19:22:48 -08:00
Andy Hung
035d4ec772 VolumeShaper: Initial implementation
The VolumeShaper is used to apply a volume
envelope to an AudioTrack or a MediaPlayer.

Test: CTS
Bug: 30920125
Bug: 31015569
Change-Id: If8b4bed29760aa3bd15a4b54cae60e40b4f518ee
2017-02-10 18:08:12 -08:00
Ray Essick
ba5ce2c0f8 API android.media.MediaExtractor.getMetrics()
adds the API getMetrics() to android.media.MediaExtractor
includes plumbing through JNI to the underlying mediaextractor
code in frameworks/av.

Tested with some CTS modifications; a more formal set of CTS
updates will be along later.

Bug: 35094936
Test: modified CTS to invoke new API and output results
Change-Id: Id8d56c9c3273b86bbd11e248bdf5004be90b91ef
2017-02-07 15:35:39 -08:00
Edwin Wong
e9b8348027 Merge "Pass application packagename to drm plugin." 2017-01-31 05:03:44 +00:00
Hassan Shojania
0b52e95c3f Modular DRM for MediaPlayer
Bug:  34559906
Test: Manual through the test app

Change-Id: If76e2898e6064c5661193872b907b1720838c678
2017-01-27 19:03:09 -08:00
Ray Essick
0e0fee1e3a API access to mediametrics
provide SDK/API access to media metrics for user apps. This lets the
apps metrics data for their instances of player and codecs. Others
to come.

Bug: 34715803
Test: booted, invoked new APIs to verify desired results
Change-Id: Iaae6406aadef30adc893952961ac154a7c4c761d
2017-01-27 17:58:30 +00:00
TreeHugger Robot
60d820b050 Merge "media: Add new MediaMuxer constructor that takes FileDescriptor." 2017-01-26 08:22:01 +00:00
Hangyu Kuang
61c74c6a4b media: Add new MediaMuxer constructor that takes FileDescriptor.
Test: Run new mediamuxer CTS test.
Bug: 34221063
Change-Id: Iaad4f0254782dca3e5994e80af0848482847c618
2017-01-25 18:31:02 -08:00
Wei Jia
23dfee521a mediaplayer: add buffering settings API
Test: compiles, ensured that params is passed all the way to source
Bug:32524218

Change-Id: I90d65e10012ecc1a78989eba80d025d513ceaadf
2017-01-25 11:54:56 -08:00
Jerry Zhang
13bb2f4dda Add support for MTP perceived device type property.
Property value is based on the particular device.
This allows some hosts (windows) to apply a device
specific icon in file explorer.

Test: Connect device to windows, verify new icon
Bug: 25360563
Change-Id: I9d3468ca8c01a6f0d42ad543aef11ed265b6c825
2017-01-19 11:26:35 -08:00
Hangyu Kuang
e176ee1222 media: Add new API to set next output file.
Only support recording to MP4 file now. When the recorded file is approcaching
file size limit, application will receive
MEDIA_RECORDER_INFO_MAX_FILESIZE_APPROACHING callback from mediarecorder.
Application could use setNextOutputFile to set the next output file before or
after receiving this callback. Upon reaching filesize limit, recorder will swap
the output file internally and notify application with
MEDIA_RECORDER_INFO_NEXT_OUTPUT_FILE_STARTED.

Test: Hack camera app to record more than filesize limit.
Bug: 28150626
Change-Id: I2daf8f798fe3631d6b7ef48ebea3a64ab4566f2d
2017-01-18 17:32:17 -08:00
Edwin Wong
4d1d84e8a0 Pass application packagename to drm plugin.
Get the application packagename to be used as part of a unique
identifier for drm plugin.

Test: Stream movies through Play Movies, Netflix and
Gts MediaCodecCencPlayer tests.
Verify the application's packagename is reachable in the drm plugin's
debug log.

bug: 27101531

Change-Id: I6473b58d78bc34191aca5896bb1f5fb79107ae47
2017-01-07 23:59:40 -08:00
Alex Klyubin
f271c6d266 resolve merge conflicts of b53d984 to master
Change-Id: I3fe63a5c0193c720b8ec4ca53834096de8433f26
2016-12-22 12:00:24 -08:00
Alex Klyubin
abdc2b47b3 Make users of MtpServer fill in DeviceInfo field values
This is part of weaning apps off accessing system identifiers via
system properties API. Apps should use android.os.Build API instead.

Bug: 33700679
Test: Enable MTP mode then check that mtp-detect output same as before this commit
Change-Id: I4e6696cdee18b9c3e987c432c095911e85a997db
2016-12-21 13:56:28 -08:00
Jerry Zhang
d9291d55f6 Merge "Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers." am: 1975240f17 am: 830874dbe7 am: 88672d7d29
am: 11dc0eccfb

Change-Id: Ibafebe4877052595cb34626bde9ac6fba1983fb0
2016-12-13 01:02:55 +00:00
Jerry Zhang
bb598ee16f Modify UsbDeviceManager stack to allow MtpServer to use FunctionFS drivers.
Functionfs requires MtpServer to write descriptors before the device can be
configured. This adds a new configure call that will occur only when
functions are changed (new argument added to updateUsbStateBroadcast for this)
and be called after sys.usb.config is changed but before the waitForState
call to ensure compatibility with configfs devices.

Bug: 30976142
Change-Id: I7e94a5847d3b19c0fd75139e1b15a3f2a1cea01d
Test: Manual
2016-12-12 11:05:32 -08:00