xp2p_sdk 2.1.4
xp2p_sdk: ^2.1.4 copied to clipboard
Flutter SDK for Tencent IoT XP2P video streaming. This SDK provides P2P connectivity for video devices using Dart FFI.
2.1.4 #
- iOS: 按
TencentENET2.4.73 的真实 ABI 调用startService,修复门铃进直播时startService在主线程SIGBUS闪退 - 2.4.73 的内层符号是
_start_service_with_xp2pinfo(const char*, const char*, const char*, const char*, app_config_t)(4 个char*),比 Android 版多一个xp2p_info,因此startService实际为 5 参数;app_config_t同时扩到 336 字节(char server[256]/char ip[64]/uint64_t port/int type/bool cross) - 此前按 4 参数调用会把
app_config_t指针当成xp2p_info,strlen扫到的是指针字节(只可能是 0~7),通过版本校验后strlen-4无符号下溢,memcpy拷到主线程栈保护页崩溃 xp2p_info传nullptr:native 在 info 为空时跳过解密直接proxy_init,与旧的 4 参数语义一致;真实 info 仍由startService返回 0 后的setDeviceXp2pInfo设置- Android 的
startService仍是 4 参数 + 32 字节app_config_t,调用路径不变
2.1.3 #
- iOS: 移除
user_target_xcconfig中的全局-all_load,仅保留TencentENET/SoundTouchiOS的-force_load;新增XP2PBridgeSymbolAnchor.m锚定dart_bridge.o,FFI 符号保持可见。TXLiteAVSDK_IOT静态库内重复的conversion_matrix目标文件不再被同时加载,客户无需在 Podfile 中做去重修补
2.1.2 #
- 新增
TXLivePlayer.switchQuality(id, quality):切换清晰度时先停旧流,再用新清晰度地址重新起播,修复新旧两路流并存导致的 native 闪退 startPlay/stopPlay/switchQuality走同一条串行队列,快速连续切换不再并发调用 native 接口dispose改为等待停止拉流完成后再destroy,修复退出页面时的 use-after-free 崩溃TRTCCloudVideoView重建时复用已有播放器实例,避免重复创建 native 播放器
2.1.1 #
- iOS: 升级内嵌
TencentENET.framework到 XP2P 2.4.73,修复对讲过程中切换清晰度导致的EXC_BAD_ACCESS闪退 - 旧版
dataSend在调用线程直接写连接发送缓冲区,与 SDK 事件线程并发操作同一 evbuffer,会读到悬空的链表指针;新版在_voice_send内加锁查表,并通过runOnLoop把写操作投递到事件循环线程 - 同时包含 tcp Listener 在 accept 回调内被关闭导致的 use-after-free 修复
- 对外 C API 导出集与 2.4.50 完全一致(26 个符号),无需改动调用代码
- App 侧若加了「切清晰度窗口内丢弃对讲帧」的临时规避,可在升级后移除
2.1.0 #
- Add raw stream recording for debugging:
XP2P.recordStream(id)now returns the actual save path (standard FLV) - Add
XP2P.setRecordPath(path)to customize the recording target (''disables recording) - Add
XP2P.buildDefaultRecordPath()to generate a timestamped path under the app sandboxxp2p_record/directory - Default locations: Android
<external files dir>/xp2p_record/raw_video_<ts>.flv, iOS<sandbox>/Documents/xp2p_record/raw_video_<ts>.flv - Native: expose
xp2p_set_record_pathbridge;SaveFileOn/SaveFileUrlcallbacks now return the configured path - Note: the path must be injected before
startService, because the native layer queriesSaveFileOnduring service startup
2.0.0 #
- Merge
tencent_rtc_sdkintoxp2p_sdk(V2TXLivePlayer / TRTC / FFI bindings bundled), no longer depends on the separatetencent_rtc_sdkpackage - Android: depend on
com.tencent.liteav:LiteAVSDK_IOT:13.5.0.25011 - iOS: depend on
TXLiteAVSDK_IOT 13.5.25024, minimum deployment target raised to 15.6 - Remove pusher/chorus FFI symbols not provided by LiteAVSDK IOT
- Removed dependency on
super_player
1.0.0 #
- Initial release of XP2P SDK for Flutter
- Support P2P video streaming with direct/relay connection
- Command synchronization and asynchronous messaging
- Audio/Video data reception
- Voice/Data transmission
- LAN service support
- FFI-based native integration for Android and iOS
- Support for Tencent IoT Video devices
- Add
setContentDetailAPI for content tracking and data reporting - Add
getUserIDAPI to get current user identifier - Add
ReportLogUtilfor automatic data reporting (Dart version based on Java implementation) - Automatic data reporting integration with
setContentDetailcallback - User ID management with persistent storage
- Configurable logging with
LogConfig