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 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