58 Commits

Author SHA1 Message Date
Marco Nelissen
f7ec16802c Remove libexif usage from libmedia_jni.so
Test: manual, connect with MTP and PTP
Change-Id: I33128db25b8aae60df7854c61fc2a3873a1bced9
2019-07-02 15:48:17 +00:00
TreeHugger Robot
c56f3bbfba Merge "Revert "libmedia_jni pulls in libsfplugin_ccodec"" into qt-dev 2019-06-24 19:52:28 +00:00
Mikhail Naganov
03bb294e57 Revert "libmedia_jni pulls in libsfplugin_ccodec"
This reverts commit 16c0c46f208c2a6b4d321352fbc5fc6acff6261e.

Reason for revert: causes b/135763139 (volume adjustment for music does not work)

There is no clear explanation how this change breaks volume adjustment, but by bisection and by reverting the change locally it does somehow.

Bug: 133186424
Bug: 135763139
Change-Id: If6eed10f23c6b6006a6468c2a793230cd98c0501
2019-06-24 18:48:51 +00:00
TreeHugger Robot
1c0b6aa767 Merge "libmedia_jni pulls in libsfplugin_ccodec" into qt-dev 2019-06-20 20:27:22 +00:00
Ray Essick
16c0c46f20 libmedia_jni pulls in libsfplugin_ccodec
libmedia_jni now pulls in libsfplugin_ccodec instead of deferring it
until an actual reference. This eliminates some codec startup latency
later. this is only "load it", there is no actual use of
libsfplugin_ccodec by libmedia_jni.

Bug: 133186424
Test: boot, logcat, forrest startup timing measurements
Change-Id: Iacf8783cb45d33f5cec67863d4bf89da6dff9c2d
2019-06-20 09:35:54 -07:00
Steven Moreland
e5da40639c libmedia2_jni: remove libhwbinder_noltopgo ref
No longer needed, these symbols are in libhidlbase.

Bug: 134961554
Test: boot
Change-Id: I79f0fd6edd329012929b7cbd161ed6b7202995d4
2019-06-18 17:20:06 -07:00
Chong Zhang
12a24cd125 make libmedia_jni_utils depends on libgui
libmedia_jni_utils only has dependencies on libgui,
not entire libmedia_omx, it's linking to libmedia_omx
to get to libgui/bufferqueue headers.

bug: 129272021
test: builds

Change-Id: I48453cb53d36e6ecb2a6f6dd2b09f9a99e8479f0
(cherry picked from commit a527e6d94b77b74545e09bd617b0060e2075eee2)
2019-04-04 19:21:36 +00:00
Yifan Hong
f7cbc11d0c libmedia2_jni: link to libcgrouprc
libcgrouprc is an LLNDK library used by libprocessgroup.
libprocessgroup is linked statically, so the dependency needs
to be explicitly stated in libmedia2_jni.

Test: boots (sanity)
Bug: 123664216
Change-Id: Ieebba36417d1f83a5946f927043f15dc8abc188a
2019-03-27 15:20:53 -07:00
Dongwon Kang
3b9f51840b Merge "Remove static linking of libstagefright and libmedia_helper from libmedia2_jni" 2019-02-26 19:23:09 +00:00
Dongwon Kang
7c682056f7 Remove static linking of libstagefright and libmedia_helper from libmedia2_jni
Test: build and boot
Bug: 126159708
Change-Id: I35e1266425529d611d560d837ae3cd965b1057da
2019-02-25 14:26:37 -08:00
Jooyung Han
cb1e896d57 Extract android_media_Utils.cpp as a lib
This is a part of job to cut dependency from libmediandk
to libandroid_runtime. As a LL-NDK, libmediandk desn't have
to depend on libandroid_runtime.

dependency: libmediandk -> libmedia_jni -> libandroid_runtime

Libmediandk calls three utility functions defined in
android_media_Utils.cpp. But these functions are independent
from libandroid_runtime.

By extracting those utility functions into its own shared library
(libmedia_jni_utils), the dependency from libmediandk to
libmedia_jni is cut down.

However, some classes and other functions in android_media_Utils.cpp
are moved into new file, android_media_Streams.cpp since they
depend on libandroid_runtime.

