mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
PsExtractorTest
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=124355441
This commit is contained in:
parent
110c819939
commit
544d88ca56
6 changed files with 117 additions and 1 deletions
BIN
library/src/androidTest/assets/ts/sample.ps
Normal file
BIN
library/src/androidTest/assets/ts/sample.ps
Normal file
Binary file not shown.
79
library/src/androidTest/assets/ts/sample.ps.dump
Normal file
79
library/src/androidTest/assets/ts/sample.ps.dump
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
seekMap:
|
||||||
|
isSeekable = false
|
||||||
|
duration = UNSET TIME
|
||||||
|
getPosition(0) = 0
|
||||||
|
numberOfTracks = 2
|
||||||
|
track 192:
|
||||||
|
format:
|
||||||
|
bitrate = -1
|
||||||
|
id = null
|
||||||
|
containerMimeType = null
|
||||||
|
sampleMimeType = audio/mpeg-L2
|
||||||
|
maxInputSize = 4096
|
||||||
|
requiresSecureDecryption = false
|
||||||
|
width = -1
|
||||||
|
height = -1
|
||||||
|
frameRate = -1.0
|
||||||
|
rotationDegrees = -1
|
||||||
|
pixelWidthHeightRatio = -1.0
|
||||||
|
channelCount = 1
|
||||||
|
sampleRate = 44100
|
||||||
|
pcmEncoding = -1
|
||||||
|
encoderDelay = -1
|
||||||
|
encoderPadding = -1
|
||||||
|
subsampleOffsetUs = 9223372036854775807
|
||||||
|
selectionFlags = 0
|
||||||
|
language = null
|
||||||
|
drmInitData = -
|
||||||
|
initializationData:
|
||||||
|
sample count = 4
|
||||||
|
sample 0:
|
||||||
|
time = 29088
|
||||||
|
flags = 1
|
||||||
|
data = length 417, hash 5C710F78
|
||||||
|
sample 1:
|
||||||
|
time = 55210
|
||||||
|
flags = 1
|
||||||
|
data = length 418, hash 79CF71F8
|
||||||
|
sample 2:
|
||||||
|
time = 81332
|
||||||
|
flags = 1
|
||||||
|
data = length 418, hash 79CF71F8
|
||||||
|
sample 3:
|
||||||
|
time = 107454
|
||||||
|
flags = 1
|
||||||
|
data = length 418, hash 79CF71F8
|
||||||
|
track 224:
|
||||||
|
format:
|
||||||
|
bitrate = -1
|
||||||
|
id = null
|
||||||
|
containerMimeType = null
|
||||||
|
sampleMimeType = video/mpeg2
|
||||||
|
maxInputSize = -1
|
||||||
|
requiresSecureDecryption = false
|
||||||
|
width = 640
|
||||||
|
height = 426
|
||||||
|
frameRate = -1.0
|
||||||
|
rotationDegrees = -1
|
||||||
|
pixelWidthHeightRatio = 1.0
|
||||||
|
channelCount = -1
|
||||||
|
sampleRate = -1
|
||||||
|
pcmEncoding = -1
|
||||||
|
encoderDelay = -1
|
||||||
|
encoderPadding = -1
|
||||||
|
subsampleOffsetUs = 9223372036854775807
|
||||||
|
selectionFlags = 0
|
||||||
|
language = null
|
||||||
|
drmInitData = -
|
||||||
|
initializationData:
|
||||||
|
data = length 22, hash 743CC6F8
|
||||||
|
sample count = 2
|
||||||
|
sample 0:
|
||||||
|
time = 40000
|
||||||
|
flags = 1
|
||||||
|
data = length 20616, hash CA38A5B5
|
||||||
|
sample 1:
|
||||||
|
time = 80000
|
||||||
|
flags = 0
|
||||||
|
data = length 17831, hash 5C5A57F5
|
||||||
|
tracksEnded = true
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2016 The Android Open Source Project
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.google.android.exoplayer.extractor.ts;
|
||||||
|
|
||||||
|
import com.google.android.exoplayer.extractor.Extractor;
|
||||||
|
import com.google.android.exoplayer.testutil.TestUtil;
|
||||||
|
|
||||||
|
import android.test.InstrumentationTestCase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unit test for {@link PsExtractor}.
|
||||||
|
*/
|
||||||
|
public final class PsExtractorTest extends InstrumentationTestCase {
|
||||||
|
|
||||||
|
public void testSample() throws Exception {
|
||||||
|
TestUtil.assertOutput(new TestUtil.ExtractorFactory() {
|
||||||
|
@Override
|
||||||
|
public Extractor create() {
|
||||||
|
return new PsExtractor();
|
||||||
|
}
|
||||||
|
}, "ts/sample.ps", getInstrumentation());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -31,7 +31,7 @@ public final class TsExtractorTest extends InstrumentationTestCase {
|
||||||
public Extractor create() {
|
public Extractor create() {
|
||||||
return new TsExtractor();
|
return new TsExtractor();
|
||||||
}
|
}
|
||||||
}, "ts/sample.mpeg", getInstrumentation());
|
}, "ts/sample.ts", getInstrumentation());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue