Skip to content

Instantly share code, notes, and snippets.

View teaglin's full-sized avatar

Todd teaglin

View GitHub Profile
func rgbData(_ frame: AVFrame) throws -> Data {
let dstPkt = AVPacket()
let dstFrame = AVFrame()
dstFrame.width = frame.width
dstFrame.height = frame.height
dstFrame.pixFmt = .RGB24
let swsCtx = SwsContext(
srcW: frame.width,
//
// EncoderTest.swift
//
//
// Created by T
// Copyright © 2018 T. All rights reserved.
//
import VideoToolbox
import AVFoundation
//
// EncoderTest.swift
//
//
// Created by T
// Copyright © 2018 T. All rights reserved.
//
import VideoToolbox
import AVFoundation