         }
     }
     
+    /// 映像フレームの高さ
     public var height: Int {
         get {
             switch self {

import CoreMedia
import WebRTC

public enum VideoFrame {
    
    public init?(from sampleBuffer: CMSampleBuffer) {
        guard let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else {
            return nil
        }
        let timeStamp = CMTimeGetSeconds(CMSampleBufferGetPresentationTimeStamp(sampleBuffer))
        let timeStampNs = Int64(timeStamp * 1_000_000_000)
        let frame = RTCVideoFrame(pixelBuffer: pixelBuffer, rotation: RTCVideoRotation._0, timeStampNs: timeStampNs)
        self = .native(capturer: nil, frame: frame)
    }
    
    case native(capturer: RTCVideoCapturer?, frame: RTCVideoFrame)
    case snapshot(Snapshot)
    
    public var width: Int {
        get {
            switch self {

        }
    }

    
    // MARK: - 初期化
    
    /**
     初期化します。
     指定されたサンプルバッファーからピクセル画像データを取得できなければ
     `nil` を返します。
     
     - parameter sampleBuffer: ピクセルバッファーを含むサンプルバッファー
     */
    public init?(from sampleBuffer: CMSampleBuffer) {
        guard let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else {
            return nil
        }
        let timeStamp = CMTimeGetSeconds(CMSampleBufferGetPresentationTimeStamp(sampleBuffer))
        let timeStampNs = Int64(timeStamp * 1_000_000_000)
        let frame = RTCVideoFrame(pixelBuffer: pixelBuffer, rotation: RTCVideoRotation._0, timeStampNs: timeStampNs)
        self = .native(capturer: nil, frame: frame)
    }
    
}
