From: Caisking <3449750381@qq.com> Date: Thu, 28 Dec 2023 02:16:00 +0000 (+0800) Subject: 增加视频播放 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=a1da7d32ce9f3bad4279f07c751235ae70ee146f;p=mirrors%2FFD230.git 增加视频播放 --- diff --git a/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_video_play/ui_test_video_play.cpp b/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_video_play/ui_test_video_play.cpp index 4627cd32b..faf844e49 100755 --- a/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_video_play/ui_test_video_play.cpp +++ b/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_video_play/ui_test_video_play.cpp @@ -19,8 +19,8 @@ #include "components/root_view.h" namespace OHOS { -static constexpr int16_t VIDEO_WIDTH = 454; -static constexpr int16_t VIDEO_HEIGHT = 454; +static constexpr int16_t VIDEO_WIDTH = 466; +static constexpr int16_t VIDEO_HEIGHT = 466; static constexpr int16_t STRIDE_ALIGNMENT_VALUE = 64; static constexpr int16_t BUFFER_QUEUE_SIZE = 3; static constexpr int16_t JPEG_HEIGHT_DIVISOR = 2; @@ -66,7 +66,7 @@ void UITestVideoPlay::SetUp() label_ = new UILabel(); char filePath[PATH_MAX]; - if (realpath("/user/video/panda.mp4", filePath) == nullptr) { + if (realpath("/user/video/dial.mp4", filePath) == nullptr) { label_->SetPosition(60, 227, 330, 70); // 60, 227, 330, 70: Left, right, width, height. label_->SetText("please upload video resource."); label_->SetStyle(STYLE_BACKGROUND_COLOR, 0xff505050); @@ -133,7 +133,7 @@ void UITestVideoPlay::SetUp() int32_t bufferSize = ySize + uvSize; surface->SetSize(bufferSize); if (videoPlay_ == nullptr) { - std::string uri("/user/video/panda.mp4"); + std::string uri("/user/video/dial.mp4"); videoPlay_ = new MediaVideoPlay(surface, button1_, uri); if (videoPlay_ == nullptr) { GRAPHIC_LOGE("videoPlay_ is nullptr\n");