mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-07 23:12:42 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b0789c9d28
4 changed files with 14 additions and 6 deletions
|
@ -2606,7 +2606,7 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
/* probably already implicitly unmapped due to adapter operation,
|
/* probably already implicitly unmapped due to adapter operation,
|
||||||
* but for good measure ... */
|
* but for good measure ... */
|
||||||
gst_adapter_unmap (parse->priv->adapter);
|
gst_adapter_unmap (parse->priv->adapter);
|
||||||
if (ret != GST_FLOW_OK) {
|
if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (skip == 0 && flush == 0) {
|
if (skip == 0 && flush == 0) {
|
||||||
|
|
|
@ -394,6 +394,7 @@ gst_base_transform_class_init (GstBaseTransformClass * klass)
|
||||||
gobject_class->finalize = gst_base_transform_finalize;
|
gobject_class->finalize = gst_base_transform_finalize;
|
||||||
|
|
||||||
klass->passthrough_on_same_caps = FALSE;
|
klass->passthrough_on_same_caps = FALSE;
|
||||||
|
klass->transform_ip_on_passthrough = TRUE;
|
||||||
|
|
||||||
klass->transform_caps =
|
klass->transform_caps =
|
||||||
GST_DEBUG_FUNCPTR (gst_base_transform_default_transform_caps);
|
GST_DEBUG_FUNCPTR (gst_base_transform_default_transform_caps);
|
||||||
|
@ -1996,8 +1997,8 @@ no_qos:
|
||||||
/* In passthrough mode, give transform_ip a look at the
|
/* In passthrough mode, give transform_ip a look at the
|
||||||
* buffer, without making it writable, or just push the
|
* buffer, without making it writable, or just push the
|
||||||
* data through */
|
* data through */
|
||||||
if (bclass->transform_ip) {
|
if (bclass->transform_ip_on_passthrough && bclass->transform_ip) {
|
||||||
GST_DEBUG_OBJECT (trans, "doing passthrough transform");
|
GST_DEBUG_OBJECT (trans, "doing passthrough transform_ip");
|
||||||
ret = bclass->transform_ip (trans, *outbuf);
|
ret = bclass->transform_ip (trans, *outbuf);
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (trans, "element is in passthrough");
|
GST_DEBUG_OBJECT (trans, "element is in passthrough");
|
||||||
|
|
|
@ -107,8 +107,14 @@ struct _GstBaseTransform {
|
||||||
/**
|
/**
|
||||||
* GstBaseTransformClass:
|
* GstBaseTransformClass:
|
||||||
* @parent_class: Element parent class
|
* @parent_class: Element parent class
|
||||||
* @passthrough_on_same_caps: If set to TRUE, passthrough mode will be
|
* @passthrough_on_same_caps: If set to %TRUE, passthrough mode will be
|
||||||
* automatically enabled if the caps are the same.
|
* automatically enabled if the caps are the same.
|
||||||
|
* Set to %FALSE by default.
|
||||||
|
* @transform_ip_on_passthrough: If set to %TRUE, @transform_ip will be called in
|
||||||
|
* passthrough mode. The passed buffer might not be
|
||||||
|
* writable. When %FALSE, neither @transform nor
|
||||||
|
* @transform_ip will be called in passthrough mode.
|
||||||
|
* Set to %TRUE by default.
|
||||||
* @transform_caps: Optional. Given the pad in this direction and the given
|
* @transform_caps: Optional. Given the pad in this direction and the given
|
||||||
* caps, what caps are allowed on the other pad in this
|
* caps, what caps are allowed on the other pad in this
|
||||||
* element ?
|
* element ?
|
||||||
|
@ -201,6 +207,7 @@ struct _GstBaseTransformClass {
|
||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
gboolean passthrough_on_same_caps;
|
gboolean passthrough_on_same_caps;
|
||||||
|
gboolean transform_ip_on_passthrough;
|
||||||
|
|
||||||
/* virtual methods for subclasses */
|
/* virtual methods for subclasses */
|
||||||
GstCaps* (*transform_caps) (GstBaseTransform *trans,
|
GstCaps* (*transform_caps) (GstBaseTransform *trans,
|
||||||
|
|
|
@ -392,23 +392,23 @@ gst_fd_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
gssize readbytes;
|
gssize readbytes;
|
||||||
guint blocksize;
|
guint blocksize;
|
||||||
GstClockTime timeout;
|
|
||||||
GstMapInfo info;
|
GstMapInfo info;
|
||||||
|
|
||||||
#ifndef HAVE_WIN32
|
#ifndef HAVE_WIN32
|
||||||
|
GstClockTime timeout;
|
||||||
gboolean try_again;
|
gboolean try_again;
|
||||||
gint retval;
|
gint retval;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
src = GST_FD_SRC (psrc);
|
src = GST_FD_SRC (psrc);
|
||||||
|
|
||||||
|
#ifndef HAVE_WIN32
|
||||||
if (src->timeout > 0) {
|
if (src->timeout > 0) {
|
||||||
timeout = src->timeout * GST_USECOND;
|
timeout = src->timeout * GST_USECOND;
|
||||||
} else {
|
} else {
|
||||||
timeout = GST_CLOCK_TIME_NONE;
|
timeout = GST_CLOCK_TIME_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_WIN32
|
|
||||||
do {
|
do {
|
||||||
try_again = FALSE;
|
try_again = FALSE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue