struct _GstVideoAggregatorConvertPadPrivate
{
+ /* The following fields are only used from the aggregate thread and when
+ * initializing / finalizing */
+
/* Converter, if NULL no conversion is done */
GstVideoConverter *convert;
GstVideoInfo conversion_info;
GstBuffer *converted_buffer;
+ /* The following fields are accessed from the property setters / getters,
+ * and as such are protected with the object lock */
GstStructure *converter_config;
gboolean converter_config_changed;
};
{
GstVideoAggregatorConvertPad *pad = GST_VIDEO_AGGREGATOR_CONVERT_PAD (vpad);
+ GST_OBJECT_LOCK (pad);
pad->priv->converter_config_changed = TRUE;
+ GST_OBJECT_UNLOCK (pad);
}
static gboolean
GstVideoFrame frame;
/* Update/create converter as needed */
+ GST_OBJECT_LOCK (pad);
if (pad->priv->converter_config_changed) {
GstVideoAggregatorConvertPadClass *klass =
GST_VIDEO_AGGREGATOR_CONVERT_PAD_GET_CLASS (pad);
GST_DEBUG_OBJECT (pad, "This pad will not need conversion");
}
}
+ GST_OBJECT_UNLOCK (pad);
if (!gst_video_frame_map (&frame, &vpad->info, buffer, GST_MAP_READ)) {
GST_WARNING_OBJECT (vagg, "Could not map input buffer");
{
g_return_if_fail (GST_IS_VIDEO_AGGREGATOR_CONVERT_PAD (pad));
+ GST_OBJECT_LOCK (pad);
pad->priv->converter_config_changed = TRUE;
+ GST_OBJECT_UNLOCK (pad);
}
/**************************************