vapoursynth / vsrepo

A simple package repository for VapourSynth
MIT License
113 stars 29 forks source link

Fix the APIv4 stubs #158

Closed Ichunjo closed 3 years ago

Ichunjo commented 3 years ago

Here's the beginning of the fixes. I would like to have to have some thoughts about some things:

This PR will fix #156

Ichunjo commented 3 years ago

APIV4 introduced VideoFormat instead of Format but there isn’t an AudioFormat? All the format properties are already stored in the AudioNode https://github.com/vapoursynth/vapoursynth/blob/master/src/cython/vapoursynth.pyx#L1924

myrsloik commented 3 years ago

APIV4 introduced VideoFormat instead of Format but there isn’t an AudioFormat? All the format properties are already stored in the AudioNode https://github.com/vapoursynth/vapoursynth/blob/master/src/cython/vapoursynth.pyx#L1924

Right, I forgot to make a separate AudioFormat object. I should probably do that. https://github.com/vapoursynth/vapoursynth/issues/776

myrsloik commented 3 years ago

Implemented the dir thing. Now you'll just have to distinguish between the bound audio/video cases and this can make some more progress.

myrsloik commented 3 years ago

Actually now I remember why I didn't make AudioFormat a separate class. Unlike the VSVideoFormat struct that can be serialized into a small int audio is more complicated. It's also relatively few values so it's easier to not lump it up as function arguments.

myrsloik commented 3 years ago

Are we getting closer to something that's mildly working?

Ichunjo commented 3 years ago

Fixing the return type has to be in the cython side. See my PR https://github.com/vapoursynth/vapoursynth/pull/783

Ichunjo commented 3 years ago

I finally did it!

myrsloik commented 3 years ago

Looks reasonable I guess. Not an expert on typing stuff