mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 08:38:21 +00:00
use gst_dparam_attach, check for boolean and timestamp before updating
Original commit message from CVS: use gst_dparam_attach, check for boolean and timestamp before updating
This commit is contained in:
parent
12ead469ca
commit
a466301057
1 changed files with 3 additions and 5 deletions
|
@ -276,10 +276,8 @@ gst_dpman_attach_dparam (GstDParamManager *dpman, gchar *dparam_name, GstDParam
|
||||||
g_return_val_if_fail(dpwrap != NULL, FALSE);
|
g_return_val_if_fail(dpwrap != NULL, FALSE);
|
||||||
g_return_val_if_fail(dpwrap->value != NULL, FALSE);
|
g_return_val_if_fail(dpwrap->value != NULL, FALSE);
|
||||||
|
|
||||||
GST_DPARAM_VALUE(dparam) = dpwrap->value;
|
|
||||||
dpwrap->dparam = dparam;
|
dpwrap->dparam = dparam;
|
||||||
gst_dparam_set_parent (dparam, GST_OBJECT(dpman));
|
gst_dparam_attach(dparam, GST_OBJECT(dpman), dparam_name, dpwrap->value);
|
||||||
GST_DPARAM_NAME(dparam) = dparam_name;
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -551,8 +549,8 @@ gst_dpman_preprocess_synchronous(GstDParamManager *dpman, guint frames, gint64 t
|
||||||
dpwrap = (GstDParamWrapper*)dwraps->data;
|
dpwrap = (GstDParamWrapper*)dwraps->data;
|
||||||
dparam = dpwrap->dparam;
|
dparam = dpwrap->dparam;
|
||||||
|
|
||||||
if (dparam && (GST_DPARAM_READY_FOR_UPDATE(dparam) ||
|
if (dparam && (GST_DPARAM_READY_FOR_UPDATE(dparam) &&
|
||||||
(GST_DPARAM_NEXT_UPDATE_TIMESTAMP(dparam) < timestamp))){
|
(GST_DPARAM_NEXT_UPDATE_TIMESTAMP(dparam) <= timestamp))){
|
||||||
|
|
||||||
// this will make dpwrap->value contain the latest value.
|
// this will make dpwrap->value contain the latest value.
|
||||||
// now we just need to get it to the element
|
// now we just need to get it to the element
|
||||||
|
|
Loading…
Reference in a new issue