dukebw / lintel

A Python module to decode video frames directly, using the FFmpeg C API.
Apache License 2.0
261 stars 38 forks source link

Lintel support with python 2.x? #21

Open aurooj opened 5 years ago

aurooj commented 5 years ago

Hi, As per your comment below: To use Python 2, I believe a (potentially small) amount of code would have to be changed in lintel/py_ext/lintelmodule.c.

Can you please help what change is need to be made in the lintelmodule.c file for python2?

dukebw commented 5 years ago

Hi aurooj, I believe the major part that needs changing is the C extension module initialization:

https://github.com/dukebw/lintel/blob/8ba861ef5424890568583a64c11da9c6ec293fff/lintel/py_ext/lintelmodule.c#L492-L500

This can be converted by following the guide here: https://docs.python.org/2/extending/extending.html. Any other inconsistencies between the Python 2 and 3 C extension APIs would need to be changed as well. This article: https://docs.python.org/3/howto/cporting.html might be useful.

jugg1024 commented 5 years ago

Hi, any progress here? Could you please offer example codes of lintelmodule.c for python 2.x?