~ubuntu-branches/ubuntu/trusty/gstreamer1.0/trusty

« back to all changes in this revision

Viewing changes to libs/gst/base/gstbasesrc.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2012-09-14 09:04:41 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20120914090441-1ul912ezvm3xfael
Tags: 0.11.94-1
* New upstream release:
  + debian/libgstreamer.symbols:
    - Update symbols file.
  + debian/control.in:
    - Build-depend on gtk-doc >= 1.12.
  + debian/patches/0001-netclientclock-simplify-by-using-g_socket_condition_.patch:
    - Dropped, merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
860
860
 
861
861
  if (bclass->set_caps)
862
862
    res = bclass->set_caps (src, caps);
 
863
 
863
864
  if (res)
864
865
    res = gst_pad_set_caps (src->srcpad, caps);
865
866
 
2692
2693
 
2693
2694
  ret = gst_pad_push (pad, buf);
2694
2695
  if (G_UNLIKELY (ret != GST_FLOW_OK)) {
 
2696
    if (ret == GST_FLOW_NOT_NEGOTIATED) {
 
2697
      goto not_negotiated;
 
2698
    }
2695
2699
    GST_INFO_OBJECT (src, "pausing after gst_pad_push() = %s",
2696
2700
        gst_flow_get_name (ret));
2697
2701
    goto pause;
2709
2713
  /* special cases */
2710
2714
not_negotiated:
2711
2715
  {
 
2716
    if (gst_pad_needs_reconfigure (pad)) {
 
2717
      GST_DEBUG_OBJECT (src, "Retrying to renegotiate");
 
2718
      return;
 
2719
    }
2712
2720
    GST_DEBUG_OBJECT (src, "Failed to renegotiate");
2713
2721
    ret = GST_FLOW_NOT_NEGOTIATED;
2714
2722
    goto pause;
3619
3627
    return result;
3620
3628
  }
3621
3629
}
 
3630
 
 
3631
/**
 
3632
 * gst_base_src_get_buffer_pool:
 
3633
 * @src: a #GstBaseSrc
 
3634
 *
 
3635
 * Returns: (transfer full): the instance of the #GstBufferPool used
 
3636
 * by the src; free it after use it
 
3637
 */
 
3638
GstBufferPool *
 
3639
gst_base_src_get_buffer_pool (GstBaseSrc * src)
 
3640
{
 
3641
  g_return_val_if_fail (GST_IS_BASE_SRC (src), NULL);
 
3642
 
 
3643
  if (src->priv->pool)
 
3644
    return gst_object_ref (src->priv->pool);
 
3645
 
 
3646
  return NULL;
 
3647
}
 
3648
 
 
3649
/**
 
3650
 * gst_base_src_get_allocator:
 
3651
 * @src: a #GstBaseSrc
 
3652
 * @allocator: (out) (allow-none) (transfer full): the #GstAllocator
 
3653
 * used
 
3654
 * @params: (out) (allow-none) (transfer full): the
 
3655
 * #GstAllocatorParams of @allocator
 
3656
 *
 
3657
 * Lets #GstBaseSrc sub-classes to know the memory @allocator
 
3658
 * used by the base class and its @params.
 
3659
 *
 
3660
 * Unref the @allocator after use it.
 
3661
 */
 
3662
void
 
3663
gst_base_src_get_allocator (GstBaseSrc * src,
 
3664
    GstAllocator ** allocator, GstAllocationParams * params)
 
3665
{
 
3666
  g_return_if_fail (GST_IS_BASE_SRC (src));
 
3667
 
 
3668
  if (allocator)
 
3669
    *allocator = src->priv->allocator ?
 
3670
        gst_object_ref (src->priv->allocator) : NULL;
 
3671
 
 
3672
  if (params)
 
3673
    *params = src->priv->params;
 
3674
}