Relocate drm and crypto headers from media
to mediadrm to have finer grained ownership
bug:73556221
Change-Id: I7d1b5944f261f9b1fdeed7605e4c0b4b4ca43e1a
Extractor plugins now use DataSourceBase, which is not refcounted.
Framework-side DataSource derives from DataSourceBase and RefBase.
Also remove MediaExtractor::release, because it is not needed
anymore due to the way the extractor/track/datasource lifecycle
is managed now.
Also add source and target pid to CallbackDataSource name, to
make the extractor dumpsys more useful.
Bug: 67908556
Test: build, boot, CTS, skia test app for heif
Change-Id: I6b9cbe903f76b0cf27ba87f4a456f424803efd08
Extractor plugins now use MediaSourceBase, which is not refcounted.
Framework-side MediaSource derives from MediaSourceBase and RefBase.
Bug: 67908556
Test: build, boot
Change-Id: Ie33ca07f0d0ba783a504d7b7bf1a75ca4acdd745
Add MicrophoneInfo class in native side and native logic for supporting
query all available microphones.
Bug: 64038649
Test: Run test and check the print log.
Change-Id: Ic0a9cce55a1265a66ba08fe81b56b56cb88ba42f
This adds AudioPresentationInfo interface to enable applications
to query and receive audio presentation
information from multiplexed data sources (e.g. MP4 or MPEG2-TS).
Bug: 63901775
Test: make
Change-Id: I3156cc8594ae153fe8cd2dedc191bfab207f5203
Signed-off-by: Previr Rangroo <prang@dolby.com>
Adds an EventMetric class, associated unit tests, and an instance of the
EventMetric to DrmHal. Also added a unit test for CounterMetric and
created a class to hold all of the future metric instances.
BUG: 64001676
Test: Added and ran unit tests. Also added a CTS test case.
Change-Id: Ic94bedd5f8293a58a939613a4ae69ce656a772be
This adds a new class CounterMetric which is used to hold metric
information. It also adds a single use case for recording and
reporting a counter metric.
BUG: 64001676
Test: Added and ran a new test for the specific CounterMetric use case.
Change-Id: I39cab8328f135e579f80b6c2fab721da5f569795
If a sessionID other than AAUDIO_SESSION_ID_NONE is requested
then legacy data path will be forced.
SessionID is implemented for MMAP data path but not used.
It is easier to implement it now then try to figure
it out later.
Bug: 33268927
Test: test_session_id.cpp will be moved to CTS when stable
Change-Id: I3ea67f57c1cbe24a512980f1352b917ab3cb6387
The destination files of these symlinks no longer exist, remove symlink so that
the generated cmake file can be loaded by clion.
Test: make
Change-Id: I00afd6950c80869cb6fb7f01ec42300332002924
Refactor the mechanism used by audio tracks to query and attach
to an output mixer/stream in audio flinger. This will:
- reduce the number of binder transactions needed to create a track
- move sample rate, framecount and flags validations to audio server
side
- move audio session allocation to audio server side
- prepare restriction of certain binder transactions to audioserver only
Test: CTS tests for AudioTrack
Change-Id: If4369aad6c080a56c0b42fbfcc97c8ade17a7439
- MediaSource, DataSource and MediaExtractor are moved to
libmediaextractor so that they can be used by extractor
implementations without depending on libmedia and libstagefright.
- XXXFactory classes has been added in order not to expose CreateXXX
methods in libmediaextractor.
- avc_utils is moved to libstagefright_foundation since most of
extractor implementations are relying on that.
Test: build + post submit media CTS tests
Bug: 65851881
Change-Id: I7d5cf18dd25abc10478ac3f6e7d1828ad023e3fb
This has been deprecated for some time. Remove this from codebase
to avoid introducing new HAL for HDCP. Log warning and return NULL
when remote display is requested.
bug: 62213914
Change-Id: I3560b60fe83a01c51df0f2e715a8f2c760e57bf8
nbaio is an acronym for "non-blocking audio I/O", and nblog means
"non-blocking logger" so nblog does not belong with nbaio.
There are a lot of improvements planned for nblog, and having the
restructuring done will make it clearer as more files are added.
Test: builds OK
Change-Id: Ib28bada2566c1d64bdbe9f5d7a5ce40e080178ef
This removes the manually rolled IPlayer implementation and instead uses
an aidl generated implementation. The IPlayer aidl file is moved from
frameworks/base/.
Test: run cts --module CtsMediaTestCases
Bug: 64223827
Change-Id: Ia609f7ba1cc6f71ce919d6174dd8b5e0e1b05575
Every time merge is called by the thread loop,
the data is also processed and written to
PerformanceAnalysis. A call to dump retrieves
the FIFO of processed data in PerformanceAnalysis
instead of the unprocessed Reader FIFO, and prints
the result to the console.
Test: dumpsys media.log
Change-Id: Ic479f48e9e4fdf4523a8f15db514dbdd85b70434
Because DRM Plugins will not be allowed to call the AMI API under
Treble, the mediadrmservice will need to marshal the metrics out of the
plugin in protobuf format and report them to the AMI API instead. This
patch implements the pulling and interpreting of metrics from DRM
Plugins.
Bug: 36497276
Test: Played Google Play Movies, verified that playback still worked and
Widevine metrics appeared in a dump of the system media metrics.
Change-Id: If07717c1b87022bc1fcdedfbc62b9193899742d5
Implement correct indication of client UID and PID to audio flinger
for AAudio MMAP streams in both exclusive mode and shared mode.
- Add start/stop client methods on MMAP streams used only when the MMAP
stream is in AAudio service and carries a mix of shared streams.
- Add "In Service'" indication from "client" side to AAudioServiceStreamMMAP
so that the behavior can be adapted accordingly.
- Modify logic on audio flinger side with regard to mmap tracks and
audio HAL stream activity:
- use same audio session for all clients on a same stream to match
audio policy logic to share same direct output stream for clients on same
session. This is also more consistent with current volume and effect
handling as all MMAP clients sharing the same output stream have the
same volume and use case.
- start/stop the HAL when the stream is started/stopped with the initial client
handle (returned when the stream is opened) but do not create a track.
AAudioService implementation will always send an additional start command before
first client starts and a stop command after last client stops,
in both shared and exclusive mode.
- start/stop a track only if the start/stop stream command is received
with a handle different from the initial handle.
- Allow more than one active client from the same UID on a MMAP input in audio policy.
Bug: 62950008
Test: verify playback and capture in mmap mode
Change-Id: I86151bbb637ff172d2fd5f813056eab13a7bcd3c
When the vndk is enabled (BOARD_VNDK_VERSION=current),
vendor libraries must only link against vendor variants
in the build system. This also means that they receive restricted
sets of headers and that automatic global headers are restricted.
Test: mma -j BOARD_VNDK_VERSION=current
Test: boots device, audio plays over YouTube
Bug: 37342627
Bug: 63269228
Change-Id: Ifa9c96f6b98b456def485be6bc5046ee54c3c3ca
libstagefright_foundation_vendor is a vendor-only variant of the
libstagefright_foundation. Vendor libs and other VNDK libs should link
against this _vendor.so library. This vendor-only variant does not have
dependency to libpowermanager which is not available to vendors.
Headers are moved from the global include dir to module-local include
dir. This is because global include dir (e.g. frameworks/av/include) is
not provided when building with BOARD_VNDK_VERSION=current. Instead the
headers are exported via the module's export_include_dirs directive.
Short summary on the directory movement:
"some" libstagefright headers are moved from libstagefright/include to
libstagefright/include/media/stagefright. This is because the headers
are included as <media/stagefright/HEADER_NAME,h>.
libstagefrigut_foundation headers are moved from
libstagefright/include/foundation to
libstagefright/foundation/include/media/stagefright/foundation. Again
this is because the headers are included as
<media/stagefright/foundation/HEADER_NAME.h>.
Furthermore, in order to prevent sudden breakage, symlinks to the
module-local header directories are added to the global include
directory.
frameworks/av/include/media/stagefright ->
<libstagefright>/include/media/stagefright
frameworks/av/include/media/stagefright/foundation ->
<libstagefright_foundation>/include/media/stagefright/foundation
Bug: 37462569
Test: sailfish builds and boots
Test: BOARD_VNDK_VERSION=current m libstagefright_foundation_vendor is
successful
Change-Id: Iadfa594e885e0bd39837ccb282993d3ba5b62852
1) Limit number of VolumeShapers that can be created.
a) 16 system VolumeShapers
b) 16 application/client VolumeShapers
2) Return proper volume before VolumeShaper is started.
3) Consistent xOffset definition used internally:
a) this is now always the position on the volumeshaper curve
which can go backwards if in REVERSE.
b) normalized time is always forward going and is scaled
to 0.f and 1.f depending on progress relative to
the curve's duration.
4) Fix replace method.
5) Add comments.
Test: Use updated CTS VolumeShaperTest
Bug: 37536598
Change-Id: I837ab2a481adc0abbd3f1338bfe2cb79831b11fa
hardware/qcom/display includes frameworks/av/include headers
while compiling with -Wextra. Fix warnings that were hidden
by -isystem.
Bug: 31751828
Test: lunch bullhead-userdebug && m -j checkbuild
Change-Id: Ib1ee7165882ff3cc1d85c123815604079483f725
hardware/qcom/display includes frameworks/av/include headers
while compiling with -Wextra. Fix warnings that were hidden
by -isystem.
Bug: 31751828
Test: lunch bullhead-userdebug && m -j checkbuild
Change-Id: Ib1ee7165882ff3cc1d85c123815604079483f725
(cherry picked from commit 27d3c6a329)
Fix the trivial warnings that are hidden by the use of -isystem to
include frameworks/av and caught by -Werror.
Test: m -j checkbuild
Bug: 31751828
Change-Id: I155f9f772ce0a84b364313814cb7cf528b9de4eb
Merged-In: I155f9f772ce0a84b364313814cb7cf528b9de4eb
(cherry picked from commit b8c35f9447)
These warnings were hidden by -isystem.
Bug: 31751828
Test: m -j checkbuild
Change-Id: Ibb1aa07a6827fcbd29fc15291fcd90280c0f608d
Merged-In: Ibb1aa07a6827fcbd29fc15291fcd90280c0f608d
(cherry picked from commit 6f51c153ea)
hardware/qcom/display includes frameworks/av/include headers
while compiling with -Wextra. Fix warnings that were hidden
by -isystem.
Bug: 31751828
Test: lunch bullhead-userdebug && m -j checkbuild
Change-Id: Ib1ee7165882ff3cc1d85c123815604079483f725
Fix the trivial warnings that are hidden by the use of -isystem to
include frameworks/av and caught by -Werror.
Test: m -j checkbuild
Bug: 31751828
Change-Id: I155f9f772ce0a84b364313814cb7cf528b9de4eb
Consider whether VolumeShaper has been started or not when
restoring (position). If the VolumeShaper hasn't been started
we restore in that state. If it has been started already,
we advance to the end assuming the duration has been played out.
Test: CTS and headset / kill audioserver
Bug: 37536598
Change-Id: I4b55dca6f6a859563fd20bad4c8f67d2c92321c0
So MediaCodecSource could use the stopTimeOffset to adjust the stop timeout
dynamically.
Test: Camera recording with video stream delay.
Bug: 35925528
Change-Id: Ic186971992bdc03155e9993cb44027002f71a457
Test: Manual use of Camera, Movies, Photos and YouTube apps.
Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Bug: 37302530
Change-Id: Id0d4f7fed57349a2f5484f6b6264981471e8f022
Also had to fix the location and symlink of them.
Test: works with BOARD_VNDK_VERSION := current
Bug: 33241851
Change-Id: Idcfe1eaaf7be10a183b69bafa07f035ab9ca1e4e
Combine the two openSession methods into one that doesn't take any
arguments. This gives the client more flexibility on creating
sessions efficiently. They can better decide whether to share one
session for multiple streams, or create one session per stream.
bug: 22804304
Change-Id: I9634f4dd4fc437229068103b54555cc28a818937
Test: Media post-submit tests on Pixel phone.
Test: Manual use of Camera, Photos, Play Movies and YouTube apps.
Bug: 36952714
Change-Id: I230df51c2d658e29cffec369ba622e336c3402d2
- Set crypto mode to kMode_AES_CTR, since kMode_AES_CBC is not defined
on Java API, and is rejected when the sample is queued to MediaCodec.
- Wrap the plugin object in a RefBase, and hold a strong ref to it
when executing any API calls in CasImpl. This is needed because
CasImpl could be released by Java API, while MediaCodec native is
still trying to access it.
- Fix build warnings.
Tests: cts-tradefed run cts-dev --module CtsMediaTestCases --test android.media.cts.ClearKeySystemTest
It should not fail.
bug: 22804304
Change-Id: Id4ef037d57dd741d2bb22b1de3d04c8d078b69fb
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.
Change-Id: I81768eecca88d5e59e6e6e547f29308a94e30c7b
We are ready for devices to begin migrating to a 64-bit Media DRM
Server. However, not all devices are ready to make this jump yet. A
device needs to have all of its DRM Plugins ready to run as 64-bit
before it can do this. This includes having 64-bit hardware
integrations.
So that devices can turn on 64-bit support as they get ready, I am
adding flags that can be set in a device's device.mk file. There are two
parts:
* ENABLE_MEDIADRM_64 enables building the mediadrmserver as 64-bit.
* Setting drm.64bit.enabled=true in PRODUCT_PROPERTY_OVERRIDES switches
mediadrmserver to searching for DRM Plugins in the 64-bit directory.
Test: Validated that turning on these flags enables a 64-bit
mediadrmserver that loads 64-bit DRM Plugins from the lib64
directory (after setting DISABLE_TREBLE_DRM to true to load this
code as opposed to the Legacy DRM Plugin HAL)
Bug: 36076017
Change-Id: I141cfd57ff75b40c8b0cb40a5bf1439a1ab5b766
Also, merge android.hardware.media.omx@1.0-impl into libstagefright_omx.
Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Manual use of Camera, Photos, Play Movies and YouTube apps.
Test: Manual use of screen mirroring.
Bug: 33854657
Change-Id: Ie927bcafd86dc7e9509bb8b76bb3b51f9a423cc7
include/camera -> camera/include/camera
include/media/audiohal -> media/libaudiohal/include
include/media/AudioResampler*.h -> media/libaudioprocessing/include
include/media/Audio*.h,IAudio*.h,IEffect*.h,ToneGenerator.h -> media/libaudioclient/include
include/media/EffectsFactoryApi.h -> media/libeffects/include
include/media/stagefright -> media/libstagefright/include
include/media/nbaio -> media/libnbaio/include
include/media/<rest of files> -> media/libmedia/include
include/cpustats -> media/libcpustats/include/cpustats
Added symlinks from old location to new ones
Bug: 33241851
Test: VNDK linked modules will need to add explicit lib dep.
All other modules should compile the same
Change-Id: I0ecf754a2132640ae781a3cc31428fb8c0bd1669
The initial drm hidl hal implementation assumed one
codec per crypto instance, but in fact there can be
multiple codecs per crypto instance. This change
extends the drm hal to allow multiple memory heaps
per crypto plugin. It fixes the issue of mapping
memory frequently during playback.
bug:35275191
Test: manual verification with Play Movies on angler
in passthrough mode and on marlin in binderized mode.
Change-Id: Icada005f515483d7bc214b08caf6eea46ca354a7
A lot of media makefiles didn’t specify libui or
libgui but included headers from these libraries
directly.
It works because these headers are on the global
include path. With this change, though, rect.h
is not anymore (albeit exported from libui).
Test: built and booted device
Bug: 35164655
Change-Id: I72e8f0b7bd25c6a67eedc17afe52c4c484a147fe
android.hidl.memory is being split into android.hidl.memory and
android.hidl.allocator since the former is a passthrough hal and the
latter is a binderized service.
Bug: 35327976
Test: hidl_test, lshal, youtube/camera works
Change-Id: I7a2e72dcd3721d2689eb7ef95f5b140ecc1c446f
Process all buffers that have been queued to the encoder on
StagefrightRecorder::pause()/stop(). Furthermore, add timestamp support for
pause/stop. Buffers willi keep getting encoded until 1) a buffer with a higher
timestamp is queued, or 2) the bufferqueue is abandoned by the producer.
Test: Recording with hacking GoogleCamera timestamp. And Mediarecorder CTS test.
Bug:32765698
Change-Id: I9ec33d635aef269836d7a5d9f4b906cb41b46a0d