From 06e8599d298df8e3562ce68c9bd244b027205950 Mon Sep 17 00:00:00 2001 From: bird_j Date: Fri, 24 Sep 2021 06:30:13 +0000 Subject: [PATCH] =?UTF-8?q?setVolume=E5=88=B7=E6=96=B0=20Signed-off-by:=20?= =?UTF-8?q?bird=5Fj=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../player/src/api/ActsPlayerAPITest.cpp | 33 ------------------- 1 file changed, 33 deletions(-) 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 529050769..37a6d4e2e 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之后 -- GitLab