I have no idea why this error happens, but it does not seem worth the effort to investigate further, so I'm just reverting the previous change to this file.
I am not sure why the definition of NULL was removed; it might have been by mistake, but in any case it broke code like this:
img = PNMImage(w, h, color_space=CS_srgb)
since it would not understand the default value (NULL) for the argument preceding color_space.
This distinction allows us to better support Python 3, since it will raise exceptions when trying to put arbitrary binary data in a str object.
This also adds some convenience functions for efficiently initializing a Datagram or PTA_uchar from a vector_uchar.
We need to support this because Ubuntu 14.04 ships with this
version, and has no "backports" option to bring in a newer version
(without use of a PPA or compiling it yourself).
We can consider raising the minimums again once Trusty is EOL.
Previously this would close and reopen the codec context;
that's entirely unnecessary, as all supported versions of
libavcodec support flushing the buffers instead.
This leverages libavcodec >= 57.37.100's new asynchronous API,
which both allows decoding in hardware and in a separate thread,
and in any case would free up more CPU time for Panda's app loop.
This also avoids use of the now-deprecated `avcodec_decode_audio4`
AVStream.codec is deprecated as of libavformat version 57.41.100,
so if this version is detected, we switch to AVStream.codecpar instead.
Note this also makes it necessary to construct and use our own codec
context - but doing that is a cleaner approach anyway.
lavcodec: 54.86.100
lavformat: 54.59.106
lavutil: 52.13.100
These are the versions included in FFmpeg 1.1, which is the oldest
release that works with Panda already: we've been using
`av_opt_set_sample_fmt` (introduced in FFmpeg 1.1) since
03e96d8c4a903be7222365b40613429768659892 (August 2013) and nobody has
complained since. In other words, I'm not dropping support for anything
here, I'm just making the supported versions explicit.
It would seem that interpretKeyEvents/insertText would be the right way to do this, but while that does handle AltGr keys correctly, it does not handle dead keys at all. This approach seems to do the right things.
This can happen when a system event (eg. on macOS) triggers a terminate from within process_events.
This is a workaround for a common error; the proper fix is not to put PandaFramework in the global scope.
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
This reverses the relationship between EXPCL_PANDA_COMPONENT
and BUILDING_PANDA, where BUILDING_PANDA is just shorthand for
BUILDING_PANDA_COMPONENT and BUILDING_PANDA_COMPONENT itself
sets the EXPCL_PANDA_COMPONENT defines.
Also removes EXPCL_PANDA.