1 /* 2 * Copyright (C) 2020-2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef PLAYER_LITE_TEST_H 17 #define PLAYER_LITE_TEST_H 18 19 #include "gtest/gtest.h" 20 #include "player.h" 21 22 namespace OHOS { 23 using OHOS::Media::Player; 24 using OHOS::Media::PlayerSeekMode; 25 using OHOS::Media::Source; 26 using OHOS::Media::Format; 27 using OHOS::Media::StreamSource; 28 using OHOS::Media::StreamCallback; 29 using OHOS::Media::SourceType; 30 using OHOS::Media::PlayerCallback; 31 32 using namespace std; 33 using namespace OHOS::Media; 34 using namespace testing::ext; 35 36 const int FILE_PATH_LEN = 2048; 37 38 using TestSample = struct TagTestSample { 39 std::shared_ptr<Player> adaptr; 40 char filePath[FILE_PATH_LEN]; 41 }; 42 43 static TagTestSample g_tagTestSample; 44 static Surface *g_surface = Surface::CreateSurface(); 45 } // namespace OHOS 46 #endif // PLAYER_LITE_TEST_H 47