mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Make sure that the sample pipeline data is processed regularly.
This is necessary to move video decoding to the AssetLoader. Otherwise, if the decoder max pending frame count is reached, the AssetLoader will stop queuing frames to the pipeline, and process data will not be called anymore. PiperOrigin-RevId: 492392621
This commit is contained in:
parent
d711bf7b24
commit
85c48c481e
@ -14,6 +14,72 @@ format 1:
|
||||
initializationData:
|
||||
data = length 30, hash F6F3D010
|
||||
data = length 10, hash 7A0D0F2B
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 555688582
|
||||
size = 416
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 0
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 2000837254
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 4717
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1593942879
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 9456
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 587837542
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 14196
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1836423877
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 18935
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 874705099
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 23674
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -269206181
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 28413
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -58682425
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 33152
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -859796970
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 37892
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 711911523
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 42631
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -694513071
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 47370
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -252482306
|
||||
@ -104,72 +170,6 @@ sample:
|
||||
size = 5525
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 567000
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 555688582
|
||||
size = 416
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 0
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 2000837254
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 4717
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1593942879
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 9456
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 587837542
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 14196
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1836423877
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 18935
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 874705099
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 23674
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -269206181
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 28413
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -58682425
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 33152
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -859796970
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 37892
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 711911523
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 42631
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -694513071
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 47370
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1124371059
|
||||
@ -200,6 +200,12 @@ sample:
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 71066
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -637074022
|
||||
size = 1082
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 500000
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1297086772
|
||||
@ -278,12 +284,6 @@ sample:
|
||||
size = 418
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 132676
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -637074022
|
||||
size = 1082
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 500000
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -1824027029
|
||||
|
@ -14,6 +14,78 @@ format 1:
|
||||
initializationData:
|
||||
data = length 29, hash 4746B5D9
|
||||
data = length 10, hash 7A0D0F2B
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1868041800
|
||||
size = 22
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 0
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1552866193
|
||||
size = 8
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 230
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 701848493
|
||||
size = 160
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 313
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 2000505720
|
||||
size = 206
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1980
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 57276327
|
||||
size = 222
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 4125
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 382237408
|
||||
size = 228
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 6438
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 795308374
|
||||
size = 228
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 8813
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 356270426
|
||||
size = 224
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 11188
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 963641614
|
||||
size = 244
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 13521
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 2045272193
|
||||
size = 234
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 16063
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -251933090
|
||||
size = 228
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 18500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -329315280
|
||||
size = 234
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 20875
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -770308242
|
||||
@ -104,78 +176,6 @@ sample:
|
||||
size = 5450
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 567233
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1868041800
|
||||
size = 22
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 0
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1552866193
|
||||
size = 8
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 230
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 701848493
|
||||
size = 160
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 313
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 2000505720
|
||||
size = 206
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1980
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 57276327
|
||||
size = 222
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 4125
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 382237408
|
||||
size = 228
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 6438
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 795308374
|
||||
size = 228
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 8813
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 356270426
|
||||
size = 224
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 11188
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 963641614
|
||||
size = 244
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 13521
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 2045272193
|
||||
size = 234
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 16063
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -251933090
|
||||
size = 228
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 18500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -329315280
|
||||
size = 234
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 20875
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1536715689
|
||||
@ -284,6 +284,12 @@ sample:
|
||||
size = 250
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 67625
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -1830836678
|
||||
size = 1051
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 500500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1290952882
|
||||
@ -374,12 +380,6 @@ sample:
|
||||
size = 8
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 107646
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -1830836678
|
||||
size = 1051
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 500500
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 1767407540
|
||||
|
@ -21,6 +21,12 @@ format 1:
|
||||
initializationData:
|
||||
data = length 29, hash 4746B5D9
|
||||
data = length 10, hash 7A0D0F2B
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1205768497
|
||||
size = 23
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 44000
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -770308242
|
||||
@ -111,12 +117,6 @@ sample:
|
||||
size = 5450
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 567233
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1205768497
|
||||
size = 23
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 44000
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 837571078
|
||||
@ -129,6 +129,12 @@ sample:
|
||||
size = 148
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 90439
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -1830836678
|
||||
size = 1051
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 500500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -822987359
|
||||
@ -238,17 +244,41 @@ sample:
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 508399
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -1830836678
|
||||
size = 1051
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 500500
|
||||
trackIndex = 0
|
||||
dataHashCode = 1675188486
|
||||
size = 228
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 531619
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 888567545
|
||||
size = 238
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 554839
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -439631803
|
||||
size = 234
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 578058
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1606694497
|
||||
size = 231
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 601278
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 1767407540
|
||||
size = 874
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 467133
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1747388653
|
||||
size = 217
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 624498
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 918440283
|
||||
@ -327,36 +357,6 @@ sample:
|
||||
size = 568
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 934266
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1675188486
|
||||
size = 228
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 531619
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 888567545
|
||||
size = 238
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 554839
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -439631803
|
||||
size = 234
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 578058
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1606694497
|
||||
size = 231
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 601278
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1747388653
|
||||
size = 217
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 624498
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -734560004
|
||||
|
@ -15,6 +15,78 @@ format 1:
|
||||
initializationData:
|
||||
data = length 33, hash D3FB879D
|
||||
data = length 10, hash 7A0D0F2B
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -212376212
|
||||
size = 20
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 0
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1948569090
|
||||
size = 72
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 417
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1316750072
|
||||
size = 84
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1917
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1016428949
|
||||
size = 88
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 3667
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1127325245
|
||||
size = 96
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 5500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1148147726
|
||||
size = 92
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 7500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -2125685540
|
||||
size = 76
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 9417
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 473329679
|
||||
size = 24
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 11000
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 240990900
|
||||
size = 176
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 11500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 777637182
|
||||
size = 196
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 15167
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1872106264
|
||||
size = 180
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 19250
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1520711499
|
||||
size = 140
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 23000
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 1949079733
|
||||
@ -123,78 +195,6 @@ sample:
|
||||
size = 1109
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 600750
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -212376212
|
||||
size = 20
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 0
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1948569090
|
||||
size = 72
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 417
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1316750072
|
||||
size = 84
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1917
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1016428949
|
||||
size = 88
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 3667
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1127325245
|
||||
size = 96
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 5500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1148147726
|
||||
size = 92
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 7500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -2125685540
|
||||
size = 76
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 9417
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 473329679
|
||||
size = 24
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 11000
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 240990900
|
||||
size = 176
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 11500
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 777637182
|
||||
size = 196
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 15167
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1872106264
|
||||
size = 180
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 19250
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -1520711499
|
||||
size = 140
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 23000
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1580199067
|
||||
|
@ -27,6 +27,12 @@ format 1:
|
||||
initializationData:
|
||||
data = length 31, hash 4B108214
|
||||
data = length 9, hash FBA158BB
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 620415738
|
||||
size = 508
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 7020
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 983000500
|
||||
@ -219,18 +225,18 @@ sample:
|
||||
size = 151
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 516666
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 620415738
|
||||
size = 508
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 7020
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 33931768
|
||||
size = 504
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 28354
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 264118578
|
||||
size = 2235
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 533333
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 800699278
|
||||
@ -370,17 +376,23 @@ sample:
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 519020
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 264118578
|
||||
size = 2235
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 533333
|
||||
trackIndex = 0
|
||||
dataHashCode = 204379389
|
||||
size = 504
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 540354
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 64254117
|
||||
size = 164
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 550000
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 694913274
|
||||
size = 508
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 561687
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -1000078879
|
||||
@ -556,23 +568,29 @@ sample:
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 1033333
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 204379389
|
||||
size = 504
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 540354
|
||||
trackIndex = 1
|
||||
dataHashCode = 65238903
|
||||
size = 163
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 1050000
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 694913274
|
||||
size = 508
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 561687
|
||||
trackIndex = 1
|
||||
dataHashCode = 1720840922
|
||||
size = 2043
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 1066666
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 289018778
|
||||
size = 513
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 583020
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -1006231050
|
||||
size = 178
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 1083333
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -693167785
|
||||
@ -700,29 +718,35 @@ sample:
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1031020
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 65238903
|
||||
size = 163
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 1050000
|
||||
trackIndex = 0
|
||||
dataHashCode = -320096195
|
||||
size = 509
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1052354
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 1720840922
|
||||
size = 2043
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 1066666
|
||||
trackIndex = 0
|
||||
dataHashCode = -744850549
|
||||
size = 511
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1073687
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -1006231050
|
||||
size = 178
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 1083333
|
||||
trackIndex = 0
|
||||
dataHashCode = 1457899387
|
||||
size = 505
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1095020
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = 1742965952
|
||||
size = 2022
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 1100000
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 168118808
|
||||
size = 519
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1116354
|
||||
sample:
|
||||
trackIndex = 1
|
||||
dataHashCode = -971065365
|
||||
@ -861,30 +885,6 @@ sample:
|
||||
size = 119
|
||||
isKeyFrame = false
|
||||
presentationTimeUs = 1483333
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -320096195
|
||||
size = 509
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1052354
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = -744850549
|
||||
size = 511
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1073687
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 1457899387
|
||||
size = 505
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1095020
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 168118808
|
||||
size = 519
|
||||
isKeyFrame = true
|
||||
presentationTimeUs = 1116354
|
||||
sample:
|
||||
trackIndex = 0
|
||||
dataHashCode = 896298799
|
||||
|
@ -17,7 +17,6 @@
|
||||
package androidx.media3.transformer;
|
||||
|
||||
import static androidx.media3.common.util.Assertions.checkNotNull;
|
||||
import static androidx.media3.common.util.Assertions.checkStateNotNull;
|
||||
import static androidx.media3.transformer.TransformationException.ERROR_CODE_MUXING_FAILED;
|
||||
import static androidx.media3.transformer.Transformer.PROGRESS_STATE_AVAILABLE;
|
||||
import static androidx.media3.transformer.Transformer.PROGRESS_STATE_UNAVAILABLE;
|
||||
@ -91,7 +90,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
private static final int MSG_DRAIN_PIPELINES = 4;
|
||||
private static final int MSG_END = 5;
|
||||
|
||||
private static final int DRAIN_PIPELINES_DELAY_MS = 10;
|
||||
private static final int DRAIN_PIPELINES_DELAY_MS = 50;
|
||||
|
||||
private final Context context;
|
||||
private final TransformationRequest transformationRequest;
|
||||
@ -223,13 +222,13 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
startInternal();
|
||||
break;
|
||||
case MSG_REGISTER_SAMPLE_PIPELINE:
|
||||
samplePipelines.add((SamplePipeline) msg.obj);
|
||||
registerSamplePipelineInternal((SamplePipeline) msg.obj);
|
||||
break;
|
||||
case MSG_DEQUEUE_INPUT:
|
||||
dequeueInputInternal(/* samplePipelineIndex= */ msg.arg1);
|
||||
break;
|
||||
case MSG_QUEUE_INPUT:
|
||||
queueInputInternal(/* samplePipelineIndex= */ msg.arg1);
|
||||
samplePipelines.get(/* samplePipelineIndex= */ msg.arg1).queueInputBuffer();
|
||||
break;
|
||||
case MSG_DRAIN_PIPELINES:
|
||||
drainPipelinesInternal();
|
||||
@ -254,12 +253,19 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
exoPlayerAssetLoader.start();
|
||||
}
|
||||
|
||||
private void registerSamplePipelineInternal(SamplePipeline samplePipeline) {
|
||||
samplePipelines.add(samplePipeline);
|
||||
if (!isDrainingPipelines) {
|
||||
// Make sure pipelines are drained regularly to prevent them from getting stuck.
|
||||
internalHandler.sendEmptyMessageDelayed(MSG_DRAIN_PIPELINES, DRAIN_PIPELINES_DELAY_MS);
|
||||
isDrainingPipelines = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void dequeueInputInternal(int samplePipelineIndex) throws TransformationException {
|
||||
SamplePipeline samplePipeline = samplePipelines.get(samplePipelineIndex);
|
||||
// The sample pipeline is drained before dequeuing input. It can't be done before queuing
|
||||
// input because, if the pipeline is full, dequeuing input would forever return a null buffer.
|
||||
// Draining the pipeline at regular intervals would be inefficient because a low interval could
|
||||
// result in many no-op operations, and a high interval could slow down data queuing.
|
||||
// The sample pipeline is drained before dequeuing input to maximise the chances of having an
|
||||
// input buffer to dequeue.
|
||||
while (samplePipeline.processData()) {}
|
||||
pendingInputBuffer = samplePipeline.dequeueInputBuffer();
|
||||
dequeueBufferConditionVariable.open();
|
||||
@ -269,15 +275,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
}
|
||||
}
|
||||
|
||||
private void queueInputInternal(int samplePipelineIndex) throws TransformationException {
|
||||
DecoderInputBuffer pendingInputBuffer = checkStateNotNull(this.pendingInputBuffer);
|
||||
samplePipelines.get(samplePipelineIndex).queueInputBuffer();
|
||||
if (pendingInputBuffer.isEndOfStream() && !isDrainingPipelines) {
|
||||
internalHandler.sendEmptyMessageDelayed(MSG_DRAIN_PIPELINES, DRAIN_PIPELINES_DELAY_MS);
|
||||
isDrainingPipelines = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void drainPipelinesInternal() throws TransformationException {
|
||||
for (int i = 0; i < samplePipelines.size(); i++) {
|
||||
while (samplePipelines.get(i).processData()) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user