This is used to let MediaProvider could specify the request is
on behalf of which client.
CTS-Coverage-Bug: 168990206
Bug: 154733526
Test: Unit test.
Change-Id: Id1a2c4cccff12dd1d979fa9350120e2ddad9ff5b
The retry api is used internally to retry the pending jobs
upon service die and also used by client to retry the failed job.
CTS-Coverage-Bug: 168805960
Bug: 161469320
Test: Unit test
Change-Id: I5c3f4d1d0e7a21cd2f802fdffe0e5b0566833328
Add a helper API for determining whether to transcode
as well as the transcoding video format.
bug: 163086057
test: MediaTranscodeManagerTest; Manually verify with
local changes in MediaProvider to use the API.
Change-Id: Id694bd83a960fe21008b06a7144ede831103cea2
This is for addressing part of API counsel comments.
1. Remove AutoCloseable from MediaTranscodeManager.
2. Return job id in progress update callback.
3. Hide PRIORITY_OFFLINE.
Bug: 160260102
Test: Unit test
Change-Id: I7ae4d723a8f1b325ddc5fe7e81c49783adcbae19
1. Remove MediaTranscodeManagerWithMockServiceTest and move
all the tests to MediaTranscodeManagerTest.
2. Move the service died test in MediaTranscodeManagerTest into a
seperate ServiceDied test as it affect the normal test when
killing the service.
Bug: 160260102
Test: Unit test
Change-Id: I192200744a44d4d724289f6001255100b332c968
They are disabled due to bug in transcoding file with audio.
Bug: 154734675
Test: Benchmarking test.
Change-Id: Id4b6d4da5b09cc1f8cc6fc1604bf55d73f9a2cf1
Upon receiving a binder died event of the client
due to service crash, we will do the following:
1) For the job that is running, notify the client
that the job is failed with error code, so client
could choose to retry the job or not.
2) For the jobs that is still pending or paused,
we will resubmit the job internally once we
successfully reconnect to the service and
register a new client.
3) When trying to connect to the service and register
a new client. The service may need time to reboot
or never boot up again. So we will retry for a number
of times. If we still could not connect, we will notify
client job failure for the pending and paused jobs.
Bug: 161469320
Bug: 160260102
Test: Run the test with long clip and kill the service.
Change-Id: Idfd8dd0aae60b1dfd6c766552c71f07c60663918
Due to slowness in transcoding video with audio, only adding
the video only file for now.
Bug: 154734456
Test: Unit test.
Change-Id: I5a353e24cca0a6624df4e9309ac64bc2fef4b0ed
Due to slowness in transcoding video with audio, those test will be
disable for now and enable after the issue is fixed.
Bug: 154734456
Test: Unit test.
Change-Id: Ia98a4f14a71bfa2aee7f21613a1c5df58ebfc9ff
This CL only adds preliminary benchmark for avc->avc.
More benchmark will be added later.
Bug: 154734456
Test: Unit test.
Change-Id: Iceb61dcf8f3831529be3670cdee8adfe8843fda2
The util class will calculate the PSNR of the transcoded
video againest the source video.
Bug: 145628554
Bug: 154734285
Test: Unit test
Change-Id: Ifa1ba87da1f190aef373a2755fd292a51092f57e
1) This CL verifies hevc to avc transcoding is working.
Still need to verify the transcoding result in the
coming CLs.
2) This CL also fix a bug that the track format
is not set when sending job to transcoding service.
Bug: 145628554
Bug: 154734285
Test: Unit test
Change-Id: Ia740e1e969357c3f719966c114f1e5182f4d7f66
In order to allow media router to communicate with the old routing
controller for synchronizing media status during transfer,
this CL postpone releasing the old routing controller.
Basically media router should release the old routing controller by
itself when it's done with the old routing controller.
If it didn't, the old routing controller is automatically released
after timeout (30s for now)
This CL also clarifies "old routing controller" in onTransfer callback.
Now it is consistent regardless of who requested transfer.
A request from MediaRouter2Manager is handled by MediaRouter2 to
simplify session creation logic.
Limitation of this approach is that a routing session unknown to
MediaRouter2 can't be transferred to a different provider but it is out
of R scope so it's okay.
Bug: 158713035
Test: CTS test && atest mediaroutertest && manually transfer using
support v7 demos
Change-Id: I168af69e2a25240227aea0fd9e892eaa91e78ee3
This CL verifies avc to avc transcoding is working.
Still need to verify the transcoding result in the
coming CLs.
Bug: 145628554
Bug: 154734285
Test: Unit test
Change-Id: I2a3ddc31f84775ee2d7b7cf856d9f028a81034c6
From this CL, even for system routes (phone speaker, bt routes),
features are required to get notified of events on routes or to
get them as "available" routes.
By adding this, apps can disable cast -> phone feature.
Bug: 159090706
Test: cts test && atest mediaroutertest && manually
using support v7 demos such that
with LIVE_AUDIO : nothing changed
w/o LIVE_AUDIO : cast -> phone feature is disabled
unregistering callback : cast -> cast (media transfer) and
phone -> phone is only enabled <- this is
the expected behavior for apps that updates
AndroidX library
Change-Id: I4bd27eb1d4776b9cedb59b10e1bac5868d56d305
The method can be called with a random requestId, or called multiple
times with the valid requestId. It can result unnecessary calls
to MediaRouter2Manager#onRequestFailed().
This CL resolves this problem.
Bug: 157873556
Test: Passes CTS and mediaroutertest
Change-Id: Ia7dd4ddafd532b9f23bf19491a0820d5a74f6a70
Add the callback to let MediaRouter2Manager get notified
of released sessions.
A test is also added to check if the manager is aware of
a released session when the session is released from the
media router.
Bug: 157872573
Test: atest mediaroutertest
Change-Id: Ifb96b23ed61cc15f5015c453727a487c3b09a92b