mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 00:31:13 +00:00
basesrc: expose set_caps method
Expose a previously static method so that custom negotiate implementation can call it and do the right thing.
This commit is contained in:
parent
21ea3fdd96
commit
fd75c12631
2 changed files with 16 additions and 4 deletions
|
@ -780,8 +780,17 @@ gst_base_src_new_seamless_segment (GstBaseSrc * src, gint64 start, gint64 stop,
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
/**
|
||||||
gst_base_src_setcaps (GstBaseSrc * bsrc, GstCaps * caps)
|
* gst_base_src_set_caps:
|
||||||
|
* @bsrc: a #GstBaseSrc
|
||||||
|
* @caps: a #GstCaps
|
||||||
|
*
|
||||||
|
* Set new caps on the basesrc source pad.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if the caps could be set
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
gst_base_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
{
|
{
|
||||||
GstBaseSrcClass *bclass;
|
GstBaseSrcClass *bclass;
|
||||||
gboolean res = TRUE;
|
gboolean res = TRUE;
|
||||||
|
@ -2779,7 +2788,7 @@ gst_base_src_default_negotiate (GstBaseSrc * basesrc)
|
||||||
if (gst_caps_is_fixed (caps)) {
|
if (gst_caps_is_fixed (caps)) {
|
||||||
/* yay, fixed caps, use those then, it's possible that the subclass does
|
/* yay, fixed caps, use those then, it's possible that the subclass does
|
||||||
* not accept this caps after all and we have to fail. */
|
* not accept this caps after all and we have to fail. */
|
||||||
result = gst_base_src_setcaps (basesrc, caps);
|
result = gst_base_src_set_caps (basesrc, caps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
@ -2906,7 +2915,7 @@ gst_base_src_start (GstBaseSrc * basesrc)
|
||||||
if (!(caps = gst_type_find_helper (basesrc->srcpad, size)))
|
if (!(caps = gst_type_find_helper (basesrc->srcpad, size)))
|
||||||
goto typefind_failed;
|
goto typefind_failed;
|
||||||
|
|
||||||
result = gst_base_src_setcaps (basesrc, caps);
|
result = gst_base_src_set_caps (basesrc, caps);
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
} else {
|
} else {
|
||||||
/* use class or default negotiate function */
|
/* use class or default negotiate function */
|
||||||
|
|
|
@ -238,6 +238,9 @@ void gst_base_src_set_do_timestamp (GstBaseSrc *src, gboolean timesta
|
||||||
gboolean gst_base_src_get_do_timestamp (GstBaseSrc *src);
|
gboolean gst_base_src_get_do_timestamp (GstBaseSrc *src);
|
||||||
|
|
||||||
gboolean gst_base_src_new_seamless_segment (GstBaseSrc *src, gint64 start, gint64 stop, gint64 position);
|
gboolean gst_base_src_new_seamless_segment (GstBaseSrc *src, gint64 start, gint64 stop, gint64 position);
|
||||||
|
|
||||||
|
gboolean gst_base_src_set_caps (GstBaseSrc *src, GstCaps *caps);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_BASE_SRC_H__ */
|
#endif /* __GST_BASE_SRC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue