DISCO_UNLOCK (dc);
}
-static gboolean
-_event_probe (GstPad * pad, GstEvent * event, PrivateStream * ps)
+static GstProbeReturn
+_event_probe (GstPad * pad, GstProbeType type, GstEvent * event,
+ PrivateStream * ps)
{
if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) {
GstTagList *tl = NULL, *tmp;
DISCO_UNLOCK (ps->dc);
}
- return TRUE;
+ return GST_PROBE_OK;
}
static void
g_object_set (ps->sink, "silent", TRUE, NULL);
g_object_set (ps->queue, "max-size-buffers", 1, "silent", TRUE, NULL);
- caps = gst_pad_get_caps_reffed (pad);
+ caps = gst_pad_get_caps (pad, NULL);
if (gst_caps_can_intersect (caps, subs_caps)) {
/* Subtitle streams are sparse and don't provide any information - don't
gst_object_unref (sinkpad);
/* Add an event probe */
- gst_pad_add_event_probe (pad, G_CALLBACK (_event_probe), ps);
+ gst_pad_add_probe (pad, GST_PROBE_TYPE_EVENT,
+ (GstPadProbeCallback) _event_probe, ps, NULL);
DISCO_LOCK (dc);
dc->priv->streams = g_list_append (dc->priv->streams, ps);
if (!caps) {
GST_WARNING ("Couldn't get negotiated caps from %s:%s",
GST_DEBUG_PAD_NAME (ps->pad));
- caps = gst_pad_get_caps (ps->pad);
+ caps = gst_pad_get_caps (ps->pad, NULL);
}
if (caps) {
GST_DEBUG ("Got caps %" GST_PTR_FORMAT, caps);
return parent;
else
return (GstDiscovererStreamInfo *)
- gst_mini_object_new (GST_TYPE_DISCOVERER_STREAM_INFO);
+ g_object_new (GST_TYPE_DISCOVERER_STREAM_INFO, NULL);
}
gst_structure_id_get (st, _CAPS_QUARK, GST_TYPE_CAPS, &caps, NULL);
info = (GstDiscovererAudioInfo *) parent;
else {
info = (GstDiscovererAudioInfo *)
- gst_mini_object_new (GST_TYPE_DISCOVERER_AUDIO_INFO);
+ g_object_new (GST_TYPE_DISCOVERER_AUDIO_INFO, NULL);
info->parent.caps = caps;
}
info = (GstDiscovererVideoInfo *) parent;
else {
info = (GstDiscovererVideoInfo *)
- gst_mini_object_new (GST_TYPE_DISCOVERER_VIDEO_INFO);
+ g_object_new (GST_TYPE_DISCOVERER_VIDEO_INFO, NULL);
info->parent.caps = caps;
}
info = parent;
else {
info = (GstDiscovererStreamInfo *)
- gst_mini_object_new (GST_TYPE_DISCOVERER_STREAM_INFO);
+ g_object_new (GST_TYPE_DISCOVERER_STREAM_INFO, NULL);
info->caps = caps;
}
GST_DEBUG ("next is a list of %d entries", len);
cont = (GstDiscovererContainerInfo *)
- gst_mini_object_new (GST_TYPE_DISCOVERER_CONTAINER_INFO);
+ g_object_new (GST_TYPE_DISCOVERER_CONTAINER_INFO, NULL);
cont->parent.caps = caps;
res = (GstDiscovererStreamInfo *) cont;
gst_caps_get_structure (dc->priv->current_info->stream_info->caps, 0);
if (g_str_has_prefix (gst_structure_get_name (st), "image/"))
- ((GstDiscovererVideoInfo *) dc->priv->current_info->
- stream_info)->is_image = TRUE;
+ ((GstDiscovererVideoInfo *) dc->priv->current_info->stream_info)->
+ is_image = TRUE;
}
}
case GST_MESSAGE_ELEMENT:
{
- GQuark sttype = gst_structure_get_name_id (msg->structure);
+ GQuark sttype;
+ const GstStructure *structure;
+
+ structure = gst_message_get_structure (msg);
+ sttype = gst_structure_get_name_id (structure);
GST_DEBUG_OBJECT (GST_MESSAGE_SRC (msg),
- "structure %" GST_PTR_FORMAT, msg->structure);
+ "structure %" GST_PTR_FORMAT, structure);
if (sttype == _MISSING_PLUGIN_QUARK) {
GST_DEBUG_OBJECT (GST_MESSAGE_SRC (msg),
"Setting result to MISSING_PLUGINS");
dc->priv->current_info->result = GST_DISCOVERER_MISSING_PLUGINS;
- dc->priv->current_info->misc = gst_structure_copy (msg->structure);
+ dc->priv->current_info->misc = gst_structure_copy (structure);
} else if (sttype == _STREAM_TOPOLOGY_QUARK) {
- dc->priv->current_topology = gst_structure_copy (msg->structure);
+ dc->priv->current_topology = gst_structure_copy (structure);
}
}
break;
/* Pop URI off the pending URI list */
dc->priv->current_info =
- (GstDiscovererInfo *) gst_mini_object_new (GST_TYPE_DISCOVERER_INFO);
+ (GstDiscovererInfo *) g_object_new (GST_TYPE_DISCOVERER_INFO, NULL);
dc->priv->current_info->uri = (gchar *) dc->priv->pending_uris->data;
dc->priv->pending_uris =
g_list_delete_link (dc->priv->pending_uris, dc->priv->pending_uris);