}
}
+/**
+ * gst_audio_info_new_from_caps:
+ * @caps: a #GstCaps
+ *
+ * Parse @caps to generate a #GstAudioInfo.
+ *
+ * Returns: A #GstAudioInfo, or %NULL if @caps couldn't be parsed
+ * Since: 1.20
+ */
+GstAudioInfo *
+gst_audio_info_new_from_caps (const GstCaps * caps)
+{
+ GstAudioInfo *ret = gst_audio_info_new ();
+
+ if (gst_audio_info_from_caps (ret, caps)) {
+ return ret;
+ } else {
+ gst_audio_info_free (ret);
+ return NULL;
+ }
+}
+
/**
* gst_audio_info_to_caps:
* @info: a #GstAudioInfo
GST_AUDIO_API
GstAudioInfo * gst_audio_info_new (void);
+GST_AUDIO_API
+GstAudioInfo * gst_audio_info_new_from_caps (const GstCaps * caps);
+
GST_AUDIO_API
void gst_audio_info_init (GstAudioInfo *info);
}
}
+/**
+ * gst_video_info_new_from_caps:
+ * @caps: a #GstCaps
+ *
+ * Parse @caps to generate a #GstVideoInfo.
+ *
+ * Returns: A #GstVideoInfo, or %NULL if @caps couldn't be parsed
+ * Since: 1.20
+ */
+GstVideoInfo *
+gst_video_info_new_from_caps (const GstCaps * caps)
+{
+ GstVideoInfo *ret = gst_video_info_new ();
+
+ if (gst_video_info_from_caps (ret, caps)) {
+ return ret;
+ } else {
+ gst_video_info_free (ret);
+ return NULL;
+ }
+}
+
/**
* gst_video_info_is_equal:
* @info: a #GstVideoInfo
GST_VIDEO_API
void gst_video_info_free (GstVideoInfo *info);
+GST_VIDEO_API
+GstVideoInfo * gst_video_info_new_from_caps (const GstCaps * caps);
+
GST_VIDEO_API
gboolean gst_video_info_set_format (GstVideoInfo *info, GstVideoFormat format,
guint width, guint height);
--- /dev/null
+from ..module import get_introspection_module
+
+import gi
+gi.require_version('Gst', '1.0')
+
+from gi.repository import Gst # noqa
+
+GstAudio = get_introspection_module('GstAudio')
+__all__ = []
+
+
+def __audio_info_from_caps(*args):
+ raise NotImplementedError('AudioInfo.from_caps was removed, use AudioInfo.new_from_caps instead')
+
+
+GstAudio.AudioInfo.from_caps = __audio_info_from_caps
--- /dev/null
+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
-pysources = ['Gst.py', 'GstPbutils.py']
+pysources = ['Gst.py', 'GstPbutils.py', 'GstVideo.py', 'GstAudio.py']
install_data(pysources,
install_dir: pygi_override_dir)