Set Text Time Scale In Tests
Problem: The time scale for text was being set to zero in our tests because it was never needed. Change: This changes it to use MS as that is what's most common and requires the least amount of changes. Change-Id: Ia046ac1994b4cede079d2f801275c7f058d5bdd3
This commit is contained in:
parent
03afb16c0c
commit
cb2ec22a06
|
@ -215,10 +215,13 @@ std::unique_ptr<SegmentInfo> MediaHandlerTestBase::GetSegmentInfo(
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<StreamInfo> MediaHandlerTestBase::GetTextStreamInfo() const {
|
std::unique_ptr<StreamInfo> MediaHandlerTestBase::GetTextStreamInfo() const {
|
||||||
|
// Assume that text will use milliseconds.
|
||||||
|
const uint64_t kTimeScaleMs = 1000;
|
||||||
|
|
||||||
// None of this information is actually used by the text out handler.
|
// None of this information is actually used by the text out handler.
|
||||||
// The stream info is just needed to signal the start of the stream.
|
// The stream info is just needed to signal the start of the stream.
|
||||||
return std::unique_ptr<StreamInfo>(
|
return std::unique_ptr<StreamInfo>(
|
||||||
new TextStreamInfo(0, 0, 0, kUnknownCodec, "", "", 0, 0, ""));
|
new TextStreamInfo(0, kTimeScaleMs, 0, kUnknownCodec, "", "", 0, 0, ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<TextSample> MediaHandlerTestBase::GetTextSample(
|
std::unique_ptr<TextSample> MediaHandlerTestBase::GetTextSample(
|
||||||
|
|
|
@ -29,7 +29,6 @@ const size_t kThreeOutput = 3;
|
||||||
const bool kEncrypted = true;
|
const bool kEncrypted = true;
|
||||||
const bool kKeyFrame = true;
|
const bool kKeyFrame = true;
|
||||||
|
|
||||||
const uint64_t kNoTimeScale = 0;
|
|
||||||
const uint64_t kMsTimeScale = 1000;
|
const uint64_t kMsTimeScale = 1000;
|
||||||
|
|
||||||
const char* kNoId = "";
|
const char* kNoId = "";
|
||||||
|
@ -156,7 +155,7 @@ TEST_F(CueAlignmentHandlerTest, TextInputWithNoCues) {
|
||||||
testing::InSequence s;
|
testing::InSequence s;
|
||||||
|
|
||||||
EXPECT_CALL(*Output(kTextStream),
|
EXPECT_CALL(*Output(kTextStream),
|
||||||
OnProcess(IsStreamInfo(kParent, kNoTimeScale, !kEncrypted)));
|
OnProcess(IsStreamInfo(kParent, kMsTimeScale, !kEncrypted)));
|
||||||
EXPECT_CALL(*Output(kTextStream),
|
EXPECT_CALL(*Output(kTextStream),
|
||||||
OnProcess(IsTextSample(kNoId, kSample0Start, kSample0End,
|
OnProcess(IsTextSample(kNoId, kSample0Start, kSample0End,
|
||||||
kNoSettings, kNoPayload)));
|
kNoSettings, kNoPayload)));
|
||||||
|
@ -210,7 +209,7 @@ TEST_F(CueAlignmentHandlerTest, TextAudioVideoInputWithNoCues) {
|
||||||
testing::InSequence s;
|
testing::InSequence s;
|
||||||
|
|
||||||
EXPECT_CALL(*Output(kTextStream),
|
EXPECT_CALL(*Output(kTextStream),
|
||||||
OnProcess(IsStreamInfo(kParent, kNoTimeScale, !kEncrypted)));
|
OnProcess(IsStreamInfo(kParent, kMsTimeScale, !kEncrypted)));
|
||||||
EXPECT_CALL(*Output(kTextStream),
|
EXPECT_CALL(*Output(kTextStream),
|
||||||
OnProcess(IsTextSample(kNoId, kSample0Start, kSample0End,
|
OnProcess(IsTextSample(kNoId, kSample0Start, kSample0End,
|
||||||
kNoSettings, kNoPayload)));
|
kNoSettings, kNoPayload)));
|
||||||
|
@ -445,7 +444,7 @@ TEST_F(CueAlignmentHandlerTest, TextInputWithCues) {
|
||||||
testing::InSequence s;
|
testing::InSequence s;
|
||||||
|
|
||||||
EXPECT_CALL(*Output(kTextStream),
|
EXPECT_CALL(*Output(kTextStream),
|
||||||
OnProcess(IsStreamInfo(kParent, kNoTimeScale, !kEncrypted)));
|
OnProcess(IsStreamInfo(kParent, kMsTimeScale, !kEncrypted)));
|
||||||
EXPECT_CALL(*Output(kTextStream),
|
EXPECT_CALL(*Output(kTextStream),
|
||||||
OnProcess(IsTextSample(kNoId, kSample0Start, kSample0End,
|
OnProcess(IsTextSample(kNoId, kSample0Start, kSample0End,
|
||||||
kNoSettings, kNoPayload)));
|
kNoSettings, kNoPayload)));
|
||||||
|
@ -510,7 +509,7 @@ TEST_F(CueAlignmentHandlerTest, TextAudioVideoInputWithCues) {
|
||||||
testing::InSequence s;
|
testing::InSequence s;
|
||||||
|
|
||||||
EXPECT_CALL(*Output(kTextStream),
|
EXPECT_CALL(*Output(kTextStream),
|
||||||
OnProcess(IsStreamInfo(kParent, kNoTimeScale, !kEncrypted)));
|
OnProcess(IsStreamInfo(kParent, kMsTimeScale, !kEncrypted)));
|
||||||
EXPECT_CALL(*Output(kTextStream),
|
EXPECT_CALL(*Output(kTextStream),
|
||||||
OnProcess(IsTextSample(kNoId, kSample0Start, kSample0End,
|
OnProcess(IsTextSample(kNoId, kSample0Start, kSample0End,
|
||||||
kNoSettings, kNoPayload)));
|
kNoSettings, kNoPayload)));
|
||||||
|
|
Loading…
Reference in New Issue