PyAV-Org / PyAV

Pythonic bindings for FFmpeg's libraries.
https://pyav.basswood-io.com/
BSD 3-Clause "New" or "Revised" License
2.51k stars 365 forks source link

Improve stub for enum, error, logging, stream #1311

Closed laggykiller closed 8 months ago

WyattBlue commented 8 months ago

I don't know if the stubs for enum, error, logging are even accurate. It's been a while since I reviewed that code and I know logging needs an overhaul in general.

stream.pyx shouldn't be included with these files.

laggykiller commented 8 months ago

I don't know if the stubs for enum, error, logging are even accurate.

I made the stub by reading the pyx files, as well as running pyav, open a video and check if those attributes could be accessed.

stream.pyx shouldn't be included with these files.

Please reconsider about this. Even if the user is not supposed to create object from that class, it is easy for us to create a stub file next to the pyx that is responsible for it. Stream from stream.pyx is baseclass for VideoStream and AudioStream. If we do not create stub for stream.pyx, further changes in stream.pyx (e.g. add/remove attributes from Stream) would require us to edit av.video.stream and av.audio.stream stub files. This is not convenient for future development.

laggykiller commented 8 months ago

Fixed, please review!