예제 #1
0
static void
identity_handoff (GstElement * object, GstBuffer * buffer, gpointer user_data)
{
  GstAdapter *adapter = GST_ADAPTER (user_data);

  gst_adapter_push (adapter, gst_buffer_ref (buffer));
}
예제 #2
0
static void
gst_adapter_finalize (GObject * object)
{
    GstAdapter *adapter = GST_ADAPTER (object);

    g_free (adapter->assembled_data);

    GST_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
}
예제 #3
0
static void
gst_adapter_dispose (GObject * object)
{
    GstAdapter *adapter = GST_ADAPTER (object);

    gst_adapter_clear (adapter);

    GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
}
예제 #4
0
static void
fakesink_handoff (GstElement * object, GstBuffer * buffer, GstPad * pad,
    gpointer user_data)
{
  GstAdapter *adapter = GST_ADAPTER (user_data);

  /* Don't allow the second buffer with offset=0 as it's the decoded
   * rewrite of the first
   */
  if (had_first_buffer == FALSE && GST_BUFFER_OFFSET (buffer) == 0)
    had_first_buffer = TRUE;
  else if (GST_BUFFER_OFFSET (buffer) == 0)
    return;

  gst_adapter_push (adapter, gst_buffer_ref (buffer));
}