GithubHelp home page GithubHelp logo

Export winsize about m3u8 HOT 12 CLOSED

grafov avatar grafov commented on September 3, 2024
Export winsize

from m3u8.

Comments (12)

bradleyfalzon avatar bradleyfalzon commented on September 3, 2024

Can you see #22 and let me know of your thoughts there?

from m3u8.

konradreiche avatar konradreiche commented on September 3, 2024

@bradleyfalzon Sorry, didn't realize there was already more or less the same discussion going on. Also my last edit on my issue didn't go through. Basically, I am agreeing with:

Perhaps another PR could include options to overwrite the winsize as the decode function does set to 8, others (probably myself) might want to change this on the fly.

It should certainly be possible. Is there any reason why winsize doesn't get exported as part of the struct? My original issue is fixed by simply declaring the playlist as a VOD but the overlaying issue is the non-accessible winsize in my opinion.

I could draft a pull request.

from m3u8.

bradleyfalzon avatar bradleyfalzon commented on September 3, 2024

A PR to provide a getter and setter for winsize (WinSize() and SetWinSize()) would be great and reference issue #22, I can do it in the next couple of days though. Just include a simple test to ensure it's set

If you do, can you call p.buf.Reset() too.

See this commit for something similar we've recently done for the version, in particular the test but ignore the master manifest stuff obviously: 321517c

Again, if you don't have time, I can do it, but might be a couple of days.

from m3u8.

bradleyfalzon avatar bradleyfalzon commented on September 3, 2024

#22 still will need to be resolved though, but this'll help you and others when they wish to set the win size (as I've needed to do, so this will help me).

from m3u8.

konradreiche avatar konradreiche commented on September 3, 2024

Also something which came to my mind is the media type EVENT for which you want a continuously growing window size because you must not remove URLs from it or it should probably be treated in the same way as VOD. Is that a separate issue?

from m3u8.

bradleyfalzon avatar bradleyfalzon commented on September 3, 2024

Yeah, best for a separate issue, but something like the following?

    p, _ := m3u8.NewMediaPlaylist(5, 5) // don't ignore error
    p.MediaType = m3u8.EVENT            // make this an event
    p.Closed = true                     // when finished make closed
    for i := 0; i < 5; i++ {
        _ = p.Append(fmt.Sprintf("test%d.ts", i), 6.0, "") // don't ignore error
    }
    fmt.Println(p.Encode())

from m3u8.

bradleyfalzon avatar bradleyfalzon commented on September 3, 2024

Hi @platzhirsch any progress on the PR, if you've moved on that's fine, I can manage it from here.

from m3u8.

konradreiche avatar konradreiche commented on September 3, 2024

Unfortunately not, no :person_frowning:

from m3u8.

bradleyfalzon avatar bradleyfalzon commented on September 3, 2024

No problem, do you still it? I don't want to add it unless someone needs it, although I'm sure someone else will want it some day for their use case.

from m3u8.

bradleyfalzon avatar bradleyfalzon commented on September 3, 2024

Hi @platzhirsch I've proposed some changes in #70 for the EVENT issue you mentioned and also adds the winsize getter and setter.

from m3u8.

konradreiche avatar konradreiche commented on September 3, 2024

This looks great @bradleyfalzon Thanks a lot for your effort.

from m3u8.

bradleyfalzon avatar bradleyfalzon commented on September 3, 2024

Thanks, I'll wait on a review from the maintainer and hopefully get it merged and close off a few issues. Thanks again for this input.

from m3u8.

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.