From 07820b6c84c6e4e2ba67a9a53ad622512ed48edd Mon Sep 17 00:00:00 2001 From: XUXIAOBO Date: Wed, 22 Sep 2021 07:01:11 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A4=B4=E6=96=87=E4=BB=B6=E5=88=B7=E6=96=B0?= =?UTF-8?q?=20Signed-off-by:=20XUXIAOBO=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../player/include/ActsPlayerFuncTest.h | 1 - .../player/include/TestParamsConfig.h | 2 +- .../player/include/Testplayer.h | 7 ++++--- .../player/include/common.h | 21 ------------------- 4 files changed, 5 insertions(+), 26 deletions(-) diff --git a/multimedia/media/media_cpp_test_standard/player/include/ActsPlayerFuncTest.h b/multimedia/media/media_cpp_test_standard/player/include/ActsPlayerFuncTest.h index 835c71dc9..6a4425649 100755 --- a/multimedia/media/media_cpp_test_standard/player/include/ActsPlayerFuncTest.h +++ b/multimedia/media/media_cpp_test_standard/player/include/ActsPlayerFuncTest.h @@ -45,7 +45,6 @@ public: MEDIA_DEBUG_LOG("ActsPlayerFuncTest::TearDown:%s", testInfo->name()); }; static void LocalPlayFunc(const std::string uri, bool isAsync, WindowConfig config = g_sub_config); - static void *LocalMulitPlayFunc(void *threadarg); }; } } diff --git a/multimedia/media/media_cpp_test_standard/player/include/TestParamsConfig.h b/multimedia/media/media_cpp_test_standard/player/include/TestParamsConfig.h index ccd2fea45..1e0f513c3 100644 --- a/multimedia/media/media_cpp_test_standard/player/include/TestParamsConfig.h +++ b/multimedia/media/media_cpp_test_standard/player/include/TestParamsConfig.h @@ -37,7 +37,7 @@ namespace { namespace TestPlayerBasic { class TestParamsConfig { public: - static TestParamsConfig& GetInstance() + static TestParamsConfig &GetInstance() { static TestParamsConfig config; return config; diff --git a/multimedia/media/media_cpp_test_standard/player/include/Testplayer.h b/multimedia/media/media_cpp_test_standard/player/include/Testplayer.h index 92eb84670..603556163 100755 --- a/multimedia/media/media_cpp_test_standard/player/include/Testplayer.h +++ b/multimedia/media/media_cpp_test_standard/player/include/Testplayer.h @@ -67,8 +67,8 @@ public: }; class TestPlayer { public: - std::shared_ptr player_; - sptr window_; + std::shared_ptr player_ = nullptr; + sptr window_ = nullptr; explicit TestPlayer(std::shared_ptr test); virtual ~TestPlayer(); bool CreatePlayer(); @@ -107,11 +107,12 @@ public: void OnInfo(PlayerOnInfoType type, int32_t extra, const Format &infoBody = {}); int WaitForState(PlayerStates state); private: + void PrintState(PlayerStates state); + PlayerErrorType errorType_ = PLAYER_ERROR_UNKNOWN; int32_t errorCode_ = -1; bool seekDoneFlag_ = false; int32_t postion_ = 0; - void PrintState(PlayerStates state); std::shared_ptr test_; }; } diff --git a/multimedia/media/media_cpp_test_standard/player/include/common.h b/multimedia/media/media_cpp_test_standard/player/include/common.h index 774731231..7eae77d20 100755 --- a/multimedia/media/media_cpp_test_standard/player/include/common.h +++ b/multimedia/media/media_cpp_test_standard/player/include/common.h @@ -12,24 +12,3 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -#include "gtest/gtest.h" -#include "player.h" - -namespace PlayerNameSpace { - static std::string MOUNT_147 = "/data/media/audio/147"; - static std::string MOUNT_189 = "/data/media/audio/189"; - static const int MAX_THREADS = 16; - static const int32_t PLAYING_TIME = 3; - static const int32_t PAUSED_TIME = 1; - static const int32_t SEEK_TIME_5_SEC = 5000; - static const int32_t SEEK_TIME_2_SEC = 2000; - static const int DELTA_TIME = 1000; - static const int WAITSECOND = 2; - static const int MAXTIME = 1000; - static const int RET_OK = 0; - static const int32_t FILE_BEGIN = 0; - static const int32_t BUF_SIZE = 1024 * 1024; - static const OHOS::Media::PlayerSeekMode SEEK_MODE = OHOS::Media::PlayerSeekMode::SEEK_PREVIOUS_SYNC; - std::string GetUri(); -} \ No newline at end of file -- GitLab