python: Fix the audiotestsrc example

Since 830d1595b9 AudioInfo::from_caps has been hidden in python

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2675>
This commit is contained in:
Thibault Saunier 2022-06-28 16:38:09 -04:00 committed by GStreamer Marge Bot
parent fab64c0b3a
commit 7aeb2f6711

View file

@ -86,7 +86,7 @@ class AudioTestSrc(GstBase.BaseSrc):
self.set_format(Gst.Format.TIME)
def do_set_caps(self, caps):
self.info.from_caps(caps)
self.info = GstAudio.AudioInfo.new_from_caps(caps)
self.set_blocksize(self.info.bpf * SAMPLESPERBUFFER)
return True