"GStreamer" (GNOME Bugzilla)
2018-03-07 19:01:05 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=794162
Bug ID: 794162
Summary: gst-python: Can't set channel positions with
GstAudio.AudioInfo.set_format
Classification: Platform
Product: GStreamer
Version: 1.12.4
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-python
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@mithril.org.ua
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---
Hello, I'm trying to rewrite basic tutorial #8
(https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html)
in Python and in original C code we have lines:
GstAudioInfo info;
gst_audio_info_set_format(&info, GST_AUDIO_FORMAT_S16, SAMPLE_RATE, 1, NULL);
I've rewritten them as:
info = GstAudio.AudioInfo()
info.set_format(
format=GstAudio.AudioFormat.S16,
rate=SAMPLE_RATE,
channels=1,
position=None
)
According to documentation and source code of `gst_audio_info_set_format` last
parameter `position` is nullable (for 1 and 2 channel setup).
Python documents type of `position` argument as `GstAudio.AudioChannelPosition`
and nothing said if it accepts `None`, so with Python code above I will get an
error: "Argument 4 does not allow None as a value".
I can't pass list of `GstAudio.AudioChannelPosition` instead - I will get
"Expected a GstAudio.AudioChannelPosition, but got list". Isn't list of
`GstAudio.AudioChannelPosition` an equivalent of `GstAudioChannelPosition*`?
Also it's weird why `position` in C code is annotated with `fixed size` of 64
when in fact 64 is the maximum size of channel positions array and channel
count argument used to determine actual array size.
Bug ID: 794162
Summary: gst-python: Can't set channel positions with
GstAudio.AudioInfo.set_format
Classification: Platform
Product: GStreamer
Version: 1.12.4
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-python
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@mithril.org.ua
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---
Hello, I'm trying to rewrite basic tutorial #8
(https://gstreamer.freedesktop.org/documentation/tutorials/basic/short-cutting-the-pipeline.html)
in Python and in original C code we have lines:
GstAudioInfo info;
gst_audio_info_set_format(&info, GST_AUDIO_FORMAT_S16, SAMPLE_RATE, 1, NULL);
I've rewritten them as:
info = GstAudio.AudioInfo()
info.set_format(
format=GstAudio.AudioFormat.S16,
rate=SAMPLE_RATE,
channels=1,
position=None
)
According to documentation and source code of `gst_audio_info_set_format` last
parameter `position` is nullable (for 1 and 2 channel setup).
Python documents type of `position` argument as `GstAudio.AudioChannelPosition`
and nothing said if it accepts `None`, so with Python code above I will get an
error: "Argument 4 does not allow None as a value".
I can't pass list of `GstAudio.AudioChannelPosition` instead - I will get
"Expected a GstAudio.AudioChannelPosition, but got list". Isn't list of
`GstAudio.AudioChannelPosition` an equivalent of `GstAudioChannelPosition*`?
Also it's weird why `position` in C code is annotated with `fixed size` of 64
when in fact 64 is the maximum size of channel positions array and channel
count argument used to determine actual array size.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.