MiXiD API Reference: HLS

Back to MiXiD API Documentation

Detailed MiXiD XCFramework reference for HLS. Read through each header, class, protocol, and function section to inspect Objective-C declarations, parameters, return values, and usage guidance.

HLS Publishing Examples

Use MXDHLSStreamPusher to publish a live HLS playlist and MPEG-TS segments to an HTTP endpoint or a local file URL.

Swift

final class HLSPublisher: NSObject, MXDHLSStreamPusherDelegate {
    private let pusher: MXDHLSStreamPusher

    init(publishingURL: URL) {
        let config = MXDHLSStreamPusherConfiguration.default()
        config.videoWidth = 1920
        config.videoHeight = 1080
        config.videoFPS = 30
        config.videoCodec = .h264
        config.minVideoBitrateBps = 3_000_000
        config.maxVideoBitrateBps = 5_000_000
        config.segmentDurationSeconds = 2
        config.playlistWindowSize = 6
        config.playlistFileName = "live.m3u8"
        config.segmentFileNamePrefix = "segment"
        config.uploadHTTPMethod = "PUT"

        self.pusher = MXDHLSStreamPusher(publishingURL: publishingURL, 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 hlsStreamPusherDidConnect() {
        print("HLS publishing started")
    }

    func hlsStreamPusherDidFailWithError(_ error: Error) {
        print("HLS failed: \(error)")
    }
}

Objective-C

@interface HLSPublisher : NSObject <MXDHLSStreamPusherDelegate>
@property (nonatomic, strong) MXDHLSStreamPusher *pusher;
@end

@implementation HLSPublisher

- (instancetype)initWithPublishingURL:(NSURL *)publishingURL {
    self = [super init];
    if (!self) { return nil; }

    MXDHLSStreamPusherConfiguration *config = [MXDHLSStreamPusherConfiguration defaultConfiguration];
    config.videoWidth = 1920;
    config.videoHeight = 1080;
    config.videoFPS = 30;
    config.videoCodec = MXDHLSVideoCodecH264;
    config.minVideoBitrateBps = 3000000;
    config.maxVideoBitrateBps = 5000000;
    config.segmentDurationSeconds = 2;
    config.playlistWindowSize = 6;
    config.playlistFileName = @"live.m3u8";
    config.segmentFileNamePrefix = @"segment";
    config.uploadHTTPMethod = @"PUT";

    _pusher = [[MXDHLSStreamPusher alloc] initWithPublishingURL:publishingURL 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)hlsStreamPusherDidConnect { NSLog(@"HLS publishing started"); }
- (void)hlsStreamPusherDidFailWithError:(NSError *)error { NSLog(@"HLS failed: %@", error); }

@end

HLS

HLS

MXDHLSAnnexBParser.h

Annex B H.264 parser for HLS streams.

MXDHLSAnnexBParser

appendDataAndExtractNALUnits:
- (NSArray<NSData *> *)appendDataAndExtractNALUnits:(NSData *)data;
KindInstance method
ReturnNSArray<NSData *> *
DetailsAppends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized.
ParametersappendDataAndExtractNALUnits (NSData *, data)
Swift usagelet result = instance.appendDataAndExtractNALUnits(appendDataAndExtractNALUnits: data)
reset
- (void)reset;
KindInstance method
Returnvoid
DetailsResets parser or demuxer state before processing a new stream or segment.
ParametersNo parameters.
Swift usageinstance.reset()

MXDHLSAudioPlayer.h

AAC audio renderer for HLS playback.

MXDHLSAudioPlayerDelegate Protocol

audioPlayer:didFailWithError:
- (void)audioPlayer:(MXDHLSAudioPlayer *)audioPlayer didFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for audioPlayer didFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParametersaudioPlayer (MXDHLSAudioPlayer *, audioPlayer); didFailWithError (NSError *, error)
Swift usageinstance.audioPlayer(audioPlayer: audioPlayer, didFailWithError: nil)

MXDHLSAudioPlayer

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDHLSAudioPlayerDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
muted@property (nonatomic, assign, getter=isMuted) BOOL muted;Audio routing, mute, level, or gain configuration.
minimumPCMPrerollChunks@property (nonatomic, assign) NSUInteger minimumPCMPrerollChunks;Public configuration or state exposed by this API.
enqueueADTSData:presentationTimeStamp:
- (void)enqueueADTSData:(NSData *)data presentationTimeStamp:(CMTime)presentationTimeStamp;
KindInstance method
Returnvoid
DetailsQueues encoded audio data for playback. Call in timestamp order for stable audio scheduling.
ParametersenqueueADTSData (NSData *, data); presentationTimeStamp (CMTime, presentationTimeStamp)
Swift usageinstance.enqueueADTSData(enqueueADTSData: data, presentationTimeStamp: 0.0)
finishEnqueuedSegment
- (void)finishEnqueuedSegment;
KindInstance method
Returnvoid
DetailsPerforms the finishEnqueuedSegment operation on this MiXiD component.
ParametersNo parameters.
Swift usageinstance.finishEnqueuedSegment()
flush
- (void)flush;
KindInstance method
Returnvoid
DetailsClears queued decoder/player state so future media starts from a clean point.
ParametersNo parameters.
Swift usageinstance.flush()

MXDHLSMPEGTSDemuxer.h

MPEG-TS demuxer for HLS payloads.

MXDHLSMPEGTSDemuxer

appendDataAndExtractPackets:
- (NSArray<MXDHLSMPEGTSStreamPacket *> *)appendDataAndExtractPackets:(NSData *)data;
KindInstance method
ReturnNSArray<MXDHLSMPEGTSStreamPacket *> *
DetailsAppends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized.
ParametersappendDataAndExtractPackets (NSData *, data)
Swift usagelet result = instance.appendDataAndExtractPackets(appendDataAndExtractPackets: data)
reset
- (void)reset;
KindInstance method
Returnvoid
DetailsResets parser or demuxer state before processing a new stream or segment.
ParametersNo parameters.
Swift usageinstance.reset()

MXDHLSMPEGTSStreamPacket.h

Elementary stream packet model.

Enums

MXDHLSMPEGTSStreamKind

  • MXDHLSMPEGTSStreamKindVideo = 0
  • MXDHLSMPEGTSStreamKindAudio = 1

MXDHLSMPEGTSStreamPacket

NameDeclarationDetails
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) MXDHLSMPEGTSStreamKind 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:(MXDHLSMPEGTSStreamKind)streamKind streamType:(uint8_t)streamType;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithPayload presentationTimeStamp streamKind streamType. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithPayload (NSData *, payload); presentationTimeStamp (CMTime, presentationTimeStamp); streamKind (MXDHLSMPEGTSStreamKind, streamKind); streamType (uint8_t, streamType)
Swift usagelet value = MXDHLSMPEGTSStreamPacket(initWithPayload: data, presentationTimeStamp: 0.0, streamKind: streamKind, streamType: streamType)

MXDHLSPlayerView.h

HLS playback source component.

Enums

MXDHLSPlayerState

  • HLSPlayerStateIdle = 0
  • HLSPlayerStateLoading
  • HLSPlayerStatePlaying
  • HLSPlayerStatePaused
  • HLSPlayerStateStopped
  • HLSPlayerStateError

MXDHLSPlayerViewDelegate Protocol

hlsPlayerView:didChangeState:
- (void)hlsPlayerView:(MXDHLSPlayerView *)playerView didChangeState:(MXDHLSPlayerState)state;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsPlayerView didChangeState. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsPlayerView (MXDHLSPlayerView *, playerView); didChangeState (MXDHLSPlayerState, state)
Swift usageinstance.hlsPlayerView(hlsPlayerView: playerView, didChangeState: state)
hlsPlayerView:didFailWithError:
- (void)hlsPlayerView:(MXDHLSPlayerView *)playerView didFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsPlayerView didFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsPlayerView (MXDHLSPlayerView *, playerView); didFailWithError (NSError *, error)
Swift usageinstance.hlsPlayerView(hlsPlayerView: playerView, didFailWithError: nil)

MXDHLSPlayerViewOutputDelegate Protocol

hlsPlayerView:didOutputVideoFrame:presentationTime:
- (void)hlsPlayerView:(MXDHLSPlayerView *)playerView didOutputVideoFrame:(CVImageBufferRef)imageBuffer presentationTime:(CMTime)presentationTime;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsPlayerView didOutputVideoFrame presentationTime. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsPlayerView (MXDHLSPlayerView *, playerView); didOutputVideoFrame (CVImageBufferRef, imageBuffer); presentationTime (CMTime, presentationTime)
Swift usageinstance.hlsPlayerView(hlsPlayerView: playerView, didOutputVideoFrame: imageBuffer, presentationTime: 0.0)
hlsPlayerView:didOutputAACAccessUnit:sampleRate:channels:objectType:config:
- (void)hlsPlayerView:(MXDHLSPlayerView *)playerView didOutputAACAccessUnit:(NSData *)accessUnit sampleRate:(Float64)sampleRate channels:(UInt32)channels objectType:(UInt32)objectType config:(NSData *)config;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsPlayerView didOutputAACAccessUnit sampleRate channels objectType config. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsPlayerView (MXDHLSPlayerView *, playerView); didOutputAACAccessUnit (NSData *, accessUnit); sampleRate (Float64, sampleRate); channels (UInt32, channels); objectType (UInt32, objectType); config (NSData *, config)
Swift usageinstance.hlsPlayerView(hlsPlayerView: playerView, didOutputAACAccessUnit: data, sampleRate: 0.0, channels: channels, objectType: objectType, config: data)

MXDHLSPlayerView

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDHLSPlayerViewDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
outputDelegate@property (nonatomic, weak, nullable) id<MXDHLSPlayerViewOutputDelegate> outputDelegate;Receives lifecycle, media output, status, or error callbacks.
streamURL@property (nonatomic, copy, nullable, readonly) NSURL *streamURL;Endpoint or file URL used by the component.
state@property (nonatomic, assign, readonly) MXDHLSPlayerState state;Public configuration or state exposed by this API.
muted@property (nonatomic, assign, getter=isMuted) BOOL muted;Audio routing, mute, level, or gain configuration.
slotIndex@property (nonatomic, assign) NSInteger slotIndex;Public configuration or state exposed by this API.
audioPrerollChunkCount@property (nonatomic, assign) NSUInteger audioPrerollChunkCount;Audio routing, mute, level, or gain configuration.
init
- (instancetype)init;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for init. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersNo parameters.
Swift usagelet value = MXDHLSPlayerView()
initWithStreamURL:
- (instancetype)initWithStreamURL:(NSURL *)streamURL;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithStreamURL. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithStreamURL (NSURL *, streamURL)
Swift usagelet value = MXDHLSPlayerView(initWithStreamURL: url)
setStreamURL:autoplay:
- (void)setStreamURL:(nullable NSURL *)streamURL autoplay:(BOOL)autoplay;
KindInstance method
Returnvoid
DetailsUpdates configuration on an existing object. Some changes apply immediately; transport or stream changes may reconnect or reload internal resources.
ParameterssetStreamURL (nullable NSURL *, streamURL); autoplay (BOOL, autoplay)
Swift usageinstance.setStreamURL(setStreamURL: url, autoplay: true)
play
- (void)play;
KindInstance method
Returnvoid
DetailsBegins or resumes playback/rendering for the configured media source.
ParametersNo parameters.
Swift usageinstance.play()
pause
- (void)pause;
KindInstance method
Returnvoid
DetailsPauses playback while keeping the object available for a later resume.
ParametersNo parameters.
Swift usageinstance.pause()
stop
- (void)stop;
KindInstance method
Returnvoid
DetailsStops the component and releases or finalizes active workflow resources.
ParametersNo parameters.
Swift usageinstance.stop()
appendMPEGTSData:
- (void)appendMPEGTSData:(NSData *)data;
KindInstance method
Returnvoid
DetailsAppends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized.
ParametersappendMPEGTSData (NSData *, data)
Swift usageinstance.appendMPEGTSData(appendMPEGTSData: data)

MXDHLSServerView.h

HLS ingest source component.

Enums

MXDHLSServerViewState

  • HLSServerViewStateIdle = 0
  • HLSServerViewStateListening
  • HLSServerViewStateReceiving
  • HLSServerViewStateStopped
  • HLSServerViewStateError

MXDHLSServerViewDelegate Protocol

hlsServerView:didChangeState:
- (void)hlsServerView:(MXDHLSServerView *)serverView didChangeState:(MXDHLSServerViewState)state;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsServerView didChangeState. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsServerView (MXDHLSServerView *, serverView); didChangeState (MXDHLSServerViewState, state)
Swift usageinstance.hlsServerView(hlsServerView: serverView, didChangeState: state)
hlsServerView:didFailWithError:
- (void)hlsServerView:(MXDHLSServerView *)serverView didFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsServerView didFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsServerView (MXDHLSServerView *, serverView); didFailWithError (NSError *, error)
Swift usageinstance.hlsServerView(hlsServerView: serverView, didFailWithError: nil)
hlsServerViewDidStartNewSession:
- (void)hlsServerViewDidStartNewSession:(MXDHLSServerView *)serverView;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsServerViewDidStartNewSession. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsServerViewDidStartNewSession (MXDHLSServerView *, serverView)
Swift usageinstance.hlsServerViewDidStartNewSession(hlsServerViewDidStartNewSession: serverView)

MXDHLSServerViewOutputDelegate Protocol

hlsServerView:didOutputVideoFrame:presentationTime:
- (void)hlsServerView:(MXDHLSServerView *)serverView didOutputVideoFrame:(CVImageBufferRef)imageBuffer presentationTime:(CMTime)presentationTime;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsServerView didOutputVideoFrame presentationTime. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsServerView (MXDHLSServerView *, serverView); didOutputVideoFrame (CVImageBufferRef, imageBuffer); presentationTime (CMTime, presentationTime)
Swift usageinstance.hlsServerView(hlsServerView: serverView, didOutputVideoFrame: imageBuffer, presentationTime: 0.0)
hlsServerView:didOutputAACAccessUnit:sampleRate:channels:objectType:config:
- (void)hlsServerView:(MXDHLSServerView *)serverView didOutputAACAccessUnit:(NSData *)accessUnit sampleRate:(Float64)sampleRate channels:(UInt32)channels objectType:(UInt32)objectType config:(NSData *)config;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsServerView didOutputAACAccessUnit sampleRate channels objectType config. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsServerView (MXDHLSServerView *, serverView); didOutputAACAccessUnit (NSData *, accessUnit); sampleRate (Float64, sampleRate); channels (UInt32, channels); objectType (UInt32, objectType); config (NSData *, config)
Swift usageinstance.hlsServerView(hlsServerView: serverView, didOutputAACAccessUnit: data, sampleRate: 0.0, channels: channels, objectType: objectType, config: data)

MXDHLSServerView

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDHLSServerViewDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
outputDelegate@property (nonatomic, weak, nullable) id<MXDHLSServerViewOutputDelegate> outputDelegate;Receives lifecycle, media output, status, or error callbacks.
serverURL@property (nonatomic, copy, nullable, readonly) NSURL *serverURL;Endpoint or file URL used by the component.
state@property (nonatomic, assign, readonly) MXDHLSServerViewState state;Public configuration or state exposed by this API.
muted@property (nonatomic, assign, getter=isMuted) BOOL muted;Audio routing, mute, level, or gain configuration.
slotIndex@property (nonatomic, assign) NSInteger slotIndex;Public configuration or state exposed by this API.
init
- (instancetype)init;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for init. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersNo parameters.
Swift usagelet value = MXDHLSServerView()
initWithServerURL:
- (instancetype)initWithServerURL:(NSURL *)serverURL;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithServerURL. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithServerURL (NSURL *, serverURL)
Swift usagelet value = MXDHLSServerView(initWithServerURL: url)
setServerURL:autoplay:
- (void)setServerURL:(nullable NSURL *)serverURL autoplay:(BOOL)autoplay;
KindInstance method
Returnvoid
DetailsUpdates configuration on an existing object. Some changes apply immediately; transport or stream changes may reconnect or reload internal resources.
ParameterssetServerURL (nullable NSURL *, serverURL); autoplay (BOOL, autoplay)
Swift usageinstance.setServerURL(setServerURL: url, autoplay: true)
play
- (void)play;
KindInstance method
Returnvoid
DetailsBegins or resumes playback/rendering for the configured media source.
ParametersNo parameters.
Swift usageinstance.play()
stop
- (void)stop;
KindInstance method
Returnvoid
DetailsStops the component and releases or finalizes active workflow resources.
ParametersNo parameters.
Swift usageinstance.stop()

MXDHLSStreamPusher.h

HLS publishing component.

Enums

MXDHLSVideoCodec

  • MXDHLSVideoCodecH264 = 0
  • MXDHLSVideoCodecHEVC = 1

MXDHLSStreamPusherDelegate Protocol

hlsStreamPusherDidConnect
- (void)hlsStreamPusherDidConnect;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsStreamPusherDidConnect. Implement this method to observe lifecycle, media output, status, or error events.
ParametersNo parameters.
Swift usageinstance.hlsStreamPusherDidConnect()
hlsStreamPusherDidStop
- (void)hlsStreamPusherDidStop;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsStreamPusherDidStop. Implement this method to observe lifecycle, media output, status, or error events.
ParametersNo parameters.
Swift usageinstance.hlsStreamPusherDidStop()
hlsStreamPusherDidFailWithError:
- (void)hlsStreamPusherDidFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsStreamPusherDidFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsStreamPusherDidFailWithError (NSError *, error)
Swift usageinstance.hlsStreamPusherDidFailWithError(hlsStreamPusherDidFailWithError: nil)
hlsStreamPusherDidUpdateStatus:
- (void)hlsStreamPusherDidUpdateStatus:(NSString *)status;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsStreamPusherDidUpdateStatus. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsStreamPusherDidUpdateStatus (NSString *, status)
Swift usageinstance.hlsStreamPusherDidUpdateStatus(hlsStreamPusherDidUpdateStatus: "value")

MXDHLSStreamPusher

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDHLSStreamPusherDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
pushing@property (nonatomic, assign, readonly, getter=isPushing) BOOL pushing;Read-only runtime state flag.
publishingURL@property (nonatomic, strong, readonly) NSURL *publishingURL;Endpoint or file URL used by the component.
configuration@property (nonatomic, strong, readonly) MXDHLSStreamPusherConfiguration *configuration;Public configuration or state exposed by this API.
initWithPublishingURL:
- (instancetype)initWithPublishingURL:(NSURL *)publishingURL;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithPublishingURL. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithPublishingURL (NSURL *, publishingURL)
Swift usagelet value = MXDHLSStreamPusher(initWithPublishingURL: url)
initWithPublishingURL:configuration:
- (instancetype)initWithPublishingURL:(NSURL *)publishingURL configuration:(nullable MXDHLSStreamPusherConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithPublishingURL configuration. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithPublishingURL (NSURL *, publishingURL); configuration (nullable MXDHLSStreamPusherConfiguration *, configuration)
Swift usagelet value = MXDHLSStreamPusher(initWithPublishingURL: url, configuration: configuration)
start
- (void)start;
KindInstance method
Returnvoid
DetailsStarts the component and begins the related capture, server, playback, publish, recording, or discovery workflow.
ParametersNo parameters.
Swift usageinstance.start()
stop
- (void)stop;
KindInstance method
Returnvoid
DetailsStops the component and releases or finalizes active workflow resources.
ParametersNo parameters.
Swift usageinstance.stop()
appendVideoFrame:presentationTime:
- (void)appendVideoFrame:(CVImageBufferRef)imageBuffer presentationTime:(CMTime)presentationTime;
KindInstance method
Returnvoid
DetailsAppends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized.
ParametersappendVideoFrame (CVImageBufferRef, imageBuffer); presentationTime (CMTime, presentationTime)
Swift usageinstance.appendVideoFrame(appendVideoFrame: imageBuffer, presentationTime: 0.0)
appendAudioBuffer:
- (void)appendAudioBuffer:(AVAudioPCMBuffer *)audioBuffer;
KindInstance method
Returnvoid
DetailsAppends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized.
ParametersappendAudioBuffer (AVAudioPCMBuffer *, audioBuffer)
Swift usageinstance.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;
KindInstance method
Returnvoid
DetailsAppends media into the component. Use presentation timestamps and matching stream configuration so downstream encoders, mixers, or recorders stay synchronized.
ParametersappendAACAccessUnit (NSData *, accessUnit); sampleRate (Float64, sampleRate); channels (UInt32, channels); objectType (UInt32, objectType); config (NSData * _Nullable, config)
Swift usageinstance.appendAACAccessUnit(appendAACAccessUnit: data, sampleRate: 0.0, channels: channels, objectType: objectType, config: data)

MXDHLSStreamPusherConfiguration

NameDeclarationDetails
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) MXDHLSVideoCodec 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.
segmentDurationSeconds@property (nonatomic, assign) NSTimeInterval segmentDurationSeconds;Public configuration or state exposed by this API.
playlistWindowSize@property (nonatomic, assign) NSUInteger playlistWindowSize;Public configuration or state exposed by this API.
playlistFileName@property (nonatomic, copy) NSString *playlistFileName;Public configuration or state exposed by this API.
segmentFileNamePrefix@property (nonatomic, copy) NSString *segmentFileNamePrefix;Public configuration or state exposed by this API.
uploadHTTPMethod@property (nonatomic, copy) NSString *uploadHTTPMethod;Public configuration or state exposed by this API.
uploadTimeoutSeconds@property (nonatomic, assign) NSTimeInterval uploadTimeoutSeconds;Network transport reliability and buffering configuration.
defaultConfiguration
+ (instancetype)defaultConfiguration;
KindClass method
Returninstancetype
DetailsCreates, discovers, or returns shared information for defaultConfiguration. Call this on the class before creating or configuring an instance.
ParametersNo parameters.
Swift usagelet result = MXDHLSStreamPusherConfiguration.defaultConfiguration()

MXDHLSStreamServer.h

Lightweight HTTP HLS ingest server.

MXDHLSStreamServerDelegate Protocol

hlsStreamServerDidStart:
- (void)hlsStreamServerDidStart:(MXDHLSStreamServer *)server;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsStreamServerDidStart. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsStreamServerDidStart (MXDHLSStreamServer *, server)
Swift usageinstance.hlsStreamServerDidStart(hlsStreamServerDidStart: server)
hlsStreamServer:didStopWithError:
- (void)hlsStreamServer:(MXDHLSStreamServer *)server didStopWithError:(nullable NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsStreamServer didStopWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsStreamServer (MXDHLSStreamServer *, server); didStopWithError (nullable NSError *, error)
Swift usageinstance.hlsStreamServer(hlsStreamServer: server, didStopWithError: nil)
hlsStreamServer:didReceivePlaylistAtPath:
- (void)hlsStreamServer:(MXDHLSStreamServer *)server didReceivePlaylistAtPath:(NSString *)path;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsStreamServer didReceivePlaylistAtPath. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsStreamServer (MXDHLSStreamServer *, server); didReceivePlaylistAtPath (NSString *, path)
Swift usageinstance.hlsStreamServer(hlsStreamServer: server, didReceivePlaylistAtPath: "value")
hlsStreamServer:didFailWithError:
- (void)hlsStreamServer:(MXDHLSStreamServer *)server didFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for hlsStreamServer didFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParametershlsStreamServer (MXDHLSStreamServer *, server); didFailWithError (NSError *, error)
Swift usageinstance.hlsStreamServer(hlsStreamServer: server, didFailWithError: nil)

MXDHLSStreamServer

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDHLSStreamServerDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
serverURL@property (nonatomic, strong, readonly) NSURL *serverURL;Endpoint or file URL used by the component.
port@property (nonatomic, readonly) uint16_t port;Public configuration or state exposed by this API.
running@property (nonatomic, readonly, getter=isRunning) BOOL running;Read-only runtime state flag.
playlistPath@property (nonatomic, copy, readonly) NSString *playlistPath;Public configuration or state exposed by this API.
initWithServerURL:
- (instancetype)initWithServerURL:(NSURL *)serverURL NS_DESIGNATED_INITIALIZER;
KindInstance method
Returninstancetype
DetailsInitializes the receiver for initWithServerURL. Use this to provide required URLs, ports, names, peer connections, or configuration objects.
ParametersinitWithServerURL (NSURL *, serverURL)
Swift usagelet value = MXDHLSStreamServer(initWithServerURL: url)
start:
- (BOOL)start:(NSError * _Nullable * _Nullable)error;
KindInstance method
ReturnBOOL
DetailsPerforms the start operation on this MiXiD component.
Parametersstart (NSError * _Nullable * _Nullable, error)
Swift usagelet result = instance.start(start: nil)
stop
- (void)stop;
KindInstance method
Returnvoid
DetailsStops the component and releases or finalizes active workflow resources.
ParametersNo parameters.
Swift usageinstance.stop()
localURLForPath:
- (nullable NSURL *)localURLForPath:(NSString *)path;
KindInstance method
Returnnullable NSURL *
DetailsReturns derived state, buffered data, preview information, or available source metadata from the component.
ParameterslocalURLForPath (NSString *, path)
Swift usagelet result = instance.localURLForPath(localURLForPath: "value")
storedDataForPath:
- (nullable NSData *)storedDataForPath:(NSString *)path;
KindInstance method
Returnnullable NSData *
DetailsReturns derived state, buffered data, preview information, or available source metadata from the component.
ParametersstoredDataForPath (NSString *, path)
Swift usagelet result = instance.storedDataForPath(storedDataForPath: "value")

MXDHLSVideoDecoder.h

H.264 and HEVC video decoder for HLS streams.

MXDHLSVideoDecoderDelegate Protocol

videoDecoderDidDecodeSampleBuffer:
- (void)videoDecoderDidDecodeSampleBuffer:(CMSampleBufferRef)sampleBuffer;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for videoDecoderDidDecodeSampleBuffer. Implement this method to observe lifecycle, media output, status, or error events.
ParametersvideoDecoderDidDecodeSampleBuffer (CMSampleBufferRef, sampleBuffer)
Swift usageinstance.videoDecoderDidDecodeSampleBuffer(videoDecoderDidDecodeSampleBuffer: sampleBuffer)
videoDecoderDidFailWithError:
- (void)videoDecoderDidFailWithError:(NSError *)error;
KindDelegate / protocol callback
Returnvoid
DetailsCallback invoked by MiXiD for videoDecoderDidFailWithError. Implement this method to observe lifecycle, media output, status, or error events.
ParametersvideoDecoderDidFailWithError (NSError *, error)
Swift usageinstance.videoDecoderDidFailWithError(videoDecoderDidFailWithError: nil)

MXDHLSVideoDecoder

NameDeclarationDetails
delegate@property (nonatomic, weak, nullable) id<MXDHLSVideoDecoderDelegate> delegate;Receives lifecycle, media output, status, or error callbacks.
decodeAccessUnitNALUnits:presentationTimeStamp:
- (void)decodeAccessUnitNALUnits:(NSArray<NSData *> *)nalUnits presentationTimeStamp:(CMTime)presentationTimeStamp;
KindInstance method
Returnvoid
DetailsDecodes encoded video access units into sample buffers for rendering or forwarding.
ParametersdecodeAccessUnitNALUnits (NSArray<NSData *> *, nalUnits); presentationTimeStamp (CMTime, presentationTimeStamp)
Swift usageinstance.decodeAccessUnitNALUnits(decodeAccessUnitNALUnits: data, presentationTimeStamp: 0.0)
decodeAccessUnitNALUnits:presentationTimeStamp:videoStreamType:
- (void)decodeAccessUnitNALUnits:(NSArray<NSData *> *)nalUnits presentationTimeStamp:(CMTime)presentationTimeStamp videoStreamType:(uint8_t)videoStreamType;
KindInstance method
Returnvoid
DetailsDecodes encoded video access units into sample buffers for rendering or forwarding.
ParametersdecodeAccessUnitNALUnits (NSArray<NSData *> *, nalUnits); presentationTimeStamp (CMTime, presentationTimeStamp); videoStreamType (uint8_t, videoStreamType)
Swift usageinstance.decodeAccessUnitNALUnits(decodeAccessUnitNALUnits: data, presentationTimeStamp: 0.0, videoStreamType: videoStreamType)
flush
- (void)flush;
KindInstance method
Returnvoid
DetailsClears queued decoder/player state so future media starts from a clean point.
ParametersNo parameters.
Swift usageinstance.flush()
reset
- (void)reset;
KindInstance method
Returnvoid
DetailsResets parser or demuxer state before processing a new stream or segment.
ParametersNo parameters.
Swift usageinstance.reset()

Back to API Reference index