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

A problem in attributes for AVPlayerItemVideoOutput in LocalFileViewController #2

@madadoux

Description

@madadoux

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions