Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

A problem in attributes for AVPlayerItemVideoOutput in LocalFileViewController #2

Open
madadoux opened this issue Dec 6, 2020 · 0 comments

Comments

@madadoux
Copy link

madadoux commented Dec 6, 2020

in this declaration
when I make this code as it is


   lazy var playerItemVideoOutput: AVPlayerItemVideoOutput = {
        let attributes = [kCVPixelBufferPixelFormatTypeKey as String: Int(kCVPixelFormatType_32BGRA)]
        return AVPlayerItemVideoOutput(pixelBufferAttributes: attributes)
    }()

nothing is showin on the screen
I think It doesn't know how to make a texture from the CVPixelbuffer

but when I pass nil to the constructor

   lazy var playerItemVideoOutput: AVPlayerItemVideoOutput = {
        let attributes = [kCVPixelBufferPixelFormatTypeKey as String: Int(kCVPixelFormatType_32BGRA)]
        return AVPlayerItemVideoOutput(pixelBufferAttributes: nil)
    }()

it show like this

https://i.imgur.com/iWqu592.png
alt text

any help
@tomisacat

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant