HEVCEncoder
public class HEVCEncoder : NSObject
H.265/HEVC用のエンコーダークラス。
-
エンコード時のキーフレーム間隔のデフォルト値( 5秒 )。
Declaration
Swift
public static let DEFAULT_KEY_FRAME_INTERVAL_TIME: Int -
このエンコーダーがエンコード時に付与するスタートコード(
0 0 0 1)。Declaration
Swift
public static let START_CODE: [UInt8] -
オブジェクトを識別するためのタグ。
Declaration
Swift
public var tag: Int -
このクラスが使用する Delegate。
Declaration
Swift
public weak var delegate: HEVCEncoderDelegate? -
画像の幅。
Declaration
Swift
public private(set) var videoWidth: Int { get } -
画像の高さ。
Declaration
Swift
public private(set) var videoHeigh: Int { get } -
フレームレート。
Declaration
Swift
public private(set) var frameRate: Int { get } -
リアルタイム処理フラグ。
Declaration
Swift
public private(set) var isRealTime: Bool { get } -
画質。
Declaration
Swift
public private(set) var encodeQuality: IntdashVideoEncodeQuality { get } -
ビットレート。
Declaration
Swift
public private(set) var bitRate: Int { get } -
固定ビットレートアルゴリズムの利用フラグ(H.264、HEVCの場合のみ有効)。
iOS16、またはmacOS13以降から利用可能
Declaration
Swift
public private(set) var useConstantBitRateAlgorithm: Bool { get } -
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int)Parameters
frameRateフレームレート。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, encodeQuality: IntdashVideoEncodeQuality)Parameters
frameRateフレームレート。
encodeQuality画質。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, bitRate: Int)Parameters
frameRateフレームレート。
bitRateビットレート。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, bitRate: Int, useConstantBitRateAlgorithm: Bool)Parameters
frameRateフレームレート。
bitRateビットレート。
useConstantBitRateAlgorithmビットレート固定化アルゴリズムを利用するかどうか。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, isRealTime: Bool)Parameters
frameRateフレームレート。
isRealTimeリアルタイム処理フラグ。 エンコーダーをエンコード処理がリアルタイムに行われるように設定します。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, isRealTime: Bool, encodeQuality: IntdashVideoEncodeQuality)Parameters
frameRateフレームレート。
isRealTimeリアルタイム処理フラグ。 エンコーダーをエンコード処理がリアルタイムに行われるように設定します。
encodeQuality画質
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, isRealTime: Bool, bitRate: Int)Parameters
frameRateフレームレート。
isRealTimeリアルタイム処理フラグ 。 エンコーダーをエンコード処理がリアルタイムに行われるように設定します。
bitRateビットレート。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, isRealTime: Bool, bitRate: Int, useConstantBitRateAlgorithm: Bool)Parameters
frameRateフレームレート。
isRealTimeリアルタイム処理フラグ。 エンコーダーをエンコード処理がリアルタイムに行われるように設定します。
bitRateビットレート。
useConstantBitRateAlgorithmビットレート固定化アルゴリズムを利用するかどうか。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, keyFrameIntervalTime: Int)Parameters
frameRateフレームレート。
keyFrameIntervalTimeキーフレーム間隔。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, keyFrameIntervalTime: Int, encodeQuality: IntdashVideoEncodeQuality)Parameters
frameRateフレームレート。
keyFrameIntervalTimeキーフレーム間隔。
encodeQuality画質。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, keyFrameIntervalTime: Int, bitRate: Int)Parameters
frameRateフレームレート。
keyFrameIntervalTimeキーフレーム間隔。
bitRateビットレート。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, keyFrameIntervalTime: Int, bitRate: Int, useConstantBitRateAlgorithm: Bool)Parameters
frameRateフレームレート。
keyFrameIntervalTimeキーフレーム間隔。
bitRateビットレート。
useConstantBitRateAlgorithmビットレート固定化アルゴリズムを利用するかどうか。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, keyFrameIntervalTime: Int, isRealTime: Bool)Parameters
frameRateフレームレート。
keyFrameIntervalTimeキーフレーム間隔。
isRealTimeリアルタイム処理フラグ 。 エンコーダーをエンコード処理がリアルタイムに行われるように設定します。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, keyFrameIntervalTime: Int, isRealTime: Bool, encodeQuality: IntdashVideoEncodeQuality)Parameters
frameRateフレームレート。
keyFrameIntervalTimeキーフレーム間隔。
isRealTimeリアルタイム処理フラグ。 エンコーダーをエンコード処理がリアルタイムに行われるように設定します。
encodeQuality画質。
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, keyFrameIntervalTime: Int, isRealTime: Bool, bitRate: Int)Parameters
frameRateフレームレート。
keyFrameIntervalTimeキーフレーム間隔。
isRealTimeリアルタイム処理フラグ 。 エンコーダーをエンコード処理がリアルタイムに行われるように設定します。
bitRateビットレート
-
HEVCEncoder を生成します。
Declaration
Swift
public init(frameRate: Int, keyFrameIntervalTime: Int, isRealTime: Bool, bitRate: Int, useConstantBitRateAlgorithm: Bool)Parameters
frameRateフレームレート。
keyFrameIntervalTimeキーフレーム間隔。
isRealTimeリアルタイム処理フラグ。 エンコーダーをエンコード処理がリアルタイムに行われるように設定します。
bitRateビットレート。
useConstantBitRateAlgorithmビットレート固定化アルゴリズムを利用するかどうか。
-
エンコードしたい映像データを追加します。
Declaration
Swift
public func appendSampleBuffer(sampleBuffer: CMSampleBuffer, timestamp: TimeInterval = -1)Parameters
sampleBuffer画像サンプルバッファー
timestampタイムスタンプ
-
ビットレートを設定します。
Declaration
Swift
public func set(bitRate: Int)Parameters
bitRateビットレート
-
画質を設定します。
Declaration
Swift
public func set(encodeQuality: IntdashVideoEncodeQuality)Parameters
encodeQuality画質
-
割り当てを解除します。
Declaration
Swift
public func dispose()
HEVCEncoder Class Reference