gstreamer/subprojects/gst-python/gi/overrides/GstVideo.py
Mathieu Duponchelle 830d1595b9 VideoInfo, AudioInfo: fix usage with python bindings
* Expose an actual constructor from caps

* Error out in overrides for code that was using the "manual
  allocation" pattern which only worked by chance. Direct
  the script writer to the new_from_caps constructor instead.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/-/issues/47

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1571>
2022-01-27 08:36:46 +00:00

16 lines
386 B
Python

from ..module import get_introspection_module
import gi
gi.require_version('Gst', '1.0')
from gi.repository import Gst # noqa
GstVideo = get_introspection_module('GstVideo')
__all__ = []
def __video_info_from_caps(*args):
raise NotImplementedError('VideoInfo.from_caps was removed, use VideoInfo.new_from_caps instead')
GstVideo.VideoInfo.from_caps = __video_info_from_caps