Skip to content

Commit

Permalink
UTest: Determine hevc defined for test.
Browse files Browse the repository at this point in the history
  • Loading branch information
chundonglinlin committed Jan 15, 2023
1 parent 3bfcdf9 commit 5a89bf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions trunk/src/kernel/srs_kernel_codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1066,13 +1066,13 @@ srs_error_t SrsFormat::hevc_demux_vps_sps_pps(SrsHevcHvccNalu* nal)
// nal data
switch (nal->nal_unit_type) {
case SrsHevcNaluType_VPS:
//err = hevc_demux_vps(&stream);
err = hevc_demux_vps(&stream);
break;
case SrsHevcNaluType_SPS:
err = hevc_demux_sps(&stream);
break;
case SrsHevcNaluType_PPS:
//err = hevc_demux_pps(&stream);
err = hevc_demux_pps(&stream);
break;
default:
break;
Expand Down
6 changes: 4 additions & 2 deletions trunk/src/utest/srs_utest_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3985,6 +3985,7 @@ VOID TEST(KernelCodecTest, VideoFormat)
}
}

#ifndef SRS_H265
VOID TEST(KernelCodecTest, HevcVideoFormat)
{
srs_error_t err;
Expand Down Expand Up @@ -4047,7 +4048,7 @@ VOID TEST(KernelCodecTest, HevcVideoFormat)
SrsFormat f;
HELPER_EXPECT_SUCCESS(f.initialize());

/*HELPER_EXPECT_SUCCESS(f.on_video(0, (char *)vps_sps_pps, sizeof(vps_sps_pps)));
HELPER_EXPECT_SUCCESS(f.on_video(0, (char *)vps_sps_pps, sizeof(vps_sps_pps)));
EXPECT_EQ(1, f.video->frame_type);
EXPECT_EQ(0, f.video->avc_packet_type);

Expand All @@ -4058,9 +4059,10 @@ VOID TEST(KernelCodecTest, HevcVideoFormat)
EXPECT_EQ(1, f.video->nb_samples);

HELPER_EXPECT_SUCCESS(f.on_video(0, (char*)rawIBMF, sizeof(rawIBMF)));
EXPECT_EQ(1, f.video->nb_samples);*/
EXPECT_EQ(1, f.video->nb_samples);
}
}
#endif

VOID TEST(KernelFileTest, FileWriteReader)
{
Expand Down

0 comments on commit 5a89bf2

Please sign in to comment.