Giter Club home page Giter Club logo

Comments (10)

kingslay avatar kingslay commented on August 18, 2024

是在播放同一个视频的时候,会一直发生Video has been updated 吗?这个是不合理的

from ksplayer.

matteogobbi avatar matteogobbi commented on August 18, 2024

from ksplayer.

kingslay avatar kingslay commented on August 18, 2024

你是重载updateVideo(refreshRate: Float, formatDescription: CMFormatDescription?) 这个方法吗?

from ksplayer.

kingslay avatar kingslay commented on August 18, 2024

试着用AVDisplayCriteria(refreshRate: refreshRate, videoDynamicRange: videoDynamicRange.rawValue) 这给初始化方法,不要用 AVDisplayCriteria(refreshRate: refreshRate, formatDescription: formatDescription) 这个初始化方法

from ksplayer.

matteogobbi avatar matteogobbi commented on August 18, 2024

from ksplayer.

kingslay avatar kingslay commented on August 18, 2024

你试着这样重载。看行不行


    override func updateVideo(refreshRate: Float, formatDescription: CMFormatDescription?) {
        #if os(tvOS) || os(xrOS)
        guard let displayManager = UIApplication.shared.windows.first?.avDisplayManager,
              displayManager.isDisplayCriteriaMatchingEnabled,
              !displayManager.isDisplayModeSwitchInProgress
        else {
            return
        }
        if let formatDescription {
            displayManager.preferredDisplayCriteria = AVDisplayCriteria(refreshRate: refreshRate, videoDynamicRange: formatDescription.dynamicRange.rawValue)
        }
        #endif
    }

from ksplayer.

matteogobbi avatar matteogobbi commented on August 18, 2024

from ksplayer.

matteogobbi avatar matteogobbi commented on August 18, 2024

I tried even using

displayManager.preferredDisplayCriteria = AVDisplayCriteria(refreshRate: refreshRate, videoDynamicRange: formatDescription.dynamicRange.rawValue)

with the video output, with no success.

from ksplayer.

matteogobbi avatar matteogobbi commented on August 18, 2024

I have the impression that live refresh rate less than 50, works with:

AVDisplayCriteria(refreshRate: track.nominalFrameRate, videoDynamicRange: videoDynamicRange)

and that for 50 or more, works with the new tvOS17 API.

UPDATE:

nope, it's mixed behavior even in this case

from ksplayer.

matteogobbi avatar matteogobbi commented on August 18, 2024

So for 50 fps I use this:

displayManager.preferredDisplayCriteria = AVDisplayCriteria(refreshRate: videoOutputRefreshRate, formatDescription: videoOutputFormatDescription)

and it works.

For 25 fps most of the time doesn't work well with any approach.

from ksplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.