This was causing a null deref in cts/security/gce-all.
Bug: 142652210
Test: Run cts/security/gce-all, observe no more crash.
Change-Id: If2003b650f69e88825219113ce1b7d70edc4731d
DrmInitialization only needs to be called on PlayerServiceFileSource
and PlayerServiceMediaHTTP, so just have those initialize the forward
lock engine automatically, which removes the need to have this in the
IDataSource interface.
Test: atest cts/tests/tests/drm/src/android/drm/cts/DRMTest.java
Change-Id: I344f46b65b5c473930b16b9b4041e4897384dc18
Merged-In: I344f46b65b5c473930b16b9b4041e4897384dc18
`readBuffer` might not set `nextSubTimeUs`. It's not clear that
`mMediaClock->addTimer(msg, nextSubTimeUs);` is only called in cases
where `nextSubTimeUs` is set, so initialize it to 0 here.
This is consistent with what's done in `fetchTextData`.
Caught by the static analyzer:
frameworks/av/media/libmediaplayerservice/nuplayer/GenericSource.cpp:799:9:
warning: 2nd function call argument is an uninitialized value
[clang-analyzer-core.CallAndMessage]
Bug: None
Test: TreeHugger
Change-Id: Iae6f9d71757c1bcc6e994a448b6169b4d69c4a38
Name changes:
ClearFileSource -> FileSource
ClearMediaHTTP -> MediaHTTP
FileSource -> PlayerServiceFileSource
MediaHTTP -> PlayerServiceMediaHTTP
PlayerServiceXXX are able to handle OMA(forward-lock) files and now
moved to media/libmediaplayerservice/datasource since they only work
on mediaserver process.
Bug: 142567168
Test: build and DrmTest
Change-Id: I9292dba33d149efe17cf566017dcce1710cc8c88
This is preparation for having a subclass of DataSourceFactory which
is only used in mediaserver process with OMA (forward-lock) use case.
Test: build
Bug: 142567168
Change-Id: I2a1ab3d1ae89f657a84376d9a95d4e814b545b4f
into libdatasource, which contains:
DataSourceFactory
(Clear)FileSource
(Clear)MediaHTTP
DataURISource
HTTPBase
NuCachedSource2
This is needed to break a circular dependency in an upcoming CL.
Test: build, boot
Change-Id: I34d9937235c78f18f51b18945342a0743e209577
Merged-In: I34d9937235c78f18f51b18945342a0743e209577
onPollBuffering() monitors EOS(finalStatus == ERROR_END_OF_STREAM),
then notifyPreparedAndCleanup(finalStatus) notifies prepared error.
Previous Google's patch "GenericSource: fix error handling during
preparing or rebuffering" should focus on error except ERROR_END_OF_STREAM.
Bug: 134911527
Test: http streaming can play a mp4 video whose duration is less than 5s
Change-Id: I5c738bbe7242314b24463679b5bd996ab59d2b04
(cherry picked from commit 89703072ec4edf7a384ec07024debc0a6e085ae0)
mLock and mDisconnect lock order interleaving,
which has potential risk of deadlock if other code locks/unlocks them in a different order.
Bug: 135211710
Test: (1) android.hardware.camera2.cts.FastBasicsTest#testCamera1
(2) android.media.cts.MediaPlayerFlakyNetworkTest
Change-Id: I9486f2c6780c2f246786299a3d6c7c2f7295b768
Added mDisconnectLock to seperate it from mLock, used for protecting
mDataSource, mHttpSource and mDisconnected in order that disconnect()
won't be blocked by mLock.
Bug: 133900877
Test: android.media.cts.MediaPlayerFlakyNetworkTest
Change-Id: I15693c0a61f898aad4035d0fa55c8af25de4fc96
take the collected media.metrics (as they arrive) and push a copy over
to statsd, the statistics logging subsystem.
gather data, wrap in protobufs apppropriately, and submit it to statsd.
Bug: 118782504
Test: statsd's test_drive app
Change-Id: Ieb82c43633851075e9eaf65d2a95c8cba87441ea
don't emit the -1 (default, unspecified) values for
movie, audio, and video timescale fields in the 'recorder'
mediametrics type.
Bug: 78600173
Test: y
ftruncate(fd) would be useless if mWriter was NULL already.
Hence moved mWriter nullptr check before ftruncate(fd).
Bug: 128366317
Test: atest CtsMediaTestCases:android.media.cts.MediaRecorderTest
Change-Id: I46b8c4718bc8a90712b7ec0b54d8239106106018
Bug: 127693962
StagefrightRecorder receives next file descriptor in it's function setNextOutputFile() from
MediaRecorder.setNextOutputFile(). It duplicates the received file descriptor, but doesn't close
the duplicated one when done.
This CL fixes that issue by not duplicating it in StagefrighRecorder as it has to just pass it on
to Mpeg4Writer. Mpeg4Writer duplicates received file descriptor. It frees them during release.
Test: cts-tradefed run cts-dev -m CtsMediaTestCases --compatibility:module-arg
CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice
Change-Id: I24fc12bd957a2abdb8785625261c95da62952736
mediaserver is no longer forced to 32-bit mode, floating to primary
architecture which is usually 64 bits.
Bug: 16890215
Test: boot, record video, android.media.cts.MediaPlayerTest
Change-Id: If5265e251a4201e7037ddaa2f36fa998936622aa
Bug: http://b/116873221
Mark the functions in this class that aren't defined as pure virtual.
If not, Clang assumes that the TU which defines the first undefined
function will contain the vtable for the class as well. Since there's
no out-of-line definition of this funciton, no TU ends up with the
vtable.
This causes a problem with coverage builds, which are built with -O0,
where calls don't get inlined, thereby requiring a definition of the
vtable. For non -O0 builds, the vtable is not required since the
virtual calls get inlined/optimized-out.
Test: Build with and without coverage
Change-Id: I4644dcd892c5f47031f1603b0f809c1da95314db
when audio tear down happens, audio gets flushed and seek is issued.
If video is not flushed before seek, previous video buffers will be
rendered and leads to A/V sync issue. Hence call video flush.
Author: Cong Jiajia <jcong@codeaurora.org>
Bug: 70919418
Test: MediaPlayerTest
Change-Id: I01f744c1eae99a1d0f81ca84f536d493a2a54b01
Clear the vector which holds all tracks when the
GenericSource is reset to prevent any stale access
Author: Umesh Pandey <umeshp@codeaurora.org>
Bug: 70919418
Test: TBD
Change-Id: If7042b3344ce36ba56e38df1a43bc2bb287cc40c
nuplayer's updateMetrics() referenced an unprotected shared stats buffer.
It's a small buffer, so we now make a copy during updateMetrics()
[at a point where we are mutexed] instead of putting a mutex on the
underlying frequently used construct.
Ensure that nuplayer2 has the same protections.
Bug: 123256408
Test: race condition
Check if MediaAnalyticsItem class is valid before
calling any of its functions.
Author: Paras Nagda <pnagda@codeaurora.org>
Bug: 70919418
Test: TBD
Change-Id: I2d5704063b9479301f03d6f57ce74108873ef4cc
IMPORTANT NOTE:
CL depends on another CL in frameworks/base
https://partner-android-review.googlesource.com/c/platform/frameworks/base/+/1206275
AudioProductStrategies offers the possibility to dynamically
translate attributes to stream types (and vice versa) within
audio policy engine.
Legacy engine has hard coded rules to maintain the translation
service.
This patch removes the hardcoded translation within the helper
and replaces them by AudioProductStrategy APIs.
Test: AudioPolicyTests: AudioProductStrategiesAllStreamsTest
It loops on all stream types supported by strategy and ensures
device selection matches. Hard coded stuff would prevent right device
selection.
Test: CTS: AudioTrackTest AudioRecordTest
Test: audio smoke test on sailfish, walleye blueline
Change-Id: I76589df5555136ed49dbacc7aac9b0b5e828bef2
Signed-off-by: François Gaffie <francois.gaffie@renault.com>