Bug: 124268753
Test: m -j
Change-Id: I1e1ea4bc1ff7022d8d9c42785c8c00e3ca153a50
2019-02-22 08:47:24 +00:00
Suren Baghdasaryan
3fc4af6568 Replace hardcoded cgroup paths
Replace hardcoded cgroup paths with new processgroup library API calls,
include required headers. Add required dependencies.

Bug: 111307099
Test: builds, boots

Change-Id: Ic2dc2a94328cf1927fafaa9506537aeb213df413
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-02 09:07:43 +00:00
Pirama Arumuga Nainar
5b6c39d94c Use the non-LTO/PGO hwbinder in libmedia2_jni
Bug: http://b/119560349

Currently, any binary links in a PGO-enabled static library also needs
to opt into PGO.  With b/119560349, this should be done automatically by
the build system.  Until then, use the non-PGO version of libhwbinder in
libmedia2_jni.

Test: m ANDROID_PGO_INSTRUMENT=all
Change-Id: I0bdd1b56c9e9417ea62d9db8986a10b93b2260b9
2019-01-29 10:35:07 -08:00
Dongwon Kang
72d83dc5ab Clean up build rule for libmedia2_jni
- Remove unused cas libraries.
- Remove unused libz.
- Statically include libutils and cas libs.
- Remove libbinder.

Test: build
Bug: 123361167
Change-Id: Iffb57a74c442ab0de928025e4afee1f00c397868
2019-01-25 20:28:06 -08:00
Ray Essick
d35a9c7535 mediaplayer2 uses the new mediametrics C apis
cut mediaplayer2 over to use the new mediametrics C apis to support
updateable components.

Bug: 112555455
Test: boot
Change-Id: I35150dc5445b6597fce739395d0132bcd29366b4
2019-01-24 14:25:46 -08:00
Ray Essick
c535a55cd6 Further work on libmediametrics stable API
implement a missing method (for inflight metrics), enumerate exported
symbols. Reconcile common source files
core/jni/android_media_MediaMetricsJNI and media/jni/android_media_MediaMetricsJNI
use new "libmediametrics_stable" library for mediaplayer2

Bug: 119675363
Test: build, CTS media/codec tests
Change-Id: Ide72dfe891231c3764329686955e1b4682094b1e
2019-01-24 14:25:34 -08:00
Dongwon Kang
fc86964668 Revert "Load MediaPlayer2 implementation with a linker namespace."
This reverts commit 6ac67f7293648405c623889b62ad3d2e384f5110.

Reason for revert: This change is no longer needed thanks to upcoming
                   native_loader change for applying linker namespace.

Bug: 112766913
Test: build and boot
Change-Id: Idb29b6cd6a4baaf791b67e6e7fc3a97f98292be4
2019-01-21 10:16:52 -08:00
Dongwon Kang
d5c8fa1dd9 Merge "Load MediaPlayer2 implementation with a linker namespace." 2019-01-16 17:48:21 +00:00
Dongwon Kang
6ac67f7293 Load MediaPlayer2 implementation with a linker namespace.
MediaPlayer2 calls System.loadLibrary(media2_jni) and
libmedia2_jni loads the MediaPlayer2 native implementation
in libmediaplayer2_jni with an isolated linker namespace.

Test: build & boot & atest MediaPlayer2Test
Bug: 112766913
Change-Id: I07c542da5ccb305f839cda488c9e83b43c98c9e1
2019-01-14 13:33:28 -08:00
Marco Nelissen
4632573631 libmediaextractor doesn't exist anymore
Test: build

Change-Id: I19fef2ea96b3f309c7c6bc668413a13f25cd8654
2019-01-14 08:47:39 -08:00
Dichen Zhang
8022ba126a jWakeLock
replace native binder with java PowerManager in JWakeLock

Test: MediaPlayer2Test
Bug: 122470692
Change-Id: I1e5871a50ecac4b0785f064801107e4b6035889a
2019-01-08 14:30:18 -08:00
Dongwon Kang
c7011b0862 MediaPlayer2: replace IPCThreadState with libbinder_ndk.
Test: make libmedia2_jni
Bug: 112766913
Change-Id: I49c77faea008e873f41f5e496a525d77fe6230c4
2019-01-07 15:04:56 -08:00
Dongwon Kang
7890a61a44 Remove libgui.so and re-order shared library list.
Test: build
Bug: 112766913
Change-Id: Ic2f04e30acb68ec6264f46d5dbfbdff5252fe970
2018-12-21 15:31:08 -08:00
Chong Zhang
c1c60d46ca Fix build for libmedia2_jni
Mpeg2ts static lib now uses the hidl allocator
to get the hidl memory.

