diff --git a/multimedia/media/media_cpp_test_standard/player/src/api/ActsPlayerAPITest.cpp b/multimedia/media/media_cpp_test_standard/player/src/api/ActsPlayerAPITest.cpp index 52905076912dee5eb8965dc1d84bc89d0320273f..37a6d4e2e9adff2714b9b8bd6ff95f7a1806b146 100644 --- a/multimedia/media/media_cpp_test_standard/player/src/api/ActsPlayerAPITest.cpp +++ b/multimedia/media/media_cpp_test_standard/player/src/api/ActsPlayerAPITest.cpp @@ -278,39 +278,6 @@ HWTEST_F(ActsPlayerAPITest, SUB_MEDIA_PLAYER_APITest_Seek_0300, Reliability | Me EXPECT_EQ(RET_OK, testCallback->errorNum_); } -/** - * @tc.number : SUB_MEDIA_PLAYER_APITest_SetVolume_0100 - * @tc.name : 01.SetVolume 0.5 0.5 - * @tc.desc : test SetVolume -*/ -HWTEST_F(ActsPlayerAPITest, SUB_MEDIA_PLAYER_APITest_SetVolume_0100, Reliability | MediumTest | Level2) -{ - std::shared_ptr testObj = std::make_shared(); - std::shared_ptr player = std::make_shared(testObj); - ASSERT_NE(nullptr, player); - ASSERT_EQ(true, player->CreatePlayer()); - std::string uri = TestParamsConfig::GetInstance().GetUri(); - int32_t time; - ASSERT_EQ(RET_OK, player->SetSource(uri)); - sptr videoSurface = player->GetVideoSurface(g_sub_config); - EXPECT_EQ(RET_OK, player->SetVideoSurface(videoSurface)); - std::shared_ptr testCallback = std::make_shared(testObj); - EXPECT_EQ(RET_OK, player->SetPlayerCallback(testCallback)); - ASSERT_EQ(RET_OK, player->Prepare()); - EXPECT_EQ(RET_OK, player->Play()); - EXPECT_TRUE(player->IsPlaying()); - EXPECT_EQ(RET_OK, player->Seek(SEEK_TIME_2_SEC, SEEK_MODE)); - EXPECT_EQ(RET_OK, player->GetCurrentTime(time)); - EXPECT_NEAR(SEEK_TIME_2_SEC, time, DELTA_TIME); - sleep(PLAYING_TIME); - EXPECT_EQ(RET_OK, player->SetVolume(0.5, 0.5)); - sleep(PLAYING_TIME); - EXPECT_EQ(RET_OK, player->Stop()); - EXPECT_FALSE(player->IsPlaying()); - EXPECT_EQ(RET_OK, player->Reset()); - EXPECT_EQ(RET_OK, testCallback->errorNum_); -} - /** * @tc.number : SUB_MEDIA_PLAYER_APITest_SetPlaybackSpeed_0100 * @tc.name : 02.SetPlaybackSpeed操作在play之后