# Controllers API Migration Table (OC -> LN Swift)

## Decode Core

| OC Class | OC API | Swift Class | Swift API | Status |
|---|---|---|---|---|
| `QGAnimatedImageDecodeConfig` | `+defaultConfig` | `LNAnimatedImageDecodeConfig` | `@objc(defaultConfig) defaultConfig()` | Done |
| `QGAnimatedImageDecodeThread` | `occupied`, `sequenceDec` | `LNAnimatedImageDecodeThread` | same semantic properties | Done |
| `QGAnimatedImageDecodeThreadPool` | `+sharedPool`, `-getDecodeThread` | `LNAnimatedImageDecodeThreadPool` | `sharedPool()`, `getDecodeThread()` | Done |
| `QGAnimatedImageBufferManager` | `-getBufferedFrame:` | `LNAnimatedImageBufferManager` | `@objc(getBufferedFrame:) getBufferedFrame(_:)` | Done |
| `QGAnimatedImageBufferManager` | `-isBufferFull` | `LNAnimatedImageBufferManager` | `@objc(isBufferFull) isBufferFull()` | Done |
| `QGAnimatedImageBufferManager` | `-popVideoFrame` | `LNAnimatedImageBufferManager` | `@objc(popVideoFrame) popVideoFrame()` | Done |
| `QGBaseDecoder` | `-initWith:error:` | `LNBaseDecoder` | `init(fileInfo:)` | Done |
| `QGBaseDecoder` | `-decodeFrame:buffers:` | `LNBaseDecoder` | `decodeFrame(_:buffers:)` | Done |
| `QGBaseDecoder` | `-shouldStopDecode:` | `LNBaseDecoder` | `shouldStopDecode(_:)` | Done |
| `QGBaseDecoder` | `-isFrameIndexBeyondEnd:` | `LNBaseDecoder` | `isFrameIndexBeyondEnd(_:)` | Done |
| `QGAnimatedImageDecodeManager` | `-initWith:config:delegate:` | `LNAnimatedImageDecodeManager` | `init(fileInfo:config:delegate:)` | Done |
| `QGAnimatedImageDecodeManager` | `-consumeDecodedFrame:` | `LNAnimatedImageDecodeManager` | `@objc(consumeDecodedFrame:) consumeDecodedFrame(_:)` | Done |
| `QGAnimatedImageDecodeManager` | `-tryToStart/Stop/Pause/ResumeAudioPlay` | `LNAnimatedImageDecodeManager` | same semantic APIs | Done |
| `QGAnimatedImageDecodeManager` | `-containsThisDeocder:` | `LNAnimatedImageDecodeManager` | `@objc(containsThisDeocder:) containsThisDeocder(_:)` | Done |

## HW Decoder

| OC Class | OC API | Swift Class | Swift API | Status |
|---|---|---|---|---|
| `QGMP4FrameHWDecoder` | `+errorDescriptionForCode:` | `LNMP4FrameHWDecoder` | `@objc(errorDescriptionForCode:) errorDescription(for:)` | Done |
| `QGMP4FrameHWDecoder` | `-decodeFrame:buffers:` | `LNMP4FrameHWDecoder` | `override decodeFrame(_:buffers:)` | Done |
| `QGMP4FrameHWDecoder` | `-shouldStopDecode:` | `LNMP4FrameHWDecoder` | `override shouldStopDecode(_:)` | Done |
| `QGMP4FrameHWDecoder` | `-isFrameIndexBeyondEnd:` | `LNMP4FrameHWDecoder` | `override isFrameIndexBeyondEnd(_:)` | Done |
| `QGMP4FrameHWDecoder` | `VT session init/reset/seek keyframe` | `LNMP4FrameHWDecoder` | same semantic flow in Swift | Done |

## Config Manager

| OC Class | OC API | Swift Class | Swift API | Status |
|---|---|---|---|---|
| `QGVAPConfigManager` | `-initWith:` | `LNVAPConfigManager` | `init(fileInfo:)` | Done |
| `QGVAPConfigManager` | `-loadConfigResources` | `LNVAPConfigManager` | `@objc(loadConfigResources) loadConfigResources()` | Done |
| `QGVAPConfigManager` | `-loadMTLTextures:` | `LNVAPConfigManager` | `@objc(loadMTLTextures:) loadMTLTextures(_:)` | Done |
| `QGVAPConfigManager` | `-loadMTLBuffers:` | `LNVAPConfigManager` | `@objc(loadMTLBuffers:) loadMTLBuffers(_:)` | Done |

## Files

- `/Users/yanxuyao/Vap/QGVAPlayer/QGVAPlayer/LNSwift/Core/LNControllers.swift`

