Commit Graph

30 Commits

Author SHA1 Message Date
hkuang
bbb7628545 transoding: Add xml parsing to ApplicationMediaCapabilities.
CTS-Coverage-Bug:172074159

Bug: 169849854
Test: Unit test

Change-Id: I4a8cabb850495cb14c51f25de607bdf47da8b26e
2020-11-17 16:41:46 -08:00
hkuang
396906c975 transcoding: Unhide setClientCapabilities.
And use the new ApplicationMediaCapabilities class.

CTS-Coverage-Bug:168990206

Bug: 169849854
Test:tracking in b/168990206

Change-Id: I0e0d801de019b453ad4171816e1d59d82a085a52
2020-11-14 12:48:24 -08:00
hkuang
10acecb23b transcoding: Unhide ApplicationMediaCapabilities
CTS-Coverage-Bug:172074159

Bug: 169849854
Test: Unit test
Change-Id: Ib043bf8e52c6868cd1dfeff5552755d394c4c851
2020-11-13 19:09:34 -08:00
Brett Chabot
073ffdd9fc Convert to androidx.test from android-support-test.
android-support-test has long been deprecated and unsupported,
and it causes problems having both androidx.test and
androiud.support.test included in one binary.

Bug: 172570181
Test: m -j NullHomeTest mediatunertest mediatranscodingtest mediaroutertest mediaframeworktest BluetoothMidiTests
Change-Id: If86f5634beab88db07656f743b19beddd9d77984
2020-11-05 10:28:43 -08:00
hkuang
df59cbd5ec transcoding: Add ApplicationMediaCapabilities.
Bug: 169849854
Test: Unit test

Change-Id: I4a20aa2ac2433b228e80707281d8c747ec9ff7d6
2020-10-29 11:51:47 -07:00
hkuang
7ee8e7fe17 Update TranscodingJob to TranscodingSession.
No functional change.

bug: 154733526
Test: Unit test
Change-Id: Iaf76ea902b46c127ab7474486de6ddecbd9a8589
2020-10-23 19:49:35 +00:00
Hangyu Kuang
ee743d3238 Merge "transcoding: Add forClientUid in TranscodingRequest." 2020-09-23 00:19:00 +00:00
hkuang
9e0c251319 transcoding: Add forClientUid in TranscodingRequest.
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
2020-09-23 00:04:21 +00:00
hkuang
516eebe5c1 transcoding: Add retry api.
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
2020-09-17 17:23:22 +00:00
Chong Zhang
566b316d8d transcoding: add API for determininng transcoding format
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
2020-09-03 20:32:45 -07:00
hkuang
bd974fadcb trancoding: Rework some API signature.
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
2020-09-01 22:59:48 -07:00
hkuang
48be9935c0 transcoding: Rework MediaTranscodeManager test.
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
2020-09-01 23:35:58 +00:00
TreeHugger Robot
a64e5145ea Merge "transcoding: Enable the benchmark for video file with audio." 2020-08-28 18:20:32 +00:00
hkuang
60d5b2e8e0 transcoding: Enable the benchmark for video file with audio.
They are disabled due to bug in transcoding file with audio.

Bug: 154734675
Test: Benchmarking test.
Change-Id: Id4b6d4da5b09cc1f8cc6fc1604bf55d73f9a2cf1
2020-08-28 09:58:15 -07:00
hkuang
3eb57dc580 TranscodingAPI: Expose MediaTranscodeManager as System API.
Bug: 160260102
Test: Unit test
Change-Id: I38e9efc46e23fe1aafe65100bbc7f72eb200720f
2020-08-27 22:20:18 +00:00
hkuang
ef9108a1de TranscodingAPI: Handling Transcding service crash.
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
2020-08-20 15:06:30 -07:00
hkuang
4ccf29836e TranscodingApi: Update job status upon receiving callback.
Bug: 160260102
Test: Unit test.

Change-Id: Ib3727889a102f64d76794703e085e73feeabe34e
2020-08-11 09:56:46 -07:00
hkuang
be355a317c Transcoding API: Add support for progress update.
Bug: 160260102
Test: Unit test.
Change-Id: I2203b10e330ea31463d73d1248acb3c3f54f4d64
2020-08-10 09:42:56 -07:00
hkuang
6bc5ae0cf7 Transcoding: Add HEVC->AVC performance test.
Due to slowness in transcoding video with audio, only adding
the video only file for now.

Bug: 154734456
Test: Unit test.
Change-Id: I5a353e24cca0a6624df4e9309ac64bc2fef4b0ed
2020-07-14 12:01:50 -07:00
hkuang
2fd238f6a2 Transcoding: Add more tests to collect the performance.
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
2020-07-09 18:01:41 -07:00
hkuang
3c47c7b497 Transcoding: Add test for cancel transcoding.
Bug: 160260102
Test: Unit Test.
Change-Id: Ibca34efc639cb72dbb0a7eb44154ff80343d0fdb
2020-07-08 13:39:43 -07:00
hkuang
ce2fb63375 transcoding: Add benchmark for transcoding.
This CL only adds preliminary benchmark for avc->avc.
More benchmark will be added later.

Bug:  154734456
Test: Unit test.

Change-Id: Iceb61dcf8f3831529be3670cdee8adfe8843fda2
2020-07-07 11:22:36 -07:00
hkuang
6497987277 transcoding: Add util class to verify transcoding.
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
2020-06-26 11:15:59 -07:00
hkuang
331fbc0434 transcoding: Add HEVC->AVC transcoding test.
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
2020-06-24 09:31:04 -07:00
hkuang
cfdbc0d335 Transcoding: Bring up first real transcoding with Java API.
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
2020-06-21 12:23:35 -07:00
hkuang
c4b07f6eae transcoding: Add tests for transcoding to internal/external storage.
Also refactor the code to remove duplication.

Bug: 145628554
Test: unit testing

Change-Id: If0a75ba3101c7d9261ccae95f8b82f8b41704592
2020-06-16 12:22:37 -07:00
hkuang
c1b763c91b transcoding: Fix the bug in openFileDescriptor and add more tests.
Bug: 145628554
Test: unit testing

Change-Id: If340c770ad396f45d6faa829915870a9da797adf
2020-06-15 16:54:39 +00:00
hkuang
3b285d600d Transcoding: Test api with actual service.
Also adding the new start/pause/resume handling in
client callback.

Bug: 145628554
Test: Build
Change-Id: Ie059a57b4d2552067df0cecb512e1fbabc683037
2020-06-09 23:26:08 +00:00
hkuang
931e13d0bc transcodng: Replace fd with Uri string.
Bug: 145628554
Test: MediaTranscodeManagerTest.
Change-Id: I8e81111943e20cb31cd4349406b633d3f6c092d1
2020-06-04 19:08:14 +00:00
hkuang
51703503e6 transcoding: Rework mediatranscoding test.
Create a sperate directory for all tests associated with
mediatranscoding.
This CL is a preparation of hooking with actual service,
adding perf benchamrk, power measurement.

Bug: 145628554
Test: MediaTranscodingTest.

Change-Id: Ifcdb26eae2e71599e2e19bb92b991f88809ec5e0
2020-06-02 15:25:00 -07:00