支持业务层直接推送视频帧,支持屏幕共享推流

This commit is contained in:
Caleb
2025-12-11 16:52:45 +08:00
parent 14431c1570
commit b85cee5d0d
17 changed files with 209 additions and 182 deletions

View File

@@ -19,6 +19,7 @@
#import "SellyRTCSession.h"
#import "SellyRTCVideoConfiguration.h"
#import "SellyRTCSessionDelegate.h"
#import "SellyRTCReplayKitHandler.h"
NS_ASSUME_NONNULL_BEGIN

View File

@@ -1,6 +1,6 @@
#if 0
#elif defined(__arm64__) && __arm64__
// Generated by Apple Swift version 6.2 effective-5.10 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
// Generated by Apple Swift version 6.2.1 effective-5.10 (swiftlang-6.2.1.4.8 clang-1700.4.4.1)
#ifndef SELLYCLOUDSDK_SWIFT_H
#define SELLYCLOUDSDK_SWIFT_H
#pragma clang diagnostic push

View File

@@ -19,6 +19,7 @@
#import "SellyPusherManagerDelegate.h"
#import "SellyRTCEngine.h"
#import "SellyRTCP2pStats.h"
#import "SellyRTCReplayKitHandler.h"
#import "SellyRTCSession.h"
#import "SellyRTCSessionDelegate.h"
#import "SellyRtcVideoCanvas.h"

View File

@@ -61,4 +61,11 @@ typedef NS_ENUM(NSInteger, SellyRoomConnectionState) {
SellyRoomStateFailed,
};
//屏幕分享状态
typedef NS_ENUM(uint8_t, SellyScreenShareState) {
SellyScreenShareStateStarted = 1, // 开始
SellyScreenShareStatePaused = 2, // 暂停
SellyScreenShareStateResumed = 3, // 恢复
SellyScreenShareStateStopped = 4, // 结束
};
#endif /* SellyPublicDefinition_h */

View File

@@ -0,0 +1,17 @@
//
// SellyRTCReplayKitHandler.h
// SellyCloudSDK
//
// Created by Caleb on 12/10/25.
//
#import <Foundation/Foundation.h>
#import <ReplayKit/ReplayKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface SellyRTCReplayKitHandler : RPBroadcastSampleHandler
@end
NS_ASSUME_NONNULL_END

View File

@@ -79,6 +79,12 @@ NS_ASSUME_NONNULL_BEGIN
//更新token
- (void)renewToken:(NSString * _Nonnull)token;
//Starts screen sharing.
- (void)startScreenCapture;
//外部推流不使用sdk默认的视频采集
- (void)pushExternalVideoFrame:(CVPixelBufferRef)pixelBuffer;
//
@property (nonatomic, weak)id<SellyRTCSessionDelegate> delegate;

View File

@@ -8,6 +8,7 @@
#import <Foundation/Foundation.h>
#import "SellyRTCP2pStats.h"
#import "SellyRTCVideoFrame.h"
@class SellyRTCSession;
NS_ASSUME_NONNULL_BEGIN
@@ -113,6 +114,11 @@ token过期后依然可以正常通话但是断网重连会失败
*/
- (void)rtcSession:(SellyRTCSession * _Nonnull)session tokenExpired:(NSString *)token;
/**
屏幕分享状态发生变化
*/
- (void)rtcSession:(SellyRTCSession * _Nonnull)session onScreenShareStatusChanged:(SellyScreenShareState)state;
@end
NS_ASSUME_NONNULL_END