bug: 112766913
bug: 111407253
Change-Id: I588e9a603a0dd34dd90a69a32a9b355222507ff2
2018-12-17 16:56:58 -08:00
Wei Jia
073e1b11b3 MediaPlayer2: rename Media2DataSource to DataSourceCallback
Test: cts
Bug: 112549021
Change-Id: I4f623d2c94e855f7af51f20a207db05b6da4b221
2018-11-28 16:54:57 -08:00
Dongwon Kang
90282b4a59 MediaPlayer2: remove libaudioclient.so dependency.
Test: build
Bug: 112549970
Change-Id: Iad5e843f37911ebf747253cd842ff85a45222ccf
2018-11-15 10:47:54 -08:00
TreeHugger Robot
36e0320cf9 Merge "MediaPlayer2: remove libnetd_client dependency." 2018-11-03 06:46:40 +00:00
Dongwon Kang
354eb38f58 Merge "MediaPlayer2: remove unused libraries." 2018-11-02 22:51:20 +00:00
Dongwon Kang
a6e29ae210 MediaPlayer2: remove libnetd_client dependency.
Test: build
Bug: 112767419
Change-Id: Ib7f8535ee3074c6ce4c5c609a80f8230ea3d68e2
2018-11-01 17:41:50 -07:00
Dongwon Kang
fc676fe538 MediaPlayer2: remove unused libraries.
Test: build
Bug: 112767419
Change-Id: I40a2afcce027007d887afe1a9d0fcc234f3e4298
2018-11-01 16:32:47 -07:00
Ray Essick
67004bc46d annotate intentional fallthroughs in switch()
also disable the temporary 'suppress the warning' flags

Bug: 118756460
Test: compilation
Change-Id: Iefeb66be13099021940ec8bce2515c62052b9304
2018-11-01 15:25:23 -07:00
Chih-hung Hsieh
51025d638d Merge "Allow implicit-fallthrough warnings locally." am: 36afe11a64 am: 9c5738238d
am: 469705cca4

Change-Id: I4bc5f389495ed535762438632e65ccd6c66f3739
2018-10-25 17:58:17 -07:00
Chih-Hung Hsieh
e8abd06776 Allow implicit-fallthrough warnings locally.
It will be a global error by default.

Test: make checkbuild
Bug: 112564944
Change-Id: I26616fd50ccf3639fa7c01d850a14d079273ede7
Exempt-From-Owner-Approval: do not block on new warnings
2018-10-22 09:56:12 -07:00
Robert Shih
4f31ee9aee Update libmedia2_jni build dependencies
Add libmediandk_utils, which includes DataSource to AMediaDataSource
conversion.

Bug: 109928575
Test: compiles
Change-Id: I2c198b1dbab95d4d28fdc38a8679ae6e4f35195c
2018-10-19 05:10:26 +00:00
Robert Shih
8761bee9ab Move files to libmedia2_jni_core
Bug: 109928575
Test: compiles
Change-Id: I7036261ef53d16392f5dc778335c0413ccaf75ae
2018-09-18 17:34:41 -07:00
Dongwon Kang
bf98d54da9 MediaPlayer2: remove libandroid_runtime + other static lib dependency.
MediaMetricsJNI.cpp is forked from libandroid_runtime instead of moving
since it was also used with in the libandroid_runtime.so.

Test: MediaPlayer2Test
Bug: 112767225
Change-Id: Iebb0ce2736dbf4df9288a5c3aca447a52c4de533
2018-09-11 17:02:13 -07:00
Dongwon Kang
4c2e8620e6 MediaPlayer2: use protobuf instead of parcel for TimedText
Test: MediaPlayer2Test
Bug: 112767225
Change-Id: I374427125af3d470224876c947d69dda243625cd
2018-09-10 20:39:54 -07:00
Dongwon Kang
dfea0aab67 MediaPlayer2: use protobuf instead of parcel in invoke()
Also fix MEDIA_INFO handling code to send the event to the client
after handling internal update. (This fixes several cts test cases.)

