From 8902865c0ecbc16575ef8c8cbffc105fa7c2c414 Mon Sep 17 00:00:00 2001 From: xiaowei guan Date: Fri, 15 Dec 2023 17:21:24 +0800 Subject: [PATCH] Fix code review issue --- .../video_player_videohole/lib/src/video_player_tizen.dart | 2 +- packages/video_player_videohole/pubspec.yaml | 1 - packages/video_player_videohole/tizen/src/drm_manager.cc | 1 - .../tizen/src/video_player_tizen_plugin.cc | 5 ++--- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/video_player_videohole/lib/src/video_player_tizen.dart b/packages/video_player_videohole/lib/src/video_player_tizen.dart index 1a875f5dd..6520d7e4b 100644 --- a/packages/video_player_videohole/lib/src/video_player_tizen.dart +++ b/packages/video_player_videohole/lib/src/video_player_tizen.dart @@ -13,7 +13,7 @@ import 'messages.g.dart'; import 'tracks.dart'; /// An implementation of [VideoPlayerPlatform] that uses the -/// Pigeon-generated [TizenVideoPlayerApi]. +/// Pigeon-generated [VideoPlayerVideoholeApi]. class VideoPlayerTizen extends VideoPlayerPlatform { final VideoPlayerVideoholeApi _api = VideoPlayerVideoholeApi(); diff --git a/packages/video_player_videohole/pubspec.yaml b/packages/video_player_videohole/pubspec.yaml index d16f38df3..bfd9edd4f 100644 --- a/packages/video_player_videohole/pubspec.yaml +++ b/packages/video_player_videohole/pubspec.yaml @@ -16,7 +16,6 @@ flutter: fileName: video_player_tizen_plugin.h dependencies: - ffi: ^2.0.1 flutter: sdk: flutter html: ^0.15.0 diff --git a/packages/video_player_videohole/tizen/src/drm_manager.cc b/packages/video_player_videohole/tizen/src/drm_manager.cc index 0f1aa51fb..3d695b01e 100644 --- a/packages/video_player_videohole/tizen/src/drm_manager.cc +++ b/packages/video_player_videohole/tizen/src/drm_manager.cc @@ -186,7 +186,6 @@ bool DrmManager::SecurityInitCompleteCB(int *drm_handle, unsigned int len, } int DrmManager::SetChallenge(const std::string &media_url) { - LOG_ERROR("[DrmManager] SetChallenge url = %s", media_url.c_str()); if (!drm_session_) { LOG_ERROR("[DrmManager] Invalid drm session."); return DM_ERROR_INVALID_SESSION; diff --git a/packages/video_player_videohole/tizen/src/video_player_tizen_plugin.cc b/packages/video_player_videohole/tizen/src/video_player_tizen_plugin.cc index 2a7291f17..94411c4e7 100644 --- a/packages/video_player_videohole/tizen/src/video_player_tizen_plugin.cc +++ b/packages/video_player_videohole/tizen/src/video_player_tizen_plugin.cc @@ -164,12 +164,11 @@ ErrorOr VideoPlayerTizenPlugin::Create( return FlutterError("Invalid argument", "Either asset or uri must be set."); } - int64_t player_id = 0; auto player = std::make_unique( plugin_registrar_->messenger(), FlutterDesktopPluginRegistrarGetView(registrar_ref_)); - player_id = player->Create(uri, drm_type, license_server_url, prebuffer_mode, - http_headers); + int64_t player_id = player->Create(uri, drm_type, license_server_url, + prebuffer_mode, http_headers); if (player_id == -1) { return FlutterError("Operation failed", "Failed to create a player."); }