Back to MiXiD API Documentation
Detailed MiXiD XCFramework reference for SRT. Read through each header, class, protocol, and function section to inspect Objective-C declarations, parameters, return values, and usage guidance.
SRT Publishing Examples
Use MXDSRTStreamPusher with an MXDSRTPlayerConfiguration transport object to publish encoded MiXiD video and audio over SRT.
Swift
final class SRTPublisher: NSObject, MXDSRTStreamPusherDelegate {
private let pusher: MXDSRTStreamPusher
init(streamURL: URL, streamID: String? = nil, passphrase: String? = nil) {
let transport = MXDSRTPlayerConfiguration(streamURL: streamURL)
transport.streamID = streamID
transport.passphrase = passphrase
transport.latencyInMilliseconds = 120
transport.payloadFormat = HVSRTStreamPayloadFormatMPEGTS
let config = MXDSRTStreamPusherConfiguration.default()
config.videoWidth = 1920
config.videoHeight = 1080
config.videoFPS = 30
config.videoCodec = .h264
config.minVideoBitrateBps = 3_000_000
config.maxVideoBitrateBps = 5_000_000
self.pusher = MXDSRTStreamPusher(transportConfiguration: transport, configuration: config)
super.init()
pusher.delegate = self
}
func start() { pusher.start() }
func stop() { pusher.stop() }
func appendVideoFrame(_ imageBuffer: CVImageBuffer, time: CMTime) {
pusher.appendVideoFrame(imageBuffer, presentationTime: time)
}
func appendAudioBuffer(_ audioBuffer: AVAudioPCMBuffer) {
pusher.appendAudioBuffer(audioBuffer)
}
func srtStreamPusherDidConnect() {
print("SRT connected")
}
func srtStreamPusherDidFailWithError(_ error: Error) {
print("SRT failed: \(error)")
}
}
Objective-C
@interface SRTPublisher : NSObject <MXDSRTStreamPusherDelegate>
@property (nonatomic, strong) MXDSRTStreamPusher *pusher;
@end
@implementation SRTPublisher
- (instancetype)initWithStreamURL:(NSURL *)streamURL streamID:(NSString *)streamID passphrase:(NSString *)passphrase {
self = [super init];
if (!self) { return nil; }
MXDSRTPlayerConfiguration *transport = [[MXDSRTPlayerConfiguration alloc] initWithStreamURL:streamURL];
transport.streamID = streamID;
transport.passphrase = passphrase;
transport.latencyInMilliseconds = 120;
transport.payloadFormat = HVSRTStreamPayloadFormatMPEGTS;
MXDSRTStreamPusherConfiguration *config = [MXDSRTStreamPusherConfiguration defaultConfiguration];
config.videoWidth = 1920;
config.videoHeight = 1080;
config.videoFPS = 30;
config.videoCodec = MXDSRTStreamPusherVideoCodecH264;
config.minVideoBitrateBps = 3000000;
config.maxVideoBitrateBps = 5000000;
_pusher = [[MXDSRTStreamPusher alloc] initWithTransportConfiguration:transport configuration:config];
_pusher.delegate = self;
return self;
}
- (void)start { [self.pusher start]; }
- (void)stop { [self.pusher stop]; }
- (void)appendVideoFrame:(CVImageBufferRef)imageBuffer time:(CMTime)time {
[self.pusher appendVideoFrame:imageBuffer presentationTime:time];
}
- (void)appendAudioBuffer:(AVAudioPCMBuffer *)audioBuffer {
[self.pusher appendAudioBuffer:audioBuffer];
}
- (void)srtStreamPusherDidConnect { NSLog(@"SRT connected"); }
- (void)srtStreamPusherDidFailWithError:(NSError *)error { NSLog(@"SRT failed: %@", error); }
@end
SRT
SRT
MXDHaivisionSRTPlayer.h
Convenience umbrella for SRT playback APIs.
MXDSRTAnnexBParser.h
Annex B H.264 parser for SRT streams.
MXDSRTAnnexBParser
appendDataAndExtractNALUnits:
- (NSArray<NSData *> *)appendDataAndExtractNALUnits:(NSData *)data;
Kind Instance method Return NSArray<NSData *> *Details Appends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized. Parameters appendDataAndExtractNALUnits (NSData *, data)Swift usage let result = instance.appendDataAndExtractNALUnits(appendDataAndExtractNALUnits: data)
reset
- (void)reset;
Kind Instance method Return voidDetails Resets parser or demuxer state before processing a new stream or segment. Parameters No parameters. Swift usage instance.reset()
MXDSRTAudioPlayer.h
AAC audio renderer for SRT playback.
MXDSRTAudioPlayerDelegate Protocol
audioPlayer:didFailWithError:
- (void)audioPlayer:(MXDSRTAudioPlayer *)audioPlayer didFailWithError:(NSError *)error;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for audioPlayer didFailWithError. Implement this method to observe lifecycle, media output, status, or error events. Parameters audioPlayer (MXDSRTAudioPlayer *, audioPlayer); didFailWithError (NSError *, error)Swift usage instance.audioPlayer(audioPlayer: audioPlayer, didFailWithError: nil)
MXDSRTAudioPlayer
Name Declaration Details delegate@property (nonatomic, weak, nullable) id<MXDSRTAudioPlayerDelegate> delegate;Receives lifecycle, media output, status, or error callbacks. muted@property (nonatomic, assign, getter=isMuted) BOOL muted;Audio routing, mute, level, or gain configuration.
enqueueADTSData:presentationTimeStamp:
- (void)enqueueADTSData:(NSData *)data presentationTimeStamp:(CMTime)presentationTimeStamp;
Kind Instance method Return voidDetails Queues encoded audio data for playback. Call in timestamp order for stable audio scheduling. Parameters enqueueADTSData (NSData *, data); presentationTimeStamp (CMTime, presentationTimeStamp)Swift usage instance.enqueueADTSData(enqueueADTSData: data, presentationTimeStamp: 0.0)
flush
- (void)flush;
Kind Instance method Return voidDetails Clears queued decoder/player state so future media starts from a clean point. Parameters No parameters. Swift usage instance.flush()
MXDSRTElementaryStreamPacket.h
Elementary stream packet model.
Enums
MXDSRTElementaryStreamKind
HVSRTElementaryStreamKindVideo = 0
HVSRTElementaryStreamKindAudio = 1
MXDSRTElementaryStreamPacket
Name Declaration Details payload@property (nonatomic, strong, readonly) NSData *payload;Public configuration or state exposed by this API. presentationTimeStamp@property (nonatomic, assign, readonly) CMTime presentationTimeStamp;Public configuration or state exposed by this API. streamKind@property (nonatomic, assign, readonly) MXDSRTElementaryStreamKind streamKind;Public configuration or state exposed by this API. streamType@property (nonatomic, assign, readonly) uint8_t streamType;Public configuration or state exposed by this API.
initWithPayload:presentationTimeStamp:streamKind:streamType:
- (instancetype)initWithPayload:(NSData *)payload presentationTimeStamp:(CMTime)presentationTimeStamp streamKind:(MXDSRTElementaryStreamKind)streamKind streamType:(uint8_t)streamType;
Kind Instance method Return instancetypeDetails Initializes the receiver for initWithPayload presentationTimeStamp streamKind streamType. Use this to provide required URLs, ports, names, peer connections, or configuration objects. Parameters initWithPayload (NSData *, payload); presentationTimeStamp (CMTime, presentationTimeStamp); streamKind (MXDSRTElementaryStreamKind, streamKind); streamType (uint8_t, streamType)Swift usage let value = MXDSRTElementaryStreamPacket(initWithPayload: data, presentationTimeStamp: 0.0, streamKind: streamKind, streamType: streamType)
MXDSRTPlayerConfiguration.h
SRT player and transport configuration.
Enums
MXDSRTStreamPayloadFormat
HVSRTStreamPayloadFormatAnnexBH264 = 0
HVSRTStreamPayloadFormatMPEGTS
MXDSRTPlayerConfiguration
Name Declaration Details streamURL@property (nonatomic, copy) NSURL *streamURL;Endpoint or file URL used by the component. streamID@property (nonatomic, copy, nullable) NSString *streamID;Public configuration or state exposed by this API. passphrase@property (nonatomic, copy, nullable) NSString *passphrase;Public configuration or state exposed by this API. username@property (nonatomic, copy, nullable) NSString *username;Public configuration or state exposed by this API. password@property (nonatomic, copy, nullable) NSString *password;Public configuration or state exposed by this API. latencyInMilliseconds@property (nonatomic, assign) NSInteger latencyInMilliseconds;Network transport reliability and buffering configuration. networkCachingInMilliseconds@property (nonatomic, assign) NSInteger networkCachingInMilliseconds;Network transport reliability and buffering configuration. connectionTimeoutInMilliseconds@property (nonatomic, assign) NSInteger connectionTimeoutInMilliseconds;Network transport reliability and buffering configuration. shouldReconnectAutomatically@property (nonatomic, assign) BOOL shouldReconnectAutomatically;Network transport reliability and buffering configuration. maximumReconnectAttempts@property (nonatomic, assign) NSInteger maximumReconnectAttempts;Network transport reliability and buffering configuration. muted@property (nonatomic, assign) BOOL muted;Audio routing, mute, level, or gain configuration. payloadFormat@property (nonatomic, assign) MXDSRTStreamPayloadFormat payloadFormat;Public configuration or state exposed by this API. listenAsServer@property (nonatomic, assign) BOOL listenAsServer;Public configuration or state exposed by this API.
initWithStreamURL:
- (instancetype)initWithStreamURL:(NSURL *)streamURL;
Kind Instance method Return instancetypeDetails Initializes the receiver for initWithStreamURL. Use this to provide required URLs, ports, names, peer connections, or configuration objects. Parameters initWithStreamURL (NSURL *, streamURL)Swift usage let value = MXDSRTPlayerConfiguration(initWithStreamURL: url)
MXDSRTPlayerView.h
SRT playback component.
Enums
MXDSRTPlayerState
HVSRTPlayerStateIdle = 0
HVSRTPlayerStateBuffering
HVSRTPlayerStatePlaying
HVSRTPlayerStatePaused
HVSRTPlayerStateStopped
HVSRTPlayerStateError
MXDSRTPlayerViewDelegate Protocol
playerView:didChangeState:
- (void)playerView:(MXDSRTPlayerView *)playerView didChangeState:(MXDSRTPlayerState)state;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for playerView didChangeState. Implement this method to observe lifecycle, media output, status, or error events. Parameters playerView (MXDSRTPlayerView *, playerView); didChangeState (MXDSRTPlayerState, state)Swift usage instance.playerView(playerView: playerView, didChangeState: state)
playerView:didFailWithError:
- (void)playerView:(MXDSRTPlayerView *)playerView didFailWithError:(NSError *)error;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for playerView didFailWithError. Implement this method to observe lifecycle, media output, status, or error events. Parameters playerView (MXDSRTPlayerView *, playerView); didFailWithError (NSError *, error)Swift usage instance.playerView(playerView: playerView, didFailWithError: nil)
playerViewDidStartRenderingVideo:
- (void)playerViewDidStartRenderingVideo:(MXDSRTPlayerView *)playerView;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for playerViewDidStartRenderingVideo. Implement this method to observe lifecycle, media output, status, or error events. Parameters playerViewDidStartRenderingVideo (MXDSRTPlayerView *, playerView)Swift usage instance.playerViewDidStartRenderingVideo(playerViewDidStartRenderingVideo: playerView)
MXDSRTPlayerViewOutputDelegate Protocol
srtPlayerView:didOutputVideoFrame:presentationTime:
- (void)srtPlayerView:(MXDSRTPlayerView *)playerView didOutputVideoFrame:(CVImageBufferRef)imageBuffer presentationTime:(CMTime)presentationTime;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for srtPlayerView didOutputVideoFrame presentationTime. Implement this method to observe lifecycle, media output, status, or error events. Parameters srtPlayerView (MXDSRTPlayerView *, playerView); didOutputVideoFrame (CVImageBufferRef, imageBuffer); presentationTime (CMTime, presentationTime)Swift usage instance.srtPlayerView(srtPlayerView: playerView, didOutputVideoFrame: imageBuffer, presentationTime: 0.0)
srtPlayerView:didOutputAACAccessUnit:sampleRate:channels:objectType:config:
- (void)srtPlayerView:(MXDSRTPlayerView *)playerView didOutputAACAccessUnit:(NSData *)accessUnit sampleRate:(Float64)sampleRate channels:(UInt32)channels objectType:(UInt32)objectType config:(NSData * _Nullable)config;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for srtPlayerView didOutputAACAccessUnit sampleRate channels objectType config. Implement this method to observe lifecycle, media output, status, or error events. Parameters srtPlayerView (MXDSRTPlayerView *, playerView); didOutputAACAccessUnit (NSData *, accessUnit); sampleRate (Float64, sampleRate); channels (UInt32, channels); objectType (UInt32, objectType); config (NSData * _Nullable, config)Swift usage instance.srtPlayerView(srtPlayerView: playerView, didOutputAACAccessUnit: data, sampleRate: 0.0, channels: channels, objectType: objectType, config: data)
MXDSRTPlayerView
Name Declaration Details delegate@property (nonatomic, weak, nullable) id<MXDSRTPlayerViewDelegate> delegate;Receives lifecycle, media output, status, or error callbacks. outputDelegate@property (nonatomic, weak, nullable) id<MXDSRTPlayerViewOutputDelegate> outputDelegate;Receives lifecycle, media output, status, or error callbacks. configuration@property (nonatomic, strong, readonly, nullable) MXDSRTPlayerConfiguration *configuration;Public configuration or state exposed by this API. state@property (nonatomic, assign, readonly) MXDSRTPlayerState state;Public configuration or state exposed by this API. muted@property (nonatomic, assign, getter=isMuted) BOOL muted;Audio routing, mute, level, or gain configuration. previewEnabled@property (nonatomic, assign) BOOL previewEnabled;Public configuration or state exposed by this API. slotIndex@property (nonatomic, assign) NSInteger slotIndex;Public configuration or state exposed by this API.
init
- (instancetype)init;
Kind Instance method Return instancetypeDetails Initializes the receiver for init. Use this to provide required URLs, ports, names, peer connections, or configuration objects. Parameters No parameters. Swift usage let value = MXDSRTPlayerView()
initWithConfiguration:
- (instancetype)initWithConfiguration:(MXDSRTPlayerConfiguration *)configuration;
Kind Instance method Return instancetypeDetails Initializes the receiver for initWithConfiguration. Use this to provide required URLs, ports, names, peer connections, or configuration objects. Parameters initWithConfiguration (MXDSRTPlayerConfiguration *, configuration)Swift usage let value = MXDSRTPlayerView(initWithConfiguration: configuration)
prepareToPlay
- (void)prepareToPlay;
Kind Instance method Return voidDetails Prepares transport, decoder, and rendering resources before playback starts. Parameters No parameters. Swift usage instance.prepareToPlay()
play
- (void)play;
Kind Instance method Return voidDetails Begins or resumes playback/rendering for the configured media source. Parameters No parameters. Swift usage instance.play()
pause
- (void)pause;
Kind Instance method Return voidDetails Pauses playback while keeping the object available for a later resume. Parameters No parameters. Swift usage instance.pause()
stop
- (void)stop;
Kind Instance method Return voidDetails Stops the component and releases or finalizes active workflow resources. Parameters No parameters. Swift usage instance.stop()
reloadWithConfiguration:
- (void)reloadWithConfiguration:(MXDSRTPlayerConfiguration *)configuration;
Kind Instance method Return voidDetails Updates configuration on an existing object. Some changes apply immediately; transport or stream changes may reconnect or reload internal resources. Parameters reloadWithConfiguration (MXDSRTPlayerConfiguration *, configuration)Swift usage instance.reloadWithConfiguration(reloadWithConfiguration: configuration)
MXDSRTStreamClient.h
SRT transport client.
MXDSRTStreamClient
Name Declaration Details delegate@property (nonatomic, weak, nullable) id<MXDSRTStreamClientDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
initWithConfiguration:
- (instancetype)initWithConfiguration:(MXDSRTPlayerConfiguration *)configuration;
Kind Instance method Return instancetypeDetails Initializes the receiver for initWithConfiguration. Use this to provide required URLs, ports, names, peer connections, or configuration objects. Parameters initWithConfiguration (MXDSRTPlayerConfiguration *, configuration)Swift usage let value = MXDSRTStreamClient(initWithConfiguration: configuration)
start
- (void)start;
Kind Instance method Return voidDetails Starts the component and begins the related capture, server, playback, publish, recording, or discovery workflow. Parameters No parameters. Swift usage instance.start()
stop
- (void)stop;
Kind Instance method Return voidDetails Stops the component and releases or finalizes active workflow resources. Parameters No parameters. Swift usage instance.stop()
MXDSRTStreamClientDelegate Protocol
streamClientDidStart:
- (void)streamClientDidStart:(MXDSRTStreamClient *)streamClient;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for streamClientDidStart. Implement this method to observe lifecycle, media output, status, or error events. Parameters streamClientDidStart (MXDSRTStreamClient *, streamClient)Swift usage instance.streamClientDidStart(streamClientDidStart: streamClient)
streamClient:didReceiveData:
- (void)streamClient:(MXDSRTStreamClient *)streamClient didReceiveData:(NSData *)data;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for streamClient didReceiveData. Implement this method to observe lifecycle, media output, status, or error events. Parameters streamClient (MXDSRTStreamClient *, streamClient); didReceiveData (NSData *, data)Swift usage instance.streamClient(streamClient: streamClient, didReceiveData: data)
streamClient:didFailWithError:
- (void)streamClient:(MXDSRTStreamClient *)streamClient didFailWithError:(NSError *)error;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for streamClient didFailWithError. Implement this method to observe lifecycle, media output, status, or error events. Parameters streamClient (MXDSRTStreamClient *, streamClient); didFailWithError (NSError *, error)Swift usage instance.streamClient(streamClient: streamClient, didFailWithError: nil)
streamClientDidStop:
- (void)streamClientDidStop:(MXDSRTStreamClient *)streamClient;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for streamClientDidStop. Implement this method to observe lifecycle, media output, status, or error events. Parameters streamClientDidStop (MXDSRTStreamClient *, streamClient)Swift usage instance.streamClientDidStop(streamClientDidStop: streamClient)
MXDSRTStreamPusher.h
SRT publishing component.
Enums
MXDSRTStreamPusherVideoCodec
MXDSRTStreamPusherVideoCodecH264 = 0
MXDSRTStreamPusherVideoCodecHEVC = 1
MXDSRTStreamPusherDelegate Protocol
srtStreamPusherDidConnect
- (void)srtStreamPusherDidConnect;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for srtStreamPusherDidConnect. Implement this method to observe lifecycle, media output, status, or error events. Parameters No parameters. Swift usage instance.srtStreamPusherDidConnect()
srtStreamPusherDidStop
- (void)srtStreamPusherDidStop;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for srtStreamPusherDidStop. Implement this method to observe lifecycle, media output, status, or error events. Parameters No parameters. Swift usage instance.srtStreamPusherDidStop()
srtStreamPusherDidFailWithError:
- (void)srtStreamPusherDidFailWithError:(NSError *)error;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for srtStreamPusherDidFailWithError. Implement this method to observe lifecycle, media output, status, or error events. Parameters srtStreamPusherDidFailWithError (NSError *, error)Swift usage instance.srtStreamPusherDidFailWithError(srtStreamPusherDidFailWithError: nil)
srtStreamPusherDidUpdateStatus:
- (void)srtStreamPusherDidUpdateStatus:(NSString *)status;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for srtStreamPusherDidUpdateStatus. Implement this method to observe lifecycle, media output, status, or error events. Parameters srtStreamPusherDidUpdateStatus (NSString *, status)Swift usage instance.srtStreamPusherDidUpdateStatus(srtStreamPusherDidUpdateStatus: "value")
MXDSRTStreamPusher
Name Declaration Details delegate@property (nonatomic, weak, nullable) id<MXDSRTStreamPusherDelegate> delegate;Receives lifecycle, media output, status, or error callbacks. pushing@property (nonatomic, assign, readonly, getter=isPushing) BOOL pushing;Read-only runtime state flag. transportConfiguration@property (nonatomic, strong, readonly) MXDSRTPlayerConfiguration *transportConfiguration;Public configuration or state exposed by this API. configuration@property (nonatomic, strong, readonly) MXDSRTStreamPusherConfiguration *configuration;Public configuration or state exposed by this API.
initWithConfiguration:
- (instancetype)initWithConfiguration:(MXDSRTPlayerConfiguration *)configuration;
Kind Instance method Return instancetypeDetails Initializes the receiver for initWithConfiguration. Use this to provide required URLs, ports, names, peer connections, or configuration objects. Parameters initWithConfiguration (MXDSRTPlayerConfiguration *, configuration)Swift usage let value = MXDSRTStreamPusher(initWithConfiguration: configuration)
initWithTransportConfiguration:configuration:
- (instancetype)initWithTransportConfiguration:(MXDSRTPlayerConfiguration *)transportConfiguration configuration:(nullable MXDSRTStreamPusherConfiguration *)configuration;
Kind Instance method Return instancetypeDetails Initializes the receiver for initWithTransportConfiguration configuration. Use this to provide required URLs, ports, names, peer connections, or configuration objects. Parameters initWithTransportConfiguration (MXDSRTPlayerConfiguration *, transportConfiguration); configuration (nullable MXDSRTStreamPusherConfiguration *, configuration)Swift usage let value = MXDSRTStreamPusher(initWithTransportConfiguration: 0, configuration: configuration)
start
- (void)start;
Kind Instance method Return voidDetails Starts the component and begins the related capture, server, playback, publish, recording, or discovery workflow. Parameters No parameters. Swift usage instance.start()
stop
- (void)stop;
Kind Instance method Return voidDetails Stops the component and releases or finalizes active workflow resources. Parameters No parameters. Swift usage instance.stop()
appendVideoFrame:presentationTime:
- (void)appendVideoFrame:(CVImageBufferRef)imageBuffer presentationTime:(CMTime)presentationTime;
Kind Instance method Return voidDetails Appends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized. Parameters appendVideoFrame (CVImageBufferRef, imageBuffer); presentationTime (CMTime, presentationTime)Swift usage instance.appendVideoFrame(appendVideoFrame: imageBuffer, presentationTime: 0.0)
appendAudioBuffer:
- (void)appendAudioBuffer:(AVAudioPCMBuffer *)audioBuffer;
Kind Instance method Return voidDetails Appends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized. Parameters appendAudioBuffer (AVAudioPCMBuffer *, audioBuffer)Swift usage instance.appendAudioBuffer(appendAudioBuffer: audioBuffer)
appendAACAccessUnit:sampleRate:channels:objectType:config:
- (void)appendAACAccessUnit:(NSData *)accessUnit sampleRate:(Float64)sampleRate channels:(UInt32)channels objectType:(UInt32)objectType config:(NSData * _Nullable)config;
Kind Instance method Return voidDetails Appends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized. Parameters appendAACAccessUnit (NSData *, accessUnit); sampleRate (Float64, sampleRate); channels (UInt32, channels); objectType (UInt32, objectType); config (NSData * _Nullable, config)Swift usage instance.appendAACAccessUnit(appendAACAccessUnit: data, sampleRate: 0.0, channels: channels, objectType: objectType, config: data)
MXDSRTStreamPusherConfiguration
Name Declaration Details videoWidth@property (nonatomic, assign) NSInteger videoWidth;Video encoding or rendering configuration. videoHeight@property (nonatomic, assign) NSInteger videoHeight;Video encoding or rendering configuration. videoFPS@property (nonatomic, assign) NSInteger videoFPS;Video encoding or rendering configuration. videoCodec@property (nonatomic, assign) MXDSRTStreamPusherVideoCodec videoCodec;Public configuration or state exposed by this API. minVideoBitrateBps@property (nonatomic, assign) NSInteger minVideoBitrateBps;Video encoding or rendering configuration. maxVideoBitrateBps@property (nonatomic, assign) NSInteger maxVideoBitrateBps;Video encoding or rendering configuration. keyframeIntervalSeconds@property (nonatomic, assign) NSTimeInterval keyframeIntervalSeconds;Public configuration or state exposed by this API.
defaultConfiguration
+ (instancetype)defaultConfiguration;
Kind Class method Return instancetypeDetails Creates, discovers, or returns shared information for defaultConfiguration. Call this on the class before creating or configuring an instance. Parameters No parameters. Swift usage let result = MXDSRTStreamPusherConfiguration.defaultConfiguration()
MXDSRTStreamServer.h
SRT listener transport.
MXDSRTStreamServerDelegate Protocol
streamServerDidStartListening:
- (void)streamServerDidStartListening:(MXDSRTStreamServer *)streamServer;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for streamServerDidStartListening. Implement this method to observe lifecycle, media output, status, or error events. Parameters streamServerDidStartListening (MXDSRTStreamServer *, streamServer)Swift usage instance.streamServerDidStartListening(streamServerDidStartListening: streamServer)
streamServerDidAcceptConnection:
- (void)streamServerDidAcceptConnection:(MXDSRTStreamServer *)streamServer;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for streamServerDidAcceptConnection. Implement this method to observe lifecycle, media output, status, or error events. Parameters streamServerDidAcceptConnection (MXDSRTStreamServer *, streamServer)Swift usage instance.streamServerDidAcceptConnection(streamServerDidAcceptConnection: streamServer)
streamServer:didReceiveData:
- (void)streamServer:(MXDSRTStreamServer *)streamServer didReceiveData:(NSData *)data;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for streamServer didReceiveData. Implement this method to observe lifecycle, media output, status, or error events. Parameters streamServer (MXDSRTStreamServer *, streamServer); didReceiveData (NSData *, data)Swift usage instance.streamServer(streamServer: streamServer, didReceiveData: data)
streamServer:didFailWithError:
- (void)streamServer:(MXDSRTStreamServer *)streamServer didFailWithError:(NSError *)error;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for streamServer didFailWithError. Implement this method to observe lifecycle, media output, status, or error events. Parameters streamServer (MXDSRTStreamServer *, streamServer); didFailWithError (NSError *, error)Swift usage instance.streamServer(streamServer: streamServer, didFailWithError: nil)
streamServerDidStop:
- (void)streamServerDidStop:(MXDSRTStreamServer *)streamServer;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for streamServerDidStop. Implement this method to observe lifecycle, media output, status, or error events. Parameters streamServerDidStop (MXDSRTStreamServer *, streamServer)Swift usage instance.streamServerDidStop(streamServerDidStop: streamServer)
MXDSRTStreamServer
Name Declaration Details delegate@property (nonatomic, weak, nullable) id<MXDSRTStreamServerDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
initWithConfiguration:
- (instancetype)initWithConfiguration:(MXDSRTPlayerConfiguration *)configuration;
Kind Instance method Return instancetypeDetails Initializes the receiver for initWithConfiguration. Use this to provide required URLs, ports, names, peer connections, or configuration objects. Parameters initWithConfiguration (MXDSRTPlayerConfiguration *, configuration)Swift usage let value = MXDSRTStreamServer(initWithConfiguration: configuration)
start
- (void)start;
Kind Instance method Return voidDetails Starts the component and begins the related capture, server, playback, publish, recording, or discovery workflow. Parameters No parameters. Swift usage instance.start()
stop
- (void)stop;
Kind Instance method Return voidDetails Stops the component and releases or finalizes active workflow resources. Parameters No parameters. Swift usage instance.stop()
MXDSRTVideoDecoder.h
H.264 and HEVC video decoder for SRT streams.
MXDSRTVideoDecoderDelegate Protocol
videoDecoderDidDecodeSampleBuffer:
- (void)videoDecoderDidDecodeSampleBuffer:(CMSampleBufferRef)sampleBuffer;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for videoDecoderDidDecodeSampleBuffer. Implement this method to observe lifecycle, media output, status, or error events. Parameters videoDecoderDidDecodeSampleBuffer (CMSampleBufferRef, sampleBuffer)Swift usage instance.videoDecoderDidDecodeSampleBuffer(videoDecoderDidDecodeSampleBuffer: sampleBuffer)
videoDecoderDidFailWithError:
- (void)videoDecoderDidFailWithError:(NSError *)error;
Kind Delegate / protocol callback Return voidDetails Callback invoked by MiXiD for videoDecoderDidFailWithError. Implement this method to observe lifecycle, media output, status, or error events. Parameters videoDecoderDidFailWithError (NSError *, error)Swift usage instance.videoDecoderDidFailWithError(videoDecoderDidFailWithError: nil)
MXDSRTVideoDecoder
Name Declaration Details delegate@property (nonatomic, weak, nullable) id<MXDSRTVideoDecoderDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
decodeAccessUnitNALUnits:presentationTimeStamp:
- (void)decodeAccessUnitNALUnits:(NSArray<NSData *> *)nalUnits presentationTimeStamp:(CMTime)presentationTimeStamp;
Kind Instance method Return voidDetails Decodes encoded video access units into sample buffers for rendering or forwarding. Parameters decodeAccessUnitNALUnits (NSArray<NSData *> *, nalUnits); presentationTimeStamp (CMTime, presentationTimeStamp)Swift usage instance.decodeAccessUnitNALUnits(decodeAccessUnitNALUnits: data, presentationTimeStamp: 0.0)
decodeAccessUnitNALUnits:presentationTimeStamp:videoStreamType:
- (void)decodeAccessUnitNALUnits:(NSArray<NSData *> *)nalUnits presentationTimeStamp:(CMTime)presentationTimeStamp videoStreamType:(uint8_t)videoStreamType;
Kind Instance method Return voidDetails Decodes encoded video access units into sample buffers for rendering or forwarding. Parameters decodeAccessUnitNALUnits (NSArray<NSData *> *, nalUnits); presentationTimeStamp (CMTime, presentationTimeStamp); videoStreamType (uint8_t, videoStreamType)Swift usage instance.decodeAccessUnitNALUnits(decodeAccessUnitNALUnits: data, presentationTimeStamp: 0.0, videoStreamType: videoStreamType)
flush
- (void)flush;
Kind Instance method Return voidDetails Clears queued decoder/player state so future media starts from a clean point. Parameters No parameters. Swift usage instance.flush()
Back to API Reference index