mirror of
https://gitee.com/openharmony/multimedia_av_codec
synced 2024-11-23 15:00:51 +00:00
【修改说明】修改不合理类型&新增参考关系解析用例&更改json管理方式
Signed-off-by: qihaonan <qihaonan3@huawei.com>
This commit is contained in:
parent
9f005142db
commit
49229abed1
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,2 +1 @@
|
||||
test/unittest/resources/reference_parser_test/mp4/*.mp4 filter=lfs diff=lfs merge=lfs -text
|
||||
test/unittest/resources/reference_parser_test/json/*.json filter=lfs diff=lfs merge=lfs -text
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
namespace {
|
||||
constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, LOG_DOMAIN_DEMUXER, "FfmpegReferenceParser" };
|
||||
constexpr int32_t REFERENCE_PARSER_TIMEOUT_MS = 20000;
|
||||
constexpr int64_t REFERENCE_PARSER_TIMEOUT_MS = 20000;
|
||||
}
|
||||
|
||||
namespace OHOS {
|
||||
@ -247,7 +247,8 @@ Status FFmpegDemuxerPlugin::ParserRefInfoLoop(AVPacket *pkt, uint32_t curStreamI
|
||||
return Status::ERROR_UNKNOWN;
|
||||
}
|
||||
InsertIframePtsMap(pkt, parserCurGopId_, parserRefVideoStreamIdx_, iFramePtsMap_);
|
||||
FALSE_RETURN_V_NOLOG(pkt->stream_index == parserRefVideoStreamIdx_ || ffmpegRet == AVERROR_EOF, Status::OK);
|
||||
FALSE_RETURN_V_MSG_D(pkt->stream_index == parserRefVideoStreamIdx_ || ffmpegRet == AVERROR_EOF, Status::OK,
|
||||
"eos or not video");
|
||||
int64_t dts = AvTime2Us(
|
||||
ConvertTimeFromFFmpeg(pkt->dts, parserRefFormatContext_->streams[parserRefVideoStreamIdx_]->time_base));
|
||||
Status result = referenceParser_->ParserNalUnits(pkt->data, pkt->size, curStreamId, dts);
|
||||
@ -376,7 +377,7 @@ Status FFmpegDemuxerPlugin::ParserRefInfo()
|
||||
auto now =
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());
|
||||
auto duration = now - std::chrono::milliseconds(start.count());
|
||||
FALSE_RETURN_V_MSG_W(duration < std::chrono::milliseconds(REFERENCE_PARSER_TIMEOUT_MS), Status::ERROR_UNKNOWN,
|
||||
FALSE_RETURN_V_MSG_W(duration.count() < REFERENCE_PARSER_TIMEOUT_MS, Status::ERROR_UNKNOWN,
|
||||
"reference parser timeout");
|
||||
}
|
||||
|
||||
|
@ -1034,7 +1034,22 @@ HWTEST_F(InnerParsercNdkTest, DEMUXER_REFERENCE_HDR_0010, TestSize.Level1)
|
||||
}
|
||||
shared_ptr<InnerDemuxerParserSample> parserSample = make_shared<InnerDemuxerParserSample>(g_file_hdr_1_hevc);
|
||||
parserSample->InitParameter(MP4Scene::HDR_1_HEVC);
|
||||
ASSERT_TRUE(parserSample->RunSeekScene(WorkPts::END_PTS));
|
||||
ASSERT_TRUE(parserSample->RunSeekScene(WorkPts::RANDOM_PTS));
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number : DEMUXER_REFERENCE_HDR_0011
|
||||
* @tc.name : Randomly generating Pts corresponding to the N existing positions frame in HDR sequence
|
||||
* @tc.desc : func test
|
||||
*/
|
||||
HWTEST_F(InnerParsercNdkTest, DEMUXER_REFERENCE_HDR_0011, TestSize.Level1)
|
||||
{
|
||||
if (access(HEVC_LIB_PATH.c_str(), F_OK) != 0) {
|
||||
return;
|
||||
}
|
||||
shared_ptr<InnerDemuxerParserSample> parserSample = make_shared<InnerDemuxerParserSample>(g_file_hdr_1_hevc);
|
||||
parserSample->InitParameter(MP4Scene::HDR_1_HEVC);
|
||||
ASSERT_TRUE(parserSample->RunSpeedScene(WorkPts::RANDOM_PTS));
|
||||
}
|
||||
|
||||
/**
|
||||
|
BIN
test/unittest/resources/reference_parser_test/json/ipb_0_frame.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ipb_0_frame.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ipb_0_gop.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ipb_0_gop.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ipb_1_frame.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ipb_1_frame.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ipb_1_gop.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ipb_1_gop.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ippp_0_frame.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ippp_0_frame.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ippp_0_gop.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ippp_0_gop.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ippp_1_frame.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ippp_1_frame.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ippp_1_gop.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ippp_1_gop.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ippp_scala_0_frame.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ippp_scala_0_frame.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ippp_scala_0_gop.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ippp_scala_0_gop.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ippp_scala_1_frame.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ippp_scala_1_frame.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/ippp_scala_1_gop.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/ippp_scala_1_gop.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/sdtp_ext_frame.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/sdtp_ext_frame.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/sdtp_ext_gop.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/sdtp_ext_gop.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/sdtp_frame.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/sdtp_frame.json
(Stored with Git LFS)
Binary file not shown.
BIN
test/unittest/resources/reference_parser_test/json/sdtp_gop.json
(Stored with Git LFS)
BIN
test/unittest/resources/reference_parser_test/json/sdtp_gop.json
(Stored with Git LFS)
Binary file not shown.
Loading…
Reference in New Issue
Block a user