check/oggmux: Convert to new probe API

This commit is contained in:
Edward Hervey 2011-06-03 19:00:23 +02:00
parent e8d11f4ef7
commit e3e4c28b39

View file

@ -157,8 +157,9 @@ check_chain_final_state (gpointer key, ChainState * state, gpointer data)
return TRUE; return TRUE;
} }
static gboolean static GstProbeReturn
eos_buffer_probe (GstPad * pad, GstBuffer * buffer, gpointer unused) eos_buffer_probe (GstPad * pad, GstProbeType type, GstBuffer * buffer,
gpointer unused)
{ {
gint ret; gint ret;
gint size; gint size;
@ -195,7 +196,7 @@ eos_buffer_probe (GstPad * pad, GstBuffer * buffer, gpointer unused)
} }
} }
return TRUE; return GST_PROBE_OK;
} }
static void static void
@ -208,7 +209,8 @@ start_pipeline (GstElement * bin, GstPad * pad)
eos_chain_states = eos_chain_states =
g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free); g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free);
probe_id = probe_id =
gst_pad_add_buffer_probe (pad, G_CALLBACK (eos_buffer_probe), NULL); gst_pad_add_probe (pad, GST_PROBE_TYPE_BUFFER,
(GstPadProbeCallback) eos_buffer_probe, NULL, NULL);
ret = gst_element_set_state (bin, GST_STATE_PLAYING); ret = gst_element_set_state (bin, GST_STATE_PLAYING);
fail_if (ret == GST_STATE_CHANGE_FAILURE, "Could not start test pipeline"); fail_if (ret == GST_STATE_CHANGE_FAILURE, "Could not start test pipeline");
@ -230,7 +232,7 @@ stop_pipeline (GstElement * bin, GstPad * pad)
fail_if (ret != GST_STATE_CHANGE_SUCCESS, "Could not stop test pipeline"); fail_if (ret != GST_STATE_CHANGE_SUCCESS, "Could not stop test pipeline");
} }
gst_pad_remove_buffer_probe (pad, (guint) probe_id); gst_pad_remove_probe (pad, probe_id);
ogg_sync_clear (&oggsync); ogg_sync_clear (&oggsync);
/* check end conditions, such as EOS flags */ /* check end conditions, such as EOS flags */