Test: pass MediaPlayer2Test
Bug: 63934228
Change-Id: I5d4884353057a195b1f587694bfbf66cdf1fd23c
2018-08-28 20:50:08 -07:00
Dongwon Kang
e22a23f35f MediaPlayer2: Remove libdrmframework.so dependency.
Test: build & MediaPlayerTest
Bug: 111406958
Change-Id: Ic120db29d02b9df0b021c7c3ac88a9339dbd9b83
2018-08-01 12:43:22 -07:00
Steven Moreland
9f590ad031 libmedia2_jni: use libbinder as shared library
In order to prevent prebuilts from freezing the libbinder
internal API (the wire protocol), it is being made a
shared-only library.

Bug: 111454508
Test: m only
Change-Id: If7f8bd931dae5310eda6c230f20179418c2efa43
(cherry picked from commit a192e0e31400ac5a2b9d69788c7a60a89fb6c6ed)
Merged-In: If7f8bd931dae5310eda6c230f20179418c2efa43
2018-07-18 17:20:44 +00:00
Steven Moreland
a192e0e314 libmedia2_jni: use libbinder as shared library
In order to prevent prebuilts from freezing the libbinder
internal API (the wire protocol), it is being made a
shared-only library.

Bug: 111454508
Test: m only
Change-Id: If7f8bd931dae5310eda6c230f20179418c2efa43
2018-07-17 10:11:34 -07:00
Dongwon Kang
10a67ef68a Clean up libmedia2_jni Android.bp
- Remove unnecessary source files
- Use shared-lib if there is NDK or NDK-compliant version

Test: build
Bug: 63934228
Change-Id: I23347678d53f43e6732065270d52e28d753e15bc
2018-06-27 16:58:38 -07:00
Paul Mclean
128f093ee8 Merge "(re)integrating Native MIDI API into NDK - base API" 2018-03-20 19:43:14 +00:00
Paul McLean
8a3e33b36a (re)integrating Native MIDI API into NDK - base API
Implement native MIDI API (amidi)

Bug: 30252756
Bug: 37090545

Test: manual - Connect PreSonus AudioBox 22VSL and run tests in NativeMidiTestbed app.
Verify MIDI messages sent to external MIDI synthesizer.
Verify MIDI messages received from external MIDI synthesizer.
CTS

Change-Id: I7bb02b8926d01090132ce873c785b5323a9fa5f8
2018-03-15 16:20:07 -07:00
Dongwon Kang
56a807dba8 Remove unnecessary static libraries in libmedia2_jni
Test: build
Bug: 63934228
Change-Id: I146ee62e78cf2d3348e624f61a1c3328820bd763
2018-03-15 21:19:17 +00:00
Mathias Agopian
3e88ed82e5 NEW API: Add Image.getHardwareBuffer()
This mirror the corresponding NDK API. For some
reason this was missing from the java version
of Image.

Bug: 73784759
Test: manual
Change-Id: Iafa6dedda809fe38ea4453d9873d1ba886f88481
2018-02-28 22:23:54 +00:00
Chong Zhang
f98fc1c54a MediaCas: use HidlMemory to avoid handle leaks
bug: 67710751
test: CTS MediaCasTest, ClearKeySystemTest; VTS VtsHalCasV1_0Target
Change-Id: I379ba416e72328f8e18849ded42dedb24e34210b
2018-02-23 01:42:34 +00:00
Wei Jia
c3c31a5382 MediaPlayer2: move MediaPlayer2 native code to libmediaplayer2
Test: MediaPlayer2 plays
Bug: 63934228
Change-Id: Ie674b01b6e839d5ca0af76d8b712c395da64b57a
2018-02-05 16:18:27 -08:00
Marco Nelissen
4045a06d21 MetaData now lives in libmediaextractor
Bug: 67908544
Test: build, boot
Change-Id: Ied00ea8f51ad7adad7a4384d416508d22ec9a31c
2018-01-29 11:29:09 -08:00
TreeHugger Robot
839c570b20 Merge "MediaPlayer2: remove unused methods" 2018-01-25 22:58:15 +00:00