Exemplo n.º 1
0
static void
gst_segment_clip_reset (GstSegmentClip * self)
{
  GstSegmentClipClass *klass = GST_SEGMENT_CLIP_GET_CLASS (self);

  GST_DEBUG_OBJECT (self, "Resetting internal state");

  gst_segment_init (&self->segment, GST_FORMAT_UNDEFINED);
  if (klass->reset)
    klass->reset (self);
}
Exemplo n.º 2
0
static gboolean
gst_segment_clip_sink_setcaps (GstPad * pad, GstCaps * caps)
{
  GstSegmentClip *self = GST_SEGMENT_CLIP (gst_pad_get_parent (pad));
  GstSegmentClipClass *klass = GST_SEGMENT_CLIP_GET_CLASS (self);
  gboolean ret;

  GST_DEBUG_OBJECT (pad, "Setting caps: %" GST_PTR_FORMAT, caps);
  ret = klass->set_caps (self, caps);

  gst_object_unref (self);

  return ret;
}
Exemplo n.º 3
0
static gboolean
gst_segment_clip_sink_setcaps (GstSegmentClip * self, GstCaps * caps)
{
  GstSegmentClipClass *klass = GST_SEGMENT_CLIP_GET_CLASS (self);
  gboolean ret;

  GST_DEBUG_OBJECT (self, "Setting caps: %" GST_PTR_FORMAT, caps);
  ret = klass->set_caps (self, caps);

  /* pass along caps* */
  if (ret)
    ret = gst_pad_set_caps (self->srcpad, caps);

  return ret;
}
Exemplo n.º 4
0
static GstFlowReturn
gst_segment_clip_sink_chain (GstPad * pad, GstBuffer * buffer)
{
  GstSegmentClip *self = GST_SEGMENT_CLIP (GST_PAD_PARENT (pad));
  GstFlowReturn ret;
  GstSegmentClipClass *klass = GST_SEGMENT_CLIP_GET_CLASS (self);
  GstBuffer *outbuf = NULL;

  GST_LOG_OBJECT (pad,
      "Handling buffer with timestamp %" GST_TIME_FORMAT " and duration %"
      GST_TIME_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
      GST_TIME_ARGS (GST_BUFFER_DURATION (buffer)));

  ret = klass->clip_buffer (self, buffer, &outbuf);
  if (ret == GST_FLOW_OK && outbuf)
    ret = gst_pad_push (self->srcpad, outbuf);

  return ret;
}