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
IVSVideoConfigurationif the codec is supported, or anNSErrorif the codec is not supported. Codec availability depends on theIVSVideoConfigurationprovided, your AWS Customer ID, and the available encoders on your device. Regardless of if a codec is supported, aIVSCodecDiscoveryResultwill be returned for it.Certain encoders will support some dimensions but not others, so it is required that an
IVSVideoConfigurationis 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 theconfigurationproperty of eachIVSCodecDiscoveryResult.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
IVSVideoConfigurationon theIVSCodecDiscoveryResultmust be used, you can not manually assign a non H.264 codec to anIVSVideoConfigurationinstance. If you only plan on using H.264, it is not necessary to use this API, the defaultIVSVideoConfigurationinitializer 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)