gboolean handled;
gboolean marshalled;
- GHook **called_probes;
+ gulong *called_probes;
guint n_called_probes;
guint called_probes_size;
gboolean retry;
* will be assigned.
* This function makes a copy of the name so you can safely free the name.
*
- * Returns: (transfer floating) (nullable): a new #GstPad, or %NULL in
- * case of an error.
+ * Returns: (transfer floating): a new #GstPad.
*
* MT safe.
*/
* will be assigned.
* This function makes a copy of the name so you can safely free the name.
*
- * Returns: (transfer floating) (nullable): a new #GstPad, or %NULL in
- * case of an error.
+ * Returns: (transfer floating): a new #GstPad.
*/
GstPad *
gst_pad_new_from_template (GstPadTemplate * templ, const gchar * name)
* will be assigned.
* This function makes a copy of the name so you can safely free the name.
*
- * Returns: (transfer floating) (nullable): a new #GstPad, or %NULL in
- * case of an error.
+ * Returns: (transfer floating): a new #GstPad.
*/
GstPad *
gst_pad_new_from_static_template (GstStaticPadTemplate * templ,
{
GstPadProbeType type;
+ GST_DEBUG_OBJECT (pad,
+ "cleaning up hook %lu with flags %08x", hook->hook_id, hook->flags);
+
if (!G_HOOK_IS_VALID (hook))
return;
*
* Sets the given unlink function for the pad. It will be called
* when the pad is unlinked.
+ *
+ * Note that the pad's lock is already held when the unlink
+ * function is called, so most pad functions cannot be called
+ * from within the callback.
*/
void
gst_pad_set_unlink_function_full (GstPad * pad, GstPadUnlinkFunction unlink,
ret = gst_pad_query_latency_default (pad, query);
forward = FALSE;
break;
+ case GST_QUERY_BITRATE:
+ /* FIXME: better default handling */
+ forward = TRUE;
+ break;
case GST_QUERY_POSITION:
case GST_QUERY_SEEKING:
case GST_QUERY_FORMATS:
* if we're actually calling probes a second time */
if (data->retry) {
for (i = 0; i < data->n_called_probes; i++) {
- if (data->called_probes[i] == hook) {
+ if (data->called_probes[i] == hook->hook_id) {
GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad,
"hook %lu already called", hook->hook_id);
return;
if (data->called_probes_size > N_STACK_ALLOCATE_PROBES) {
data->called_probes_size *= 2;
data->called_probes =
- g_renew (GHook *, data->called_probes, data->called_probes_size);
+ g_renew (gulong, data->called_probes, data->called_probes_size);
} else {
- GHook **tmp = data->called_probes;
+ gulong *tmp = data->called_probes;
data->called_probes_size *= 2;
- data->called_probes = g_new (GHook *, data->called_probes_size);
+ data->called_probes = g_new (gulong, data->called_probes_size);
memcpy (data->called_probes, tmp,
- N_STACK_ALLOCATE_PROBES * sizeof (GHook *));
+ N_STACK_ALLOCATE_PROBES * sizeof (gulong));
}
}
- data->called_probes[data->n_called_probes++] = hook;
+ data->called_probes[data->n_called_probes++] = hook->hook_id;
flags = hook->flags >> G_HOOK_FLAG_USER_SHIFT;
type = info->type;
ProbeMarshall data;
guint cookie;
gboolean is_block;
- GHook *called_probes[N_STACK_ALLOCATE_PROBES];
+ gulong called_probes[N_STACK_ALLOCATE_PROBES];
data.pad = pad;
data.info = info;