From 9acb5f4cce35de24bb046a43d4834b69dd769281 Mon Sep 17 00:00:00 2001 From: liyi Date: Wed, 25 Jun 2025 18:48:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E5=85=BC=E5=AE=B9ios?= =?UTF-8?q?=E7=9A=84=E5=AF=B9=E8=AE=B2=E8=A7=A3=E7=A0=81=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/talk/starChart/star_chart_manage.dart | 34 ++++++++++--------- .../native/talk_view_native_decode_logic.dart | 4 +-- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/lib/talk/starChart/star_chart_manage.dart b/lib/talk/starChart/star_chart_manage.dart index 81d36ccc..57cf953d 100644 --- a/lib/talk/starChart/star_chart_manage.dart +++ b/lib/talk/starChart/star_chart_manage.dart @@ -239,25 +239,27 @@ class StartChartManage { // 初始化udp Future _onlineRelayService() async { var addressIListenFrom = InternetAddress.anyIPv4; - RawDatagramSocket.bind(addressIListenFrom, localPort) + await RawDatagramSocket.bind(addressIListenFrom, localPort) .then((RawDatagramSocket socket) { // 设置接收缓冲区大小 (SO_RCVBUF = 8) - socket.setRawOption( - RawSocketOption.fromInt( - RawSocketOption.levelSocket, - 8, // SO_RCVBUF for Android/iOS - 2 * 1024 * 1024, // 2MB receive buffer - ), - ); + if (AppPlatform.isAndroid) { + socket.setRawOption( + RawSocketOption.fromInt( + RawSocketOption.levelSocket, + 8, // SO_RCVBUF for Android/iOS + 2 * 1024 * 1024, // 2MB receive buffer + ), + ); - // 设置发送缓冲区大小 (SO_SNDBUF = 7) - socket.setRawOption( - RawSocketOption.fromInt( - RawSocketOption.levelSocket, - 7, // SO_SNDBUF for Android/iOS - 2 * 1024 * 1024, // 2MB send buffer - ), - ); + // 设置发送缓冲区大小 (SO_SNDBUF = 7) + socket.setRawOption( + RawSocketOption.fromInt( + RawSocketOption.levelSocket, + 7, // SO_SNDBUF for Android/iOS + 2 * 1024 * 1024, // 2MB send buffer + ), + ); + } _udpSocket = socket; diff --git a/lib/talk/starChart/views/native/talk_view_native_decode_logic.dart b/lib/talk/starChart/views/native/talk_view_native_decode_logic.dart index 97522643..9d9e0e40 100644 --- a/lib/talk/starChart/views/native/talk_view_native_decode_logic.dart +++ b/lib/talk/starChart/views/native/talk_view_native_decode_logic.dart @@ -106,9 +106,9 @@ class TalkViewNativeDecodeLogic extends BaseGetXController { state.isLoading.value = true; // 创建解码器配置 final config = VideoDecoderConfig( - width: StartChartManage().videoWidth, + width: 864, // 实际视频宽度 - height: StartChartManage().videoHeight, + height: 480, codecType: 'h264', ); // 初始化解码器并获取textureId From 75dbbc93d1db1f6711a51265d31102cc74495284 Mon Sep 17 00:00:00 2001 From: liyi Date: Wed, 25 Jun 2025 18:49:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E5=85=BC=E5=AE=B9ios?= =?UTF-8?q?=E7=9A=84=E5=AF=B9=E8=AE=B2=E8=A7=A3=E7=A0=81=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pubspec.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index ae04ec9f..c92ba945 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -130,7 +130,7 @@ dependencies: video_decode_plugin: git: url: git@code.star-lock.cn:liyi/video_decode_plugin.git - ref: 5dfbd190fdc61dab3fc93543606b85d6b826a2ed + ref: 1370536da9dfbe0d69ab6e229e4fa7fc026ea1ea flutter_localizations: sdk: flutter @@ -182,7 +182,8 @@ dependencies: #菊花 flutter_easyloading: ^3.0.5 #图形验证码 - aj_captcha_flutter: ^0.0.1 +# aj_captcha_flutter: ^0.0.1 + asn1lib: ^1.6.5 #国家选择 azlistview: ^2.0.0 common_utils: ^2.0.0