IVSCodecDiscovery

Objective-C


@interface IVSCodecDiscovery : NSObject

Swift

class IVSCodecDiscovery : NSObject

The interaction point for discovering codecs for use with the Broadcast and Stage SDKs.

  • Gather all codecs that are supported by the SDK for RTMP Broadcast. Each codec will be associated with either an IVSVideoConfiguration if the codec is supported, or an NSError if the codec is not supported. Codec availability depends on the IVSVideoConfiguration provided, your AWS Customer ID, and the available encoders on your device. Regardless of if a codec is supported, a IVSCodecDiscoveryResult will be returned for it.

    Certain encoders will support some dimensions but not others, so it is required that an IVSVideoConfiguration is provided to this API. A codec will be considered incompatible if the dimensions or frame rate isn’t supported. Things like B-frame support, keyframe interval, and bitrate may be changed to provide compatibility, and those changes will be reflected in the configuration property of each IVSCodecDiscoveryResult.

    H.264 will always be returned with a configuration identical to the configuration provided. All other codecs are subject to configuration changes.

    In order to use the discovered codec, the IVSVideoConfiguration on the IVSCodecDiscoveryResult must be used, you can not manually assign a non H.264 codec to an IVSVideoConfiguration instance. If you only plan on using H.264, it is not necessary to use this API, the default IVSVideoConfiguration initializer will use H.264 by default.

    Warning

    This API is in beta and may change in the future.

    Declaration

    Objective-C

    - (void)
        gatherAvailableCodecsForCustomerID:(nonnull NSString *)customerID
                        videoConfiguration:
                            (nonnull IVSVideoConfiguration *)videoConfiguration
                           resultsCallback:
                               (nonnull void (^)(NSArray<IVSCodecDiscoveryResult *>
                                                     *_Nonnull))resultsCallback;

    Swift

    func gatherAvailableCodecs(forCustomerID customerID: String, videoConfiguration: IVSVideoConfiguration, resultsCallback: @escaping ([IVSCodecDiscovery.Result]) -> Void)